comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Already claimed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/structs/BitMaps.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./libraries/MerkleProof.sol";
contract Airdrop is Ownable {
using BitMaps for BitMaps.BitMap;
using SafeERC20 for IERC20;
address public token;
uint256 public claimPeriodEnds;
bytes32 public merkleRoot;
BitMaps.BitMap private claimed;
bool public isStart;
event Claim(address indexed claimant, address delegate, uint256 amount);
event SetParams(bytes32 merkleRoot, address token, uint256 claimPeriodEnds);
constructor(address _owner) Ownable() {
}
function claimTokens(
uint256 amount,
address delegate,
bytes32[] calldata merkleProof
) external {
require(isStart, "Not start");
require(block.timestamp < claimPeriodEnds, "Claim period is ended");
bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount));
(bool valid, uint256 index) = MerkleProof.verify(
merkleProof,
merkleRoot,
leaf
);
require(valid, "Valid proof");
require(<FILL_ME>)
claimed.set(index);
IERC20(token).safeTransfer(delegate, amount);
emit Claim(msg.sender, delegate, amount);
}
function sweep(address dest) external onlyOwner {
}
function isClaimed(
uint256 amount,
address _sender,
bytes32[] calldata merkleProof
) external view returns (bool _isClaimed) {
}
function isClaimedByIndex(uint256 index) public view returns (bool) {
}
function setParams(
bytes32 _merkleRoot,
address _token,
uint256 _claimPeriodEnds
) external onlyOwner {
}
function start() external onlyOwner {
}
}
| !isClaimedByIndex(index),"Already claimed" | 355,359 | !isClaimedByIndex(index) |
"Is start" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
pragma abicoder v2;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/structs/BitMaps.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./libraries/MerkleProof.sol";
contract Airdrop is Ownable {
using BitMaps for BitMaps.BitMap;
using SafeERC20 for IERC20;
address public token;
uint256 public claimPeriodEnds;
bytes32 public merkleRoot;
BitMaps.BitMap private claimed;
bool public isStart;
event Claim(address indexed claimant, address delegate, uint256 amount);
event SetParams(bytes32 merkleRoot, address token, uint256 claimPeriodEnds);
constructor(address _owner) Ownable() {
}
function claimTokens(
uint256 amount,
address delegate,
bytes32[] calldata merkleProof
) external {
}
function sweep(address dest) external onlyOwner {
}
function isClaimed(
uint256 amount,
address _sender,
bytes32[] calldata merkleProof
) external view returns (bool _isClaimed) {
}
function isClaimedByIndex(uint256 index) public view returns (bool) {
}
function setParams(
bytes32 _merkleRoot,
address _token,
uint256 _claimPeriodEnds
) external onlyOwner {
require(<FILL_ME>)
merkleRoot = _merkleRoot;
token = _token;
claimPeriodEnds = _claimPeriodEnds;
emit SetParams(_merkleRoot, _token, _claimPeriodEnds);
}
function start() external onlyOwner {
}
}
| !isStart,"Is start" | 355,359 | !isStart |
"SALE_IS_NOT_ACTIVE" | pragma solidity ^0.8.10;
/**
* @title Nas Academy x Curious Addys Zombie Edition Contract
* @author Mai Akiyoshi & Ben Yu (https://twitter.com/mai_on_chain & https://twitter.com/intenex)
* @notice This contract handles minting Nas Academy NFT tokens.
*/
contract NasAcademyXCuriousAddysZombieEdition is ERC721, Ownable {
using ECDSA for bytes32;
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter public tokenIds;
string public baseTokenURI;
uint256 public immutable maxSupply;
uint256 public immutable firstSaleSupply;
/**
* @notice Construct a Nas Academy NFT instance
* @param name Token name
* @param symbol Token symbol
* @param baseTokenURI_ Base URI for all tokens
*/
constructor(
string memory name,
string memory symbol,
string memory baseTokenURI_,
uint256 maxSupply_,
uint256 firstSaleSupply_
) ERC721(name, symbol) {
}
// Used to validate authorized mint addresses
address private signerAddress = 0x0cCF0888754C15f2624952AbE6b491239148F2F1;
mapping (address => bool) public alreadyMinted;
bool public isFirstSaleActive = false;
bool public isSecondSaleActive = false;
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* To be updated by contract owner to allow for the first tranche of members to mint
*/
function setFirstSaleState(bool _firstSaleActiveState) public onlyOwner {
}
/**
* To be updated once maxSupply equals totalSupply. This will deactivate minting.
* Can also be activated by contract owner to begin public sale
*/
function setSecondSaleState(bool _secondSaleActiveState) public onlyOwner {
}
function setSignerAddress(address _signerAddress) external onlyOwner {
}
/**
* Update the base token URI
*/
function setBaseURI(string calldata _newBaseURI) external onlyOwner {
}
function verifyAddressSigner(bytes32 messageHash, bytes memory signature) private view returns (bool) {
}
function hashMessage(address sender) private pure returns (bytes32) {
}
/**
* @notice Allow for token minting for an approved minter with a valid message signature.
* The address of the sender is hashed and signed with the server's private key and verified.
*/
function mint(
bytes32 messageHash,
bytes calldata signature
) external virtual {
require(<FILL_ME>)
require(!alreadyMinted[msg.sender], "ALREADY_MINTED");
require(hashMessage(msg.sender) == messageHash, "MESSAGE_INVALID");
require(verifyAddressSigner(messageHash, signature), "SIGNATURE_VALIDATION_FAILED");
uint256 currentId = tokenIds.current();
if (isFirstSaleActive) {
require(currentId <= firstSaleSupply, "NOT_ENOUGH_MINTS_AVAILABLE");
} else {
require(currentId <= maxSupply, "NOT_ENOUGH_MINTS_AVAILABLE");
}
alreadyMinted[msg.sender] = true;
_safeMint(msg.sender, currentId);
tokenIds.increment();
if (isFirstSaleActive && (currentId == firstSaleSupply)) {
isFirstSaleActive = false;
} else if (isSecondSaleActive && (currentId == maxSupply)) {
isSecondSaleActive = false;
}
}
/**
* @notice Allow owner to send `mintNumber` tokens without cost to multiple addresses
*/
function gift(address[] calldata receivers, uint256 mintNumber) external onlyOwner {
}
}
| isFirstSaleActive||isSecondSaleActive,"SALE_IS_NOT_ACTIVE" | 355,456 | isFirstSaleActive||isSecondSaleActive |
"MINT_TOO_LARGE" | pragma solidity ^0.8.10;
/**
* @title Nas Academy x Curious Addys Zombie Edition Contract
* @author Mai Akiyoshi & Ben Yu (https://twitter.com/mai_on_chain & https://twitter.com/intenex)
* @notice This contract handles minting Nas Academy NFT tokens.
*/
contract NasAcademyXCuriousAddysZombieEdition is ERC721, Ownable {
using ECDSA for bytes32;
using Strings for uint256;
using Counters for Counters.Counter;
Counters.Counter public tokenIds;
string public baseTokenURI;
uint256 public immutable maxSupply;
uint256 public immutable firstSaleSupply;
/**
* @notice Construct a Nas Academy NFT instance
* @param name Token name
* @param symbol Token symbol
* @param baseTokenURI_ Base URI for all tokens
*/
constructor(
string memory name,
string memory symbol,
string memory baseTokenURI_,
uint256 maxSupply_,
uint256 firstSaleSupply_
) ERC721(name, symbol) {
}
// Used to validate authorized mint addresses
address private signerAddress = 0x0cCF0888754C15f2624952AbE6b491239148F2F1;
mapping (address => bool) public alreadyMinted;
bool public isFirstSaleActive = false;
bool public isSecondSaleActive = false;
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* To be updated by contract owner to allow for the first tranche of members to mint
*/
function setFirstSaleState(bool _firstSaleActiveState) public onlyOwner {
}
/**
* To be updated once maxSupply equals totalSupply. This will deactivate minting.
* Can also be activated by contract owner to begin public sale
*/
function setSecondSaleState(bool _secondSaleActiveState) public onlyOwner {
}
function setSignerAddress(address _signerAddress) external onlyOwner {
}
/**
* Update the base token URI
*/
function setBaseURI(string calldata _newBaseURI) external onlyOwner {
}
function verifyAddressSigner(bytes32 messageHash, bytes memory signature) private view returns (bool) {
}
function hashMessage(address sender) private pure returns (bytes32) {
}
/**
* @notice Allow for token minting for an approved minter with a valid message signature.
* The address of the sender is hashed and signed with the server's private key and verified.
*/
function mint(
bytes32 messageHash,
bytes calldata signature
) external virtual {
}
/**
* @notice Allow owner to send `mintNumber` tokens without cost to multiple addresses
*/
function gift(address[] calldata receivers, uint256 mintNumber) external onlyOwner {
require(<FILL_ME>)
for (uint256 i = 0; i < receivers.length; i++) {
for (uint256 j = 0; j < mintNumber; j++) {
_safeMint(receivers[i], tokenIds.current());
tokenIds.increment();
}
}
}
}
| (tokenIds.current()-1+(receivers.length*mintNumber))<=maxSupply,"MINT_TOO_LARGE" | 355,456 | (tokenIds.current()-1+(receivers.length*mintNumber))<=maxSupply |
"OxyFarmsNFT::mint: Sold out." | pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title OxyFarmsNFT
* @dev The NFTrees token contract for the first OxyFarm of Oxychain
* Taken from https://github.com/oxychain-earth/oxyfarms-contracts/blob/master/contracts/OxyFarmsNFT.sol
*
* @author The Storm Network & Dandelion Labs team
*/
contract OxyFarmsNFT is ERC721Enumerable, Ownable {
using SafeMath for uint;
string baseURI; // BASE URI FOR TOKEN METADATA URL CREATION
string public contractURI; // CONTRACT URI FOR PUBLIC MARKETPLACES
uint public constant MAX_NFTREES = 4444; // MAX NFTREES EVER MINTED
uint public constant MAX_SALE = 50; // MAX NFTREES TO BE SOLD DURING PUBLIC SALE
address saleAddress; // ADDRESS THAT WILL RECEIVE THE PROCEEDS OF THE SALE
uint public maxPreSale; // MAX AMOUNT OF NFTREES MINTED DURING PRESALE
uint public price; // PRICE PER NFT DURING SALE
mapping(address => uint256) private whitelistedAllowance; // ALLOWANCE INDEX
bool public hasPreSaleStarted = false; // INDICATES IF PRE SALE IS STARTED
bool public preSaleOver = false; // INDICATES IF PRE SALE IS OVER
bool public hasSaleStarted = false; // INDICATES IF SALE HAS STARTED
event NFTreeMinted(uint indexed tokenId, address indexed owner); //THROWN EVERY TIME AN NFTREE IS MINTED
/**
* @dev constructor instantiates ERC721 with URI params for the sale and sets up
* the basic params of the sale, price per nft and max pre sale values.
*
* @param baseURI_ receives a string as the base for the token URI creation
* @param contractURI_ receives a string as the contract URI for public marketplaces
*/
constructor(string memory baseURI_, string memory contractURI_) ERC721("OxyFarms NFTrees", "OXF") {
}
/**
* @dev mintTo is an internal function with the business logic for minting.
*
* @param _to address which we are going to mint the NFTree to.
*/
function mintTo(address _to) internal {
}
/**
* @dev mint is an external function that allows the minting process to happen during public sale.
*
* @param _quantity number of NFTrees we want to mint.
*/
function mint(uint _quantity) external payable {
require(hasSaleStarted, "OxyFarmsNFT::mint: Sale hasn't started.");
require(_quantity > 0, "OxyFarmsNFT::mint: Quantity cannot be zero.");
require(_quantity <= MAX_SALE, "OxyFarmsNFT::mint: Quantity cannot be bigger than MAX_BUYING.");
require(<FILL_ME>)
require(msg.value >= price.mul(_quantity) || msg.sender == owner(), "OxyFarmsNFT::mint: Ether value sent is below the price.");
for (uint i = 0; i < _quantity; i++) {
mintTo(msg.sender);
}
}
/**
* @dev preMint is an external function that allows the minting process to happen during pre sale.
*
* @param _quantity number of NFTrees we want to mint.
*/
function preMint(uint _quantity) external payable {
}
/**
* @dev mintByOwner is a function to allow the preminting for team, partners, and community reserve.
* Only the contract owner can access this function.
*
* @param _to address we are going to mint the NFTrees to.
* @param _quantity number of NFTrees we want to mint.
*/
function mintByOwner(address _to, uint256 _quantity) public onlyOwner {
}
/**
* @dev batchMintByOwner is a function to allow the preminting for team, partners, and community reserve in batch.
* Only the contract owner can access this function.
*
* @param _mintAddressList list of addresses we are going to mint the NFTrees to.
* @param _quantityList list with the number of NFTrees we want to mint to each address.
*/
function batchMintByOwner(address[] memory _mintAddressList, uint256[] memory _quantityList) external onlyOwner {
}
function tokensOfOwner(address _owner) public view returns(uint[] memory ) {
}
function setBaseURI(string memory _URI) external onlyOwner {
}
function setContractURI(string memory _URI) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setPrice(uint _price) external onlyOwner {
}
function setMaxPreSale(uint _quantity) external onlyOwner {
}
function startSale() external onlyOwner {
}
function pauseSale() external onlyOwner {
}
function startPreSale() external onlyOwner {
}
function pausePreSale() external onlyOwner {
}
function setSaleAddress(address _saleAddress) external onlyOwner {
}
/**
* @dev checkWhitelisting() allows us to check how many tokens the address
* is still able to mint during the presale.
*
* @param _addressToCheck address to be checked.
*
* @return allowed quantity
*/
function checkWhitelisting(address _addressToCheck) public view returns (uint) {
}
/**
* @dev addAddressessToWhitelist() allows to add new addresses to the presale whitelist.
*
* @param addressesToWhitelist receives a list of addresses to whitelist.
*/
function addAddressessToWhitelist(address[] memory addressesToWhitelist) external onlyOwner {
}
/**
* @dev withdrawAll() allows to withdraw all the funds of the contract during
* or after the sale is ended, to the sale address (by default contract creator).
*/
function withdrawAll() external onlyOwner {
}
}
| totalSupply().add(_quantity)<=MAX_NFTREES,"OxyFarmsNFT::mint: Sold out." | 355,563 | totalSupply().add(_quantity)<=MAX_NFTREES |
"OxyFarmsNFT::preMint: The user is not allowed to do further presale buyings." | pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title OxyFarmsNFT
* @dev The NFTrees token contract for the first OxyFarm of Oxychain
* Taken from https://github.com/oxychain-earth/oxyfarms-contracts/blob/master/contracts/OxyFarmsNFT.sol
*
* @author The Storm Network & Dandelion Labs team
*/
contract OxyFarmsNFT is ERC721Enumerable, Ownable {
using SafeMath for uint;
string baseURI; // BASE URI FOR TOKEN METADATA URL CREATION
string public contractURI; // CONTRACT URI FOR PUBLIC MARKETPLACES
uint public constant MAX_NFTREES = 4444; // MAX NFTREES EVER MINTED
uint public constant MAX_SALE = 50; // MAX NFTREES TO BE SOLD DURING PUBLIC SALE
address saleAddress; // ADDRESS THAT WILL RECEIVE THE PROCEEDS OF THE SALE
uint public maxPreSale; // MAX AMOUNT OF NFTREES MINTED DURING PRESALE
uint public price; // PRICE PER NFT DURING SALE
mapping(address => uint256) private whitelistedAllowance; // ALLOWANCE INDEX
bool public hasPreSaleStarted = false; // INDICATES IF PRE SALE IS STARTED
bool public preSaleOver = false; // INDICATES IF PRE SALE IS OVER
bool public hasSaleStarted = false; // INDICATES IF SALE HAS STARTED
event NFTreeMinted(uint indexed tokenId, address indexed owner); //THROWN EVERY TIME AN NFTREE IS MINTED
/**
* @dev constructor instantiates ERC721 with URI params for the sale and sets up
* the basic params of the sale, price per nft and max pre sale values.
*
* @param baseURI_ receives a string as the base for the token URI creation
* @param contractURI_ receives a string as the contract URI for public marketplaces
*/
constructor(string memory baseURI_, string memory contractURI_) ERC721("OxyFarms NFTrees", "OXF") {
}
/**
* @dev mintTo is an internal function with the business logic for minting.
*
* @param _to address which we are going to mint the NFTree to.
*/
function mintTo(address _to) internal {
}
/**
* @dev mint is an external function that allows the minting process to happen during public sale.
*
* @param _quantity number of NFTrees we want to mint.
*/
function mint(uint _quantity) external payable {
}
/**
* @dev preMint is an external function that allows the minting process to happen during pre sale.
*
* @param _quantity number of NFTrees we want to mint.
*/
function preMint(uint _quantity) external payable {
require(hasPreSaleStarted, "OxyFarmsNFT::preMint: Presale hasn't started.");
require(!preSaleOver, "OxyFarmsNFT::preMint: Presale is over, no more allowances.");
require(_quantity > 0, "OxyFarmsNFT::preMint: Quantity cannot be zero.");
require(_quantity <= maxPreSale, "OxyFarmsNFT::preMint: Quantity cannot be bigger than maxPreSale.");
require(<FILL_ME>)
require(whitelistedAllowance[msg.sender] >= _quantity, "OxyFarmsNFT::preMint: This address is not allowed to buy that quantity.");
require(totalSupply().add(_quantity) <= MAX_NFTREES, "OxyFarmsNFT::preMint: Sold out");
require(msg.value >= price.mul(_quantity) || msg.sender == owner(), "OxyFarmsNFT::preMint: Ether value sent is below the price.");
whitelistedAllowance[msg.sender] = whitelistedAllowance[msg.sender].sub(_quantity);
for (uint i = 0; i < _quantity; i++) {
mintTo(msg.sender);
}
}
/**
* @dev mintByOwner is a function to allow the preminting for team, partners, and community reserve.
* Only the contract owner can access this function.
*
* @param _to address we are going to mint the NFTrees to.
* @param _quantity number of NFTrees we want to mint.
*/
function mintByOwner(address _to, uint256 _quantity) public onlyOwner {
}
/**
* @dev batchMintByOwner is a function to allow the preminting for team, partners, and community reserve in batch.
* Only the contract owner can access this function.
*
* @param _mintAddressList list of addresses we are going to mint the NFTrees to.
* @param _quantityList list with the number of NFTrees we want to mint to each address.
*/
function batchMintByOwner(address[] memory _mintAddressList, uint256[] memory _quantityList) external onlyOwner {
}
function tokensOfOwner(address _owner) public view returns(uint[] memory ) {
}
function setBaseURI(string memory _URI) external onlyOwner {
}
function setContractURI(string memory _URI) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setPrice(uint _price) external onlyOwner {
}
function setMaxPreSale(uint _quantity) external onlyOwner {
}
function startSale() external onlyOwner {
}
function pauseSale() external onlyOwner {
}
function startPreSale() external onlyOwner {
}
function pausePreSale() external onlyOwner {
}
function setSaleAddress(address _saleAddress) external onlyOwner {
}
/**
* @dev checkWhitelisting() allows us to check how many tokens the address
* is still able to mint during the presale.
*
* @param _addressToCheck address to be checked.
*
* @return allowed quantity
*/
function checkWhitelisting(address _addressToCheck) public view returns (uint) {
}
/**
* @dev addAddressessToWhitelist() allows to add new addresses to the presale whitelist.
*
* @param addressesToWhitelist receives a list of addresses to whitelist.
*/
function addAddressessToWhitelist(address[] memory addressesToWhitelist) external onlyOwner {
}
/**
* @dev withdrawAll() allows to withdraw all the funds of the contract during
* or after the sale is ended, to the sale address (by default contract creator).
*/
function withdrawAll() external onlyOwner {
}
}
| whitelistedAllowance[msg.sender].sub(_quantity)>=0,"OxyFarmsNFT::preMint: The user is not allowed to do further presale buyings." | 355,563 | whitelistedAllowance[msg.sender].sub(_quantity)>=0 |
"OxyFarmsNFT::preMint: This address is not allowed to buy that quantity." | pragma solidity ^0.8.0;
// SPDX-License-Identifier: MIT
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/**
* @title OxyFarmsNFT
* @dev The NFTrees token contract for the first OxyFarm of Oxychain
* Taken from https://github.com/oxychain-earth/oxyfarms-contracts/blob/master/contracts/OxyFarmsNFT.sol
*
* @author The Storm Network & Dandelion Labs team
*/
contract OxyFarmsNFT is ERC721Enumerable, Ownable {
using SafeMath for uint;
string baseURI; // BASE URI FOR TOKEN METADATA URL CREATION
string public contractURI; // CONTRACT URI FOR PUBLIC MARKETPLACES
uint public constant MAX_NFTREES = 4444; // MAX NFTREES EVER MINTED
uint public constant MAX_SALE = 50; // MAX NFTREES TO BE SOLD DURING PUBLIC SALE
address saleAddress; // ADDRESS THAT WILL RECEIVE THE PROCEEDS OF THE SALE
uint public maxPreSale; // MAX AMOUNT OF NFTREES MINTED DURING PRESALE
uint public price; // PRICE PER NFT DURING SALE
mapping(address => uint256) private whitelistedAllowance; // ALLOWANCE INDEX
bool public hasPreSaleStarted = false; // INDICATES IF PRE SALE IS STARTED
bool public preSaleOver = false; // INDICATES IF PRE SALE IS OVER
bool public hasSaleStarted = false; // INDICATES IF SALE HAS STARTED
event NFTreeMinted(uint indexed tokenId, address indexed owner); //THROWN EVERY TIME AN NFTREE IS MINTED
/**
* @dev constructor instantiates ERC721 with URI params for the sale and sets up
* the basic params of the sale, price per nft and max pre sale values.
*
* @param baseURI_ receives a string as the base for the token URI creation
* @param contractURI_ receives a string as the contract URI for public marketplaces
*/
constructor(string memory baseURI_, string memory contractURI_) ERC721("OxyFarms NFTrees", "OXF") {
}
/**
* @dev mintTo is an internal function with the business logic for minting.
*
* @param _to address which we are going to mint the NFTree to.
*/
function mintTo(address _to) internal {
}
/**
* @dev mint is an external function that allows the minting process to happen during public sale.
*
* @param _quantity number of NFTrees we want to mint.
*/
function mint(uint _quantity) external payable {
}
/**
* @dev preMint is an external function that allows the minting process to happen during pre sale.
*
* @param _quantity number of NFTrees we want to mint.
*/
function preMint(uint _quantity) external payable {
require(hasPreSaleStarted, "OxyFarmsNFT::preMint: Presale hasn't started.");
require(!preSaleOver, "OxyFarmsNFT::preMint: Presale is over, no more allowances.");
require(_quantity > 0, "OxyFarmsNFT::preMint: Quantity cannot be zero.");
require(_quantity <= maxPreSale, "OxyFarmsNFT::preMint: Quantity cannot be bigger than maxPreSale.");
require(whitelistedAllowance[msg.sender].sub(_quantity) >= 0, "OxyFarmsNFT::preMint: The user is not allowed to do further presale buyings.");
require(<FILL_ME>)
require(totalSupply().add(_quantity) <= MAX_NFTREES, "OxyFarmsNFT::preMint: Sold out");
require(msg.value >= price.mul(_quantity) || msg.sender == owner(), "OxyFarmsNFT::preMint: Ether value sent is below the price.");
whitelistedAllowance[msg.sender] = whitelistedAllowance[msg.sender].sub(_quantity);
for (uint i = 0; i < _quantity; i++) {
mintTo(msg.sender);
}
}
/**
* @dev mintByOwner is a function to allow the preminting for team, partners, and community reserve.
* Only the contract owner can access this function.
*
* @param _to address we are going to mint the NFTrees to.
* @param _quantity number of NFTrees we want to mint.
*/
function mintByOwner(address _to, uint256 _quantity) public onlyOwner {
}
/**
* @dev batchMintByOwner is a function to allow the preminting for team, partners, and community reserve in batch.
* Only the contract owner can access this function.
*
* @param _mintAddressList list of addresses we are going to mint the NFTrees to.
* @param _quantityList list with the number of NFTrees we want to mint to each address.
*/
function batchMintByOwner(address[] memory _mintAddressList, uint256[] memory _quantityList) external onlyOwner {
}
function tokensOfOwner(address _owner) public view returns(uint[] memory ) {
}
function setBaseURI(string memory _URI) external onlyOwner {
}
function setContractURI(string memory _URI) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function setPrice(uint _price) external onlyOwner {
}
function setMaxPreSale(uint _quantity) external onlyOwner {
}
function startSale() external onlyOwner {
}
function pauseSale() external onlyOwner {
}
function startPreSale() external onlyOwner {
}
function pausePreSale() external onlyOwner {
}
function setSaleAddress(address _saleAddress) external onlyOwner {
}
/**
* @dev checkWhitelisting() allows us to check how many tokens the address
* is still able to mint during the presale.
*
* @param _addressToCheck address to be checked.
*
* @return allowed quantity
*/
function checkWhitelisting(address _addressToCheck) public view returns (uint) {
}
/**
* @dev addAddressessToWhitelist() allows to add new addresses to the presale whitelist.
*
* @param addressesToWhitelist receives a list of addresses to whitelist.
*/
function addAddressessToWhitelist(address[] memory addressesToWhitelist) external onlyOwner {
}
/**
* @dev withdrawAll() allows to withdraw all the funds of the contract during
* or after the sale is ended, to the sale address (by default contract creator).
*/
function withdrawAll() external onlyOwner {
}
}
| whitelistedAllowance[msg.sender]>=_quantity,"OxyFarmsNFT::preMint: This address is not allowed to buy that quantity." | 355,563 | whitelistedAllowance[msg.sender]>=_quantity |
"vote not exist" | pragma solidity >=0.4.21 <0.6.0;
contract MultiSigInterface{
function update_and_check_reach_majority(uint64 id, string memory name, bytes32 hash, address sender) public returns (bool);
function is_signer(address addr) public view returns(bool);
}
contract MultiSigTools{
MultiSigInterface public multisig_contract;
constructor(address _contract) public{
}
modifier only_signer{
}
modifier is_majority_sig(uint64 id, string memory name) {
}
event TransferMultiSig(address _old, address _new);
function transfer_multisig(uint64 id, address _contract) public only_signer
is_majority_sig(id, "transfer_multisig"){
}
}
contract TransferableToken{
function balanceOf(address _owner) public returns (uint256 balance) ;
function transfer(address _to, uint256 _amount) public returns (bool success) ;
function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success) ;
}
contract TokenClaimer{
event ClaimedTokens(address indexed _token, address indexed _to, uint _amount);
/// @notice This method can be used by the controller to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
/// set to 0 in case you want to extract ether.
function _claimStdTokens(address _token, address payable to) internal {
}
}
library SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
}
function safeSub(uint a, uint b) public pure returns (uint c) {
}
function safeMul(uint a, uint b) public pure returns (uint c) {
}
function safeDiv(uint a, uint b) public pure returns (uint c) {
}
}
contract SimpleMultiSigVote is MultiSigTools, TokenClaimer{
struct InternalData{
bool exist;
bool determined;
uint start_height;
uint end_height;
address owner;
string announcement;
string value;
}
mapping (bytes32 => InternalData) public vote_status;
uint public determined_vote_number;
uint public created_vote_number;
constructor(address _multisig) MultiSigTools(_multisig) public{
}
event VoteCreate(bytes32 _hash, uint _start_height, uint _end_height);
event VoteChange(bytes32 _hash, uint _start_height, uint _end_height, string announcement);
event VotePass(bytes32 _hash, string _value);
modifier vote_exist(bytes32 _hash){
require(<FILL_ME>)
_;
}
function createVote(bytes32 _hash, uint _start_height, uint _end_height)
public
returns (bool){
}
function changeVoteInfo(bytes32 _hash, uint _start_height, uint _end_height, string memory announcement) public
vote_exist(_hash)
returns (bool){
}
function vote(uint64 id, bytes32 _hash, string memory _value) public
vote_exist(_hash)
only_signer
is_majority_sig(id, "vote")
returns (bool){
}
function isVoteDetermined(bytes32 _hash) public view returns (bool){
}
function checkVoteValue(bytes32 _hash) public view returns(string memory value){
}
function voteInfo(bytes32 _hash) public
vote_exist(_hash)
view returns(bool determined, uint start_height, uint end_height, address owner, string memory announcement, string memory value){
}
function claimStdTokens(uint64 id, address _token, address payable to) public only_signer is_majority_sig(id, "claimStdTokens"){
}
}
contract SimpleMultiSigVoteFactory {
event NewSimpleMultiSigVote(address addr);
function createSimpleMultiSigVote(address _multisig) public returns(address){
}
}
| vote_status[_hash].exist,"vote not exist" | 355,583 | vote_status[_hash].exist |
"already exist" | pragma solidity >=0.4.21 <0.6.0;
contract MultiSigInterface{
function update_and_check_reach_majority(uint64 id, string memory name, bytes32 hash, address sender) public returns (bool);
function is_signer(address addr) public view returns(bool);
}
contract MultiSigTools{
MultiSigInterface public multisig_contract;
constructor(address _contract) public{
}
modifier only_signer{
}
modifier is_majority_sig(uint64 id, string memory name) {
}
event TransferMultiSig(address _old, address _new);
function transfer_multisig(uint64 id, address _contract) public only_signer
is_majority_sig(id, "transfer_multisig"){
}
}
contract TransferableToken{
function balanceOf(address _owner) public returns (uint256 balance) ;
function transfer(address _to, uint256 _amount) public returns (bool success) ;
function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success) ;
}
contract TokenClaimer{
event ClaimedTokens(address indexed _token, address indexed _to, uint _amount);
/// @notice This method can be used by the controller to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
/// set to 0 in case you want to extract ether.
function _claimStdTokens(address _token, address payable to) internal {
}
}
library SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
}
function safeSub(uint a, uint b) public pure returns (uint c) {
}
function safeMul(uint a, uint b) public pure returns (uint c) {
}
function safeDiv(uint a, uint b) public pure returns (uint c) {
}
}
contract SimpleMultiSigVote is MultiSigTools, TokenClaimer{
struct InternalData{
bool exist;
bool determined;
uint start_height;
uint end_height;
address owner;
string announcement;
string value;
}
mapping (bytes32 => InternalData) public vote_status;
uint public determined_vote_number;
uint public created_vote_number;
constructor(address _multisig) MultiSigTools(_multisig) public{
}
event VoteCreate(bytes32 _hash, uint _start_height, uint _end_height);
event VoteChange(bytes32 _hash, uint _start_height, uint _end_height, string announcement);
event VotePass(bytes32 _hash, string _value);
modifier vote_exist(bytes32 _hash){
}
function createVote(bytes32 _hash, uint _start_height, uint _end_height)
public
returns (bool){
require(<FILL_ME>)
require(_end_height > block.number, "end height too small");
require(_end_height > _start_height, "end height should be greater than start height");
if(_start_height == 0){
_start_height = block.number;
}
InternalData storage d = vote_status[_hash];
d.exist = true;
d.determined = false;
d.start_height = _start_height;
d.end_height = _end_height;
d.owner = msg.sender;
created_vote_number += 1;
emit VoteCreate(_hash, _start_height, _end_height);
return true;
}
function changeVoteInfo(bytes32 _hash, uint _start_height, uint _end_height, string memory announcement) public
vote_exist(_hash)
returns (bool){
}
function vote(uint64 id, bytes32 _hash, string memory _value) public
vote_exist(_hash)
only_signer
is_majority_sig(id, "vote")
returns (bool){
}
function isVoteDetermined(bytes32 _hash) public view returns (bool){
}
function checkVoteValue(bytes32 _hash) public view returns(string memory value){
}
function voteInfo(bytes32 _hash) public
vote_exist(_hash)
view returns(bool determined, uint start_height, uint end_height, address owner, string memory announcement, string memory value){
}
function claimStdTokens(uint64 id, address _token, address payable to) public only_signer is_majority_sig(id, "claimStdTokens"){
}
}
contract SimpleMultiSigVoteFactory {
event NewSimpleMultiSigVote(address addr);
function createSimpleMultiSigVote(address _multisig) public returns(address){
}
}
| !vote_status[_hash].exist,"already exist" | 355,583 | !vote_status[_hash].exist |
"not determined" | pragma solidity >=0.4.21 <0.6.0;
contract MultiSigInterface{
function update_and_check_reach_majority(uint64 id, string memory name, bytes32 hash, address sender) public returns (bool);
function is_signer(address addr) public view returns(bool);
}
contract MultiSigTools{
MultiSigInterface public multisig_contract;
constructor(address _contract) public{
}
modifier only_signer{
}
modifier is_majority_sig(uint64 id, string memory name) {
}
event TransferMultiSig(address _old, address _new);
function transfer_multisig(uint64 id, address _contract) public only_signer
is_majority_sig(id, "transfer_multisig"){
}
}
contract TransferableToken{
function balanceOf(address _owner) public returns (uint256 balance) ;
function transfer(address _to, uint256 _amount) public returns (bool success) ;
function transferFrom(address _from, address _to, uint256 _amount) public returns (bool success) ;
}
contract TokenClaimer{
event ClaimedTokens(address indexed _token, address indexed _to, uint _amount);
/// @notice This method can be used by the controller to extract mistakenly
/// sent tokens to this contract.
/// @param _token The address of the token contract that you want to recover
/// set to 0 in case you want to extract ether.
function _claimStdTokens(address _token, address payable to) internal {
}
}
library SafeMath {
function safeAdd(uint a, uint b) public pure returns (uint c) {
}
function safeSub(uint a, uint b) public pure returns (uint c) {
}
function safeMul(uint a, uint b) public pure returns (uint c) {
}
function safeDiv(uint a, uint b) public pure returns (uint c) {
}
}
contract SimpleMultiSigVote is MultiSigTools, TokenClaimer{
struct InternalData{
bool exist;
bool determined;
uint start_height;
uint end_height;
address owner;
string announcement;
string value;
}
mapping (bytes32 => InternalData) public vote_status;
uint public determined_vote_number;
uint public created_vote_number;
constructor(address _multisig) MultiSigTools(_multisig) public{
}
event VoteCreate(bytes32 _hash, uint _start_height, uint _end_height);
event VoteChange(bytes32 _hash, uint _start_height, uint _end_height, string announcement);
event VotePass(bytes32 _hash, string _value);
modifier vote_exist(bytes32 _hash){
}
function createVote(bytes32 _hash, uint _start_height, uint _end_height)
public
returns (bool){
}
function changeVoteInfo(bytes32 _hash, uint _start_height, uint _end_height, string memory announcement) public
vote_exist(_hash)
returns (bool){
}
function vote(uint64 id, bytes32 _hash, string memory _value) public
vote_exist(_hash)
only_signer
is_majority_sig(id, "vote")
returns (bool){
}
function isVoteDetermined(bytes32 _hash) public view returns (bool){
}
function checkVoteValue(bytes32 _hash) public view returns(string memory value){
require(vote_status[_hash].exist, "not exist");
require(<FILL_ME>)
value = vote_status[_hash].value;
}
function voteInfo(bytes32 _hash) public
vote_exist(_hash)
view returns(bool determined, uint start_height, uint end_height, address owner, string memory announcement, string memory value){
}
function claimStdTokens(uint64 id, address _token, address payable to) public only_signer is_majority_sig(id, "claimStdTokens"){
}
}
contract SimpleMultiSigVoteFactory {
event NewSimpleMultiSigVote(address addr);
function createSimpleMultiSigVote(address _multisig) public returns(address){
}
}
| vote_status[_hash].determined,"not determined" | 355,583 | vote_status[_hash].determined |
null | pragma solidity ^0.4.25;
/**
*
* World War Goo - Competitive Idle Game
*
* https://ethergoo.io
*
*/
contract Army {
GooToken constant goo = GooToken(0xdf0960778c6e6597f197ed9a25f12f5d971da86c);
Clans clans = Clans(0x0);
uint224 public totalArmyPower; // Global power of players (attack + defence)
uint224 public gooBankroll; // Goo dividends to be split over time between clans/players' army power
uint256 public nextSnapshotTime;
address public owner; // Minor management of game
mapping(address => mapping(uint256 => ArmyPower)) public armyPowerSnapshots; // Store player's army power for given day (snapshot)
mapping(address => mapping(uint256 => bool)) public armyPowerZeroedSnapshots; // Edgecase to determine difference between 0 army and an unused/inactive day.
mapping(address => uint256) public lastWarFundClaim; // Days (snapshot number)
mapping(address => uint256) public lastArmyPowerUpdate; // Days (last snapshot) player's army was updated
mapping(address => bool) operator;
uint224[] public totalArmyPowerSnapshots; // The total player army power for each prior day past
uint224[] public allocatedWarFundSnapshots; // Div pot (goo allocated to each prior day past)
uint224 public playerDivPercent = 2;
uint224 public clanDivPercent = 2;
struct ArmyPower {
uint80 attack;
uint80 defense;
uint80 looting;
}
constructor(uint256 firstSnapshotTime) public {
}
function setClans(address clansContract) external {
}
function setOperator(address gameContract, bool isOperator) external {
}
function updateDailyDivPercents(uint224 newPlayersPercent, uint224 newClansPercent) external {
}
function depositSpentGoo(uint224 gooSpent) external {
require(<FILL_ME>)
gooBankroll += gooSpent;
}
function getArmyPower(address player) external view returns (uint80, uint80, uint80) {
}
// Convenience function
function getArmiesPower(address player, address target) external view returns (uint80 playersAttack, uint80 playersLooting, uint80 targetsDefense) {
}
function increasePlayersArmyPowerTrio(address player, uint80 attackGain, uint80 defenseGain, uint80 lootingGain) public {
}
function decreasePlayersArmyPowerTrio(address player, uint80 attackLoss, uint80 defenseLoss, uint80 lootingLoss) public {
}
function changePlayersArmyPowerTrio(address player, int attackChange, int defenseChange, int lootingChange) public {
}
function changeTotalArmyPower(address player, int attackChange, int defenseChange) internal {
}
// Allocate army power divs for the day (00:00 cron job)
function snapshotDailyWarFunding() external {
}
function claimWarFundDividends(uint256 startSnapshot, uint256 endSnapShot) external {
}
function getSnapshotDay() external view returns (uint256 snapshot) {
}
}
contract GooToken {
function transfer(address to, uint256 tokens) external returns (bool);
function increasePlayersGooProduction(address player, uint256 increase) external;
function decreasePlayersGooProduction(address player, uint256 decrease) external;
function updatePlayersGooFromPurchase(address player, uint224 purchaseCost) external;
function updatePlayersGoo(address player) external;
function mintGoo(uint224 amount, address player) external;
}
contract Clans {
mapping(uint256 => uint256) public clanTotalArmyPower;
function totalSupply() external view returns (uint256);
function depositGoo(uint256 amount, uint256 clanId) external;
function getPlayerFees(address player) external view returns (uint224 clansFee, uint224 leadersFee, address leader, uint224 referalsFee, address referer);
function getPlayersClanUpgrade(address player, uint256 upgradeClass) external view returns (uint224 upgradeGain);
function mintGoo(address player, uint256 amount) external;
function increaseClanPower(address player, uint256 amount) external;
function decreaseClanPower(address player, uint256 amount) external;
}
contract Factories {
uint256 public constant MAX_SIZE = 40;
function getFactories(address player) external returns (uint256[]);
function addFactory(address player, uint8 position, uint256 unitId) external;
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint224 a, uint224 b) internal pure returns (uint224) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
library SafeMath224 {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint224 a, uint224 b) internal pure returns (uint224) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint224 a, uint224 b) internal pure returns (uint224) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint224 a, uint224 b) internal pure returns (uint224) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint224 a, uint224 b) internal pure returns (uint224) {
}
}
| operator[msg.sender] | 355,597 | operator[msg.sender] |
null | pragma solidity ^0.4.25;
/**
*
* World War Goo - Competitive Idle Game
*
* https://ethergoo.io
*
*/
contract Army {
GooToken constant goo = GooToken(0xdf0960778c6e6597f197ed9a25f12f5d971da86c);
Clans clans = Clans(0x0);
uint224 public totalArmyPower; // Global power of players (attack + defence)
uint224 public gooBankroll; // Goo dividends to be split over time between clans/players' army power
uint256 public nextSnapshotTime;
address public owner; // Minor management of game
mapping(address => mapping(uint256 => ArmyPower)) public armyPowerSnapshots; // Store player's army power for given day (snapshot)
mapping(address => mapping(uint256 => bool)) public armyPowerZeroedSnapshots; // Edgecase to determine difference between 0 army and an unused/inactive day.
mapping(address => uint256) public lastWarFundClaim; // Days (snapshot number)
mapping(address => uint256) public lastArmyPowerUpdate; // Days (last snapshot) player's army was updated
mapping(address => bool) operator;
uint224[] public totalArmyPowerSnapshots; // The total player army power for each prior day past
uint224[] public allocatedWarFundSnapshots; // Div pot (goo allocated to each prior day past)
uint224 public playerDivPercent = 2;
uint224 public clanDivPercent = 2;
struct ArmyPower {
uint80 attack;
uint80 defense;
uint80 looting;
}
constructor(uint256 firstSnapshotTime) public {
}
function setClans(address clansContract) external {
}
function setOperator(address gameContract, bool isOperator) external {
}
function updateDailyDivPercents(uint224 newPlayersPercent, uint224 newClansPercent) external {
}
function depositSpentGoo(uint224 gooSpent) external {
}
function getArmyPower(address player) external view returns (uint80, uint80, uint80) {
}
// Convenience function
function getArmiesPower(address player, address target) external view returns (uint80 playersAttack, uint80 playersLooting, uint80 targetsDefense) {
}
function increasePlayersArmyPowerTrio(address player, uint80 attackGain, uint80 defenseGain, uint80 lootingGain) public {
}
function decreasePlayersArmyPowerTrio(address player, uint80 attackLoss, uint80 defenseLoss, uint80 lootingLoss) public {
}
function changePlayersArmyPowerTrio(address player, int attackChange, int defenseChange, int lootingChange) public {
}
function changeTotalArmyPower(address player, int attackChange, int defenseChange) internal {
}
// Allocate army power divs for the day (00:00 cron job)
function snapshotDailyWarFunding() external {
require(msg.sender == owner);
require(<FILL_ME>)
totalArmyPowerSnapshots.push(totalArmyPower);
allocatedWarFundSnapshots.push((gooBankroll * playerDivPercent) / 100);
uint256 allocatedClanWarFund = (gooBankroll * clanDivPercent) / 100; // No daily snapshots needed for Clans (as below will also claim between the handful of clans)
gooBankroll -= (gooBankroll * (playerDivPercent + clanDivPercent)) / 100; // % of pool daily
uint256 numClans = clans.totalSupply();
uint256[] memory clanArmyPower = new uint256[](numClans);
// Get total power from all clans
uint256 todaysTotalClanPower;
for (uint256 i = 1; i <= numClans; i++) {
clanArmyPower[i-1] = clans.clanTotalArmyPower(i);
todaysTotalClanPower += clanArmyPower[i-1];
}
// Distribute goo divs to clans based on their relative power
for (i = 1; i <= numClans; i++) {
clans.depositGoo((allocatedClanWarFund * clanArmyPower[i-1]) / todaysTotalClanPower, i);
}
nextSnapshotTime = now + 24 hours;
}
function claimWarFundDividends(uint256 startSnapshot, uint256 endSnapShot) external {
}
function getSnapshotDay() external view returns (uint256 snapshot) {
}
}
contract GooToken {
function transfer(address to, uint256 tokens) external returns (bool);
function increasePlayersGooProduction(address player, uint256 increase) external;
function decreasePlayersGooProduction(address player, uint256 decrease) external;
function updatePlayersGooFromPurchase(address player, uint224 purchaseCost) external;
function updatePlayersGoo(address player) external;
function mintGoo(uint224 amount, address player) external;
}
contract Clans {
mapping(uint256 => uint256) public clanTotalArmyPower;
function totalSupply() external view returns (uint256);
function depositGoo(uint256 amount, uint256 clanId) external;
function getPlayerFees(address player) external view returns (uint224 clansFee, uint224 leadersFee, address leader, uint224 referalsFee, address referer);
function getPlayersClanUpgrade(address player, uint256 upgradeClass) external view returns (uint224 upgradeGain);
function mintGoo(address player, uint256 amount) external;
function increaseClanPower(address player, uint256 amount) external;
function decreaseClanPower(address player, uint256 amount) external;
}
contract Factories {
uint256 public constant MAX_SIZE = 40;
function getFactories(address player) external returns (uint256[]);
function addFactory(address player, uint8 position, uint256 unitId) external;
}
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint224 a, uint224 b) internal pure returns (uint224) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
library SafeMath224 {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint224 a, uint224 b) internal pure returns (uint224) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint224 a, uint224 b) internal pure returns (uint224) {
}
/**
* @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint224 a, uint224 b) internal pure returns (uint224) {
}
/**
* @dev Adds two numbers, throws on overflow.
*/
function add(uint224 a, uint224 b) internal pure returns (uint224) {
}
}
| now+6hours>nextSnapshotTime | 355,597 | now+6hours>nextSnapshotTime |
"Auction has already ended" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
contract Auction is Ownable, Pausable, VRFConsumerBase {
using SafeERC20 for IERC20;
uint256 public immutable minimumUnitPrice;
uint256 public immutable minimumBidIncrement;
uint256 public immutable unitPriceStepSize;
uint256 public immutable minimumQuantity;
uint256 public immutable maximumQuantity;
uint256 public immutable numberOfAuctions;
uint256 public immutable itemsPerAuction;
address payable public immutable beneficiaryAddress;
// Auction ends in last 3hrs when this random number is observed
uint256 public auctionLengthInHours = 72;
// The target number for the random end's random number generator
uint256 constant randomEnd = 3;
// block timestamp of when auction starts
uint256 public auctionStart;
AuctionStatus private _auctionStatus;
uint256 private _bidIndex;
// Chainlink configuration.
bytes32 internal keyHash;
uint256 internal fee;
bool backfillingDisabled;
event AuctionStarted();
event AuctionEnded();
event BidPlaced(
bytes32 indexed bidHash,
uint256 indexed auctionIndex,
address indexed bidder,
uint256 bidIndex,
uint256 unitPrice,
uint256 quantity,
uint256 balance
);
event WinnerSelected(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 unitPrice,
uint256 quantity
);
event BidderRefunded(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 refundAmount
);
event RandomNumberReceived(uint256 randomNumber);
struct Bid {
uint128 unitPrice;
uint128 quantity;
}
struct AuctionStatus {
bool started;
bool ended;
}
// keccak256(auctionIndex, bidder address) => current bid
mapping(bytes32 => Bid) private _bids;
// keccak256(auctionIndex, bidder address) => amount refunded
mapping(bytes32 => uint256) private _bidRefunds;
// auctionID => remainingItemsPerAuction
mapping(uint256 => uint256) private _remainingItemsPerAuction;
// Beneficiary address cannot be changed after deployment.
constructor(
address payable _beneficiaryAddress,
uint256 _minimumUnitPrice,
uint256 _minimumBidIncrement,
uint256 _unitPriceStepSize,
uint256 _maximumQuantity,
uint256 _numberOfAuctions,
uint256 _itemsPerAuction,
address vrfCoordinator_,
address link_,
bytes32 keyHash_,
uint256 fee_
) VRFConsumerBase(vrfCoordinator_, link_) {
}
modifier whenAuctionActive() {
require(<FILL_ME>)
require(_auctionStatus.started, "Auction hasn't started yet");
_;
}
modifier whenPreAuction() {
}
modifier whenAuctionEnded() {
}
function auctionStatus() public view returns (AuctionStatus memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function startAuction() external onlyOwner whenPreAuction {
}
function endAuction() external onlyOwner whenAuctionActive {
}
function _endAuction() internal whenAuctionActive {
}
// Requests randomness.
function getRandomNumber() internal returns (bytes32 requestId) {
}
// Callback function used by VRF Coordinator.
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function attemptEndAuction() external onlyOwner whenAuctionActive {
}
function numberOfBidsPlaced() external view returns (uint256) {
}
function getBid(uint256 auctionIndex, address bidder)
external
view
returns (Bid memory)
{
}
function getRemainingItemsForAuction(uint256 auctionIndex)
external
view
returns (uint256)
{
}
function _bidHash(uint256 auctionIndex_, address bidder_)
internal
pure
returns (bytes32)
{
}
function selectWinners(
uint256 auctionIndex_,
address[] calldata bidders_,
uint256[] calldata quantities_
) external onlyOwner whenPaused whenAuctionEnded {
}
// Refunds losing bidders from the contract's balance.
function partiallyRefundBidders(
uint256 auctionIndex_,
address payable[] calldata bidders_,
uint256[] calldata amounts_
) external onlyOwner whenPaused whenAuctionEnded {
}
// When a bidder places a bid or updates their existing bid, they will use this function.
// - total value can never be lowered
// - unit price can never be lowered
// - quantity can be raised or lowered, but only if unit price is raised to meet or exceed previous total price
function placeBid(
uint256 auctionIndex,
uint256 quantity,
uint256 unitPrice
) external payable whenNotPaused whenAuctionActive {
}
function withdrawContractBalance() external onlyOwner {
}
// A withdraw function to avoid locking ERC20 tokens in the contract forever.
// Tokens can only be withdrawn by the owner, to the owner.
function transferERC20Token(IERC20 token, uint256 amount) public onlyOwner {
}
function backfillDataBatch(
uint256[] calldata auctionIndexes_,
address[] calldata bidders_,
uint256[] calldata quantities_,
uint256[] calldata unitPrices_
) external onlyOwner whenPaused whenPreAuction {
}
// When backfilling is done, set the _bidIndex to the index from the previous auction.
function disableBackfilling(uint256 bidIndex_, uint256 auctionLengthInHours_)
external
onlyOwner
whenPaused
whenPreAuction
{
}
// Handles receiving ether to the contract.
// Reject all direct payments to the contract except from beneficiary and owner.
// Bids must be placed using the placeBid function.
receive() external payable {
}
}
| !_auctionStatus.ended,"Auction has already ended" | 355,664 | !_auctionStatus.ended |
"Auction hasn't started yet" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
contract Auction is Ownable, Pausable, VRFConsumerBase {
using SafeERC20 for IERC20;
uint256 public immutable minimumUnitPrice;
uint256 public immutable minimumBidIncrement;
uint256 public immutable unitPriceStepSize;
uint256 public immutable minimumQuantity;
uint256 public immutable maximumQuantity;
uint256 public immutable numberOfAuctions;
uint256 public immutable itemsPerAuction;
address payable public immutable beneficiaryAddress;
// Auction ends in last 3hrs when this random number is observed
uint256 public auctionLengthInHours = 72;
// The target number for the random end's random number generator
uint256 constant randomEnd = 3;
// block timestamp of when auction starts
uint256 public auctionStart;
AuctionStatus private _auctionStatus;
uint256 private _bidIndex;
// Chainlink configuration.
bytes32 internal keyHash;
uint256 internal fee;
bool backfillingDisabled;
event AuctionStarted();
event AuctionEnded();
event BidPlaced(
bytes32 indexed bidHash,
uint256 indexed auctionIndex,
address indexed bidder,
uint256 bidIndex,
uint256 unitPrice,
uint256 quantity,
uint256 balance
);
event WinnerSelected(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 unitPrice,
uint256 quantity
);
event BidderRefunded(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 refundAmount
);
event RandomNumberReceived(uint256 randomNumber);
struct Bid {
uint128 unitPrice;
uint128 quantity;
}
struct AuctionStatus {
bool started;
bool ended;
}
// keccak256(auctionIndex, bidder address) => current bid
mapping(bytes32 => Bid) private _bids;
// keccak256(auctionIndex, bidder address) => amount refunded
mapping(bytes32 => uint256) private _bidRefunds;
// auctionID => remainingItemsPerAuction
mapping(uint256 => uint256) private _remainingItemsPerAuction;
// Beneficiary address cannot be changed after deployment.
constructor(
address payable _beneficiaryAddress,
uint256 _minimumUnitPrice,
uint256 _minimumBidIncrement,
uint256 _unitPriceStepSize,
uint256 _maximumQuantity,
uint256 _numberOfAuctions,
uint256 _itemsPerAuction,
address vrfCoordinator_,
address link_,
bytes32 keyHash_,
uint256 fee_
) VRFConsumerBase(vrfCoordinator_, link_) {
}
modifier whenAuctionActive() {
require(!_auctionStatus.ended, "Auction has already ended");
require(<FILL_ME>)
_;
}
modifier whenPreAuction() {
}
modifier whenAuctionEnded() {
}
function auctionStatus() public view returns (AuctionStatus memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function startAuction() external onlyOwner whenPreAuction {
}
function endAuction() external onlyOwner whenAuctionActive {
}
function _endAuction() internal whenAuctionActive {
}
// Requests randomness.
function getRandomNumber() internal returns (bytes32 requestId) {
}
// Callback function used by VRF Coordinator.
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function attemptEndAuction() external onlyOwner whenAuctionActive {
}
function numberOfBidsPlaced() external view returns (uint256) {
}
function getBid(uint256 auctionIndex, address bidder)
external
view
returns (Bid memory)
{
}
function getRemainingItemsForAuction(uint256 auctionIndex)
external
view
returns (uint256)
{
}
function _bidHash(uint256 auctionIndex_, address bidder_)
internal
pure
returns (bytes32)
{
}
function selectWinners(
uint256 auctionIndex_,
address[] calldata bidders_,
uint256[] calldata quantities_
) external onlyOwner whenPaused whenAuctionEnded {
}
// Refunds losing bidders from the contract's balance.
function partiallyRefundBidders(
uint256 auctionIndex_,
address payable[] calldata bidders_,
uint256[] calldata amounts_
) external onlyOwner whenPaused whenAuctionEnded {
}
// When a bidder places a bid or updates their existing bid, they will use this function.
// - total value can never be lowered
// - unit price can never be lowered
// - quantity can be raised or lowered, but only if unit price is raised to meet or exceed previous total price
function placeBid(
uint256 auctionIndex,
uint256 quantity,
uint256 unitPrice
) external payable whenNotPaused whenAuctionActive {
}
function withdrawContractBalance() external onlyOwner {
}
// A withdraw function to avoid locking ERC20 tokens in the contract forever.
// Tokens can only be withdrawn by the owner, to the owner.
function transferERC20Token(IERC20 token, uint256 amount) public onlyOwner {
}
function backfillDataBatch(
uint256[] calldata auctionIndexes_,
address[] calldata bidders_,
uint256[] calldata quantities_,
uint256[] calldata unitPrices_
) external onlyOwner whenPaused whenPreAuction {
}
// When backfilling is done, set the _bidIndex to the index from the previous auction.
function disableBackfilling(uint256 bidIndex_, uint256 auctionLengthInHours_)
external
onlyOwner
whenPaused
whenPreAuction
{
}
// Handles receiving ether to the contract.
// Reject all direct payments to the contract except from beneficiary and owner.
// Bids must be placed using the placeBid function.
receive() external payable {
}
}
| _auctionStatus.started,"Auction hasn't started yet" | 355,664 | _auctionStatus.started |
"Auction has already started" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
contract Auction is Ownable, Pausable, VRFConsumerBase {
using SafeERC20 for IERC20;
uint256 public immutable minimumUnitPrice;
uint256 public immutable minimumBidIncrement;
uint256 public immutable unitPriceStepSize;
uint256 public immutable minimumQuantity;
uint256 public immutable maximumQuantity;
uint256 public immutable numberOfAuctions;
uint256 public immutable itemsPerAuction;
address payable public immutable beneficiaryAddress;
// Auction ends in last 3hrs when this random number is observed
uint256 public auctionLengthInHours = 72;
// The target number for the random end's random number generator
uint256 constant randomEnd = 3;
// block timestamp of when auction starts
uint256 public auctionStart;
AuctionStatus private _auctionStatus;
uint256 private _bidIndex;
// Chainlink configuration.
bytes32 internal keyHash;
uint256 internal fee;
bool backfillingDisabled;
event AuctionStarted();
event AuctionEnded();
event BidPlaced(
bytes32 indexed bidHash,
uint256 indexed auctionIndex,
address indexed bidder,
uint256 bidIndex,
uint256 unitPrice,
uint256 quantity,
uint256 balance
);
event WinnerSelected(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 unitPrice,
uint256 quantity
);
event BidderRefunded(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 refundAmount
);
event RandomNumberReceived(uint256 randomNumber);
struct Bid {
uint128 unitPrice;
uint128 quantity;
}
struct AuctionStatus {
bool started;
bool ended;
}
// keccak256(auctionIndex, bidder address) => current bid
mapping(bytes32 => Bid) private _bids;
// keccak256(auctionIndex, bidder address) => amount refunded
mapping(bytes32 => uint256) private _bidRefunds;
// auctionID => remainingItemsPerAuction
mapping(uint256 => uint256) private _remainingItemsPerAuction;
// Beneficiary address cannot be changed after deployment.
constructor(
address payable _beneficiaryAddress,
uint256 _minimumUnitPrice,
uint256 _minimumBidIncrement,
uint256 _unitPriceStepSize,
uint256 _maximumQuantity,
uint256 _numberOfAuctions,
uint256 _itemsPerAuction,
address vrfCoordinator_,
address link_,
bytes32 keyHash_,
uint256 fee_
) VRFConsumerBase(vrfCoordinator_, link_) {
}
modifier whenAuctionActive() {
}
modifier whenPreAuction() {
require(!_auctionStatus.ended, "Auction has already ended");
require(<FILL_ME>)
_;
}
modifier whenAuctionEnded() {
}
function auctionStatus() public view returns (AuctionStatus memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function startAuction() external onlyOwner whenPreAuction {
}
function endAuction() external onlyOwner whenAuctionActive {
}
function _endAuction() internal whenAuctionActive {
}
// Requests randomness.
function getRandomNumber() internal returns (bytes32 requestId) {
}
// Callback function used by VRF Coordinator.
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function attemptEndAuction() external onlyOwner whenAuctionActive {
}
function numberOfBidsPlaced() external view returns (uint256) {
}
function getBid(uint256 auctionIndex, address bidder)
external
view
returns (Bid memory)
{
}
function getRemainingItemsForAuction(uint256 auctionIndex)
external
view
returns (uint256)
{
}
function _bidHash(uint256 auctionIndex_, address bidder_)
internal
pure
returns (bytes32)
{
}
function selectWinners(
uint256 auctionIndex_,
address[] calldata bidders_,
uint256[] calldata quantities_
) external onlyOwner whenPaused whenAuctionEnded {
}
// Refunds losing bidders from the contract's balance.
function partiallyRefundBidders(
uint256 auctionIndex_,
address payable[] calldata bidders_,
uint256[] calldata amounts_
) external onlyOwner whenPaused whenAuctionEnded {
}
// When a bidder places a bid or updates their existing bid, they will use this function.
// - total value can never be lowered
// - unit price can never be lowered
// - quantity can be raised or lowered, but only if unit price is raised to meet or exceed previous total price
function placeBid(
uint256 auctionIndex,
uint256 quantity,
uint256 unitPrice
) external payable whenNotPaused whenAuctionActive {
}
function withdrawContractBalance() external onlyOwner {
}
// A withdraw function to avoid locking ERC20 tokens in the contract forever.
// Tokens can only be withdrawn by the owner, to the owner.
function transferERC20Token(IERC20 token, uint256 amount) public onlyOwner {
}
function backfillDataBatch(
uint256[] calldata auctionIndexes_,
address[] calldata bidders_,
uint256[] calldata quantities_,
uint256[] calldata unitPrices_
) external onlyOwner whenPaused whenPreAuction {
}
// When backfilling is done, set the _bidIndex to the index from the previous auction.
function disableBackfilling(uint256 bidIndex_, uint256 auctionLengthInHours_)
external
onlyOwner
whenPaused
whenPreAuction
{
}
// Handles receiving ether to the contract.
// Reject all direct payments to the contract except from beneficiary and owner.
// Bids must be placed using the placeBid function.
receive() external payable {
}
}
| !_auctionStatus.started,"Auction has already started" | 355,664 | !_auctionStatus.started |
"Auction hasn't ended yet" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
contract Auction is Ownable, Pausable, VRFConsumerBase {
using SafeERC20 for IERC20;
uint256 public immutable minimumUnitPrice;
uint256 public immutable minimumBidIncrement;
uint256 public immutable unitPriceStepSize;
uint256 public immutable minimumQuantity;
uint256 public immutable maximumQuantity;
uint256 public immutable numberOfAuctions;
uint256 public immutable itemsPerAuction;
address payable public immutable beneficiaryAddress;
// Auction ends in last 3hrs when this random number is observed
uint256 public auctionLengthInHours = 72;
// The target number for the random end's random number generator
uint256 constant randomEnd = 3;
// block timestamp of when auction starts
uint256 public auctionStart;
AuctionStatus private _auctionStatus;
uint256 private _bidIndex;
// Chainlink configuration.
bytes32 internal keyHash;
uint256 internal fee;
bool backfillingDisabled;
event AuctionStarted();
event AuctionEnded();
event BidPlaced(
bytes32 indexed bidHash,
uint256 indexed auctionIndex,
address indexed bidder,
uint256 bidIndex,
uint256 unitPrice,
uint256 quantity,
uint256 balance
);
event WinnerSelected(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 unitPrice,
uint256 quantity
);
event BidderRefunded(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 refundAmount
);
event RandomNumberReceived(uint256 randomNumber);
struct Bid {
uint128 unitPrice;
uint128 quantity;
}
struct AuctionStatus {
bool started;
bool ended;
}
// keccak256(auctionIndex, bidder address) => current bid
mapping(bytes32 => Bid) private _bids;
// keccak256(auctionIndex, bidder address) => amount refunded
mapping(bytes32 => uint256) private _bidRefunds;
// auctionID => remainingItemsPerAuction
mapping(uint256 => uint256) private _remainingItemsPerAuction;
// Beneficiary address cannot be changed after deployment.
constructor(
address payable _beneficiaryAddress,
uint256 _minimumUnitPrice,
uint256 _minimumBidIncrement,
uint256 _unitPriceStepSize,
uint256 _maximumQuantity,
uint256 _numberOfAuctions,
uint256 _itemsPerAuction,
address vrfCoordinator_,
address link_,
bytes32 keyHash_,
uint256 fee_
) VRFConsumerBase(vrfCoordinator_, link_) {
}
modifier whenAuctionActive() {
}
modifier whenPreAuction() {
}
modifier whenAuctionEnded() {
require(<FILL_ME>)
require(_auctionStatus.started, "Auction hasn't started yet");
_;
}
function auctionStatus() public view returns (AuctionStatus memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function startAuction() external onlyOwner whenPreAuction {
}
function endAuction() external onlyOwner whenAuctionActive {
}
function _endAuction() internal whenAuctionActive {
}
// Requests randomness.
function getRandomNumber() internal returns (bytes32 requestId) {
}
// Callback function used by VRF Coordinator.
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function attemptEndAuction() external onlyOwner whenAuctionActive {
}
function numberOfBidsPlaced() external view returns (uint256) {
}
function getBid(uint256 auctionIndex, address bidder)
external
view
returns (Bid memory)
{
}
function getRemainingItemsForAuction(uint256 auctionIndex)
external
view
returns (uint256)
{
}
function _bidHash(uint256 auctionIndex_, address bidder_)
internal
pure
returns (bytes32)
{
}
function selectWinners(
uint256 auctionIndex_,
address[] calldata bidders_,
uint256[] calldata quantities_
) external onlyOwner whenPaused whenAuctionEnded {
}
// Refunds losing bidders from the contract's balance.
function partiallyRefundBidders(
uint256 auctionIndex_,
address payable[] calldata bidders_,
uint256[] calldata amounts_
) external onlyOwner whenPaused whenAuctionEnded {
}
// When a bidder places a bid or updates their existing bid, they will use this function.
// - total value can never be lowered
// - unit price can never be lowered
// - quantity can be raised or lowered, but only if unit price is raised to meet or exceed previous total price
function placeBid(
uint256 auctionIndex,
uint256 quantity,
uint256 unitPrice
) external payable whenNotPaused whenAuctionActive {
}
function withdrawContractBalance() external onlyOwner {
}
// A withdraw function to avoid locking ERC20 tokens in the contract forever.
// Tokens can only be withdrawn by the owner, to the owner.
function transferERC20Token(IERC20 token, uint256 amount) public onlyOwner {
}
function backfillDataBatch(
uint256[] calldata auctionIndexes_,
address[] calldata bidders_,
uint256[] calldata quantities_,
uint256[] calldata unitPrices_
) external onlyOwner whenPaused whenPreAuction {
}
// When backfilling is done, set the _bidIndex to the index from the previous auction.
function disableBackfilling(uint256 bidIndex_, uint256 auctionLengthInHours_)
external
onlyOwner
whenPaused
whenPreAuction
{
}
// Handles receiving ether to the contract.
// Reject all direct payments to the contract except from beneficiary and owner.
// Bids must be placed using the placeBid function.
receive() external payable {
}
}
| _auctionStatus.ended,"Auction hasn't ended yet" | 355,664 | _auctionStatus.ended |
"Auction can't be stopped until due" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
contract Auction is Ownable, Pausable, VRFConsumerBase {
using SafeERC20 for IERC20;
uint256 public immutable minimumUnitPrice;
uint256 public immutable minimumBidIncrement;
uint256 public immutable unitPriceStepSize;
uint256 public immutable minimumQuantity;
uint256 public immutable maximumQuantity;
uint256 public immutable numberOfAuctions;
uint256 public immutable itemsPerAuction;
address payable public immutable beneficiaryAddress;
// Auction ends in last 3hrs when this random number is observed
uint256 public auctionLengthInHours = 72;
// The target number for the random end's random number generator
uint256 constant randomEnd = 3;
// block timestamp of when auction starts
uint256 public auctionStart;
AuctionStatus private _auctionStatus;
uint256 private _bidIndex;
// Chainlink configuration.
bytes32 internal keyHash;
uint256 internal fee;
bool backfillingDisabled;
event AuctionStarted();
event AuctionEnded();
event BidPlaced(
bytes32 indexed bidHash,
uint256 indexed auctionIndex,
address indexed bidder,
uint256 bidIndex,
uint256 unitPrice,
uint256 quantity,
uint256 balance
);
event WinnerSelected(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 unitPrice,
uint256 quantity
);
event BidderRefunded(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 refundAmount
);
event RandomNumberReceived(uint256 randomNumber);
struct Bid {
uint128 unitPrice;
uint128 quantity;
}
struct AuctionStatus {
bool started;
bool ended;
}
// keccak256(auctionIndex, bidder address) => current bid
mapping(bytes32 => Bid) private _bids;
// keccak256(auctionIndex, bidder address) => amount refunded
mapping(bytes32 => uint256) private _bidRefunds;
// auctionID => remainingItemsPerAuction
mapping(uint256 => uint256) private _remainingItemsPerAuction;
// Beneficiary address cannot be changed after deployment.
constructor(
address payable _beneficiaryAddress,
uint256 _minimumUnitPrice,
uint256 _minimumBidIncrement,
uint256 _unitPriceStepSize,
uint256 _maximumQuantity,
uint256 _numberOfAuctions,
uint256 _itemsPerAuction,
address vrfCoordinator_,
address link_,
bytes32 keyHash_,
uint256 fee_
) VRFConsumerBase(vrfCoordinator_, link_) {
}
modifier whenAuctionActive() {
}
modifier whenPreAuction() {
}
modifier whenAuctionEnded() {
}
function auctionStatus() public view returns (AuctionStatus memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function startAuction() external onlyOwner whenPreAuction {
}
function endAuction() external onlyOwner whenAuctionActive {
require(<FILL_ME>)
_endAuction();
}
function _endAuction() internal whenAuctionActive {
}
// Requests randomness.
function getRandomNumber() internal returns (bytes32 requestId) {
}
// Callback function used by VRF Coordinator.
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function attemptEndAuction() external onlyOwner whenAuctionActive {
}
function numberOfBidsPlaced() external view returns (uint256) {
}
function getBid(uint256 auctionIndex, address bidder)
external
view
returns (Bid memory)
{
}
function getRemainingItemsForAuction(uint256 auctionIndex)
external
view
returns (uint256)
{
}
function _bidHash(uint256 auctionIndex_, address bidder_)
internal
pure
returns (bytes32)
{
}
function selectWinners(
uint256 auctionIndex_,
address[] calldata bidders_,
uint256[] calldata quantities_
) external onlyOwner whenPaused whenAuctionEnded {
}
// Refunds losing bidders from the contract's balance.
function partiallyRefundBidders(
uint256 auctionIndex_,
address payable[] calldata bidders_,
uint256[] calldata amounts_
) external onlyOwner whenPaused whenAuctionEnded {
}
// When a bidder places a bid or updates their existing bid, they will use this function.
// - total value can never be lowered
// - unit price can never be lowered
// - quantity can be raised or lowered, but only if unit price is raised to meet or exceed previous total price
function placeBid(
uint256 auctionIndex,
uint256 quantity,
uint256 unitPrice
) external payable whenNotPaused whenAuctionActive {
}
function withdrawContractBalance() external onlyOwner {
}
// A withdraw function to avoid locking ERC20 tokens in the contract forever.
// Tokens can only be withdrawn by the owner, to the owner.
function transferERC20Token(IERC20 token, uint256 amount) public onlyOwner {
}
function backfillDataBatch(
uint256[] calldata auctionIndexes_,
address[] calldata bidders_,
uint256[] calldata quantities_,
uint256[] calldata unitPrices_
) external onlyOwner whenPaused whenPreAuction {
}
// When backfilling is done, set the _bidIndex to the index from the previous auction.
function disableBackfilling(uint256 bidIndex_, uint256 auctionLengthInHours_)
external
onlyOwner
whenPaused
whenPreAuction
{
}
// Handles receiving ether to the contract.
// Reject all direct payments to the contract except from beneficiary and owner.
// Bids must be placed using the placeBid function.
receive() external payable {
}
}
| block.timestamp>=(auctionStart+auctionLengthInHours*60*60),"Auction can't be stopped until due" | 355,664 | block.timestamp>=(auctionStart+auctionLengthInHours*60*60) |
"Unit price step too small" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
contract Auction is Ownable, Pausable, VRFConsumerBase {
using SafeERC20 for IERC20;
uint256 public immutable minimumUnitPrice;
uint256 public immutable minimumBidIncrement;
uint256 public immutable unitPriceStepSize;
uint256 public immutable minimumQuantity;
uint256 public immutable maximumQuantity;
uint256 public immutable numberOfAuctions;
uint256 public immutable itemsPerAuction;
address payable public immutable beneficiaryAddress;
// Auction ends in last 3hrs when this random number is observed
uint256 public auctionLengthInHours = 72;
// The target number for the random end's random number generator
uint256 constant randomEnd = 3;
// block timestamp of when auction starts
uint256 public auctionStart;
AuctionStatus private _auctionStatus;
uint256 private _bidIndex;
// Chainlink configuration.
bytes32 internal keyHash;
uint256 internal fee;
bool backfillingDisabled;
event AuctionStarted();
event AuctionEnded();
event BidPlaced(
bytes32 indexed bidHash,
uint256 indexed auctionIndex,
address indexed bidder,
uint256 bidIndex,
uint256 unitPrice,
uint256 quantity,
uint256 balance
);
event WinnerSelected(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 unitPrice,
uint256 quantity
);
event BidderRefunded(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 refundAmount
);
event RandomNumberReceived(uint256 randomNumber);
struct Bid {
uint128 unitPrice;
uint128 quantity;
}
struct AuctionStatus {
bool started;
bool ended;
}
// keccak256(auctionIndex, bidder address) => current bid
mapping(bytes32 => Bid) private _bids;
// keccak256(auctionIndex, bidder address) => amount refunded
mapping(bytes32 => uint256) private _bidRefunds;
// auctionID => remainingItemsPerAuction
mapping(uint256 => uint256) private _remainingItemsPerAuction;
// Beneficiary address cannot be changed after deployment.
constructor(
address payable _beneficiaryAddress,
uint256 _minimumUnitPrice,
uint256 _minimumBidIncrement,
uint256 _unitPriceStepSize,
uint256 _maximumQuantity,
uint256 _numberOfAuctions,
uint256 _itemsPerAuction,
address vrfCoordinator_,
address link_,
bytes32 keyHash_,
uint256 fee_
) VRFConsumerBase(vrfCoordinator_, link_) {
}
modifier whenAuctionActive() {
}
modifier whenPreAuction() {
}
modifier whenAuctionEnded() {
}
function auctionStatus() public view returns (AuctionStatus memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function startAuction() external onlyOwner whenPreAuction {
}
function endAuction() external onlyOwner whenAuctionActive {
}
function _endAuction() internal whenAuctionActive {
}
// Requests randomness.
function getRandomNumber() internal returns (bytes32 requestId) {
}
// Callback function used by VRF Coordinator.
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function attemptEndAuction() external onlyOwner whenAuctionActive {
}
function numberOfBidsPlaced() external view returns (uint256) {
}
function getBid(uint256 auctionIndex, address bidder)
external
view
returns (Bid memory)
{
}
function getRemainingItemsForAuction(uint256 auctionIndex)
external
view
returns (uint256)
{
}
function _bidHash(uint256 auctionIndex_, address bidder_)
internal
pure
returns (bytes32)
{
}
function selectWinners(
uint256 auctionIndex_,
address[] calldata bidders_,
uint256[] calldata quantities_
) external onlyOwner whenPaused whenAuctionEnded {
}
// Refunds losing bidders from the contract's balance.
function partiallyRefundBidders(
uint256 auctionIndex_,
address payable[] calldata bidders_,
uint256[] calldata amounts_
) external onlyOwner whenPaused whenAuctionEnded {
}
// When a bidder places a bid or updates their existing bid, they will use this function.
// - total value can never be lowered
// - unit price can never be lowered
// - quantity can be raised or lowered, but only if unit price is raised to meet or exceed previous total price
function placeBid(
uint256 auctionIndex,
uint256 quantity,
uint256 unitPrice
) external payable whenNotPaused whenAuctionActive {
// If the bidder is increasing their bid, the amount being added must be greater than or equal to the minimum bid increment.
if (msg.value > 0 && msg.value < minimumBidIncrement) {
revert("Bid lower than minimum bid increment.");
}
// Ensure auctionIndex is within valid range.
require(auctionIndex < numberOfAuctions, "Invalid auctionIndex");
// Cache initial bid values.
bytes32 bidHash = _bidHash(auctionIndex, msg.sender);
uint256 initialUnitPrice = _bids[bidHash].unitPrice;
uint256 initialQuantity = _bids[bidHash].quantity;
uint256 initialBalance = initialUnitPrice * initialQuantity;
// Cache final bid values.
uint256 finalUnitPrice = unitPrice;
uint256 finalQuantity = quantity;
uint256 finalBalance = initialBalance + msg.value;
// Don't allow bids with a unit price scale smaller than unitPriceStepSize.
// For example, allow 1.01 or 111.01 but don't allow 1.011.
require(<FILL_ME>)
// Reject bids that don't have a quantity within the valid range.
require(finalQuantity >= minimumQuantity, "Quantity too low");
require(finalQuantity <= maximumQuantity, "Quantity too high");
// Balance can never be lowered.
require(finalBalance >= initialBalance, "Balance can't be lowered");
// Unit price can never be lowered.
// Quantity can be raised or lowered, but it can only be lowered if the unit price is raised to meet or exceed the initial total value. Ensuring the the unit price is never lowered takes care of this.
require(finalUnitPrice >= initialUnitPrice, "Unit price can't be lowered");
// Ensure the new finalBalance equals quantity * the unit price that was given in this txn exactly. This is important to prevent rounding errors later when returning ether.
require(
finalQuantity * finalUnitPrice == finalBalance,
"Quantity * Unit Price != Total Value"
);
// Unit price must be greater than or equal to the minimumUnitPrice.
require(finalUnitPrice >= minimumUnitPrice, "Bid unit price too low");
// Something must be changing from the initial bid for this new bid to be valid.
if (
initialUnitPrice == finalUnitPrice && initialQuantity == finalQuantity
) {
revert("This bid doesn't change anything");
}
// Update the bidder's bid.
_bids[bidHash].unitPrice = uint128(finalUnitPrice);
_bids[bidHash].quantity = uint128(finalQuantity);
emit BidPlaced(
bidHash,
auctionIndex,
msg.sender,
_bidIndex,
finalUnitPrice,
finalQuantity,
finalBalance
);
// Increment after emitting the BidPlaced event because counter is 0-indexed.
_bidIndex += 1;
}
function withdrawContractBalance() external onlyOwner {
}
// A withdraw function to avoid locking ERC20 tokens in the contract forever.
// Tokens can only be withdrawn by the owner, to the owner.
function transferERC20Token(IERC20 token, uint256 amount) public onlyOwner {
}
function backfillDataBatch(
uint256[] calldata auctionIndexes_,
address[] calldata bidders_,
uint256[] calldata quantities_,
uint256[] calldata unitPrices_
) external onlyOwner whenPaused whenPreAuction {
}
// When backfilling is done, set the _bidIndex to the index from the previous auction.
function disableBackfilling(uint256 bidIndex_, uint256 auctionLengthInHours_)
external
onlyOwner
whenPaused
whenPreAuction
{
}
// Handles receiving ether to the contract.
// Reject all direct payments to the contract except from beneficiary and owner.
// Bids must be placed using the placeBid function.
receive() external payable {
}
}
| finalUnitPrice%unitPriceStepSize==0,"Unit price step too small" | 355,664 | finalUnitPrice%unitPriceStepSize==0 |
"Quantity * Unit Price != Total Value" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
contract Auction is Ownable, Pausable, VRFConsumerBase {
using SafeERC20 for IERC20;
uint256 public immutable minimumUnitPrice;
uint256 public immutable minimumBidIncrement;
uint256 public immutable unitPriceStepSize;
uint256 public immutable minimumQuantity;
uint256 public immutable maximumQuantity;
uint256 public immutable numberOfAuctions;
uint256 public immutable itemsPerAuction;
address payable public immutable beneficiaryAddress;
// Auction ends in last 3hrs when this random number is observed
uint256 public auctionLengthInHours = 72;
// The target number for the random end's random number generator
uint256 constant randomEnd = 3;
// block timestamp of when auction starts
uint256 public auctionStart;
AuctionStatus private _auctionStatus;
uint256 private _bidIndex;
// Chainlink configuration.
bytes32 internal keyHash;
uint256 internal fee;
bool backfillingDisabled;
event AuctionStarted();
event AuctionEnded();
event BidPlaced(
bytes32 indexed bidHash,
uint256 indexed auctionIndex,
address indexed bidder,
uint256 bidIndex,
uint256 unitPrice,
uint256 quantity,
uint256 balance
);
event WinnerSelected(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 unitPrice,
uint256 quantity
);
event BidderRefunded(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 refundAmount
);
event RandomNumberReceived(uint256 randomNumber);
struct Bid {
uint128 unitPrice;
uint128 quantity;
}
struct AuctionStatus {
bool started;
bool ended;
}
// keccak256(auctionIndex, bidder address) => current bid
mapping(bytes32 => Bid) private _bids;
// keccak256(auctionIndex, bidder address) => amount refunded
mapping(bytes32 => uint256) private _bidRefunds;
// auctionID => remainingItemsPerAuction
mapping(uint256 => uint256) private _remainingItemsPerAuction;
// Beneficiary address cannot be changed after deployment.
constructor(
address payable _beneficiaryAddress,
uint256 _minimumUnitPrice,
uint256 _minimumBidIncrement,
uint256 _unitPriceStepSize,
uint256 _maximumQuantity,
uint256 _numberOfAuctions,
uint256 _itemsPerAuction,
address vrfCoordinator_,
address link_,
bytes32 keyHash_,
uint256 fee_
) VRFConsumerBase(vrfCoordinator_, link_) {
}
modifier whenAuctionActive() {
}
modifier whenPreAuction() {
}
modifier whenAuctionEnded() {
}
function auctionStatus() public view returns (AuctionStatus memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function startAuction() external onlyOwner whenPreAuction {
}
function endAuction() external onlyOwner whenAuctionActive {
}
function _endAuction() internal whenAuctionActive {
}
// Requests randomness.
function getRandomNumber() internal returns (bytes32 requestId) {
}
// Callback function used by VRF Coordinator.
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function attemptEndAuction() external onlyOwner whenAuctionActive {
}
function numberOfBidsPlaced() external view returns (uint256) {
}
function getBid(uint256 auctionIndex, address bidder)
external
view
returns (Bid memory)
{
}
function getRemainingItemsForAuction(uint256 auctionIndex)
external
view
returns (uint256)
{
}
function _bidHash(uint256 auctionIndex_, address bidder_)
internal
pure
returns (bytes32)
{
}
function selectWinners(
uint256 auctionIndex_,
address[] calldata bidders_,
uint256[] calldata quantities_
) external onlyOwner whenPaused whenAuctionEnded {
}
// Refunds losing bidders from the contract's balance.
function partiallyRefundBidders(
uint256 auctionIndex_,
address payable[] calldata bidders_,
uint256[] calldata amounts_
) external onlyOwner whenPaused whenAuctionEnded {
}
// When a bidder places a bid or updates their existing bid, they will use this function.
// - total value can never be lowered
// - unit price can never be lowered
// - quantity can be raised or lowered, but only if unit price is raised to meet or exceed previous total price
function placeBid(
uint256 auctionIndex,
uint256 quantity,
uint256 unitPrice
) external payable whenNotPaused whenAuctionActive {
// If the bidder is increasing their bid, the amount being added must be greater than or equal to the minimum bid increment.
if (msg.value > 0 && msg.value < minimumBidIncrement) {
revert("Bid lower than minimum bid increment.");
}
// Ensure auctionIndex is within valid range.
require(auctionIndex < numberOfAuctions, "Invalid auctionIndex");
// Cache initial bid values.
bytes32 bidHash = _bidHash(auctionIndex, msg.sender);
uint256 initialUnitPrice = _bids[bidHash].unitPrice;
uint256 initialQuantity = _bids[bidHash].quantity;
uint256 initialBalance = initialUnitPrice * initialQuantity;
// Cache final bid values.
uint256 finalUnitPrice = unitPrice;
uint256 finalQuantity = quantity;
uint256 finalBalance = initialBalance + msg.value;
// Don't allow bids with a unit price scale smaller than unitPriceStepSize.
// For example, allow 1.01 or 111.01 but don't allow 1.011.
require(
finalUnitPrice % unitPriceStepSize == 0,
"Unit price step too small"
);
// Reject bids that don't have a quantity within the valid range.
require(finalQuantity >= minimumQuantity, "Quantity too low");
require(finalQuantity <= maximumQuantity, "Quantity too high");
// Balance can never be lowered.
require(finalBalance >= initialBalance, "Balance can't be lowered");
// Unit price can never be lowered.
// Quantity can be raised or lowered, but it can only be lowered if the unit price is raised to meet or exceed the initial total value. Ensuring the the unit price is never lowered takes care of this.
require(finalUnitPrice >= initialUnitPrice, "Unit price can't be lowered");
// Ensure the new finalBalance equals quantity * the unit price that was given in this txn exactly. This is important to prevent rounding errors later when returning ether.
require(<FILL_ME>)
// Unit price must be greater than or equal to the minimumUnitPrice.
require(finalUnitPrice >= minimumUnitPrice, "Bid unit price too low");
// Something must be changing from the initial bid for this new bid to be valid.
if (
initialUnitPrice == finalUnitPrice && initialQuantity == finalQuantity
) {
revert("This bid doesn't change anything");
}
// Update the bidder's bid.
_bids[bidHash].unitPrice = uint128(finalUnitPrice);
_bids[bidHash].quantity = uint128(finalQuantity);
emit BidPlaced(
bidHash,
auctionIndex,
msg.sender,
_bidIndex,
finalUnitPrice,
finalQuantity,
finalBalance
);
// Increment after emitting the BidPlaced event because counter is 0-indexed.
_bidIndex += 1;
}
function withdrawContractBalance() external onlyOwner {
}
// A withdraw function to avoid locking ERC20 tokens in the contract forever.
// Tokens can only be withdrawn by the owner, to the owner.
function transferERC20Token(IERC20 token, uint256 amount) public onlyOwner {
}
function backfillDataBatch(
uint256[] calldata auctionIndexes_,
address[] calldata bidders_,
uint256[] calldata quantities_,
uint256[] calldata unitPrices_
) external onlyOwner whenPaused whenPreAuction {
}
// When backfilling is done, set the _bidIndex to the index from the previous auction.
function disableBackfilling(uint256 bidIndex_, uint256 auctionLengthInHours_)
external
onlyOwner
whenPaused
whenPreAuction
{
}
// Handles receiving ether to the contract.
// Reject all direct payments to the contract except from beneficiary and owner.
// Bids must be placed using the placeBid function.
receive() external payable {
}
}
| finalQuantity*finalUnitPrice==finalBalance,"Quantity * Unit Price != Total Value" | 355,664 | finalQuantity*finalUnitPrice==finalBalance |
"backfill disabled" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.9;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBase.sol";
contract Auction is Ownable, Pausable, VRFConsumerBase {
using SafeERC20 for IERC20;
uint256 public immutable minimumUnitPrice;
uint256 public immutable minimumBidIncrement;
uint256 public immutable unitPriceStepSize;
uint256 public immutable minimumQuantity;
uint256 public immutable maximumQuantity;
uint256 public immutable numberOfAuctions;
uint256 public immutable itemsPerAuction;
address payable public immutable beneficiaryAddress;
// Auction ends in last 3hrs when this random number is observed
uint256 public auctionLengthInHours = 72;
// The target number for the random end's random number generator
uint256 constant randomEnd = 3;
// block timestamp of when auction starts
uint256 public auctionStart;
AuctionStatus private _auctionStatus;
uint256 private _bidIndex;
// Chainlink configuration.
bytes32 internal keyHash;
uint256 internal fee;
bool backfillingDisabled;
event AuctionStarted();
event AuctionEnded();
event BidPlaced(
bytes32 indexed bidHash,
uint256 indexed auctionIndex,
address indexed bidder,
uint256 bidIndex,
uint256 unitPrice,
uint256 quantity,
uint256 balance
);
event WinnerSelected(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 unitPrice,
uint256 quantity
);
event BidderRefunded(
uint256 indexed auctionIndex,
address indexed bidder,
uint256 refundAmount
);
event RandomNumberReceived(uint256 randomNumber);
struct Bid {
uint128 unitPrice;
uint128 quantity;
}
struct AuctionStatus {
bool started;
bool ended;
}
// keccak256(auctionIndex, bidder address) => current bid
mapping(bytes32 => Bid) private _bids;
// keccak256(auctionIndex, bidder address) => amount refunded
mapping(bytes32 => uint256) private _bidRefunds;
// auctionID => remainingItemsPerAuction
mapping(uint256 => uint256) private _remainingItemsPerAuction;
// Beneficiary address cannot be changed after deployment.
constructor(
address payable _beneficiaryAddress,
uint256 _minimumUnitPrice,
uint256 _minimumBidIncrement,
uint256 _unitPriceStepSize,
uint256 _maximumQuantity,
uint256 _numberOfAuctions,
uint256 _itemsPerAuction,
address vrfCoordinator_,
address link_,
bytes32 keyHash_,
uint256 fee_
) VRFConsumerBase(vrfCoordinator_, link_) {
}
modifier whenAuctionActive() {
}
modifier whenPreAuction() {
}
modifier whenAuctionEnded() {
}
function auctionStatus() public view returns (AuctionStatus memory) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function startAuction() external onlyOwner whenPreAuction {
}
function endAuction() external onlyOwner whenAuctionActive {
}
function _endAuction() internal whenAuctionActive {
}
// Requests randomness.
function getRandomNumber() internal returns (bytes32 requestId) {
}
// Callback function used by VRF Coordinator.
function fulfillRandomness(bytes32 requestId, uint256 randomness)
internal
override
{
}
function attemptEndAuction() external onlyOwner whenAuctionActive {
}
function numberOfBidsPlaced() external view returns (uint256) {
}
function getBid(uint256 auctionIndex, address bidder)
external
view
returns (Bid memory)
{
}
function getRemainingItemsForAuction(uint256 auctionIndex)
external
view
returns (uint256)
{
}
function _bidHash(uint256 auctionIndex_, address bidder_)
internal
pure
returns (bytes32)
{
}
function selectWinners(
uint256 auctionIndex_,
address[] calldata bidders_,
uint256[] calldata quantities_
) external onlyOwner whenPaused whenAuctionEnded {
}
// Refunds losing bidders from the contract's balance.
function partiallyRefundBidders(
uint256 auctionIndex_,
address payable[] calldata bidders_,
uint256[] calldata amounts_
) external onlyOwner whenPaused whenAuctionEnded {
}
// When a bidder places a bid or updates their existing bid, they will use this function.
// - total value can never be lowered
// - unit price can never be lowered
// - quantity can be raised or lowered, but only if unit price is raised to meet or exceed previous total price
function placeBid(
uint256 auctionIndex,
uint256 quantity,
uint256 unitPrice
) external payable whenNotPaused whenAuctionActive {
}
function withdrawContractBalance() external onlyOwner {
}
// A withdraw function to avoid locking ERC20 tokens in the contract forever.
// Tokens can only be withdrawn by the owner, to the owner.
function transferERC20Token(IERC20 token, uint256 amount) public onlyOwner {
}
function backfillDataBatch(
uint256[] calldata auctionIndexes_,
address[] calldata bidders_,
uint256[] calldata quantities_,
uint256[] calldata unitPrices_
) external onlyOwner whenPaused whenPreAuction {
require(<FILL_ME>)
require(auctionIndexes_.length == bidders_.length, "!len");
require(bidders_.length == quantities_.length, "!len");
require(quantities_.length == unitPrices_.length, "!len");
for (uint256 i = 0; i < auctionIndexes_.length; i++) {
bytes32 bidHash = _bidHash(auctionIndexes_[i], bidders_[i]);
_bids[bidHash] = Bid(uint128(unitPrices_[i]), uint128(quantities_[i]));
}
}
// When backfilling is done, set the _bidIndex to the index from the previous auction.
function disableBackfilling(uint256 bidIndex_, uint256 auctionLengthInHours_)
external
onlyOwner
whenPaused
whenPreAuction
{
}
// Handles receiving ether to the contract.
// Reject all direct payments to the contract except from beneficiary and owner.
// Bids must be placed using the placeBid function.
receive() external payable {
}
}
| !backfillingDisabled,"backfill disabled" | 355,664 | !backfillingDisabled |
"NOT OWNER OR NOT EXIST" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.4;
// Uncomment if needed.
// import "hardhat/console.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "../libraries/UniswapOracle.sol";
import "../libraries/UniswapCallingParams.sol";
import "../base/MiningBase.sol";
/// @title Uniswap V3 Liquidity Mining Main Contract
contract MiningOneSideBoostV2 is MiningBase {
// using Math for int24;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.UintSet;
using UniswapOracle for address;
int24 internal constant TICK_MAX = 500000;
int24 internal constant TICK_MIN = -500000;
bool public uniIsETH;
address public uniToken;
address public lockToken;
/// @dev Contract of the uniV3 Nonfungible Position Manager.
address public uniV3NFTManager;
address public uniFactory;
address public swapPool;
uint256 public lockBoostMultiplier;
/// @dev Current total lock token
uint256 public totalLock;
/// @dev Record the status for a certain token for the last touched time.
struct TokenStatus {
uint256 nftId;
// bool isDepositWithNFT;
uint128 uniLiquidity;
uint256 lockAmount;
uint256 vLiquidity;
uint256 validVLiquidity;
uint256 nIZI;
uint256 lastTouchBlock;
uint256[] lastTouchAccRewardPerShare;
}
mapping(uint256 => TokenStatus) public tokenStatus;
receive() external payable {}
// override for mining base
function getBaseTokenStatus(uint256 tokenId) internal override view returns(BaseTokenStatus memory t) {
}
struct PoolParams {
address uniV3NFTManager;
address uniTokenAddr;
address lockTokenAddr;
uint24 fee;
}
constructor(
PoolParams memory poolParams,
RewardInfo[] memory _rewardInfos,
uint256 _lockBoostMultiplier,
address iziTokenAddr,
uint256 _startBlock,
uint256 _endBlock,
uint24 feeChargePercent,
address _chargeReceiver
) MiningBase(
feeChargePercent,
poolParams.uniV3NFTManager,
poolParams.uniTokenAddr,
poolParams.lockTokenAddr,
poolParams.fee,
_chargeReceiver
) {
}
/// @notice Get the overall info for the mining contract.
function getMiningContractInfo()
external
view
returns (
address uniToken_,
address lockToken_,
uint24 fee_,
uint256 lockBoostMultiplier_,
address iziTokenAddr_,
uint256 lastTouchBlock_,
uint256 totalVLiquidity_,
uint256 totalLock_,
uint256 totalNIZI_,
uint256 startBlock_,
uint256 endBlock_
)
{
}
/// @dev compute amount of lockToken
/// @param sqrtPriceX96 sqrtprice value viewed from uniswap pool
/// @param uniAmount amount of uniToken user deposits
/// or amount computed corresponding to deposited uniswap NFT
/// @return lockAmount amount of lockToken
function _getLockAmount(uint160 sqrtPriceX96, uint256 uniAmount)
private
view
returns (uint256 lockAmount)
{
}
/// @notice new a token status when touched.
function _newTokenStatus(TokenStatus memory newTokenStatus) internal {
}
/// @notice update a token status when touched
function _updateTokenStatus(
uint256 tokenId,
uint256 validVLiquidity,
uint256 nIZI
) internal override {
}
function _computeValidVLiquidity(uint256 vLiquidity, uint256 nIZI)
internal override
view
returns (uint256)
{
}
/// @dev get sqrtPrice of pool(uniToken/tokenSwap/fee)
/// and compute tick range converted from [TICK_MIN, PriceUni] or [PriceUni, TICK_MAX]
/// @return sqrtPriceX96 current sqrtprice value viewed from uniswap pool, is a 96-bit fixed point number
/// note this value might mean price of lockToken/uniToken (if uniToken < lockToken)
/// or price of uniToken / lockToken (if uniToken > lockToken)
/// @return tickLeft
/// @return tickRight
function _getPriceAndTickRange()
private
view
returns (
uint160 sqrtPriceX96,
int24 tickLeft,
int24 tickRight
)
{
}
function getOraclePrice()
external
view
returns (
int24 avgTick,
uint160 avgSqrtPriceX96
)
{
}
function depositWithuniToken(
uint256 uniAmount,
uint256 numIZI,
uint256 deadline
) external payable nonReentrant {
}
/// @notice Widthdraw a single position.
/// @param tokenId The related position id.
/// @param noReward true if use want to withdraw without reward
function withdraw(uint256 tokenId, bool noReward) external nonReentrant {
require(<FILL_ME>)
if (noReward) {
_updateGlobalStatus();
} else {
_collectReward(tokenId);
}
TokenStatus storage t = tokenStatus[tokenId];
_updateVLiquidity(t.vLiquidity, false);
if (t.nIZI > 0) {
_updateNIZI(t.nIZI, false);
// refund iZi to user
iziToken.safeTransfer(msg.sender, t.nIZI);
}
if (t.lockAmount > 0) {
// refund lockToken to user
IERC20(lockToken).safeTransfer(msg.sender, t.lockAmount);
totalLock -= t.lockAmount;
}
// first charge and send remain fee from uniswap to user
(uint256 amount0, uint256 amount1) = INonfungiblePositionManager(
uniV3NFTManager
).collect(
UniswapCallingParams.collectParams(tokenId, address(this))
);
uint256 refundAmount0 = amount0 * feeRemainPercent / 100;
uint256 refundAmount1 = amount1 * feeRemainPercent / 100;
_safeTransferToken(rewardPool.token0, msg.sender, refundAmount0);
_safeTransferToken(rewardPool.token1, msg.sender, refundAmount1);
totalFeeCharged0 += amount0 - refundAmount0;
totalFeeCharged1 += amount1 - refundAmount1;
// then decrease and collect from uniswap
INonfungiblePositionManager(uniV3NFTManager).decreaseLiquidity(
UniswapCallingParams.decreaseLiquidityParams(tokenId, uint128(t.uniLiquidity), type(uint256).max)
);
(amount0, amount1) = INonfungiblePositionManager(
uniV3NFTManager
).collect(
UniswapCallingParams.collectParams(tokenId, address(this))
);
_safeTransferToken(rewardPool.token0, msg.sender, amount0);
_safeTransferToken(rewardPool.token1, msg.sender, amount1);
owners[tokenId] = address(0);
bool res = tokenIds[msg.sender].remove(tokenId);
require(res);
emit Withdraw(msg.sender, tokenId);
}
/// @notice Collect pending reward for a single position.
/// @param tokenId The related position id.
function collect(uint256 tokenId) external nonReentrant {
}
/// @notice Collect all pending rewards.
function collectAllTokens() external nonReentrant {
}
// Control fuctions for the contract owner and operators.
/// @notice If something goes wrong, we can send back user's nft and locked assets
/// @param tokenId The related position id.
function emergenceWithdraw(uint256 tokenId) external override onlyOwner {
}
}
| owners[tokenId]==msg.sender,"NOT OWNER OR NOT EXIST" | 355,779 | owners[tokenId]==msg.sender |
"Affiliate Split must be between 0-100%" | pragma solidity ^0.5.12;
contract HEX {
function xfLobbyEnter(address referrerAddr)
external
payable;
function xfLobbyExit(uint256 enterDay, uint256 count)
external;
function xfLobbyPendingDays(address memberAddr)
external
view
returns (uint256[2] memory words);
function balanceOf (address account)
external
view
returns (uint256);
function transfer (address recipient, uint256 amount)
external
returns (bool);
function currentDay ()
external
view
returns (uint256);
}
contract Router {
struct CustomerState {
uint16 nextPendingDay;
mapping(uint256 => uint256) contributionByDay;
}
struct LobbyContributionState {
uint256 totalValue;
uint256 heartsReceived;
}
struct ContractStateCache {
uint256 currentDay;
uint256 nextPendingDay;
}
event LobbyJoined(
uint40 timestamp,
uint16 day,
uint256 amount,
address indexed customer,
address indexed affiliate
);
event LobbyLeft(
uint40 timestamp,
uint16 day,
uint256 hearts
);
event MissedLobby(
uint40 timestamp,
uint16 day
);
// from HEX
uint16 private constant LAUNCH_PHASE_DAYS = 350;
uint16 private constant LAUNCH_PHASE_END_DAY = 351;
uint256 private constant XF_LOBBY_DAY_WORDS = (LAUNCH_PHASE_END_DAY + 255) >> 8;
// constants & mappings we need
HEX private constant hx = HEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39);
address private constant DEFAULT_OPERATOR = 0xD30BC4859A79852157211E6db19dE159673a67E2;
address private operatorOne;
address private operatorTwo;
address private operatorThree;
address private constant splitter = 0x292A6FE731314557f08F7D598eADaa1988018833;
uint256 private contractNextPendingDay;
uint256 public HEX_LAUNCH_TIME = 1575331200;
mapping(address => uint8) private registeredAffiliates;
mapping(uint256 => LobbyContributionState) private totalValueByDay;
mapping(address => CustomerState) private customerData;
mapping(uint8 => uint8) public affiliateRankPercentages;
modifier operatorOnly() {
}
constructor()
public
{
}
function enterLobby(address customer, address affiliate)
public
payable
{
}
function exitLobbiesBeforeDay(address customer, uint256 day)
public
{
}
function updateOperatorOne(address newOperator)
public
{
}
function updateOperatorTwo(address newOperator)
public
{
}
function updateOperatorThree(address newOperator)
public
{
}
function registerAffiliate(address affiliateContract, uint8 affiliateRank)
public
operatorOnly
{
require(registeredAffiliates[affiliateContract] == 0, "Affiliate contract is already registered");
require(<FILL_ME>)
registeredAffiliates[affiliateContract] = affiliateRank;
}
function updateAffiliateRank(address affiliateContract, uint8 affiliateRank)
public
operatorOnly
{
}
function addAffiliateRank(uint8 affiliateRank, uint8 rankSplitPercentage)
public
operatorOnly
{
}
function verifyAffiliate(address affiliateContract)
public
view
returns (bool, uint8)
{
}
function ()
external
payable
{
}
function _getHexContractDay()
private
view
returns (uint256)
{
}
function _leaveLobbies(ContractStateCache memory currentState, uint256 beforeDay)
private
{
}
function _distributeShare(address customer, uint256 endDay)
private
returns (uint256)
{
}
function uint2str(uint i)
internal
pure returns (string memory _uintAsString)
{
}
function strConcat(string memory _a, string memory _b, string memory _c
, string memory _d, string memory _e)
private
pure
returns (string memory){
}
function strConcat(string memory _a, string memory _b, string memory _c, string memory _d)
private
pure
returns (string memory) {
}
function strConcat(string memory _a, string memory _b, string memory _c)
private
pure
returns (string memory) {
}
function strConcat(string memory _a, string memory _b)
private
pure
returns (string memory) {
}
}
| affiliateRankPercentages[affiliateRank]>0&&affiliateRankPercentages[affiliateRank]<=100,"Affiliate Split must be between 0-100%" | 355,912 | affiliateRankPercentages[affiliateRank]>0&&affiliateRankPercentages[affiliateRank]<=100 |
"Hearts received for a lobby is 0" | pragma solidity ^0.5.12;
contract HEX {
function xfLobbyEnter(address referrerAddr)
external
payable;
function xfLobbyExit(uint256 enterDay, uint256 count)
external;
function xfLobbyPendingDays(address memberAddr)
external
view
returns (uint256[2] memory words);
function balanceOf (address account)
external
view
returns (uint256);
function transfer (address recipient, uint256 amount)
external
returns (bool);
function currentDay ()
external
view
returns (uint256);
}
contract Router {
struct CustomerState {
uint16 nextPendingDay;
mapping(uint256 => uint256) contributionByDay;
}
struct LobbyContributionState {
uint256 totalValue;
uint256 heartsReceived;
}
struct ContractStateCache {
uint256 currentDay;
uint256 nextPendingDay;
}
event LobbyJoined(
uint40 timestamp,
uint16 day,
uint256 amount,
address indexed customer,
address indexed affiliate
);
event LobbyLeft(
uint40 timestamp,
uint16 day,
uint256 hearts
);
event MissedLobby(
uint40 timestamp,
uint16 day
);
// from HEX
uint16 private constant LAUNCH_PHASE_DAYS = 350;
uint16 private constant LAUNCH_PHASE_END_DAY = 351;
uint256 private constant XF_LOBBY_DAY_WORDS = (LAUNCH_PHASE_END_DAY + 255) >> 8;
// constants & mappings we need
HEX private constant hx = HEX(0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39);
address private constant DEFAULT_OPERATOR = 0xD30BC4859A79852157211E6db19dE159673a67E2;
address private operatorOne;
address private operatorTwo;
address private operatorThree;
address private constant splitter = 0x292A6FE731314557f08F7D598eADaa1988018833;
uint256 private contractNextPendingDay;
uint256 public HEX_LAUNCH_TIME = 1575331200;
mapping(address => uint8) private registeredAffiliates;
mapping(uint256 => LobbyContributionState) private totalValueByDay;
mapping(address => CustomerState) private customerData;
mapping(uint8 => uint8) public affiliateRankPercentages;
modifier operatorOnly() {
}
constructor()
public
{
}
function enterLobby(address customer, address affiliate)
public
payable
{
}
function exitLobbiesBeforeDay(address customer, uint256 day)
public
{
}
function updateOperatorOne(address newOperator)
public
{
}
function updateOperatorTwo(address newOperator)
public
{
}
function updateOperatorThree(address newOperator)
public
{
}
function registerAffiliate(address affiliateContract, uint8 affiliateRank)
public
operatorOnly
{
}
function updateAffiliateRank(address affiliateContract, uint8 affiliateRank)
public
operatorOnly
{
}
function addAffiliateRank(uint8 affiliateRank, uint8 rankSplitPercentage)
public
operatorOnly
{
}
function verifyAffiliate(address affiliateContract)
public
view
returns (bool, uint8)
{
}
function ()
external
payable
{
}
function _getHexContractDay()
private
view
returns (uint256)
{
}
function _leaveLobbies(ContractStateCache memory currentState, uint256 beforeDay)
private
{
uint256 newBalance = hx.balanceOf(address(this));
uint256 oldBalance;
if(currentState.nextPendingDay < beforeDay){
uint256[XF_LOBBY_DAY_WORDS] memory joinedDays = hx.xfLobbyPendingDays(address(this));
while(currentState.nextPendingDay < beforeDay){
if( (joinedDays[currentState.nextPendingDay >> 8] & (1 << (currentState.nextPendingDay & 255))) >>
(currentState.nextPendingDay & 255) == 1){
hx.xfLobbyExit(currentState.nextPendingDay, 0);
oldBalance = newBalance;
newBalance = hx.balanceOf(address(this));
totalValueByDay[currentState.nextPendingDay].heartsReceived = newBalance - oldBalance;
require(<FILL_ME>)
emit LobbyLeft(uint40(block.timestamp),
uint16(currentState.nextPendingDay),
totalValueByDay[currentState.nextPendingDay].heartsReceived);
} else {
emit MissedLobby(uint40(block.timestamp),
uint16(currentState.nextPendingDay));
}
currentState.nextPendingDay++;
}
}
}
function _distributeShare(address customer, uint256 endDay)
private
returns (uint256)
{
}
function uint2str(uint i)
internal
pure returns (string memory _uintAsString)
{
}
function strConcat(string memory _a, string memory _b, string memory _c
, string memory _d, string memory _e)
private
pure
returns (string memory){
}
function strConcat(string memory _a, string memory _b, string memory _c, string memory _d)
private
pure
returns (string memory) {
}
function strConcat(string memory _a, string memory _b, string memory _c)
private
pure
returns (string memory) {
}
function strConcat(string memory _a, string memory _b)
private
pure
returns (string memory) {
}
}
| totalValueByDay[currentState.nextPendingDay].heartsReceived>0,"Hearts received for a lobby is 0" | 355,912 | totalValueByDay[currentState.nextPendingDay].heartsReceived>0 |
null | pragma solidity ^0.4.19;
contract PRIVATE_ETH_CELL
{
mapping (address=>uint256) public balances;
uint public MinSum;
LogFile Log;
bool intitalized;
function SetMinSum(uint _val)
public
{
require(<FILL_ME>)
MinSum = _val;
}
function SetLogFile(address _log)
public
{
}
function Initialized()
public
{
}
function Deposit()
public
payable
{
}
function Collect(uint _am)
public
payable
{
}
function()
public
payable
{
}
}
contract LogFile
{
struct Message
{
address Sender;
string Data;
uint Val;
uint Time;
}
Message[] public History;
Message LastMsg;
function AddMessage(address _adr,uint _val,string _data)
public
{
}
}
| !intitalized | 355,967 | !intitalized |
"Exceeded giveaway limit" | // SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./Base64.sol";
import "./PonziRugsGenerator.sol";
contract PonziRugs is ERC721, Ownable{
// On Tupac's Soul
uint256 public MAX_SUPPLY = 1250;
uint256 public GET_RUGGED_IN_ETHER = 0.06 ether;
uint256 public RUG_GIVEAWAY = 16;
uint256 public totalSupply;
uint256 RUG_RANDOM_SEED = 0;
bool public hasRuggeningStarted = false;
mapping(string => bool) isMinted;
mapping(uint256 => uint256[]) idToCombination;
constructor() ERC721("PonziRugs", "RUG") {}
function toggleRuggening() public onlyOwner
{
}
function devRug(uint rugs) public onlyOwner
{
require(<FILL_ME>)
rugPull(rugs);
}
function getRugged(uint256 rugs) public payable
{
}
function rugPull(uint256 rugPulls) internal
{
}
function craftRug(uint256 tokenId) internal returns (uint256[] memory colorCombination)
{
}
function random(uint256 seed) internal view returns (uint256)
{
}
function tokenURI(uint256 tokenId) override public view returns (string memory)
{
}
function withdrawAll() public payable onlyOwner
{
}
}
| totalSupply+rugs<=RUG_GIVEAWAY,"Exceeded giveaway limit" | 356,188 | totalSupply+rugs<=RUG_GIVEAWAY |
"Ether Amount invalid to get rugged do: getRuggedInEther * rugs" | // SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./Base64.sol";
import "./PonziRugsGenerator.sol";
contract PonziRugs is ERC721, Ownable{
// On Tupac's Soul
uint256 public MAX_SUPPLY = 1250;
uint256 public GET_RUGGED_IN_ETHER = 0.06 ether;
uint256 public RUG_GIVEAWAY = 16;
uint256 public totalSupply;
uint256 RUG_RANDOM_SEED = 0;
bool public hasRuggeningStarted = false;
mapping(string => bool) isMinted;
mapping(uint256 => uint256[]) idToCombination;
constructor() ERC721("PonziRugs", "RUG") {}
function toggleRuggening() public onlyOwner
{
}
function devRug(uint rugs) public onlyOwner
{
}
function getRugged(uint256 rugs) public payable
{
require(hasRuggeningStarted, "The ruggening has not started");
require(rugs > 0 && rugs <= 2, "You can only get rugged twice per transaction");
require(<FILL_ME>)
rugPull(rugs);
}
function rugPull(uint256 rugPulls) internal
{
}
function craftRug(uint256 tokenId) internal returns (uint256[] memory colorCombination)
{
}
function random(uint256 seed) internal view returns (uint256)
{
}
function tokenURI(uint256 tokenId) override public view returns (string memory)
{
}
function withdrawAll() public payable onlyOwner
{
}
}
| GET_RUGGED_IN_ETHER*rugs==msg.value,"Ether Amount invalid to get rugged do: getRuggedInEther * rugs" | 356,188 | GET_RUGGED_IN_ETHER*rugs==msg.value |
null | // SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./Base64.sol";
import "./PonziRugsGenerator.sol";
contract PonziRugs is ERC721, Ownable{
// On Tupac's Soul
uint256 public MAX_SUPPLY = 1250;
uint256 public GET_RUGGED_IN_ETHER = 0.06 ether;
uint256 public RUG_GIVEAWAY = 16;
uint256 public totalSupply;
uint256 RUG_RANDOM_SEED = 0;
bool public hasRuggeningStarted = false;
mapping(string => bool) isMinted;
mapping(uint256 => uint256[]) idToCombination;
constructor() ERC721("PonziRugs", "RUG") {}
function toggleRuggening() public onlyOwner
{
}
function devRug(uint rugs) public onlyOwner
{
}
function getRugged(uint256 rugs) public payable
{
}
function rugPull(uint256 rugPulls) internal
{
require(<FILL_ME>)
require(!PonziRugsGenerator.isTryingToRug(msg.sender));
for (uint256 i; i < rugPulls; i++)
{
idToCombination[totalSupply] = craftRug(totalSupply);
_mint(msg.sender, totalSupply);
totalSupply++;
}
}
function craftRug(uint256 tokenId) internal returns (uint256[] memory colorCombination)
{
}
function random(uint256 seed) internal view returns (uint256)
{
}
function tokenURI(uint256 tokenId) override public view returns (string memory)
{
}
function withdrawAll() public payable onlyOwner
{
}
}
| totalSupply+rugPulls<MAX_SUPPLY | 356,188 | totalSupply+rugPulls<MAX_SUPPLY |
null | // SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./Base64.sol";
import "./PonziRugsGenerator.sol";
contract PonziRugs is ERC721, Ownable{
// On Tupac's Soul
uint256 public MAX_SUPPLY = 1250;
uint256 public GET_RUGGED_IN_ETHER = 0.06 ether;
uint256 public RUG_GIVEAWAY = 16;
uint256 public totalSupply;
uint256 RUG_RANDOM_SEED = 0;
bool public hasRuggeningStarted = false;
mapping(string => bool) isMinted;
mapping(uint256 => uint256[]) idToCombination;
constructor() ERC721("PonziRugs", "RUG") {}
function toggleRuggening() public onlyOwner
{
}
function devRug(uint rugs) public onlyOwner
{
}
function getRugged(uint256 rugs) public payable
{
}
function rugPull(uint256 rugPulls) internal
{
require(totalSupply + rugPulls < MAX_SUPPLY);
require(<FILL_ME>)
for (uint256 i; i < rugPulls; i++)
{
idToCombination[totalSupply] = craftRug(totalSupply);
_mint(msg.sender, totalSupply);
totalSupply++;
}
}
function craftRug(uint256 tokenId) internal returns (uint256[] memory colorCombination)
{
}
function random(uint256 seed) internal view returns (uint256)
{
}
function tokenURI(uint256 tokenId) override public view returns (string memory)
{
}
function withdrawAll() public payable onlyOwner
{
}
}
| !PonziRugsGenerator.isTryingToRug(msg.sender) | 356,188 | !PonziRugsGenerator.isTryingToRug(msg.sender) |
"Purchase would exceed max supply of Guardians." | // SPDX-License-Identifier: MIT
/*
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ . . . . . +
+ . _ ____ U _____ u +
. U /"\ u . U /"___|u . \| ___"|/ . .
. . . \/ _ \/ \| | _ / | _|" .
. / ___ \ . . | |_| | . | |___ . . .
. /_/ \_\ _ \____| _ |_____| _ .
. . \\ >> (") _)(|_ (") << >> (") . .
. (__) (__) " (__)__) " (__) (__) " . .
. . . . . .
. . ## . ### . . .
. ## ### ## ### ##. . .
. ## * ## ### ░░░░░ ## ## * # .
. . .# *** ### ## ░░░ ### ░░ ## ## ****#. .
. ## ***** ### ░░ ## . ### ░░ ### ****.# . .
. .## *** ## ░░░░░ ######### ░░░ ## ** #. .
. # ** ## ░░░ ## ░░░░░░░░░ # ░░░░ ####. .
. ## ## ░░ ## ########## ░░░░░░░░ ## .
. ## ░░░ # ##### ░░░░░ ## . .
. ## ░░ ## ####################### ░░░ ## .
. ## ░░ ## ## ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ## .
. ## ## ## ░░░░░ #################### ░░░░░ ## .
. . ## ## ░░░░░ ### ### ## . .
. ### ░░░ ### ########## ## .
. ### ░░░░ ## ### ░░░░ ### HODLers Win ! .
. ## ░░░░ ## ## ░░░░ ### ## . . ~~~~~~~~ ## .
. ## ░░░░ ### ## ░░░░ ## ## .~~~~~~~~~## .
. ## ░░░░ ## ## ░░░░ ## ##~~~~~~~## .
. . #### ░░░░ ### ░░░░ ## ##~~~## .
. #### #### ░░░░ #### #~# .
. ## #### #######.. #### ## .
. ### .:. #### .######## .
. ### .:+-+:. ## # ### #### .
. # .:+-+█+-+:. # ## ######## .
. ### * .:+-+:. ### .**# ###### .
. ## # ** .:. * # ...## ##### .
. .# # ..# .** ###### ### .
. .## .*..# ..*^ # ## .
. #### ## ##.# :###### #### ## #### ####### ### ##:###### ########## .
+ +
+ +
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
*/
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./interface/IGuardVault.sol";
contract AGE is ERC721, Pausable, Ownable {
uint public constant AGE_PRICE = 0.1 ether;
uint public constant AGE_PREPRICE = 0.088 ether;
uint public constant INIT_GUARD_VAULT = 0.01 ether;
uint public constant MAX_AGE_PURCHASE = 20;
uint public constant MAX_AGES = 10000;
string public AGE_PROVENANCE = "";
//Address => Stage => tokenNumbers
mapping(address => mapping(uint => uint)) public mintRecords;
//Stage => merkle proof
mapping(uint => bytes32) public preMintRoot;
//pre mint stage, zero is public mint
uint public preStage = 1;
bool public preSaleActive = true;
//Get startingIndex from community vote
uint public startingIndex = 0;
address public hostAddress;
IGuardVault private guardVault;
uint private _totalSupply = 0;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address host, string memory uri) ERC721(name, symbol) {
}
/**
* Mints Guardians
*/
function mintAge(uint numberOfTokens) public payable whenNotPaused {
require(numberOfTokens <= MAX_AGE_PURCHASE, "Can only mint 20 tokens at a time.");
require(<FILL_ME>)
require(AGE_PRICE * numberOfTokens <= msg.value, "Ether value sent is not correct.");
require(!preSaleActive, "Now is pre mint.");
uint vaultValue = msg.value / 10 / numberOfTokens;
guardVault.forGuard{value : msg.value / 10}();
if (vaultValue == INIT_GUARD_VAULT) {
for (uint i = 0; i < numberOfTokens; i++) {
_safeMint(msg.sender, _totalSupply);
_totalSupply += 1;
}
} else {
for (uint i = 0; i < numberOfTokens; i++) {
_safeMint(msg.sender, _totalSupply);
guardVault.initGuardianVault(_totalSupply, vaultValue);
_totalSupply += 1;
}
}
}
function preMintAge(
uint numberOfTokens,
uint maxNumber,
bytes32[] memory proof) public payable whenNotPaused {
}
/**
* Reserve Guardians for community
*/
function reserveAge(uint numberOfTokens, address to) public onlyOwner payable {
}
/**
* Set the starting index for the AGE
*/
function setStartingIndex(uint index) public onlyOwner {
}
/*
* Set provenance
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function burn(uint tokenId) external {
}
// The following functions are overrides required by Solidity.
function _burn(uint tokenId) internal override(ERC721) {
}
function setStageProof(uint stage, bytes32 proof) public onlyOwner {
}
function getMintRecord(address minter, uint stage) public view returns (uint) {
}
function setHost(address host) public onlyOwner {
}
function claim() public payable onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function flipPreSaleState() public onlyOwner {
}
function setPreMintStage(uint nextStage) public onlyOwner {
}
function setVault(address vaultAddress) public onlyOwner {
}
function getVaultAddress() public view returns (address) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function totalSupply() public view virtual returns (uint) {
}
receive() external payable virtual {}
fallback() external payable virtual {}
}
| totalSupply()+numberOfTokens<=MAX_AGES,"Purchase would exceed max supply of Guardians." | 356,199 | totalSupply()+numberOfTokens<=MAX_AGES |
"Ether value sent is not correct." | // SPDX-License-Identifier: MIT
/*
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ . . . . . +
+ . _ ____ U _____ u +
. U /"\ u . U /"___|u . \| ___"|/ . .
. . . \/ _ \/ \| | _ / | _|" .
. / ___ \ . . | |_| | . | |___ . . .
. /_/ \_\ _ \____| _ |_____| _ .
. . \\ >> (") _)(|_ (") << >> (") . .
. (__) (__) " (__)__) " (__) (__) " . .
. . . . . .
. . ## . ### . . .
. ## ### ## ### ##. . .
. ## * ## ### ░░░░░ ## ## * # .
. . .# *** ### ## ░░░ ### ░░ ## ## ****#. .
. ## ***** ### ░░ ## . ### ░░ ### ****.# . .
. .## *** ## ░░░░░ ######### ░░░ ## ** #. .
. # ** ## ░░░ ## ░░░░░░░░░ # ░░░░ ####. .
. ## ## ░░ ## ########## ░░░░░░░░ ## .
. ## ░░░ # ##### ░░░░░ ## . .
. ## ░░ ## ####################### ░░░ ## .
. ## ░░ ## ## ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ## .
. ## ## ## ░░░░░ #################### ░░░░░ ## .
. . ## ## ░░░░░ ### ### ## . .
. ### ░░░ ### ########## ## .
. ### ░░░░ ## ### ░░░░ ### HODLers Win ! .
. ## ░░░░ ## ## ░░░░ ### ## . . ~~~~~~~~ ## .
. ## ░░░░ ### ## ░░░░ ## ## .~~~~~~~~~## .
. ## ░░░░ ## ## ░░░░ ## ##~~~~~~~## .
. . #### ░░░░ ### ░░░░ ## ##~~~## .
. #### #### ░░░░ #### #~# .
. ## #### #######.. #### ## .
. ### .:. #### .######## .
. ### .:+-+:. ## # ### #### .
. # .:+-+█+-+:. # ## ######## .
. ### * .:+-+:. ### .**# ###### .
. ## # ** .:. * # ...## ##### .
. .# # ..# .** ###### ### .
. .## .*..# ..*^ # ## .
. #### ## ##.# :###### #### ## #### ####### ### ##:###### ########## .
+ +
+ +
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
*/
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./interface/IGuardVault.sol";
contract AGE is ERC721, Pausable, Ownable {
uint public constant AGE_PRICE = 0.1 ether;
uint public constant AGE_PREPRICE = 0.088 ether;
uint public constant INIT_GUARD_VAULT = 0.01 ether;
uint public constant MAX_AGE_PURCHASE = 20;
uint public constant MAX_AGES = 10000;
string public AGE_PROVENANCE = "";
//Address => Stage => tokenNumbers
mapping(address => mapping(uint => uint)) public mintRecords;
//Stage => merkle proof
mapping(uint => bytes32) public preMintRoot;
//pre mint stage, zero is public mint
uint public preStage = 1;
bool public preSaleActive = true;
//Get startingIndex from community vote
uint public startingIndex = 0;
address public hostAddress;
IGuardVault private guardVault;
uint private _totalSupply = 0;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address host, string memory uri) ERC721(name, symbol) {
}
/**
* Mints Guardians
*/
function mintAge(uint numberOfTokens) public payable whenNotPaused {
require(numberOfTokens <= MAX_AGE_PURCHASE, "Can only mint 20 tokens at a time.");
require(totalSupply() + numberOfTokens <= MAX_AGES, "Purchase would exceed max supply of Guardians.");
require(<FILL_ME>)
require(!preSaleActive, "Now is pre mint.");
uint vaultValue = msg.value / 10 / numberOfTokens;
guardVault.forGuard{value : msg.value / 10}();
if (vaultValue == INIT_GUARD_VAULT) {
for (uint i = 0; i < numberOfTokens; i++) {
_safeMint(msg.sender, _totalSupply);
_totalSupply += 1;
}
} else {
for (uint i = 0; i < numberOfTokens; i++) {
_safeMint(msg.sender, _totalSupply);
guardVault.initGuardianVault(_totalSupply, vaultValue);
_totalSupply += 1;
}
}
}
function preMintAge(
uint numberOfTokens,
uint maxNumber,
bytes32[] memory proof) public payable whenNotPaused {
}
/**
* Reserve Guardians for community
*/
function reserveAge(uint numberOfTokens, address to) public onlyOwner payable {
}
/**
* Set the starting index for the AGE
*/
function setStartingIndex(uint index) public onlyOwner {
}
/*
* Set provenance
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function burn(uint tokenId) external {
}
// The following functions are overrides required by Solidity.
function _burn(uint tokenId) internal override(ERC721) {
}
function setStageProof(uint stage, bytes32 proof) public onlyOwner {
}
function getMintRecord(address minter, uint stage) public view returns (uint) {
}
function setHost(address host) public onlyOwner {
}
function claim() public payable onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function flipPreSaleState() public onlyOwner {
}
function setPreMintStage(uint nextStage) public onlyOwner {
}
function setVault(address vaultAddress) public onlyOwner {
}
function getVaultAddress() public view returns (address) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function totalSupply() public view virtual returns (uint) {
}
receive() external payable virtual {}
fallback() external payable virtual {}
}
| AGE_PRICE*numberOfTokens<=msg.value,"Ether value sent is not correct." | 356,199 | AGE_PRICE*numberOfTokens<=msg.value |
"Now is pre mint." | // SPDX-License-Identifier: MIT
/*
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ . . . . . +
+ . _ ____ U _____ u +
. U /"\ u . U /"___|u . \| ___"|/ . .
. . . \/ _ \/ \| | _ / | _|" .
. / ___ \ . . | |_| | . | |___ . . .
. /_/ \_\ _ \____| _ |_____| _ .
. . \\ >> (") _)(|_ (") << >> (") . .
. (__) (__) " (__)__) " (__) (__) " . .
. . . . . .
. . ## . ### . . .
. ## ### ## ### ##. . .
. ## * ## ### ░░░░░ ## ## * # .
. . .# *** ### ## ░░░ ### ░░ ## ## ****#. .
. ## ***** ### ░░ ## . ### ░░ ### ****.# . .
. .## *** ## ░░░░░ ######### ░░░ ## ** #. .
. # ** ## ░░░ ## ░░░░░░░░░ # ░░░░ ####. .
. ## ## ░░ ## ########## ░░░░░░░░ ## .
. ## ░░░ # ##### ░░░░░ ## . .
. ## ░░ ## ####################### ░░░ ## .
. ## ░░ ## ## ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ## .
. ## ## ## ░░░░░ #################### ░░░░░ ## .
. . ## ## ░░░░░ ### ### ## . .
. ### ░░░ ### ########## ## .
. ### ░░░░ ## ### ░░░░ ### HODLers Win ! .
. ## ░░░░ ## ## ░░░░ ### ## . . ~~~~~~~~ ## .
. ## ░░░░ ### ## ░░░░ ## ## .~~~~~~~~~## .
. ## ░░░░ ## ## ░░░░ ## ##~~~~~~~## .
. . #### ░░░░ ### ░░░░ ## ##~~~## .
. #### #### ░░░░ #### #~# .
. ## #### #######.. #### ## .
. ### .:. #### .######## .
. ### .:+-+:. ## # ### #### .
. # .:+-+█+-+:. # ## ######## .
. ### * .:+-+:. ### .**# ###### .
. ## # ** .:. * # ...## ##### .
. .# # ..# .** ###### ### .
. .## .*..# ..*^ # ## .
. #### ## ##.# :###### #### ## #### ####### ### ##:###### ########## .
+ +
+ +
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
*/
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./interface/IGuardVault.sol";
contract AGE is ERC721, Pausable, Ownable {
uint public constant AGE_PRICE = 0.1 ether;
uint public constant AGE_PREPRICE = 0.088 ether;
uint public constant INIT_GUARD_VAULT = 0.01 ether;
uint public constant MAX_AGE_PURCHASE = 20;
uint public constant MAX_AGES = 10000;
string public AGE_PROVENANCE = "";
//Address => Stage => tokenNumbers
mapping(address => mapping(uint => uint)) public mintRecords;
//Stage => merkle proof
mapping(uint => bytes32) public preMintRoot;
//pre mint stage, zero is public mint
uint public preStage = 1;
bool public preSaleActive = true;
//Get startingIndex from community vote
uint public startingIndex = 0;
address public hostAddress;
IGuardVault private guardVault;
uint private _totalSupply = 0;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address host, string memory uri) ERC721(name, symbol) {
}
/**
* Mints Guardians
*/
function mintAge(uint numberOfTokens) public payable whenNotPaused {
require(numberOfTokens <= MAX_AGE_PURCHASE, "Can only mint 20 tokens at a time.");
require(totalSupply() + numberOfTokens <= MAX_AGES, "Purchase would exceed max supply of Guardians.");
require(AGE_PRICE * numberOfTokens <= msg.value, "Ether value sent is not correct.");
require(<FILL_ME>)
uint vaultValue = msg.value / 10 / numberOfTokens;
guardVault.forGuard{value : msg.value / 10}();
if (vaultValue == INIT_GUARD_VAULT) {
for (uint i = 0; i < numberOfTokens; i++) {
_safeMint(msg.sender, _totalSupply);
_totalSupply += 1;
}
} else {
for (uint i = 0; i < numberOfTokens; i++) {
_safeMint(msg.sender, _totalSupply);
guardVault.initGuardianVault(_totalSupply, vaultValue);
_totalSupply += 1;
}
}
}
function preMintAge(
uint numberOfTokens,
uint maxNumber,
bytes32[] memory proof) public payable whenNotPaused {
}
/**
* Reserve Guardians for community
*/
function reserveAge(uint numberOfTokens, address to) public onlyOwner payable {
}
/**
* Set the starting index for the AGE
*/
function setStartingIndex(uint index) public onlyOwner {
}
/*
* Set provenance
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function burn(uint tokenId) external {
}
// The following functions are overrides required by Solidity.
function _burn(uint tokenId) internal override(ERC721) {
}
function setStageProof(uint stage, bytes32 proof) public onlyOwner {
}
function getMintRecord(address minter, uint stage) public view returns (uint) {
}
function setHost(address host) public onlyOwner {
}
function claim() public payable onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function flipPreSaleState() public onlyOwner {
}
function setPreMintStage(uint nextStage) public onlyOwner {
}
function setVault(address vaultAddress) public onlyOwner {
}
function getVaultAddress() public view returns (address) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function totalSupply() public view virtual returns (uint) {
}
receive() external payable virtual {}
fallback() external payable virtual {}
}
| !preSaleActive,"Now is pre mint." | 356,199 | !preSaleActive |
"Pre mint is not active." | // SPDX-License-Identifier: MIT
/*
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ . . . . . +
+ . _ ____ U _____ u +
. U /"\ u . U /"___|u . \| ___"|/ . .
. . . \/ _ \/ \| | _ / | _|" .
. / ___ \ . . | |_| | . | |___ . . .
. /_/ \_\ _ \____| _ |_____| _ .
. . \\ >> (") _)(|_ (") << >> (") . .
. (__) (__) " (__)__) " (__) (__) " . .
. . . . . .
. . ## . ### . . .
. ## ### ## ### ##. . .
. ## * ## ### ░░░░░ ## ## * # .
. . .# *** ### ## ░░░ ### ░░ ## ## ****#. .
. ## ***** ### ░░ ## . ### ░░ ### ****.# . .
. .## *** ## ░░░░░ ######### ░░░ ## ** #. .
. # ** ## ░░░ ## ░░░░░░░░░ # ░░░░ ####. .
. ## ## ░░ ## ########## ░░░░░░░░ ## .
. ## ░░░ # ##### ░░░░░ ## . .
. ## ░░ ## ####################### ░░░ ## .
. ## ░░ ## ## ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ## .
. ## ## ## ░░░░░ #################### ░░░░░ ## .
. . ## ## ░░░░░ ### ### ## . .
. ### ░░░ ### ########## ## .
. ### ░░░░ ## ### ░░░░ ### HODLers Win ! .
. ## ░░░░ ## ## ░░░░ ### ## . . ~~~~~~~~ ## .
. ## ░░░░ ### ## ░░░░ ## ## .~~~~~~~~~## .
. ## ░░░░ ## ## ░░░░ ## ##~~~~~~~## .
. . #### ░░░░ ### ░░░░ ## ##~~~## .
. #### #### ░░░░ #### #~# .
. ## #### #######.. #### ## .
. ### .:. #### .######## .
. ### .:+-+:. ## # ### #### .
. # .:+-+█+-+:. # ## ######## .
. ### * .:+-+:. ### .**# ###### .
. ## # ** .:. * # ...## ##### .
. .# # ..# .** ###### ### .
. .## .*..# ..*^ # ## .
. #### ## ##.# :###### #### ## #### ####### ### ##:###### ########## .
+ +
+ +
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
*/
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./interface/IGuardVault.sol";
contract AGE is ERC721, Pausable, Ownable {
uint public constant AGE_PRICE = 0.1 ether;
uint public constant AGE_PREPRICE = 0.088 ether;
uint public constant INIT_GUARD_VAULT = 0.01 ether;
uint public constant MAX_AGE_PURCHASE = 20;
uint public constant MAX_AGES = 10000;
string public AGE_PROVENANCE = "";
//Address => Stage => tokenNumbers
mapping(address => mapping(uint => uint)) public mintRecords;
//Stage => merkle proof
mapping(uint => bytes32) public preMintRoot;
//pre mint stage, zero is public mint
uint public preStage = 1;
bool public preSaleActive = true;
//Get startingIndex from community vote
uint public startingIndex = 0;
address public hostAddress;
IGuardVault private guardVault;
uint private _totalSupply = 0;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address host, string memory uri) ERC721(name, symbol) {
}
/**
* Mints Guardians
*/
function mintAge(uint numberOfTokens) public payable whenNotPaused {
}
function preMintAge(
uint numberOfTokens,
uint maxNumber,
bytes32[] memory proof) public payable whenNotPaused {
require(totalSupply() + numberOfTokens <= MAX_AGES, "Purchase would exceed max supply of Guardians.");
require(<FILL_ME>)
require(msg.value >= AGE_PREPRICE * numberOfTokens, "Ether value for vault is not enough.");
uint mintedNum = mintRecords[_msgSender()][preStage];
require(mintedNum + numberOfTokens <= maxNumber, "Pre mint already the max purchase.");
bytes32 root = preMintRoot[preStage];
bytes32 node = keccak256(abi.encodePacked(_msgSender(), maxNumber));
require(MerkleProof.verify(proof, root, node), "You are not in pre mint list.");
guardVault.forGuard{value : INIT_GUARD_VAULT * numberOfTokens}();
for (uint i = 0; i < numberOfTokens; i++) {
_safeMint(_msgSender(), _totalSupply);
_totalSupply += 1;
}
mintRecords[_msgSender()][preStage] += numberOfTokens;
}
/**
* Reserve Guardians for community
*/
function reserveAge(uint numberOfTokens, address to) public onlyOwner payable {
}
/**
* Set the starting index for the AGE
*/
function setStartingIndex(uint index) public onlyOwner {
}
/*
* Set provenance
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function burn(uint tokenId) external {
}
// The following functions are overrides required by Solidity.
function _burn(uint tokenId) internal override(ERC721) {
}
function setStageProof(uint stage, bytes32 proof) public onlyOwner {
}
function getMintRecord(address minter, uint stage) public view returns (uint) {
}
function setHost(address host) public onlyOwner {
}
function claim() public payable onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function flipPreSaleState() public onlyOwner {
}
function setPreMintStage(uint nextStage) public onlyOwner {
}
function setVault(address vaultAddress) public onlyOwner {
}
function getVaultAddress() public view returns (address) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function totalSupply() public view virtual returns (uint) {
}
receive() external payable virtual {}
fallback() external payable virtual {}
}
| preSaleActive&&preStage>0,"Pre mint is not active." | 356,199 | preSaleActive&&preStage>0 |
"Pre mint already the max purchase." | // SPDX-License-Identifier: MIT
/*
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ . . . . . +
+ . _ ____ U _____ u +
. U /"\ u . U /"___|u . \| ___"|/ . .
. . . \/ _ \/ \| | _ / | _|" .
. / ___ \ . . | |_| | . | |___ . . .
. /_/ \_\ _ \____| _ |_____| _ .
. . \\ >> (") _)(|_ (") << >> (") . .
. (__) (__) " (__)__) " (__) (__) " . .
. . . . . .
. . ## . ### . . .
. ## ### ## ### ##. . .
. ## * ## ### ░░░░░ ## ## * # .
. . .# *** ### ## ░░░ ### ░░ ## ## ****#. .
. ## ***** ### ░░ ## . ### ░░ ### ****.# . .
. .## *** ## ░░░░░ ######### ░░░ ## ** #. .
. # ** ## ░░░ ## ░░░░░░░░░ # ░░░░ ####. .
. ## ## ░░ ## ########## ░░░░░░░░ ## .
. ## ░░░ # ##### ░░░░░ ## . .
. ## ░░ ## ####################### ░░░ ## .
. ## ░░ ## ## ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ## .
. ## ## ## ░░░░░ #################### ░░░░░ ## .
. . ## ## ░░░░░ ### ### ## . .
. ### ░░░ ### ########## ## .
. ### ░░░░ ## ### ░░░░ ### HODLers Win ! .
. ## ░░░░ ## ## ░░░░ ### ## . . ~~~~~~~~ ## .
. ## ░░░░ ### ## ░░░░ ## ## .~~~~~~~~~## .
. ## ░░░░ ## ## ░░░░ ## ##~~~~~~~## .
. . #### ░░░░ ### ░░░░ ## ##~~~## .
. #### #### ░░░░ #### #~# .
. ## #### #######.. #### ## .
. ### .:. #### .######## .
. ### .:+-+:. ## # ### #### .
. # .:+-+█+-+:. # ## ######## .
. ### * .:+-+:. ### .**# ###### .
. ## # ** .:. * # ...## ##### .
. .# # ..# .** ###### ### .
. .## .*..# ..*^ # ## .
. #### ## ##.# :###### #### ## #### ####### ### ##:###### ########## .
+ +
+ +
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
*/
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./interface/IGuardVault.sol";
contract AGE is ERC721, Pausable, Ownable {
uint public constant AGE_PRICE = 0.1 ether;
uint public constant AGE_PREPRICE = 0.088 ether;
uint public constant INIT_GUARD_VAULT = 0.01 ether;
uint public constant MAX_AGE_PURCHASE = 20;
uint public constant MAX_AGES = 10000;
string public AGE_PROVENANCE = "";
//Address => Stage => tokenNumbers
mapping(address => mapping(uint => uint)) public mintRecords;
//Stage => merkle proof
mapping(uint => bytes32) public preMintRoot;
//pre mint stage, zero is public mint
uint public preStage = 1;
bool public preSaleActive = true;
//Get startingIndex from community vote
uint public startingIndex = 0;
address public hostAddress;
IGuardVault private guardVault;
uint private _totalSupply = 0;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address host, string memory uri) ERC721(name, symbol) {
}
/**
* Mints Guardians
*/
function mintAge(uint numberOfTokens) public payable whenNotPaused {
}
function preMintAge(
uint numberOfTokens,
uint maxNumber,
bytes32[] memory proof) public payable whenNotPaused {
require(totalSupply() + numberOfTokens <= MAX_AGES, "Purchase would exceed max supply of Guardians.");
require(preSaleActive && preStage > 0, "Pre mint is not active.");
require(msg.value >= AGE_PREPRICE * numberOfTokens, "Ether value for vault is not enough.");
uint mintedNum = mintRecords[_msgSender()][preStage];
require(<FILL_ME>)
bytes32 root = preMintRoot[preStage];
bytes32 node = keccak256(abi.encodePacked(_msgSender(), maxNumber));
require(MerkleProof.verify(proof, root, node), "You are not in pre mint list.");
guardVault.forGuard{value : INIT_GUARD_VAULT * numberOfTokens}();
for (uint i = 0; i < numberOfTokens; i++) {
_safeMint(_msgSender(), _totalSupply);
_totalSupply += 1;
}
mintRecords[_msgSender()][preStage] += numberOfTokens;
}
/**
* Reserve Guardians for community
*/
function reserveAge(uint numberOfTokens, address to) public onlyOwner payable {
}
/**
* Set the starting index for the AGE
*/
function setStartingIndex(uint index) public onlyOwner {
}
/*
* Set provenance
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function burn(uint tokenId) external {
}
// The following functions are overrides required by Solidity.
function _burn(uint tokenId) internal override(ERC721) {
}
function setStageProof(uint stage, bytes32 proof) public onlyOwner {
}
function getMintRecord(address minter, uint stage) public view returns (uint) {
}
function setHost(address host) public onlyOwner {
}
function claim() public payable onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function flipPreSaleState() public onlyOwner {
}
function setPreMintStage(uint nextStage) public onlyOwner {
}
function setVault(address vaultAddress) public onlyOwner {
}
function getVaultAddress() public view returns (address) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function totalSupply() public view virtual returns (uint) {
}
receive() external payable virtual {}
fallback() external payable virtual {}
}
| mintedNum+numberOfTokens<=maxNumber,"Pre mint already the max purchase." | 356,199 | mintedNum+numberOfTokens<=maxNumber |
"You are not in pre mint list." | // SPDX-License-Identifier: MIT
/*
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ . . . . . +
+ . _ ____ U _____ u +
. U /"\ u . U /"___|u . \| ___"|/ . .
. . . \/ _ \/ \| | _ / | _|" .
. / ___ \ . . | |_| | . | |___ . . .
. /_/ \_\ _ \____| _ |_____| _ .
. . \\ >> (") _)(|_ (") << >> (") . .
. (__) (__) " (__)__) " (__) (__) " . .
. . . . . .
. . ## . ### . . .
. ## ### ## ### ##. . .
. ## * ## ### ░░░░░ ## ## * # .
. . .# *** ### ## ░░░ ### ░░ ## ## ****#. .
. ## ***** ### ░░ ## . ### ░░ ### ****.# . .
. .## *** ## ░░░░░ ######### ░░░ ## ** #. .
. # ** ## ░░░ ## ░░░░░░░░░ # ░░░░ ####. .
. ## ## ░░ ## ########## ░░░░░░░░ ## .
. ## ░░░ # ##### ░░░░░ ## . .
. ## ░░ ## ####################### ░░░ ## .
. ## ░░ ## ## ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ## .
. ## ## ## ░░░░░ #################### ░░░░░ ## .
. . ## ## ░░░░░ ### ### ## . .
. ### ░░░ ### ########## ## .
. ### ░░░░ ## ### ░░░░ ### HODLers Win ! .
. ## ░░░░ ## ## ░░░░ ### ## . . ~~~~~~~~ ## .
. ## ░░░░ ### ## ░░░░ ## ## .~~~~~~~~~## .
. ## ░░░░ ## ## ░░░░ ## ##~~~~~~~## .
. . #### ░░░░ ### ░░░░ ## ##~~~## .
. #### #### ░░░░ #### #~# .
. ## #### #######.. #### ## .
. ### .:. #### .######## .
. ### .:+-+:. ## # ### #### .
. # .:+-+█+-+:. # ## ######## .
. ### * .:+-+:. ### .**# ###### .
. ## # ** .:. * # ...## ##### .
. .# # ..# .** ###### ### .
. .## .*..# ..*^ # ## .
. #### ## ##.# :###### #### ## #### ####### ### ##:###### ########## .
+ +
+ +
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
*/
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./interface/IGuardVault.sol";
contract AGE is ERC721, Pausable, Ownable {
uint public constant AGE_PRICE = 0.1 ether;
uint public constant AGE_PREPRICE = 0.088 ether;
uint public constant INIT_GUARD_VAULT = 0.01 ether;
uint public constant MAX_AGE_PURCHASE = 20;
uint public constant MAX_AGES = 10000;
string public AGE_PROVENANCE = "";
//Address => Stage => tokenNumbers
mapping(address => mapping(uint => uint)) public mintRecords;
//Stage => merkle proof
mapping(uint => bytes32) public preMintRoot;
//pre mint stage, zero is public mint
uint public preStage = 1;
bool public preSaleActive = true;
//Get startingIndex from community vote
uint public startingIndex = 0;
address public hostAddress;
IGuardVault private guardVault;
uint private _totalSupply = 0;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address host, string memory uri) ERC721(name, symbol) {
}
/**
* Mints Guardians
*/
function mintAge(uint numberOfTokens) public payable whenNotPaused {
}
function preMintAge(
uint numberOfTokens,
uint maxNumber,
bytes32[] memory proof) public payable whenNotPaused {
require(totalSupply() + numberOfTokens <= MAX_AGES, "Purchase would exceed max supply of Guardians.");
require(preSaleActive && preStage > 0, "Pre mint is not active.");
require(msg.value >= AGE_PREPRICE * numberOfTokens, "Ether value for vault is not enough.");
uint mintedNum = mintRecords[_msgSender()][preStage];
require(mintedNum + numberOfTokens <= maxNumber, "Pre mint already the max purchase.");
bytes32 root = preMintRoot[preStage];
bytes32 node = keccak256(abi.encodePacked(_msgSender(), maxNumber));
require(<FILL_ME>)
guardVault.forGuard{value : INIT_GUARD_VAULT * numberOfTokens}();
for (uint i = 0; i < numberOfTokens; i++) {
_safeMint(_msgSender(), _totalSupply);
_totalSupply += 1;
}
mintRecords[_msgSender()][preStage] += numberOfTokens;
}
/**
* Reserve Guardians for community
*/
function reserveAge(uint numberOfTokens, address to) public onlyOwner payable {
}
/**
* Set the starting index for the AGE
*/
function setStartingIndex(uint index) public onlyOwner {
}
/*
* Set provenance
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function burn(uint tokenId) external {
}
// The following functions are overrides required by Solidity.
function _burn(uint tokenId) internal override(ERC721) {
}
function setStageProof(uint stage, bytes32 proof) public onlyOwner {
}
function getMintRecord(address minter, uint stage) public view returns (uint) {
}
function setHost(address host) public onlyOwner {
}
function claim() public payable onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function flipPreSaleState() public onlyOwner {
}
function setPreMintStage(uint nextStage) public onlyOwner {
}
function setVault(address vaultAddress) public onlyOwner {
}
function getVaultAddress() public view returns (address) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function totalSupply() public view virtual returns (uint) {
}
receive() external payable virtual {}
fallback() external payable virtual {}
}
| MerkleProof.verify(proof,root,node),"You are not in pre mint list." | 356,199 | MerkleProof.verify(proof,root,node) |
"Not enough Ether to mint." | // SPDX-License-Identifier: MIT
/*
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ . . . . . +
+ . _ ____ U _____ u +
. U /"\ u . U /"___|u . \| ___"|/ . .
. . . \/ _ \/ \| | _ / | _|" .
. / ___ \ . . | |_| | . | |___ . . .
. /_/ \_\ _ \____| _ |_____| _ .
. . \\ >> (") _)(|_ (") << >> (") . .
. (__) (__) " (__)__) " (__) (__) " . .
. . . . . .
. . ## . ### . . .
. ## ### ## ### ##. . .
. ## * ## ### ░░░░░ ## ## * # .
. . .# *** ### ## ░░░ ### ░░ ## ## ****#. .
. ## ***** ### ░░ ## . ### ░░ ### ****.# . .
. .## *** ## ░░░░░ ######### ░░░ ## ** #. .
. # ** ## ░░░ ## ░░░░░░░░░ # ░░░░ ####. .
. ## ## ░░ ## ########## ░░░░░░░░ ## .
. ## ░░░ # ##### ░░░░░ ## . .
. ## ░░ ## ####################### ░░░ ## .
. ## ░░ ## ## ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ## .
. ## ## ## ░░░░░ #################### ░░░░░ ## .
. . ## ## ░░░░░ ### ### ## . .
. ### ░░░ ### ########## ## .
. ### ░░░░ ## ### ░░░░ ### HODLers Win ! .
. ## ░░░░ ## ## ░░░░ ### ## . . ~~~~~~~~ ## .
. ## ░░░░ ### ## ░░░░ ## ## .~~~~~~~~~## .
. ## ░░░░ ## ## ░░░░ ## ##~~~~~~~## .
. . #### ░░░░ ### ░░░░ ## ##~~~## .
. #### #### ░░░░ #### #~# .
. ## #### #######.. #### ## .
. ### .:. #### .######## .
. ### .:+-+:. ## # ### #### .
. # .:+-+█+-+:. # ## ######## .
. ### * .:+-+:. ### .**# ###### .
. ## # ** .:. * # ...## ##### .
. .# # ..# .** ###### ### .
. .## .*..# ..*^ # ## .
. #### ## ##.# :###### #### ## #### ####### ### ##:###### ########## .
+ +
+ +
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
*/
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./interface/IGuardVault.sol";
contract AGE is ERC721, Pausable, Ownable {
uint public constant AGE_PRICE = 0.1 ether;
uint public constant AGE_PREPRICE = 0.088 ether;
uint public constant INIT_GUARD_VAULT = 0.01 ether;
uint public constant MAX_AGE_PURCHASE = 20;
uint public constant MAX_AGES = 10000;
string public AGE_PROVENANCE = "";
//Address => Stage => tokenNumbers
mapping(address => mapping(uint => uint)) public mintRecords;
//Stage => merkle proof
mapping(uint => bytes32) public preMintRoot;
//pre mint stage, zero is public mint
uint public preStage = 1;
bool public preSaleActive = true;
//Get startingIndex from community vote
uint public startingIndex = 0;
address public hostAddress;
IGuardVault private guardVault;
uint private _totalSupply = 0;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address host, string memory uri) ERC721(name, symbol) {
}
/**
* Mints Guardians
*/
function mintAge(uint numberOfTokens) public payable whenNotPaused {
}
function preMintAge(
uint numberOfTokens,
uint maxNumber,
bytes32[] memory proof) public payable whenNotPaused {
}
/**
* Reserve Guardians for community
*/
function reserveAge(uint numberOfTokens, address to) public onlyOwner payable {
require(numberOfTokens <= MAX_AGE_PURCHASE, "Can only mint 20 tokens at a time.");
require(<FILL_ME>)
guardVault.forGuard{value : msg.value}();
for (uint i = 0; i < numberOfTokens; i++) {
_safeMint(to, _totalSupply);
_totalSupply += 1;
}
}
/**
* Set the starting index for the AGE
*/
function setStartingIndex(uint index) public onlyOwner {
}
/*
* Set provenance
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function burn(uint tokenId) external {
}
// The following functions are overrides required by Solidity.
function _burn(uint tokenId) internal override(ERC721) {
}
function setStageProof(uint stage, bytes32 proof) public onlyOwner {
}
function getMintRecord(address minter, uint stage) public view returns (uint) {
}
function setHost(address host) public onlyOwner {
}
function claim() public payable onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function flipPreSaleState() public onlyOwner {
}
function setPreMintStage(uint nextStage) public onlyOwner {
}
function setVault(address vaultAddress) public onlyOwner {
}
function getVaultAddress() public view returns (address) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function totalSupply() public view virtual returns (uint) {
}
receive() external payable virtual {}
fallback() external payable virtual {}
}
| AGE_PRICE*numberOfTokens/10<=msg.value,"Not enough Ether to mint." | 356,199 | AGE_PRICE*numberOfTokens/10<=msg.value |
"Only vault can burn token." | // SPDX-License-Identifier: MIT
/*
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
+ . . . . . +
+ . _ ____ U _____ u +
. U /"\ u . U /"___|u . \| ___"|/ . .
. . . \/ _ \/ \| | _ / | _|" .
. / ___ \ . . | |_| | . | |___ . . .
. /_/ \_\ _ \____| _ |_____| _ .
. . \\ >> (") _)(|_ (") << >> (") . .
. (__) (__) " (__)__) " (__) (__) " . .
. . . . . .
. . ## . ### . . .
. ## ### ## ### ##. . .
. ## * ## ### ░░░░░ ## ## * # .
. . .# *** ### ## ░░░ ### ░░ ## ## ****#. .
. ## ***** ### ░░ ## . ### ░░ ### ****.# . .
. .## *** ## ░░░░░ ######### ░░░ ## ** #. .
. # ** ## ░░░ ## ░░░░░░░░░ # ░░░░ ####. .
. ## ## ░░ ## ########## ░░░░░░░░ ## .
. ## ░░░ # ##### ░░░░░ ## . .
. ## ░░ ## ####################### ░░░ ## .
. ## ░░ ## ## ░░░░░░░░░░░░░░░░░░░░░░░░░░░░ ## .
. ## ## ## ░░░░░ #################### ░░░░░ ## .
. . ## ## ░░░░░ ### ### ## . .
. ### ░░░ ### ########## ## .
. ### ░░░░ ## ### ░░░░ ### HODLers Win ! .
. ## ░░░░ ## ## ░░░░ ### ## . . ~~~~~~~~ ## .
. ## ░░░░ ### ## ░░░░ ## ## .~~~~~~~~~## .
. ## ░░░░ ## ## ░░░░ ## ##~~~~~~~## .
. . #### ░░░░ ### ░░░░ ## ##~~~## .
. #### #### ░░░░ #### #~# .
. ## #### #######.. #### ## .
. ### .:. #### .######## .
. ### .:+-+:. ## # ### #### .
. # .:+-+█+-+:. # ## ######## .
. ### * .:+-+:. ### .**# ###### .
. ## # ** .:. * # ...## ##### .
. .# # ..# .** ###### ### .
. .## .*..# ..*^ # ## .
. #### ## ##.# :###### #### ## #### ####### ### ##:###### ########## .
+ +
+ +
+ + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
*/
pragma solidity ^0.8.11;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "./interface/IGuardVault.sol";
contract AGE is ERC721, Pausable, Ownable {
uint public constant AGE_PRICE = 0.1 ether;
uint public constant AGE_PREPRICE = 0.088 ether;
uint public constant INIT_GUARD_VAULT = 0.01 ether;
uint public constant MAX_AGE_PURCHASE = 20;
uint public constant MAX_AGES = 10000;
string public AGE_PROVENANCE = "";
//Address => Stage => tokenNumbers
mapping(address => mapping(uint => uint)) public mintRecords;
//Stage => merkle proof
mapping(uint => bytes32) public preMintRoot;
//pre mint stage, zero is public mint
uint public preStage = 1;
bool public preSaleActive = true;
//Get startingIndex from community vote
uint public startingIndex = 0;
address public hostAddress;
IGuardVault private guardVault;
uint private _totalSupply = 0;
// Base URI
string private _baseURIextended;
constructor(string memory name, string memory symbol, address host, string memory uri) ERC721(name, symbol) {
}
/**
* Mints Guardians
*/
function mintAge(uint numberOfTokens) public payable whenNotPaused {
}
function preMintAge(
uint numberOfTokens,
uint maxNumber,
bytes32[] memory proof) public payable whenNotPaused {
}
/**
* Reserve Guardians for community
*/
function reserveAge(uint numberOfTokens, address to) public onlyOwner payable {
}
/**
* Set the starting index for the AGE
*/
function setStartingIndex(uint index) public onlyOwner {
}
/*
* Set provenance
*/
function setProvenanceHash(string memory provenanceHash) public onlyOwner {
}
function burn(uint tokenId) external {
require(startingIndex != 0, "ETH need Guardians.");
require(tx.origin == ownerOf(tokenId), "Only owner can burn token.");
require(<FILL_ME>)
_burn(tokenId);
}
// The following functions are overrides required by Solidity.
function _burn(uint tokenId) internal override(ERC721) {
}
function setStageProof(uint stage, bytes32 proof) public onlyOwner {
}
function getMintRecord(address minter, uint stage) public view returns (uint) {
}
function setHost(address host) public onlyOwner {
}
function claim() public payable onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function flipPreSaleState() public onlyOwner {
}
function setPreMintStage(uint nextStage) public onlyOwner {
}
function setVault(address vaultAddress) public onlyOwner {
}
function getVaultAddress() public view returns (address) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function totalSupply() public view virtual returns (uint) {
}
receive() external payable virtual {}
fallback() external payable virtual {}
}
| _msgSender()==address(guardVault),"Only vault can burn token." | 356,199 | _msgSender()==address(guardVault) |
"Amount cannot exceeed the balance" | pragma solidity 0.5.11;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract ERC20 {
function totalSupply()public view returns (uint total_Supply);
function balanceOf(address who)public view returns (uint256);
function allowance(address owner, address spender)public view returns (uint);
function transferFrom(address from, address to, uint value)public returns (bool ok);
function approve(address spender, uint value)public returns (bool ok);
function transfer(address to, uint value)public returns (bool ok);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract ARMB is ERC20
{ using SafeMath for uint256;
// Name of the token
string private constant _name = "ARMB";
// Symbol of token
string private constant _symbol = "ARMB";
// Decimal of token
uint8 private constant _decimals = 2;
//--- Token allocations -------//
uint256 private Totalsupply;
//--- Address -----------------//
address private _owner;
//--- Variables ---------------//
mapping(address => uint) balances;
mapping(address => mapping(address => uint)) allowed;
event Mint(address indexed from, address indexed to, uint256 amount);
event Burn(address indexed from, uint256 amount);
event ChangeOwnerShip(address indexed newOwner);
modifier onlyOwner() {
}
constructor() public
{
}
function name() public pure returns (string memory) {
}
function symbol() public pure returns (string memory) {
}
function decimals() public pure returns (uint8) {
}
function owner() public view returns (address) {
}
//mint the tokens, can be called only by owner. total supply also increases
function mintTokens(address receiver, uint256 _amount) external onlyOwner returns (bool){
}
//burn the tokens, can be called only by owner total supply also decreasees
function burnTokens(address receiver, uint256 _amount) external onlyOwner returns (bool){
require(<FILL_ME>)
require(_amount > 0, "Value should larger than 0");
balances[receiver] = (balances[receiver]).sub(_amount);
Totalsupply = Totalsupply.sub(_amount);
emit Burn(receiver, _amount);
emit Transfer(receiver, address(0), _amount);
return true;
}
// what is the total supply of the ech tokens
function totalSupply() public view returns (uint256 ) {
}
// What is the balance of a particular account?
function balanceOf(address investor)public view returns (uint256 ) {
}
// Send _value amount of tokens from address _from to address _to
// The transferFrom method is used for a withdraw workflow, allowing contracts to send
// tokens on your behalf, for example to "deposit" to a contract address and/or to charge
// fees in sub-currencies; the command should fail unless the _from account has
// deliberately authorized the sender of the message via some mechanism; we propose
// these standardized APIs for approval:
function transferFrom( address _from, address _to, uint256 _amount ) public returns (bool success) {
}
// Allow _spender to withdraw from your account, multiple times, up to the _value amount.
// If this function is called again it overwrites the current allowance with _value.
function approve(address _spender, uint256 _amount) public returns (bool success) {
}
function allowance(address _from, address _spender) public view returns (uint256) {
}
// Transfer the balance from owner's account to another account
function transfer(address _to, uint256 _amount) public returns (bool) {
}
//In case the ownership needs to be transferred
function transferOwnership(address newOwner) external onlyOwner
{
}
}
| balances[receiver]>=_amount,"Amount cannot exceeed the balance" | 356,280 | balances[receiver]>=_amount |
"ERR_NOT_APPROVED" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;
/* ========== External Inheritance ========== */
import "@openzeppelin/contracts/access/Ownable.sol";
/* ========== External Interfaces ========== */
import "@indexed-finance/proxies/contracts/interfaces/IDelegateCallProxyManager.sol";
/* ========== External Libraries ========== */
import "@indexed-finance/proxies/contracts/SaltyLib.sol";
/**
* @title PoolFactory
* @author d1ll0n
*/
contract PoolFactory is Ownable {
/* ========== Constants ========== */
// Address of the proxy manager contract.
IDelegateCallProxyManager public immutable proxyManager;
/* ========== Events ========== */
/** @dev Emitted when a pool is deployed. */
event NewPool(address pool, address controller, bytes32 implementationID);
/* ========== Storage ========== */
mapping(address => bool) public isApprovedController;
mapping(address => bytes32) public getPoolImplementationID;
/* ========== Modifiers ========== */
modifier onlyApproved {
require(<FILL_ME>)
_;
}
/* ========== Constructor ========== */
constructor(IDelegateCallProxyManager proxyManager_) public Ownable() {
}
/* ========== Controller Approval ========== */
/** @dev Approves `controller` to deploy pools. */
function approvePoolController(address controller) external onlyOwner {
}
/** @dev Removes the ability of `controller` to deploy pools. */
function disapprovePoolController(address controller) external onlyOwner {
}
/* ========== Pool Deployment ========== */
/**
* @dev Deploys a pool using an implementation ID provided by the controller.
*
* Note: To support future interfaces, this does not initialize or
* configure the pool, this must be executed by the controller.
*
* Note: Must be called by an approved controller.
*
* @param implementationID Implementation ID for the pool
* @param controllerSalt Create2 salt provided by the deployer
*/
function deployPool(bytes32 implementationID, bytes32 controllerSalt)
external
onlyApproved
returns (address poolAddress)
{
}
/* ========== Queries ========== */
/**
* @dev Checks if an address is a pool that was deployed by the factory.
*/
function isRecognizedPool(address pool) external view returns (bool) {
}
/**
* @dev Compute the create2 address for a pool deployed by an approved controller.
*/
function computePoolAddress(bytes32 implementationID, address controller, bytes32 controllerSalt)
public
view
returns (address)
{
}
}
| isApprovedController[msg.sender],"ERR_NOT_APPROVED" | 356,310 | isApprovedController[msg.sender] |
"Purchase would exceed max supply of JimmyJims" | pragma solidity 0.7.0;
/**
* @title WickedCraniums contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract JimmyJims is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant JimmyPrice = 50000000000000000; // 0.05 ETH
uint public constant maxJimmyPurchase = 100;
uint256 public MAX_JIMMYS = 10000;
constructor() ERC721("JimmyJims", "JIMMY") {
}
function withdraw() public onlyOwner {
}
function mintJimmys(uint numberOfTokens) public payable {
require(numberOfTokens <= maxJimmyPurchase, "Can only mint 100 tokens at a time");
require(<FILL_ME>)
require(JimmyPrice.mul(numberOfTokens) <= msg.value, "Ether value sent is not correct");
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_JIMMYS) {
_safeMint(msg.sender, mintIndex + 1);
}
}
}
}
| totalSupply().add(numberOfTokens)<=MAX_JIMMYS,"Purchase would exceed max supply of JimmyJims" | 356,365 | totalSupply().add(numberOfTokens)<=MAX_JIMMYS |
"Ether value sent is not correct" | pragma solidity 0.7.0;
/**
* @title WickedCraniums contract
* @dev Extends ERC721 Non-Fungible Token Standard basic implementation
*/
contract JimmyJims is ERC721, Ownable {
using SafeMath for uint256;
uint256 public constant JimmyPrice = 50000000000000000; // 0.05 ETH
uint public constant maxJimmyPurchase = 100;
uint256 public MAX_JIMMYS = 10000;
constructor() ERC721("JimmyJims", "JIMMY") {
}
function withdraw() public onlyOwner {
}
function mintJimmys(uint numberOfTokens) public payable {
require(numberOfTokens <= maxJimmyPurchase, "Can only mint 100 tokens at a time");
require(totalSupply().add(numberOfTokens) <= MAX_JIMMYS, "Purchase would exceed max supply of JimmyJims");
require(<FILL_ME>)
for(uint i = 0; i < numberOfTokens; i++) {
uint mintIndex = totalSupply();
if (totalSupply() < MAX_JIMMYS) {
_safeMint(msg.sender, mintIndex + 1);
}
}
}
}
| JimmyPrice.mul(numberOfTokens)<=msg.value,"Ether value sent is not correct" | 356,365 | JimmyPrice.mul(numberOfTokens)<=msg.value |
"max NFT limit exceeded" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
contract AshesOfLight is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public notRevealedUri;
uint256 public cost = 0.08 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
uint256 public nftPerAddressLimit = 1;
uint256 public rewardAmountTotal = 50;
uint256 public rewardsMinted = 0;
bool public paused = true;
bool public revealed = true;
bool public onlyWhitelisted = true;
address[] public whitelistedAddresses;
address[] public rewardAddresses;
mapping(address => uint256) public addressMintedBalance;
address public ms;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address _msAddress
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
require(!paused, "the contract is paused");
uint256 supply = totalSupply();
require(_mintAmount > 0, "need to mint at least 1 NFT");
require(_mintAmount <= maxMintAmount, "max mint amount per session exceeded");
require(<FILL_ME>)
if (msg.sender != owner()) {
if(onlyWhitelisted == true) {
require(isWhitelisted(msg.sender), "user is not whitelisted");
}
require(msg.value >= cost * _mintAmount, "insufficient funds");
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
if (msg.sender == owner()) {
for (uint256 i = 1; i <= _mintAmount; i++) {
addressMintedBalance[msg.sender]++;
_safeMint(msg.sender, supply + i);
}
}
}
function claimReward() public payable {
}
function mintTo(address _to, uint256 _mintAmount) public payable onlyOwner {
}
function isWhitelisted(address _user) public view returns (bool) {
}
function hasReward(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setMS(address _newMS) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setOnlyWhitelisted(bool _state) public onlyOwner {
}
function whitelistUsers(address[] calldata _users) public onlyOwner {
}
function rewardUsers(address[] calldata _users) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| supply+_mintAmount<=maxSupply-rewardAmountTotal,"max NFT limit exceeded" | 356,414 | supply+_mintAmount<=maxSupply-rewardAmountTotal |
"No rewards to claim for your account" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
contract AshesOfLight is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public notRevealedUri;
uint256 public cost = 0.08 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
uint256 public nftPerAddressLimit = 1;
uint256 public rewardAmountTotal = 50;
uint256 public rewardsMinted = 0;
bool public paused = true;
bool public revealed = true;
bool public onlyWhitelisted = true;
address[] public whitelistedAddresses;
address[] public rewardAddresses;
mapping(address => uint256) public addressMintedBalance;
address public ms;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address _msAddress
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
}
function claimReward() public payable {
uint256 rewardAmount = 1;
require(!paused, "the contract is paused");
require(<FILL_ME>)
uint256 supply = totalSupply();
require(supply + rewardAmount <= maxSupply - rewardAmountTotal, "max NFT limit exceeded");
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(
ownerMintedCount + rewardAmount <= nftPerAddressLimit,
"max NFT per address exceeded"
);
for (uint256 i = 1; i <= rewardAmount; i++) {
addressMintedBalance[msg.sender]++;
rewardsMinted++;
rewardAmountTotal--;
_safeMint(msg.sender, supply + i);
}
}
function mintTo(address _to, uint256 _mintAmount) public payable onlyOwner {
}
function isWhitelisted(address _user) public view returns (bool) {
}
function hasReward(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setMS(address _newMS) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setOnlyWhitelisted(bool _state) public onlyOwner {
}
function whitelistUsers(address[] calldata _users) public onlyOwner {
}
function rewardUsers(address[] calldata _users) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| hasReward(msg.sender),"No rewards to claim for your account" | 356,414 | hasReward(msg.sender) |
"max NFT limit exceeded" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
contract AshesOfLight is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public notRevealedUri;
uint256 public cost = 0.08 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
uint256 public nftPerAddressLimit = 1;
uint256 public rewardAmountTotal = 50;
uint256 public rewardsMinted = 0;
bool public paused = true;
bool public revealed = true;
bool public onlyWhitelisted = true;
address[] public whitelistedAddresses;
address[] public rewardAddresses;
mapping(address => uint256) public addressMintedBalance;
address public ms;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address _msAddress
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
}
function claimReward() public payable {
uint256 rewardAmount = 1;
require(!paused, "the contract is paused");
require(
hasReward(msg.sender),
"No rewards to claim for your account"
);
uint256 supply = totalSupply();
require(<FILL_ME>)
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(
ownerMintedCount + rewardAmount <= nftPerAddressLimit,
"max NFT per address exceeded"
);
for (uint256 i = 1; i <= rewardAmount; i++) {
addressMintedBalance[msg.sender]++;
rewardsMinted++;
rewardAmountTotal--;
_safeMint(msg.sender, supply + i);
}
}
function mintTo(address _to, uint256 _mintAmount) public payable onlyOwner {
}
function isWhitelisted(address _user) public view returns (bool) {
}
function hasReward(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setMS(address _newMS) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setOnlyWhitelisted(bool _state) public onlyOwner {
}
function whitelistUsers(address[] calldata _users) public onlyOwner {
}
function rewardUsers(address[] calldata _users) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| supply+rewardAmount<=maxSupply-rewardAmountTotal,"max NFT limit exceeded" | 356,414 | supply+rewardAmount<=maxSupply-rewardAmountTotal |
"max NFT per address exceeded" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
contract AshesOfLight is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public notRevealedUri;
uint256 public cost = 0.08 ether;
uint256 public maxSupply = 10000;
uint256 public maxMintAmount = 20;
uint256 public nftPerAddressLimit = 1;
uint256 public rewardAmountTotal = 50;
uint256 public rewardsMinted = 0;
bool public paused = true;
bool public revealed = true;
bool public onlyWhitelisted = true;
address[] public whitelistedAddresses;
address[] public rewardAddresses;
mapping(address => uint256) public addressMintedBalance;
address public ms;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri,
address _msAddress
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
}
function claimReward() public payable {
uint256 rewardAmount = 1;
require(!paused, "the contract is paused");
require(
hasReward(msg.sender),
"No rewards to claim for your account"
);
uint256 supply = totalSupply();
require(supply + rewardAmount <= maxSupply - rewardAmountTotal, "max NFT limit exceeded");
uint256 ownerMintedCount = addressMintedBalance[msg.sender];
require(<FILL_ME>)
for (uint256 i = 1; i <= rewardAmount; i++) {
addressMintedBalance[msg.sender]++;
rewardsMinted++;
rewardAmountTotal--;
_safeMint(msg.sender, supply + i);
}
}
function mintTo(address _to, uint256 _mintAmount) public payable onlyOwner {
}
function isWhitelisted(address _user) public view returns (bool) {
}
function hasReward(address _user) public view returns (bool) {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner {
}
function setNftPerAddressLimit(uint256 _limit) public onlyOwner {
}
function setCost(uint256 _newCost) public onlyOwner {
}
function setMS(address _newMS) public onlyOwner {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setOnlyWhitelisted(bool _state) public onlyOwner {
}
function whitelistUsers(address[] calldata _users) public onlyOwner {
}
function rewardUsers(address[] calldata _users) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| ownerMintedCount+rewardAmount<=nftPerAddressLimit,"max NFT per address exceeded" | 356,414 | ownerMintedCount+rewardAmount<=nftPerAddressLimit |
"PLEDGE:SAFE_TRANSFER_ERROR" | pragma solidity ^0.5.8;
import "./IERC20.sol";
import "./TransferHelper.sol";
import "./ReentrancyGuard.sol";
import "./IPledgeMining.sol";
import "./SafeMath.sol";
//质押挖矿合约逻辑
//ADAO质押币
//WDAO收益币
//一.质押erc20代币ADAO:质押时间为30/60/90/120/150/180天,到期才能赎回,未到时间不予赎回,且按质押数量定挖。
//质押币本位精算到天结算:30天为总挖矿5/千,60天为总挖矿12/千,90天总挖矿21/千,120天总挖矿32/千,150天为总挖矿45/千,180天为总挖矿60/千。
//二.质押币ADAO为整数,数量1个起步
//例如:A质押ADAO54个,质押时间为60天,A最终收益为:54ADAO*12/1000=0.648WDAO,平均每天收益为0.648/60=0.0108WDAO。
//PLEDGE:AMOUNT_ERROR 输入金额不足1个ADAO
//PLEDGE:TYPE_ERROR 输入类型合约不支持
//PLEDGE:SAFE_TRANSFER_FROM_ERROR 转账到智能合约失败
//PLEDGE:RECORD_OVER 质押记录已结束
//PLEDGE:SAFE_TRANSFER_ERROR 智能合约转出失败
//PLEDGE:NO_EXTRA_INCOME 没有多余的收益
//PLEDGE:NOT_EXPIRED 未到期
//PLEDGE:STOP_MINING 停止挖矿
//PLEDGE:UNABLE_TO_CLOSE_RENEWAL 无法关闭续约
//PLEDGE:UNABLE_TO_OPEN_RENEWAL 无法开启续约
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract PledgeMining is IPledgeMining, ReentrancyGuard, Owned {
IERC20 _tokenA;
IERC20 _tokenB;
using TransferHelper for address;
using SafeMath for uint;
uint256 periodUnit = 1 days;
bool public mining_state;
struct Record {
uint256 id;
uint256 createTime;
uint256 stopTime;
uint256 heaven;
uint256 scale;
uint256 pledgeAmount;
uint256 releaseAmount;
uint256 over; // 1 processing 2 over
}
mapping(address => Record []) miningRecords;
mapping(uint256 => uint256) public typeConfig;
constructor(address tokenA, address tokenB) public {
}
// Does not accept ETH
function() external payable {
}
modifier mining {
}
// 停止挖矿,并从资金池提取WDAO
function stop_mining(uint256 tokenAAmount, uint256 tokenBAmount) public nonReentrant onlyOwner {
if (tokenAAmount > 0) {
require(<FILL_ME>)
}
if (tokenBAmount > 0) {
require(address(_tokenB).safeTransfer(msg.sender, tokenBAmount), "PLEDGE:SAFE_TRANSFER_ERROR");
}
mining_state = false;
}
// 质押
function pledge(uint256 _amount, uint256 _type) public mining nonReentrant returns (uint256){
}
//领取收益
function receiveIncomeInternal(uint256 _index) internal returns (uint256){
}
// 关闭续约
function closeRenewal(uint256 _index) public nonReentrant {
}
// 开启续约
function openRenewal(uint256 _index) public nonReentrant {
}
// 领取收益
function receiveIncome(uint256 _index) public nonReentrant returns (uint256){
}
// 移除质押
function removePledge(uint256 _index) public nonReentrant returns (uint256){
}
// 计算收益
function calcReceiveIncome(address addr, uint256 _index) public view returns (uint256){
}
// 获取token 地址
function getTokens() public view returns (address, address){
}
// 通过分页的方式获取用户质押记录
function getUserRecords(address addr, uint256 offset, uint256 size) public view returns (
uint256 [4] memory page,
uint256 [] memory data
){
}
}
| address(_tokenA).safeTransfer(msg.sender,tokenAAmount),"PLEDGE:SAFE_TRANSFER_ERROR" | 356,419 | address(_tokenA).safeTransfer(msg.sender,tokenAAmount) |
"PLEDGE:SAFE_TRANSFER_ERROR" | pragma solidity ^0.5.8;
import "./IERC20.sol";
import "./TransferHelper.sol";
import "./ReentrancyGuard.sol";
import "./IPledgeMining.sol";
import "./SafeMath.sol";
//质押挖矿合约逻辑
//ADAO质押币
//WDAO收益币
//一.质押erc20代币ADAO:质押时间为30/60/90/120/150/180天,到期才能赎回,未到时间不予赎回,且按质押数量定挖。
//质押币本位精算到天结算:30天为总挖矿5/千,60天为总挖矿12/千,90天总挖矿21/千,120天总挖矿32/千,150天为总挖矿45/千,180天为总挖矿60/千。
//二.质押币ADAO为整数,数量1个起步
//例如:A质押ADAO54个,质押时间为60天,A最终收益为:54ADAO*12/1000=0.648WDAO,平均每天收益为0.648/60=0.0108WDAO。
//PLEDGE:AMOUNT_ERROR 输入金额不足1个ADAO
//PLEDGE:TYPE_ERROR 输入类型合约不支持
//PLEDGE:SAFE_TRANSFER_FROM_ERROR 转账到智能合约失败
//PLEDGE:RECORD_OVER 质押记录已结束
//PLEDGE:SAFE_TRANSFER_ERROR 智能合约转出失败
//PLEDGE:NO_EXTRA_INCOME 没有多余的收益
//PLEDGE:NOT_EXPIRED 未到期
//PLEDGE:STOP_MINING 停止挖矿
//PLEDGE:UNABLE_TO_CLOSE_RENEWAL 无法关闭续约
//PLEDGE:UNABLE_TO_OPEN_RENEWAL 无法开启续约
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract PledgeMining is IPledgeMining, ReentrancyGuard, Owned {
IERC20 _tokenA;
IERC20 _tokenB;
using TransferHelper for address;
using SafeMath for uint;
uint256 periodUnit = 1 days;
bool public mining_state;
struct Record {
uint256 id;
uint256 createTime;
uint256 stopTime;
uint256 heaven;
uint256 scale;
uint256 pledgeAmount;
uint256 releaseAmount;
uint256 over; // 1 processing 2 over
}
mapping(address => Record []) miningRecords;
mapping(uint256 => uint256) public typeConfig;
constructor(address tokenA, address tokenB) public {
}
// Does not accept ETH
function() external payable {
}
modifier mining {
}
// 停止挖矿,并从资金池提取WDAO
function stop_mining(uint256 tokenAAmount, uint256 tokenBAmount) public nonReentrant onlyOwner {
if (tokenAAmount > 0) {
require(address(_tokenA).safeTransfer(msg.sender, tokenAAmount), "PLEDGE:SAFE_TRANSFER_ERROR");
}
if (tokenBAmount > 0) {
require(<FILL_ME>)
}
mining_state = false;
}
// 质押
function pledge(uint256 _amount, uint256 _type) public mining nonReentrant returns (uint256){
}
//领取收益
function receiveIncomeInternal(uint256 _index) internal returns (uint256){
}
// 关闭续约
function closeRenewal(uint256 _index) public nonReentrant {
}
// 开启续约
function openRenewal(uint256 _index) public nonReentrant {
}
// 领取收益
function receiveIncome(uint256 _index) public nonReentrant returns (uint256){
}
// 移除质押
function removePledge(uint256 _index) public nonReentrant returns (uint256){
}
// 计算收益
function calcReceiveIncome(address addr, uint256 _index) public view returns (uint256){
}
// 获取token 地址
function getTokens() public view returns (address, address){
}
// 通过分页的方式获取用户质押记录
function getUserRecords(address addr, uint256 offset, uint256 size) public view returns (
uint256 [4] memory page,
uint256 [] memory data
){
}
}
| address(_tokenB).safeTransfer(msg.sender,tokenBAmount),"PLEDGE:SAFE_TRANSFER_ERROR" | 356,419 | address(_tokenB).safeTransfer(msg.sender,tokenBAmount) |
"PLEDGE:AMOUNT_ERROR" | pragma solidity ^0.5.8;
import "./IERC20.sol";
import "./TransferHelper.sol";
import "./ReentrancyGuard.sol";
import "./IPledgeMining.sol";
import "./SafeMath.sol";
//质押挖矿合约逻辑
//ADAO质押币
//WDAO收益币
//一.质押erc20代币ADAO:质押时间为30/60/90/120/150/180天,到期才能赎回,未到时间不予赎回,且按质押数量定挖。
//质押币本位精算到天结算:30天为总挖矿5/千,60天为总挖矿12/千,90天总挖矿21/千,120天总挖矿32/千,150天为总挖矿45/千,180天为总挖矿60/千。
//二.质押币ADAO为整数,数量1个起步
//例如:A质押ADAO54个,质押时间为60天,A最终收益为:54ADAO*12/1000=0.648WDAO,平均每天收益为0.648/60=0.0108WDAO。
//PLEDGE:AMOUNT_ERROR 输入金额不足1个ADAO
//PLEDGE:TYPE_ERROR 输入类型合约不支持
//PLEDGE:SAFE_TRANSFER_FROM_ERROR 转账到智能合约失败
//PLEDGE:RECORD_OVER 质押记录已结束
//PLEDGE:SAFE_TRANSFER_ERROR 智能合约转出失败
//PLEDGE:NO_EXTRA_INCOME 没有多余的收益
//PLEDGE:NOT_EXPIRED 未到期
//PLEDGE:STOP_MINING 停止挖矿
//PLEDGE:UNABLE_TO_CLOSE_RENEWAL 无法关闭续约
//PLEDGE:UNABLE_TO_OPEN_RENEWAL 无法开启续约
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract PledgeMining is IPledgeMining, ReentrancyGuard, Owned {
IERC20 _tokenA;
IERC20 _tokenB;
using TransferHelper for address;
using SafeMath for uint;
uint256 periodUnit = 1 days;
bool public mining_state;
struct Record {
uint256 id;
uint256 createTime;
uint256 stopTime;
uint256 heaven;
uint256 scale;
uint256 pledgeAmount;
uint256 releaseAmount;
uint256 over; // 1 processing 2 over
}
mapping(address => Record []) miningRecords;
mapping(uint256 => uint256) public typeConfig;
constructor(address tokenA, address tokenB) public {
}
// Does not accept ETH
function() external payable {
}
modifier mining {
}
// 停止挖矿,并从资金池提取WDAO
function stop_mining(uint256 tokenAAmount, uint256 tokenBAmount) public nonReentrant onlyOwner {
}
// 质押
function pledge(uint256 _amount, uint256 _type) public mining nonReentrant returns (uint256){
require(<FILL_ME>)
require(typeConfig[_type] != uint256(0), "PLEDGE:TYPE_ERROR");
require(address(_tokenA).safeTransferFrom(msg.sender, address(this), _amount), "PLEDGE:SAFE_TRANSFER_FROM_ERROR");
uint256 scale = typeConfig[_type];
Record [] storage records = miningRecords[msg.sender];
uint256 _id = records.length;
records.push(Record(_id, block.timestamp, 0, _type, scale, _amount, 0, 1));
emit PledgeEvent(msg.sender, _amount, _type);
return _id;
}
//领取收益
function receiveIncomeInternal(uint256 _index) internal returns (uint256){
}
// 关闭续约
function closeRenewal(uint256 _index) public nonReentrant {
}
// 开启续约
function openRenewal(uint256 _index) public nonReentrant {
}
// 领取收益
function receiveIncome(uint256 _index) public nonReentrant returns (uint256){
}
// 移除质押
function removePledge(uint256 _index) public nonReentrant returns (uint256){
}
// 计算收益
function calcReceiveIncome(address addr, uint256 _index) public view returns (uint256){
}
// 获取token 地址
function getTokens() public view returns (address, address){
}
// 通过分页的方式获取用户质押记录
function getUserRecords(address addr, uint256 offset, uint256 size) public view returns (
uint256 [4] memory page,
uint256 [] memory data
){
}
}
| _amount>=(10**uint(18)),"PLEDGE:AMOUNT_ERROR" | 356,419 | _amount>=(10**uint(18)) |
"PLEDGE:TYPE_ERROR" | pragma solidity ^0.5.8;
import "./IERC20.sol";
import "./TransferHelper.sol";
import "./ReentrancyGuard.sol";
import "./IPledgeMining.sol";
import "./SafeMath.sol";
//质押挖矿合约逻辑
//ADAO质押币
//WDAO收益币
//一.质押erc20代币ADAO:质押时间为30/60/90/120/150/180天,到期才能赎回,未到时间不予赎回,且按质押数量定挖。
//质押币本位精算到天结算:30天为总挖矿5/千,60天为总挖矿12/千,90天总挖矿21/千,120天总挖矿32/千,150天为总挖矿45/千,180天为总挖矿60/千。
//二.质押币ADAO为整数,数量1个起步
//例如:A质押ADAO54个,质押时间为60天,A最终收益为:54ADAO*12/1000=0.648WDAO,平均每天收益为0.648/60=0.0108WDAO。
//PLEDGE:AMOUNT_ERROR 输入金额不足1个ADAO
//PLEDGE:TYPE_ERROR 输入类型合约不支持
//PLEDGE:SAFE_TRANSFER_FROM_ERROR 转账到智能合约失败
//PLEDGE:RECORD_OVER 质押记录已结束
//PLEDGE:SAFE_TRANSFER_ERROR 智能合约转出失败
//PLEDGE:NO_EXTRA_INCOME 没有多余的收益
//PLEDGE:NOT_EXPIRED 未到期
//PLEDGE:STOP_MINING 停止挖矿
//PLEDGE:UNABLE_TO_CLOSE_RENEWAL 无法关闭续约
//PLEDGE:UNABLE_TO_OPEN_RENEWAL 无法开启续约
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract PledgeMining is IPledgeMining, ReentrancyGuard, Owned {
IERC20 _tokenA;
IERC20 _tokenB;
using TransferHelper for address;
using SafeMath for uint;
uint256 periodUnit = 1 days;
bool public mining_state;
struct Record {
uint256 id;
uint256 createTime;
uint256 stopTime;
uint256 heaven;
uint256 scale;
uint256 pledgeAmount;
uint256 releaseAmount;
uint256 over; // 1 processing 2 over
}
mapping(address => Record []) miningRecords;
mapping(uint256 => uint256) public typeConfig;
constructor(address tokenA, address tokenB) public {
}
// Does not accept ETH
function() external payable {
}
modifier mining {
}
// 停止挖矿,并从资金池提取WDAO
function stop_mining(uint256 tokenAAmount, uint256 tokenBAmount) public nonReentrant onlyOwner {
}
// 质押
function pledge(uint256 _amount, uint256 _type) public mining nonReentrant returns (uint256){
require(_amount >= (10 ** uint(18)), "PLEDGE:AMOUNT_ERROR");
require(<FILL_ME>)
require(address(_tokenA).safeTransferFrom(msg.sender, address(this), _amount), "PLEDGE:SAFE_TRANSFER_FROM_ERROR");
uint256 scale = typeConfig[_type];
Record [] storage records = miningRecords[msg.sender];
uint256 _id = records.length;
records.push(Record(_id, block.timestamp, 0, _type, scale, _amount, 0, 1));
emit PledgeEvent(msg.sender, _amount, _type);
return _id;
}
//领取收益
function receiveIncomeInternal(uint256 _index) internal returns (uint256){
}
// 关闭续约
function closeRenewal(uint256 _index) public nonReentrant {
}
// 开启续约
function openRenewal(uint256 _index) public nonReentrant {
}
// 领取收益
function receiveIncome(uint256 _index) public nonReentrant returns (uint256){
}
// 移除质押
function removePledge(uint256 _index) public nonReentrant returns (uint256){
}
// 计算收益
function calcReceiveIncome(address addr, uint256 _index) public view returns (uint256){
}
// 获取token 地址
function getTokens() public view returns (address, address){
}
// 通过分页的方式获取用户质押记录
function getUserRecords(address addr, uint256 offset, uint256 size) public view returns (
uint256 [4] memory page,
uint256 [] memory data
){
}
}
| typeConfig[_type]!=uint256(0),"PLEDGE:TYPE_ERROR" | 356,419 | typeConfig[_type]!=uint256(0) |
"PLEDGE:SAFE_TRANSFER_FROM_ERROR" | pragma solidity ^0.5.8;
import "./IERC20.sol";
import "./TransferHelper.sol";
import "./ReentrancyGuard.sol";
import "./IPledgeMining.sol";
import "./SafeMath.sol";
//质押挖矿合约逻辑
//ADAO质押币
//WDAO收益币
//一.质押erc20代币ADAO:质押时间为30/60/90/120/150/180天,到期才能赎回,未到时间不予赎回,且按质押数量定挖。
//质押币本位精算到天结算:30天为总挖矿5/千,60天为总挖矿12/千,90天总挖矿21/千,120天总挖矿32/千,150天为总挖矿45/千,180天为总挖矿60/千。
//二.质押币ADAO为整数,数量1个起步
//例如:A质押ADAO54个,质押时间为60天,A最终收益为:54ADAO*12/1000=0.648WDAO,平均每天收益为0.648/60=0.0108WDAO。
//PLEDGE:AMOUNT_ERROR 输入金额不足1个ADAO
//PLEDGE:TYPE_ERROR 输入类型合约不支持
//PLEDGE:SAFE_TRANSFER_FROM_ERROR 转账到智能合约失败
//PLEDGE:RECORD_OVER 质押记录已结束
//PLEDGE:SAFE_TRANSFER_ERROR 智能合约转出失败
//PLEDGE:NO_EXTRA_INCOME 没有多余的收益
//PLEDGE:NOT_EXPIRED 未到期
//PLEDGE:STOP_MINING 停止挖矿
//PLEDGE:UNABLE_TO_CLOSE_RENEWAL 无法关闭续约
//PLEDGE:UNABLE_TO_OPEN_RENEWAL 无法开启续约
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract PledgeMining is IPledgeMining, ReentrancyGuard, Owned {
IERC20 _tokenA;
IERC20 _tokenB;
using TransferHelper for address;
using SafeMath for uint;
uint256 periodUnit = 1 days;
bool public mining_state;
struct Record {
uint256 id;
uint256 createTime;
uint256 stopTime;
uint256 heaven;
uint256 scale;
uint256 pledgeAmount;
uint256 releaseAmount;
uint256 over; // 1 processing 2 over
}
mapping(address => Record []) miningRecords;
mapping(uint256 => uint256) public typeConfig;
constructor(address tokenA, address tokenB) public {
}
// Does not accept ETH
function() external payable {
}
modifier mining {
}
// 停止挖矿,并从资金池提取WDAO
function stop_mining(uint256 tokenAAmount, uint256 tokenBAmount) public nonReentrant onlyOwner {
}
// 质押
function pledge(uint256 _amount, uint256 _type) public mining nonReentrant returns (uint256){
require(_amount >= (10 ** uint(18)), "PLEDGE:AMOUNT_ERROR");
require(typeConfig[_type] != uint256(0), "PLEDGE:TYPE_ERROR");
require(<FILL_ME>)
uint256 scale = typeConfig[_type];
Record [] storage records = miningRecords[msg.sender];
uint256 _id = records.length;
records.push(Record(_id, block.timestamp, 0, _type, scale, _amount, 0, 1));
emit PledgeEvent(msg.sender, _amount, _type);
return _id;
}
//领取收益
function receiveIncomeInternal(uint256 _index) internal returns (uint256){
}
// 关闭续约
function closeRenewal(uint256 _index) public nonReentrant {
}
// 开启续约
function openRenewal(uint256 _index) public nonReentrant {
}
// 领取收益
function receiveIncome(uint256 _index) public nonReentrant returns (uint256){
}
// 移除质押
function removePledge(uint256 _index) public nonReentrant returns (uint256){
}
// 计算收益
function calcReceiveIncome(address addr, uint256 _index) public view returns (uint256){
}
// 获取token 地址
function getTokens() public view returns (address, address){
}
// 通过分页的方式获取用户质押记录
function getUserRecords(address addr, uint256 offset, uint256 size) public view returns (
uint256 [4] memory page,
uint256 [] memory data
){
}
}
| address(_tokenA).safeTransferFrom(msg.sender,address(this),_amount),"PLEDGE:SAFE_TRANSFER_FROM_ERROR" | 356,419 | address(_tokenA).safeTransferFrom(msg.sender,address(this),_amount) |
"PLEDGE:SAFE_TRANSFER_ERROR" | pragma solidity ^0.5.8;
import "./IERC20.sol";
import "./TransferHelper.sol";
import "./ReentrancyGuard.sol";
import "./IPledgeMining.sol";
import "./SafeMath.sol";
//质押挖矿合约逻辑
//ADAO质押币
//WDAO收益币
//一.质押erc20代币ADAO:质押时间为30/60/90/120/150/180天,到期才能赎回,未到时间不予赎回,且按质押数量定挖。
//质押币本位精算到天结算:30天为总挖矿5/千,60天为总挖矿12/千,90天总挖矿21/千,120天总挖矿32/千,150天为总挖矿45/千,180天为总挖矿60/千。
//二.质押币ADAO为整数,数量1个起步
//例如:A质押ADAO54个,质押时间为60天,A最终收益为:54ADAO*12/1000=0.648WDAO,平均每天收益为0.648/60=0.0108WDAO。
//PLEDGE:AMOUNT_ERROR 输入金额不足1个ADAO
//PLEDGE:TYPE_ERROR 输入类型合约不支持
//PLEDGE:SAFE_TRANSFER_FROM_ERROR 转账到智能合约失败
//PLEDGE:RECORD_OVER 质押记录已结束
//PLEDGE:SAFE_TRANSFER_ERROR 智能合约转出失败
//PLEDGE:NO_EXTRA_INCOME 没有多余的收益
//PLEDGE:NOT_EXPIRED 未到期
//PLEDGE:STOP_MINING 停止挖矿
//PLEDGE:UNABLE_TO_CLOSE_RENEWAL 无法关闭续约
//PLEDGE:UNABLE_TO_OPEN_RENEWAL 无法开启续约
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract PledgeMining is IPledgeMining, ReentrancyGuard, Owned {
IERC20 _tokenA;
IERC20 _tokenB;
using TransferHelper for address;
using SafeMath for uint;
uint256 periodUnit = 1 days;
bool public mining_state;
struct Record {
uint256 id;
uint256 createTime;
uint256 stopTime;
uint256 heaven;
uint256 scale;
uint256 pledgeAmount;
uint256 releaseAmount;
uint256 over; // 1 processing 2 over
}
mapping(address => Record []) miningRecords;
mapping(uint256 => uint256) public typeConfig;
constructor(address tokenA, address tokenB) public {
}
// Does not accept ETH
function() external payable {
}
modifier mining {
}
// 停止挖矿,并从资金池提取WDAO
function stop_mining(uint256 tokenAAmount, uint256 tokenBAmount) public nonReentrant onlyOwner {
}
// 质押
function pledge(uint256 _amount, uint256 _type) public mining nonReentrant returns (uint256){
}
//领取收益
function receiveIncomeInternal(uint256 _index) internal returns (uint256){
uint256 income = calcReceiveIncome(msg.sender, _index);
if (income > 0) {
Record storage r = miningRecords[msg.sender][_index];
r.releaseAmount = r.releaseAmount.add(income);
require(<FILL_ME>)
emit ReceiveIncomeEvent(msg.sender, income, _index);
}
return (income);
}
// 关闭续约
function closeRenewal(uint256 _index) public nonReentrant {
}
// 开启续约
function openRenewal(uint256 _index) public nonReentrant {
}
// 领取收益
function receiveIncome(uint256 _index) public nonReentrant returns (uint256){
}
// 移除质押
function removePledge(uint256 _index) public nonReentrant returns (uint256){
}
// 计算收益
function calcReceiveIncome(address addr, uint256 _index) public view returns (uint256){
}
// 获取token 地址
function getTokens() public view returns (address, address){
}
// 通过分页的方式获取用户质押记录
function getUserRecords(address addr, uint256 offset, uint256 size) public view returns (
uint256 [4] memory page,
uint256 [] memory data
){
}
}
| address(_tokenB).safeTransfer(msg.sender,income),"PLEDGE:SAFE_TRANSFER_ERROR" | 356,419 | address(_tokenB).safeTransfer(msg.sender,income) |
"PLEDGE:SAFE_TRANSFER_ERROR" | pragma solidity ^0.5.8;
import "./IERC20.sol";
import "./TransferHelper.sol";
import "./ReentrancyGuard.sol";
import "./IPledgeMining.sol";
import "./SafeMath.sol";
//质押挖矿合约逻辑
//ADAO质押币
//WDAO收益币
//一.质押erc20代币ADAO:质押时间为30/60/90/120/150/180天,到期才能赎回,未到时间不予赎回,且按质押数量定挖。
//质押币本位精算到天结算:30天为总挖矿5/千,60天为总挖矿12/千,90天总挖矿21/千,120天总挖矿32/千,150天为总挖矿45/千,180天为总挖矿60/千。
//二.质押币ADAO为整数,数量1个起步
//例如:A质押ADAO54个,质押时间为60天,A最终收益为:54ADAO*12/1000=0.648WDAO,平均每天收益为0.648/60=0.0108WDAO。
//PLEDGE:AMOUNT_ERROR 输入金额不足1个ADAO
//PLEDGE:TYPE_ERROR 输入类型合约不支持
//PLEDGE:SAFE_TRANSFER_FROM_ERROR 转账到智能合约失败
//PLEDGE:RECORD_OVER 质押记录已结束
//PLEDGE:SAFE_TRANSFER_ERROR 智能合约转出失败
//PLEDGE:NO_EXTRA_INCOME 没有多余的收益
//PLEDGE:NOT_EXPIRED 未到期
//PLEDGE:STOP_MINING 停止挖矿
//PLEDGE:UNABLE_TO_CLOSE_RENEWAL 无法关闭续约
//PLEDGE:UNABLE_TO_OPEN_RENEWAL 无法开启续约
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract PledgeMining is IPledgeMining, ReentrancyGuard, Owned {
IERC20 _tokenA;
IERC20 _tokenB;
using TransferHelper for address;
using SafeMath for uint;
uint256 periodUnit = 1 days;
bool public mining_state;
struct Record {
uint256 id;
uint256 createTime;
uint256 stopTime;
uint256 heaven;
uint256 scale;
uint256 pledgeAmount;
uint256 releaseAmount;
uint256 over; // 1 processing 2 over
}
mapping(address => Record []) miningRecords;
mapping(uint256 => uint256) public typeConfig;
constructor(address tokenA, address tokenB) public {
}
// Does not accept ETH
function() external payable {
}
modifier mining {
}
// 停止挖矿,并从资金池提取WDAO
function stop_mining(uint256 tokenAAmount, uint256 tokenBAmount) public nonReentrant onlyOwner {
}
// 质押
function pledge(uint256 _amount, uint256 _type) public mining nonReentrant returns (uint256){
}
//领取收益
function receiveIncomeInternal(uint256 _index) internal returns (uint256){
}
// 关闭续约
function closeRenewal(uint256 _index) public nonReentrant {
}
// 开启续约
function openRenewal(uint256 _index) public nonReentrant {
}
// 领取收益
function receiveIncome(uint256 _index) public nonReentrant returns (uint256){
}
// 移除质押
function removePledge(uint256 _index) public nonReentrant returns (uint256){
Record storage r = miningRecords[msg.sender][_index];
require(r.over == uint256(1) && r.stopTime > 0 && block.timestamp >= r.stopTime, "PLEDGE:NOT_EXPIRED");
uint256 income = receiveIncomeInternal(_index);
require(<FILL_ME>)
r.over = uint256(2);
emit RemovePledgeEvent(msg.sender, r.pledgeAmount, _index);
return (income);
}
// 计算收益
function calcReceiveIncome(address addr, uint256 _index) public view returns (uint256){
}
// 获取token 地址
function getTokens() public view returns (address, address){
}
// 通过分页的方式获取用户质押记录
function getUserRecords(address addr, uint256 offset, uint256 size) public view returns (
uint256 [4] memory page,
uint256 [] memory data
){
}
}
| address(_tokenA).safeTransfer(msg.sender,r.pledgeAmount),"PLEDGE:SAFE_TRANSFER_ERROR" | 356,419 | address(_tokenA).safeTransfer(msg.sender,r.pledgeAmount) |
"ERC20Capped: cap exceeded" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.6.2;
import "./ERC20.sol";
import "./ERC20Burnable.sol";
import "./MinterRole.sol";
contract Token is ERC20("TownCoin", "TOWN"), ERC20Burnable, MinterRole {
address public owner;
uint256 private _totalMinted;
uint256 private _cap;
constructor() public {
}
modifier onlyOwner() {
}
function _mint(address account, uint256 amount) internal override {
}
function cap() public view returns (uint256) {
}
function totalMinted() public view returns (uint256) {
}
function mintBulk(address[] memory accounts, uint256[] memory amounts)
public
onlyMinter
returns (bool)
{
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override {
super._beforeTokenTransfer(from, to, amount);
if (from == address(0)) {
// When minting tokens
require(<FILL_ME>)
}
}
function addMinter(address account) public override onlyOwner {
}
function removeMinter(address account) public onlyOwner {
}
}
| totalMinted().add(amount)<=cap(),"ERC20Capped: cap exceeded" | 356,424 | totalMinted().add(amount)<=cap() |
"Address is not whitelisted for presale." | pragma solidity ^0.8.7;
contract MightyAxolotl is Ownable, ERC721Enumerable {
uint256 public preSaleTime = 1632168000; // Sep 20 6PM EST // 10PM CEST
uint256 public saleTime = 1632427200; // Sep 23 6PM EST // 10PM CEST
uint256 public price = 0.02 ether;
uint256 public maxSupply = 10000;
uint256 public RESERVES = 150;
uint256 public maxPerTransaction = 20;
string internal baseTokenURI;
mapping(address => bool) public preSaleWallets;
address public devAddress = 0x75479B52c8ccBD74716fb3EA17074AAeF14c66a2; // 15%
address public artistAddress = 0x3c71bEac167Aa5F4fb2A5b786b224E9201925068; // 40%
address public investorAddress =
0x8F6fc840A5259EBE3f3d5686fDeeDAd838112D92; // 10%
address public leadAddress = 0xC598531Dcf267646f88260daBAa40b95165d39C4; // 35%
receive() external payable {}
constructor() ERC721("Mighty Axolotl", "MAXOLOTL") {}
modifier saleIsOpen() {
}
modifier preSaleIsOpen() {
}
function setPreSaleWallets(address[] memory _addresses) public {
}
function addressInPresale(address _addr) public view returns (bool) {
}
function setPrice(uint256 _price) external onlyOwner {
}
function preSaleMint(uint256 _count) external payable preSaleIsOpen {
uint256 totalSupply = totalSupply();
require(<FILL_ME>)
require(totalSupply <= maxSupply, "Sold out.");
require(
_count <= maxPerTransaction,
"Surpasses max items per transaction."
);
require(msg.value == price * _count, "Invalid Payment Value.");
for (uint256 i = 0; i < _count; i++) {
_safeMint(msg.sender, totalSupply + i);
}
}
function mint(uint256 _count) external payable saleIsOpen {
}
function reserve(uint256 _count) public onlyOwner {
}
function giveaway(uint256 _count, address _to) external onlyOwner {
}
function withdrawAll() external payable onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function setBaseURI(string memory _uri) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| preSaleWallets[msg.sender],"Address is not whitelisted for presale." | 356,440 | preSaleWallets[msg.sender] |
"Reserves maxed out" | pragma solidity ^0.8.7;
contract MightyAxolotl is Ownable, ERC721Enumerable {
uint256 public preSaleTime = 1632168000; // Sep 20 6PM EST // 10PM CEST
uint256 public saleTime = 1632427200; // Sep 23 6PM EST // 10PM CEST
uint256 public price = 0.02 ether;
uint256 public maxSupply = 10000;
uint256 public RESERVES = 150;
uint256 public maxPerTransaction = 20;
string internal baseTokenURI;
mapping(address => bool) public preSaleWallets;
address public devAddress = 0x75479B52c8ccBD74716fb3EA17074AAeF14c66a2; // 15%
address public artistAddress = 0x3c71bEac167Aa5F4fb2A5b786b224E9201925068; // 40%
address public investorAddress =
0x8F6fc840A5259EBE3f3d5686fDeeDAd838112D92; // 10%
address public leadAddress = 0xC598531Dcf267646f88260daBAa40b95165d39C4; // 35%
receive() external payable {}
constructor() ERC721("Mighty Axolotl", "MAXOLOTL") {}
modifier saleIsOpen() {
}
modifier preSaleIsOpen() {
}
function setPreSaleWallets(address[] memory _addresses) public {
}
function addressInPresale(address _addr) public view returns (bool) {
}
function setPrice(uint256 _price) external onlyOwner {
}
function preSaleMint(uint256 _count) external payable preSaleIsOpen {
}
function mint(uint256 _count) external payable saleIsOpen {
}
function reserve(uint256 _count) public onlyOwner {
uint256 totalSupply = totalSupply();
require(<FILL_ME>)
for (uint256 i = 0; i < RESERVES; i++) {
_safeMint(msg.sender, totalSupply + i);
}
}
function giveaway(uint256 _count, address _to) external onlyOwner {
}
function withdrawAll() external payable onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function setBaseURI(string memory _uri) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| balanceOf(msg.sender)+_count<=RESERVES,"Reserves maxed out" | 356,440 | balanceOf(msg.sender)+_count<=RESERVES |
"Sold out!" | pragma solidity ^0.8.7;
contract MightyAxolotl is Ownable, ERC721Enumerable {
uint256 public preSaleTime = 1632168000; // Sep 20 6PM EST // 10PM CEST
uint256 public saleTime = 1632427200; // Sep 23 6PM EST // 10PM CEST
uint256 public price = 0.02 ether;
uint256 public maxSupply = 10000;
uint256 public RESERVES = 150;
uint256 public maxPerTransaction = 20;
string internal baseTokenURI;
mapping(address => bool) public preSaleWallets;
address public devAddress = 0x75479B52c8ccBD74716fb3EA17074AAeF14c66a2; // 15%
address public artistAddress = 0x3c71bEac167Aa5F4fb2A5b786b224E9201925068; // 40%
address public investorAddress =
0x8F6fc840A5259EBE3f3d5686fDeeDAd838112D92; // 10%
address public leadAddress = 0xC598531Dcf267646f88260daBAa40b95165d39C4; // 35%
receive() external payable {}
constructor() ERC721("Mighty Axolotl", "MAXOLOTL") {}
modifier saleIsOpen() {
}
modifier preSaleIsOpen() {
}
function setPreSaleWallets(address[] memory _addresses) public {
}
function addressInPresale(address _addr) public view returns (bool) {
}
function setPrice(uint256 _price) external onlyOwner {
}
function preSaleMint(uint256 _count) external payable preSaleIsOpen {
}
function mint(uint256 _count) external payable saleIsOpen {
}
function reserve(uint256 _count) public onlyOwner {
}
function giveaway(uint256 _count, address _to) external onlyOwner {
uint256 totalSupply = totalSupply();
require(<FILL_ME>)
for (uint256 i = 0; i < _count; i++) {
_safeMint(_to, totalSupply + i);
}
}
function withdrawAll() external payable onlyOwner {
}
function _withdraw(address _address, uint256 _amount) private {
}
function setBaseURI(string memory _uri) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| totalSupply+_count<=maxSupply,"Sold out!" | 356,440 | totalSupply+_count<=maxSupply |
"NFT_LIMIT_REACHED" | pragma solidity 0.8.0;
contract ZombieZebras is Ownable, ERC721, ReentrancyGuard {
uint256 public nftPrice = 0.05 ether;
uint256 public nftLimit = 3333;
uint256 public giftRemaining = 150;
uint256 public capPresale = 15;
uint256 public capPublic = 20;
uint256 public totalSupply = 0;
bool public salePresale = false;
bool public salePublic = false;
bytes32 public merkleRoot;
string public baseURI = "";
mapping(address => uint256) public presaleAddresses;
constructor(string memory _initURI, bytes32 _merkleRoot)
ERC721("Zombie Zebras", "ZEBRAS")
{
}
function mint(address _to, uint256 _amount) public payable nonReentrant {
require(salePublic == true, "PUBLIC_NOT_STARTED");
require(_amount <= capPublic, "MINT_CAP_REACHED");
require(<FILL_ME>)
require(msg.value == nftPrice * _amount, "INCORRECT_VALUE");
for (uint256 i = 0; i < _amount; i++) {
_safeMint(_to, totalSupply);
totalSupply++;
}
}
function mintPresale(
address _to,
uint256 _amount,
bytes32[] calldata proof
) public payable nonReentrant {
}
function gift(address[] calldata _tos) external onlyOwner nonReentrant {
}
function tokensOfOwnerByIndex(address _owner, uint256 _index)
public
view
returns (uint256)
{
}
function tokensOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function withdraw() public onlyOwner {
}
function toggleSalePresale() public onlyOwner {
}
function toggleSalePublic() public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNftPrice(uint256 _nftPrice) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
}
| totalSupply+_amount<=(nftLimit-giftRemaining),"NFT_LIMIT_REACHED" | 356,453 | totalSupply+_amount<=(nftLimit-giftRemaining) |
"ADDRESS_NOT_WHITELISTED" | pragma solidity 0.8.0;
contract ZombieZebras is Ownable, ERC721, ReentrancyGuard {
uint256 public nftPrice = 0.05 ether;
uint256 public nftLimit = 3333;
uint256 public giftRemaining = 150;
uint256 public capPresale = 15;
uint256 public capPublic = 20;
uint256 public totalSupply = 0;
bool public salePresale = false;
bool public salePublic = false;
bytes32 public merkleRoot;
string public baseURI = "";
mapping(address => uint256) public presaleAddresses;
constructor(string memory _initURI, bytes32 _merkleRoot)
ERC721("Zombie Zebras", "ZEBRAS")
{
}
function mint(address _to, uint256 _amount) public payable nonReentrant {
}
function mintPresale(
address _to,
uint256 _amount,
bytes32[] calldata proof
) public payable nonReentrant {
require(salePresale == true, "PRESALE_NOT_STARTED");
require(<FILL_ME>)
require(presaleAddresses[_msgSender()] + _amount <= capPresale , "MINT_CAP_REACHED");
require(
totalSupply + _amount <= (nftLimit - giftRemaining),
"NFT_LIMIT_REACHED"
);
require(msg.value == nftPrice * _amount, "INCORRECT_VALUE");
for (uint256 i = 0; i < _amount; i++) {
_safeMint(_to, totalSupply);
totalSupply++;
}
presaleAddresses[_msgSender()] += _amount;
}
function gift(address[] calldata _tos) external onlyOwner nonReentrant {
}
function tokensOfOwnerByIndex(address _owner, uint256 _index)
public
view
returns (uint256)
{
}
function tokensOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function withdraw() public onlyOwner {
}
function toggleSalePresale() public onlyOwner {
}
function toggleSalePublic() public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNftPrice(uint256 _nftPrice) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
}
| MerkleProof.verify(proof,merkleRoot,keccak256(abi.encodePacked(_msgSender()))),"ADDRESS_NOT_WHITELISTED" | 356,453 | MerkleProof.verify(proof,merkleRoot,keccak256(abi.encodePacked(_msgSender()))) |
"MINT_CAP_REACHED" | pragma solidity 0.8.0;
contract ZombieZebras is Ownable, ERC721, ReentrancyGuard {
uint256 public nftPrice = 0.05 ether;
uint256 public nftLimit = 3333;
uint256 public giftRemaining = 150;
uint256 public capPresale = 15;
uint256 public capPublic = 20;
uint256 public totalSupply = 0;
bool public salePresale = false;
bool public salePublic = false;
bytes32 public merkleRoot;
string public baseURI = "";
mapping(address => uint256) public presaleAddresses;
constructor(string memory _initURI, bytes32 _merkleRoot)
ERC721("Zombie Zebras", "ZEBRAS")
{
}
function mint(address _to, uint256 _amount) public payable nonReentrant {
}
function mintPresale(
address _to,
uint256 _amount,
bytes32[] calldata proof
) public payable nonReentrant {
require(salePresale == true, "PRESALE_NOT_STARTED");
require(
MerkleProof.verify(
proof,
merkleRoot,
keccak256(abi.encodePacked(_msgSender()))
),
"ADDRESS_NOT_WHITELISTED"
);
require(<FILL_ME>)
require(
totalSupply + _amount <= (nftLimit - giftRemaining),
"NFT_LIMIT_REACHED"
);
require(msg.value == nftPrice * _amount, "INCORRECT_VALUE");
for (uint256 i = 0; i < _amount; i++) {
_safeMint(_to, totalSupply);
totalSupply++;
}
presaleAddresses[_msgSender()] += _amount;
}
function gift(address[] calldata _tos) external onlyOwner nonReentrant {
}
function tokensOfOwnerByIndex(address _owner, uint256 _index)
public
view
returns (uint256)
{
}
function tokensOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function withdraw() public onlyOwner {
}
function toggleSalePresale() public onlyOwner {
}
function toggleSalePublic() public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNftPrice(uint256 _nftPrice) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
}
| presaleAddresses[_msgSender()]+_amount<=capPresale,"MINT_CAP_REACHED" | 356,453 | presaleAddresses[_msgSender()]+_amount<=capPresale |
"NFT_LIMIT_REACHED" | pragma solidity 0.8.0;
contract ZombieZebras is Ownable, ERC721, ReentrancyGuard {
uint256 public nftPrice = 0.05 ether;
uint256 public nftLimit = 3333;
uint256 public giftRemaining = 150;
uint256 public capPresale = 15;
uint256 public capPublic = 20;
uint256 public totalSupply = 0;
bool public salePresale = false;
bool public salePublic = false;
bytes32 public merkleRoot;
string public baseURI = "";
mapping(address => uint256) public presaleAddresses;
constructor(string memory _initURI, bytes32 _merkleRoot)
ERC721("Zombie Zebras", "ZEBRAS")
{
}
function mint(address _to, uint256 _amount) public payable nonReentrant {
}
function mintPresale(
address _to,
uint256 _amount,
bytes32[] calldata proof
) public payable nonReentrant {
}
function gift(address[] calldata _tos) external onlyOwner nonReentrant {
require(<FILL_ME>)
for (uint256 i = 0; i < _tos.length; i++) {
_safeMint(_tos[i], totalSupply);
totalSupply++;
if (giftRemaining > 0) {
giftRemaining--;
}
}
}
function tokensOfOwnerByIndex(address _owner, uint256 _index)
public
view
returns (uint256)
{
}
function tokensOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function withdraw() public onlyOwner {
}
function toggleSalePresale() public onlyOwner {
}
function toggleSalePublic() public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setNftPrice(uint256 _nftPrice) public onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function contractURI() public view returns (string memory) {
}
}
| totalSupply+_tos.length<=nftLimit,"NFT_LIMIT_REACHED" | 356,453 | totalSupply+_tos.length<=nftLimit |
"Not mature" | pragma solidity ^0.6.0;
// This contract locked token in 1 year
contract TimelockDev is Ownable {
IERC20 public token;
uint256 public lockTime;
uint256 public startTime;
// _lockTime: in seconds
constructor(uint256 _lockTime) public {
}
function withdraw() public onlyOwner() {
uint256 amount = token.balanceOf(address(this));
require(amount>0,"empty balance");
require(<FILL_ME>)
token.transfer(msg.sender, amount);
}
function setToken(address tokenAddr) public onlyOwner() {
}
}
| startTime+lockTime<block.timestamp,"Not mature" | 356,504 | startTime+lockTime<block.timestamp |
params.requiredAmount | // SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.7.0;
import "./FarmStaking.sol";
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
}
}
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () internal {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() public virtual onlyOwner {
}
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
contract FarmStakingGenerator is Context, Ownable {
using SafeMath for uint256;
IFarmFactory public factory;
struct FarmParameters {
uint256 bonusBlocks;
uint256 totalBonusReward;
uint256 numBlocks;
uint256 endBlock;
uint256 requiredAmount;
}
constructor(IFarmFactory _factory) public {
}
/**
* @notice Determine the endBlock based on inputs. Used on the front end to show the exact settings the Farm contract will be deployed with
*/
function determineEndBlock(uint256 _amount, uint256 _blockReward, uint256 _startBlock, uint256 _bonusEndBlock, uint256 _bonus) public pure returns (uint256, uint256) {
}
/**
* @notice Determine the blockReward based on inputs specifying an end date. Used on the front end to show the exact settings the Farm contract will be deployed with
*/
function determineBlockReward(uint256 _amount, uint256 _startBlock, uint256 _bonusEndBlock, uint256 _bonus, uint256 _endBlock) public pure returns (uint256, uint256) {
}
/**
* @notice Creates a new FarmStaking contract and registers it in the
* .sol. All farming rewards are locked in the FarmStaking Contract
*/
function createFarmStaking(IERC20 _rewardToken, uint256 _amount, IERC20 _token, uint256 _blockReward, uint256 _startBlock, uint256 _bonusEndBlock, uint256 _bonus) public onlyOwner returns (address){
require(_startBlock > block.number, 'START'); // ideally at least 24 hours more to give farmers time
require(_bonus > 0, 'BONUS');
require(address(_rewardToken) != address(0), 'REWARD TOKEN');
require(address(_token) != address(0), 'TOKEN');
require(_blockReward > 1000, 'BLOCK REWARD'); // minimum 1000 divisibility per block reward
FarmParameters memory params;
(params.endBlock, params.requiredAmount) = determineEndBlock(_amount, _blockReward, _startBlock, _bonusEndBlock, _bonus);
TransferHelper.safeTransferFrom(address(_rewardToken), address(_msgSender()), address(this), params.requiredAmount);
FarmStaking newFarm = new FarmStaking(address(factory), address(this));
RewardHolder newRewardHolder = new RewardHolder(address(this), address(newFarm));
TransferHelper.safeApprove(address(_rewardToken), address(newRewardHolder), params.requiredAmount);
require(<FILL_ME>)
newFarm.init(address(newRewardHolder), _rewardToken, params.requiredAmount, _token, _blockReward, _startBlock, params.endBlock, _bonusEndBlock, _bonus);
factory.registerFarm(address(newFarm));
return (address(newFarm));
}
}
| dHolder.init(address(_rewardToken),params.requiredAmount | 356,508 | address(_rewardToken) |
"Purchase would exceed public sale supply." | pragma solidity ^0.8.0;
// SPDX-License-Identifier: LGPL-3.0-or-later
// crypto
// moments mon
// cry ts @
// pt ts p ts
// @c to me t
// c r cry m
// to cmoments to om
// crypto me crypto @
// @ t moments p
// t pt me p
// @c mo ts r
// mo to cry
// m ts @
// cr cryp
// cryptomoments
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { IPreviousCollection } from "./IPreviousCollection.sol";
contract CryptoMomentsNextToken is ERC721, ERC721URIStorage, ERC721Enumerable, Ownable, Pausable, PaymentSplitter, ReentrancyGuard {
using SafeMath for uint256;
uint256 private constant _PUBLIC_TOKENS = 100;
uint256 private constant _FREE_TOKENS = 70;
uint256 public constant TOKEN_LIMIT = _PUBLIC_TOKENS + _FREE_TOKENS;
uint256 private _tokenPrice;
uint256 private _maxTokensAtOnce = 5;
bool public publicSale = false;
bool public privateSale = true;
uint internal nonce = 0;
uint[TOKEN_LIMIT] internal indices;
mapping(address => bool) private _privateSaleAddresses;
uint256[] private _shares = [45,45,10];
address[] private _payees = [0xd903a646805873D9d86233E6746a7880796fBf08,0x96816B7F0623C92CA22B9288f08f8a84149C4210, 0x295fAC863B0Ad3dE1BeCCd40856D8fee180986d1];
address _previuosMomentsContractAddress = 0x0Edf9F38fe1bf9eB1322C5560bD5b5eb23C0056e;
mapping(address => bool) private _bonusAlreadyClaimed;
constructor()
PaymentSplitter(_payees, _shares)
ERC721("Crypto Moments - BTC Genesis", unicode"₿")
{
}
// Required overrides from parent contracts
function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId) public view virtual override(ERC721, ERC721URIStorage) returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
// _tokenPrice
function getTokenPrice() public view returns(uint256) {
}
function setTokenPrice(uint256 _price) public onlyOwner {
}
// _paused
function togglePaused() public onlyOwner {
}
// _maxTokensAtOnce
function getMaxTokensAtOnce() public view returns (uint256) {
}
function setMaxTokensAtOnce(uint256 _count) public onlyOwner {
}
// Team and Public sales
function enablePublicSale() public onlyOwner {
}
function disablePublicSale() public onlyOwner {
}
function disablePrivateSale() public onlyOwner {
}
function setPreviousMomentsContractAddress(address _contractAddress) public onlyOwner {
}
// Token URIs
function _baseURI() internal override pure returns (string memory) {
}
// Pick a random index
function randomIndex() internal returns (uint256) {
}
// Minting single or multiple tokens
function _mintWithRandomTokenId(address _to) private {
}
function mintMultipleTokens(uint256 _amount) public payable nonReentrant whenNotPaused {
require(<FILL_ME>)
require(publicSale, "Public sale must be active");
require(_amount <= _maxTokensAtOnce, "Too many tokens at once");
require(getTokenPrice().mul(_amount) <= msg.value, "Insufficient funds to purchase");
for(uint256 i = 0; i < _amount; i++) {
_mintWithRandomTokenId(msg.sender);
}
}
function mintMultipleTokensForPrivateSale(uint256 _amount, address _to) public payable nonReentrant {
}
function mintBonusTokenForPreviousOwners() public nonReentrant {
}
function ownerOfPreviousMoments(uint _tokenId) public view returns (address) {
}
function balanceOfPreviousMoments(address _owner) public view returns (uint256) {
}
}
| totalSupply().add(_amount)<=_PUBLIC_TOKENS,"Purchase would exceed public sale supply." | 356,599 | totalSupply().add(_amount)<=_PUBLIC_TOKENS |
"Insufficient funds to purchase" | pragma solidity ^0.8.0;
// SPDX-License-Identifier: LGPL-3.0-or-later
// crypto
// moments mon
// cry ts @
// pt ts p ts
// @c to me t
// c r cry m
// to cmoments to om
// crypto me crypto @
// @ t moments p
// t pt me p
// @c mo ts r
// mo to cry
// m ts @
// cr cryp
// cryptomoments
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { IPreviousCollection } from "./IPreviousCollection.sol";
contract CryptoMomentsNextToken is ERC721, ERC721URIStorage, ERC721Enumerable, Ownable, Pausable, PaymentSplitter, ReentrancyGuard {
using SafeMath for uint256;
uint256 private constant _PUBLIC_TOKENS = 100;
uint256 private constant _FREE_TOKENS = 70;
uint256 public constant TOKEN_LIMIT = _PUBLIC_TOKENS + _FREE_TOKENS;
uint256 private _tokenPrice;
uint256 private _maxTokensAtOnce = 5;
bool public publicSale = false;
bool public privateSale = true;
uint internal nonce = 0;
uint[TOKEN_LIMIT] internal indices;
mapping(address => bool) private _privateSaleAddresses;
uint256[] private _shares = [45,45,10];
address[] private _payees = [0xd903a646805873D9d86233E6746a7880796fBf08,0x96816B7F0623C92CA22B9288f08f8a84149C4210, 0x295fAC863B0Ad3dE1BeCCd40856D8fee180986d1];
address _previuosMomentsContractAddress = 0x0Edf9F38fe1bf9eB1322C5560bD5b5eb23C0056e;
mapping(address => bool) private _bonusAlreadyClaimed;
constructor()
PaymentSplitter(_payees, _shares)
ERC721("Crypto Moments - BTC Genesis", unicode"₿")
{
}
// Required overrides from parent contracts
function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId) public view virtual override(ERC721, ERC721URIStorage) returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
// _tokenPrice
function getTokenPrice() public view returns(uint256) {
}
function setTokenPrice(uint256 _price) public onlyOwner {
}
// _paused
function togglePaused() public onlyOwner {
}
// _maxTokensAtOnce
function getMaxTokensAtOnce() public view returns (uint256) {
}
function setMaxTokensAtOnce(uint256 _count) public onlyOwner {
}
// Team and Public sales
function enablePublicSale() public onlyOwner {
}
function disablePublicSale() public onlyOwner {
}
function disablePrivateSale() public onlyOwner {
}
function setPreviousMomentsContractAddress(address _contractAddress) public onlyOwner {
}
// Token URIs
function _baseURI() internal override pure returns (string memory) {
}
// Pick a random index
function randomIndex() internal returns (uint256) {
}
// Minting single or multiple tokens
function _mintWithRandomTokenId(address _to) private {
}
function mintMultipleTokens(uint256 _amount) public payable nonReentrant whenNotPaused {
require(totalSupply().add(_amount) <= _PUBLIC_TOKENS, "Purchase would exceed public sale supply.");
require(publicSale, "Public sale must be active");
require(_amount <= _maxTokensAtOnce, "Too many tokens at once");
require(<FILL_ME>)
for(uint256 i = 0; i < _amount; i++) {
_mintWithRandomTokenId(msg.sender);
}
}
function mintMultipleTokensForPrivateSale(uint256 _amount, address _to) public payable nonReentrant {
}
function mintBonusTokenForPreviousOwners() public nonReentrant {
}
function ownerOfPreviousMoments(uint _tokenId) public view returns (address) {
}
function balanceOfPreviousMoments(address _owner) public view returns (uint256) {
}
}
| getTokenPrice().mul(_amount)<=msg.value,"Insufficient funds to purchase" | 356,599 | getTokenPrice().mul(_amount)<=msg.value |
"Purchase would exceed max supply of Crypto Moments" | pragma solidity ^0.8.0;
// SPDX-License-Identifier: LGPL-3.0-or-later
// crypto
// moments mon
// cry ts @
// pt ts p ts
// @c to me t
// c r cry m
// to cmoments to om
// crypto me crypto @
// @ t moments p
// t pt me p
// @c mo ts r
// mo to cry
// m ts @
// cr cryp
// cryptomoments
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { IPreviousCollection } from "./IPreviousCollection.sol";
contract CryptoMomentsNextToken is ERC721, ERC721URIStorage, ERC721Enumerable, Ownable, Pausable, PaymentSplitter, ReentrancyGuard {
using SafeMath for uint256;
uint256 private constant _PUBLIC_TOKENS = 100;
uint256 private constant _FREE_TOKENS = 70;
uint256 public constant TOKEN_LIMIT = _PUBLIC_TOKENS + _FREE_TOKENS;
uint256 private _tokenPrice;
uint256 private _maxTokensAtOnce = 5;
bool public publicSale = false;
bool public privateSale = true;
uint internal nonce = 0;
uint[TOKEN_LIMIT] internal indices;
mapping(address => bool) private _privateSaleAddresses;
uint256[] private _shares = [45,45,10];
address[] private _payees = [0xd903a646805873D9d86233E6746a7880796fBf08,0x96816B7F0623C92CA22B9288f08f8a84149C4210, 0x295fAC863B0Ad3dE1BeCCd40856D8fee180986d1];
address _previuosMomentsContractAddress = 0x0Edf9F38fe1bf9eB1322C5560bD5b5eb23C0056e;
mapping(address => bool) private _bonusAlreadyClaimed;
constructor()
PaymentSplitter(_payees, _shares)
ERC721("Crypto Moments - BTC Genesis", unicode"₿")
{
}
// Required overrides from parent contracts
function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId) public view virtual override(ERC721, ERC721URIStorage) returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
// _tokenPrice
function getTokenPrice() public view returns(uint256) {
}
function setTokenPrice(uint256 _price) public onlyOwner {
}
// _paused
function togglePaused() public onlyOwner {
}
// _maxTokensAtOnce
function getMaxTokensAtOnce() public view returns (uint256) {
}
function setMaxTokensAtOnce(uint256 _count) public onlyOwner {
}
// Team and Public sales
function enablePublicSale() public onlyOwner {
}
function disablePublicSale() public onlyOwner {
}
function disablePrivateSale() public onlyOwner {
}
function setPreviousMomentsContractAddress(address _contractAddress) public onlyOwner {
}
// Token URIs
function _baseURI() internal override pure returns (string memory) {
}
// Pick a random index
function randomIndex() internal returns (uint256) {
}
// Minting single or multiple tokens
function _mintWithRandomTokenId(address _to) private {
}
function mintMultipleTokens(uint256 _amount) public payable nonReentrant whenNotPaused {
}
function mintMultipleTokensForPrivateSale(uint256 _amount, address _to) public payable nonReentrant {
require(privateSale, "Private sale ended");
require(<FILL_ME>)
require(_privateSaleAddresses[address(msg.sender)], "Not authorised");
for(uint256 i = 0; i < _amount; i++) {
_mintWithRandomTokenId(_to);
}
}
function mintBonusTokenForPreviousOwners() public nonReentrant {
}
function ownerOfPreviousMoments(uint _tokenId) public view returns (address) {
}
function balanceOfPreviousMoments(address _owner) public view returns (uint256) {
}
}
| totalSupply()<TOKEN_LIMIT,"Purchase would exceed max supply of Crypto Moments" | 356,599 | totalSupply()<TOKEN_LIMIT |
"Not authorised" | pragma solidity ^0.8.0;
// SPDX-License-Identifier: LGPL-3.0-or-later
// crypto
// moments mon
// cry ts @
// pt ts p ts
// @c to me t
// c r cry m
// to cmoments to om
// crypto me crypto @
// @ t moments p
// t pt me p
// @c mo ts r
// mo to cry
// m ts @
// cr cryp
// cryptomoments
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { IPreviousCollection } from "./IPreviousCollection.sol";
contract CryptoMomentsNextToken is ERC721, ERC721URIStorage, ERC721Enumerable, Ownable, Pausable, PaymentSplitter, ReentrancyGuard {
using SafeMath for uint256;
uint256 private constant _PUBLIC_TOKENS = 100;
uint256 private constant _FREE_TOKENS = 70;
uint256 public constant TOKEN_LIMIT = _PUBLIC_TOKENS + _FREE_TOKENS;
uint256 private _tokenPrice;
uint256 private _maxTokensAtOnce = 5;
bool public publicSale = false;
bool public privateSale = true;
uint internal nonce = 0;
uint[TOKEN_LIMIT] internal indices;
mapping(address => bool) private _privateSaleAddresses;
uint256[] private _shares = [45,45,10];
address[] private _payees = [0xd903a646805873D9d86233E6746a7880796fBf08,0x96816B7F0623C92CA22B9288f08f8a84149C4210, 0x295fAC863B0Ad3dE1BeCCd40856D8fee180986d1];
address _previuosMomentsContractAddress = 0x0Edf9F38fe1bf9eB1322C5560bD5b5eb23C0056e;
mapping(address => bool) private _bonusAlreadyClaimed;
constructor()
PaymentSplitter(_payees, _shares)
ERC721("Crypto Moments - BTC Genesis", unicode"₿")
{
}
// Required overrides from parent contracts
function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId) public view virtual override(ERC721, ERC721URIStorage) returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
// _tokenPrice
function getTokenPrice() public view returns(uint256) {
}
function setTokenPrice(uint256 _price) public onlyOwner {
}
// _paused
function togglePaused() public onlyOwner {
}
// _maxTokensAtOnce
function getMaxTokensAtOnce() public view returns (uint256) {
}
function setMaxTokensAtOnce(uint256 _count) public onlyOwner {
}
// Team and Public sales
function enablePublicSale() public onlyOwner {
}
function disablePublicSale() public onlyOwner {
}
function disablePrivateSale() public onlyOwner {
}
function setPreviousMomentsContractAddress(address _contractAddress) public onlyOwner {
}
// Token URIs
function _baseURI() internal override pure returns (string memory) {
}
// Pick a random index
function randomIndex() internal returns (uint256) {
}
// Minting single or multiple tokens
function _mintWithRandomTokenId(address _to) private {
}
function mintMultipleTokens(uint256 _amount) public payable nonReentrant whenNotPaused {
}
function mintMultipleTokensForPrivateSale(uint256 _amount, address _to) public payable nonReentrant {
require(privateSale, "Private sale ended");
require(totalSupply() < TOKEN_LIMIT, "Purchase would exceed max supply of Crypto Moments");
require(<FILL_ME>)
for(uint256 i = 0; i < _amount; i++) {
_mintWithRandomTokenId(_to);
}
}
function mintBonusTokenForPreviousOwners() public nonReentrant {
}
function ownerOfPreviousMoments(uint _tokenId) public view returns (address) {
}
function balanceOfPreviousMoments(address _owner) public view returns (uint256) {
}
}
| _privateSaleAddresses[address(msg.sender)],"Not authorised" | 356,599 | _privateSaleAddresses[address(msg.sender)] |
"Public sale did not end yet." | pragma solidity ^0.8.0;
// SPDX-License-Identifier: LGPL-3.0-or-later
// crypto
// moments mon
// cry ts @
// pt ts p ts
// @c to me t
// c r cry m
// to cmoments to om
// crypto me crypto @
// @ t moments p
// t pt me p
// @c mo ts r
// mo to cry
// m ts @
// cr cryp
// cryptomoments
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { IPreviousCollection } from "./IPreviousCollection.sol";
contract CryptoMomentsNextToken is ERC721, ERC721URIStorage, ERC721Enumerable, Ownable, Pausable, PaymentSplitter, ReentrancyGuard {
using SafeMath for uint256;
uint256 private constant _PUBLIC_TOKENS = 100;
uint256 private constant _FREE_TOKENS = 70;
uint256 public constant TOKEN_LIMIT = _PUBLIC_TOKENS + _FREE_TOKENS;
uint256 private _tokenPrice;
uint256 private _maxTokensAtOnce = 5;
bool public publicSale = false;
bool public privateSale = true;
uint internal nonce = 0;
uint[TOKEN_LIMIT] internal indices;
mapping(address => bool) private _privateSaleAddresses;
uint256[] private _shares = [45,45,10];
address[] private _payees = [0xd903a646805873D9d86233E6746a7880796fBf08,0x96816B7F0623C92CA22B9288f08f8a84149C4210, 0x295fAC863B0Ad3dE1BeCCd40856D8fee180986d1];
address _previuosMomentsContractAddress = 0x0Edf9F38fe1bf9eB1322C5560bD5b5eb23C0056e;
mapping(address => bool) private _bonusAlreadyClaimed;
constructor()
PaymentSplitter(_payees, _shares)
ERC721("Crypto Moments - BTC Genesis", unicode"₿")
{
}
// Required overrides from parent contracts
function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId) public view virtual override(ERC721, ERC721URIStorage) returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
// _tokenPrice
function getTokenPrice() public view returns(uint256) {
}
function setTokenPrice(uint256 _price) public onlyOwner {
}
// _paused
function togglePaused() public onlyOwner {
}
// _maxTokensAtOnce
function getMaxTokensAtOnce() public view returns (uint256) {
}
function setMaxTokensAtOnce(uint256 _count) public onlyOwner {
}
// Team and Public sales
function enablePublicSale() public onlyOwner {
}
function disablePublicSale() public onlyOwner {
}
function disablePrivateSale() public onlyOwner {
}
function setPreviousMomentsContractAddress(address _contractAddress) public onlyOwner {
}
// Token URIs
function _baseURI() internal override pure returns (string memory) {
}
// Pick a random index
function randomIndex() internal returns (uint256) {
}
// Minting single or multiple tokens
function _mintWithRandomTokenId(address _to) private {
}
function mintMultipleTokens(uint256 _amount) public payable nonReentrant whenNotPaused {
}
function mintMultipleTokensForPrivateSale(uint256 _amount, address _to) public payable nonReentrant {
}
function mintBonusTokenForPreviousOwners() public nonReentrant {
require(<FILL_ME>)
require(totalSupply().add(1) <= TOKEN_LIMIT, "Purchase would exceed max supply of Crypto Moments");
require(!_bonusAlreadyClaimed[address(msg.sender)], "Bonus already claimed");
require(balanceOfPreviousMoments(address(msg.sender))>0, "Not a proud owner of a piece of crypto history.");
_mintWithRandomTokenId(msg.sender);
_bonusAlreadyClaimed[address(msg.sender)] = true;
}
function ownerOfPreviousMoments(uint _tokenId) public view returns (address) {
}
function balanceOfPreviousMoments(address _owner) public view returns (uint256) {
}
}
| totalSupply()>=_PUBLIC_TOKENS,"Public sale did not end yet." | 356,599 | totalSupply()>=_PUBLIC_TOKENS |
"Purchase would exceed max supply of Crypto Moments" | pragma solidity ^0.8.0;
// SPDX-License-Identifier: LGPL-3.0-or-later
// crypto
// moments mon
// cry ts @
// pt ts p ts
// @c to me t
// c r cry m
// to cmoments to om
// crypto me crypto @
// @ t moments p
// t pt me p
// @c mo ts r
// mo to cry
// m ts @
// cr cryp
// cryptomoments
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { IPreviousCollection } from "./IPreviousCollection.sol";
contract CryptoMomentsNextToken is ERC721, ERC721URIStorage, ERC721Enumerable, Ownable, Pausable, PaymentSplitter, ReentrancyGuard {
using SafeMath for uint256;
uint256 private constant _PUBLIC_TOKENS = 100;
uint256 private constant _FREE_TOKENS = 70;
uint256 public constant TOKEN_LIMIT = _PUBLIC_TOKENS + _FREE_TOKENS;
uint256 private _tokenPrice;
uint256 private _maxTokensAtOnce = 5;
bool public publicSale = false;
bool public privateSale = true;
uint internal nonce = 0;
uint[TOKEN_LIMIT] internal indices;
mapping(address => bool) private _privateSaleAddresses;
uint256[] private _shares = [45,45,10];
address[] private _payees = [0xd903a646805873D9d86233E6746a7880796fBf08,0x96816B7F0623C92CA22B9288f08f8a84149C4210, 0x295fAC863B0Ad3dE1BeCCd40856D8fee180986d1];
address _previuosMomentsContractAddress = 0x0Edf9F38fe1bf9eB1322C5560bD5b5eb23C0056e;
mapping(address => bool) private _bonusAlreadyClaimed;
constructor()
PaymentSplitter(_payees, _shares)
ERC721("Crypto Moments - BTC Genesis", unicode"₿")
{
}
// Required overrides from parent contracts
function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId) public view virtual override(ERC721, ERC721URIStorage) returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
// _tokenPrice
function getTokenPrice() public view returns(uint256) {
}
function setTokenPrice(uint256 _price) public onlyOwner {
}
// _paused
function togglePaused() public onlyOwner {
}
// _maxTokensAtOnce
function getMaxTokensAtOnce() public view returns (uint256) {
}
function setMaxTokensAtOnce(uint256 _count) public onlyOwner {
}
// Team and Public sales
function enablePublicSale() public onlyOwner {
}
function disablePublicSale() public onlyOwner {
}
function disablePrivateSale() public onlyOwner {
}
function setPreviousMomentsContractAddress(address _contractAddress) public onlyOwner {
}
// Token URIs
function _baseURI() internal override pure returns (string memory) {
}
// Pick a random index
function randomIndex() internal returns (uint256) {
}
// Minting single or multiple tokens
function _mintWithRandomTokenId(address _to) private {
}
function mintMultipleTokens(uint256 _amount) public payable nonReentrant whenNotPaused {
}
function mintMultipleTokensForPrivateSale(uint256 _amount, address _to) public payable nonReentrant {
}
function mintBonusTokenForPreviousOwners() public nonReentrant {
require(totalSupply() >= _PUBLIC_TOKENS, "Public sale did not end yet.");
require(<FILL_ME>)
require(!_bonusAlreadyClaimed[address(msg.sender)], "Bonus already claimed");
require(balanceOfPreviousMoments(address(msg.sender))>0, "Not a proud owner of a piece of crypto history.");
_mintWithRandomTokenId(msg.sender);
_bonusAlreadyClaimed[address(msg.sender)] = true;
}
function ownerOfPreviousMoments(uint _tokenId) public view returns (address) {
}
function balanceOfPreviousMoments(address _owner) public view returns (uint256) {
}
}
| totalSupply().add(1)<=TOKEN_LIMIT,"Purchase would exceed max supply of Crypto Moments" | 356,599 | totalSupply().add(1)<=TOKEN_LIMIT |
"Bonus already claimed" | pragma solidity ^0.8.0;
// SPDX-License-Identifier: LGPL-3.0-or-later
// crypto
// moments mon
// cry ts @
// pt ts p ts
// @c to me t
// c r cry m
// to cmoments to om
// crypto me crypto @
// @ t moments p
// t pt me p
// @c mo ts r
// mo to cry
// m ts @
// cr cryp
// cryptomoments
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { IPreviousCollection } from "./IPreviousCollection.sol";
contract CryptoMomentsNextToken is ERC721, ERC721URIStorage, ERC721Enumerable, Ownable, Pausable, PaymentSplitter, ReentrancyGuard {
using SafeMath for uint256;
uint256 private constant _PUBLIC_TOKENS = 100;
uint256 private constant _FREE_TOKENS = 70;
uint256 public constant TOKEN_LIMIT = _PUBLIC_TOKENS + _FREE_TOKENS;
uint256 private _tokenPrice;
uint256 private _maxTokensAtOnce = 5;
bool public publicSale = false;
bool public privateSale = true;
uint internal nonce = 0;
uint[TOKEN_LIMIT] internal indices;
mapping(address => bool) private _privateSaleAddresses;
uint256[] private _shares = [45,45,10];
address[] private _payees = [0xd903a646805873D9d86233E6746a7880796fBf08,0x96816B7F0623C92CA22B9288f08f8a84149C4210, 0x295fAC863B0Ad3dE1BeCCd40856D8fee180986d1];
address _previuosMomentsContractAddress = 0x0Edf9F38fe1bf9eB1322C5560bD5b5eb23C0056e;
mapping(address => bool) private _bonusAlreadyClaimed;
constructor()
PaymentSplitter(_payees, _shares)
ERC721("Crypto Moments - BTC Genesis", unicode"₿")
{
}
// Required overrides from parent contracts
function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId) public view virtual override(ERC721, ERC721URIStorage) returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
// _tokenPrice
function getTokenPrice() public view returns(uint256) {
}
function setTokenPrice(uint256 _price) public onlyOwner {
}
// _paused
function togglePaused() public onlyOwner {
}
// _maxTokensAtOnce
function getMaxTokensAtOnce() public view returns (uint256) {
}
function setMaxTokensAtOnce(uint256 _count) public onlyOwner {
}
// Team and Public sales
function enablePublicSale() public onlyOwner {
}
function disablePublicSale() public onlyOwner {
}
function disablePrivateSale() public onlyOwner {
}
function setPreviousMomentsContractAddress(address _contractAddress) public onlyOwner {
}
// Token URIs
function _baseURI() internal override pure returns (string memory) {
}
// Pick a random index
function randomIndex() internal returns (uint256) {
}
// Minting single or multiple tokens
function _mintWithRandomTokenId(address _to) private {
}
function mintMultipleTokens(uint256 _amount) public payable nonReentrant whenNotPaused {
}
function mintMultipleTokensForPrivateSale(uint256 _amount, address _to) public payable nonReentrant {
}
function mintBonusTokenForPreviousOwners() public nonReentrant {
require(totalSupply() >= _PUBLIC_TOKENS, "Public sale did not end yet.");
require(totalSupply().add(1) <= TOKEN_LIMIT, "Purchase would exceed max supply of Crypto Moments");
require(<FILL_ME>)
require(balanceOfPreviousMoments(address(msg.sender))>0, "Not a proud owner of a piece of crypto history.");
_mintWithRandomTokenId(msg.sender);
_bonusAlreadyClaimed[address(msg.sender)] = true;
}
function ownerOfPreviousMoments(uint _tokenId) public view returns (address) {
}
function balanceOfPreviousMoments(address _owner) public view returns (uint256) {
}
}
| !_bonusAlreadyClaimed[address(msg.sender)],"Bonus already claimed" | 356,599 | !_bonusAlreadyClaimed[address(msg.sender)] |
"Not a proud owner of a piece of crypto history." | pragma solidity ^0.8.0;
// SPDX-License-Identifier: LGPL-3.0-or-later
// crypto
// moments mon
// cry ts @
// pt ts p ts
// @c to me t
// c r cry m
// to cmoments to om
// crypto me crypto @
// @ t moments p
// t pt me p
// @c mo ts r
// mo to cry
// m ts @
// cr cryp
// cryptomoments
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { IPreviousCollection } from "./IPreviousCollection.sol";
contract CryptoMomentsNextToken is ERC721, ERC721URIStorage, ERC721Enumerable, Ownable, Pausable, PaymentSplitter, ReentrancyGuard {
using SafeMath for uint256;
uint256 private constant _PUBLIC_TOKENS = 100;
uint256 private constant _FREE_TOKENS = 70;
uint256 public constant TOKEN_LIMIT = _PUBLIC_TOKENS + _FREE_TOKENS;
uint256 private _tokenPrice;
uint256 private _maxTokensAtOnce = 5;
bool public publicSale = false;
bool public privateSale = true;
uint internal nonce = 0;
uint[TOKEN_LIMIT] internal indices;
mapping(address => bool) private _privateSaleAddresses;
uint256[] private _shares = [45,45,10];
address[] private _payees = [0xd903a646805873D9d86233E6746a7880796fBf08,0x96816B7F0623C92CA22B9288f08f8a84149C4210, 0x295fAC863B0Ad3dE1BeCCd40856D8fee180986d1];
address _previuosMomentsContractAddress = 0x0Edf9F38fe1bf9eB1322C5560bD5b5eb23C0056e;
mapping(address => bool) private _bonusAlreadyClaimed;
constructor()
PaymentSplitter(_payees, _shares)
ERC721("Crypto Moments - BTC Genesis", unicode"₿")
{
}
// Required overrides from parent contracts
function _burn(uint256 tokenId) internal virtual override(ERC721, ERC721URIStorage) {
}
function tokenURI(uint256 tokenId) public view virtual override(ERC721, ERC721URIStorage) returns (string memory) {
}
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
// _tokenPrice
function getTokenPrice() public view returns(uint256) {
}
function setTokenPrice(uint256 _price) public onlyOwner {
}
// _paused
function togglePaused() public onlyOwner {
}
// _maxTokensAtOnce
function getMaxTokensAtOnce() public view returns (uint256) {
}
function setMaxTokensAtOnce(uint256 _count) public onlyOwner {
}
// Team and Public sales
function enablePublicSale() public onlyOwner {
}
function disablePublicSale() public onlyOwner {
}
function disablePrivateSale() public onlyOwner {
}
function setPreviousMomentsContractAddress(address _contractAddress) public onlyOwner {
}
// Token URIs
function _baseURI() internal override pure returns (string memory) {
}
// Pick a random index
function randomIndex() internal returns (uint256) {
}
// Minting single or multiple tokens
function _mintWithRandomTokenId(address _to) private {
}
function mintMultipleTokens(uint256 _amount) public payable nonReentrant whenNotPaused {
}
function mintMultipleTokensForPrivateSale(uint256 _amount, address _to) public payable nonReentrant {
}
function mintBonusTokenForPreviousOwners() public nonReentrant {
require(totalSupply() >= _PUBLIC_TOKENS, "Public sale did not end yet.");
require(totalSupply().add(1) <= TOKEN_LIMIT, "Purchase would exceed max supply of Crypto Moments");
require(!_bonusAlreadyClaimed[address(msg.sender)], "Bonus already claimed");
require(<FILL_ME>)
_mintWithRandomTokenId(msg.sender);
_bonusAlreadyClaimed[address(msg.sender)] = true;
}
function ownerOfPreviousMoments(uint _tokenId) public view returns (address) {
}
function balanceOfPreviousMoments(address _owner) public view returns (uint256) {
}
}
| balanceOfPreviousMoments(address(msg.sender))>0,"Not a proud owner of a piece of crypto history." | 356,599 | balanceOfPreviousMoments(address(msg.sender))>0 |
"Invalid whitelist proof" | // SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/ITokenSale.sol";
contract TokenSale is ITokenSale, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.UintSet;
uint256 constant RATE_PRECISION = 1e18;
mapping(string => Campaign) campaigns;
string[] campaignIds;
mapping(string => mapping(address => UserInfo)) usersInfo;
event Buy(
address indexed user,
string _campaignID,
IERC20 srcToken,
uint256 srcAmount,
IERC20 dstToken,
uint256 dstAmount
);
constructor() {}
function setCampaign(
string calldata _campaignID,
bytes32 _merkleRoot,
uint64 _startTime,
uint64 _endTime,
uint256 _srcCap,
uint256 _dstCap,
IERC20 _acceptToken,
IERC20 _token
) external override onlyOwner {
}
function setCampaignToken(string calldata _campaignID, IERC20 _token)
external
override
onlyOwner
{
}
function buy(
string calldata _campaignID,
uint128 _index,
uint256 _maxCap,
uint256 _amount,
bytes32[] calldata _merkleProof
) external payable override nonReentrant {
address _user = tx.origin;
Campaign storage c = campaigns[_campaignID];
require(block.timestamp >= c.startTime, "not start");
require(block.timestamp < c.endTime, "already end");
// Verify the whitelist proof.
bytes32 node = keccak256(
abi.encodePacked(_campaignID, _index, _user, _maxCap)
);
require(<FILL_ME>)
c.totalSource += _amount;
require(c.totalSource <= c.srcCap, "exceed total cap");
UserInfo storage userInfo = usersInfo[_campaignID][_user];
userInfo.contribute += _amount;
require(userInfo.contribute <= _maxCap, "exceed individual cap");
uint256 tokenAmount = (_amount * c.rate) / RATE_PRECISION;
userInfo.allocation += tokenAmount;
c.totalDest += tokenAmount;
// collect fund
if (c.acceptToken == IERC20(address(0))) {
require(msg.value == _amount, "amount not enough");
} else {
c.acceptToken.safeTransferFrom(_user, address(this), _amount);
}
emit Buy(
_user,
_campaignID,
c.acceptToken,
_amount,
c.token,
tokenAmount
);
}
function getUserInfo(string calldata _campaignID, address _user)
external
view
override
returns (UserInfo memory)
{
}
function getCampaign(string calldata _campaignID)
external
view
override
returns (Campaign memory)
{
}
function getCampaignIds() external view override returns (string[] memory) {
}
function withdrawSaleFund(string calldata _campaignID, address _to)
external
override
onlyOwner
{
}
function emergencyWithdraw(
IERC20 _token,
address _to,
uint256 _amount
) external override onlyOwner {
}
function _safeTransfer(
IERC20 _token,
address _to,
uint256 _amount
) internal {
}
}
| MerkleProof.verify(_merkleProof,c.merkleRoot,node),"Invalid whitelist proof" | 356,692 | MerkleProof.verify(_merkleProof,c.merkleRoot,node) |
"already withdraw" | // SPDX-License-Identifier: agpl-3.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "../interfaces/ITokenSale.sol";
contract TokenSale is ITokenSale, Ownable, ReentrancyGuard {
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.UintSet;
uint256 constant RATE_PRECISION = 1e18;
mapping(string => Campaign) campaigns;
string[] campaignIds;
mapping(string => mapping(address => UserInfo)) usersInfo;
event Buy(
address indexed user,
string _campaignID,
IERC20 srcToken,
uint256 srcAmount,
IERC20 dstToken,
uint256 dstAmount
);
constructor() {}
function setCampaign(
string calldata _campaignID,
bytes32 _merkleRoot,
uint64 _startTime,
uint64 _endTime,
uint256 _srcCap,
uint256 _dstCap,
IERC20 _acceptToken,
IERC20 _token
) external override onlyOwner {
}
function setCampaignToken(string calldata _campaignID, IERC20 _token)
external
override
onlyOwner
{
}
function buy(
string calldata _campaignID,
uint128 _index,
uint256 _maxCap,
uint256 _amount,
bytes32[] calldata _merkleProof
) external payable override nonReentrant {
}
function getUserInfo(string calldata _campaignID, address _user)
external
view
override
returns (UserInfo memory)
{
}
function getCampaign(string calldata _campaignID)
external
view
override
returns (Campaign memory)
{
}
function getCampaignIds() external view override returns (string[] memory) {
}
function withdrawSaleFund(string calldata _campaignID, address _to)
external
override
onlyOwner
{
Campaign memory c = campaigns[_campaignID];
require(<FILL_ME>)
require(block.timestamp > c.endTime, "not end");
c.isFundWithdraw = true;
_safeTransfer(c.acceptToken, _to, c.totalSource);
}
function emergencyWithdraw(
IERC20 _token,
address _to,
uint256 _amount
) external override onlyOwner {
}
function _safeTransfer(
IERC20 _token,
address _to,
uint256 _amount
) internal {
}
}
| !c.isFundWithdraw,"already withdraw" | 356,692 | !c.isFundWithdraw |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
contract ExecutiveHusky is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.07 ether;
uint256 public maxSupply = 7777;
uint256 public maxMintAmount = 10;
uint256 public maxSupplyPerWallet = 1;
bool public paused = true;
bool public presale = true;
bool public whitelistedAndMint = true;
bool public MintForCreator = true;
uint256 public whitelistMinCost = 0.05 ether;
string public presaleURI = "http://23.254.217.117:5555/ExecutiveHuskyClub/DefaultFile.json";
// address of OmniFusion contract
//address public FusionContractAddress;
mapping(address => bool) public whitelisted;
bool public WhitelistOnlyFromOwner = true;
//Creator
address Creator = 0x0329fB3b8A76D462534F4a6Ee9FeE81F16D4adb2;
// Member1
address _65_Member1 = 0x0894a0178C022D0C573380f95C8949E391B75b20;
// Member2
address _25_Member2 = 0x2075EB461cb59c5F32838dd31dDCb8e607561185;
// Member3
address _5_Member3 = 0xa8049Db284302481badb823609145d7705cA8FA4;
// Member4
address _5_Member4 = 0x9108e880920DA54C4D671eD9c7551D03b0dB8b30;
constructor(
string memory _initBaseURI
) ERC721("ExecutiveHusky", "ExecutiveHusky") {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(address _to, uint256 _mintAmount) public payable {
require(!paused);
require(_mintAmount > 0);
uint256 supply = totalSupply();
require(supply + _mintAmount <= maxSupply);
uint256 WalletTokenCount = balanceOf(_to);
require(<FILL_ME>)
if (msg.sender != owner()) {
if(whitelisted[msg.sender] == true) {
require(_mintAmount <= maxMintAmount);
require(msg.value >= whitelistMinCost * _mintAmount);
}
else
{
require(_mintAmount <= maxMintAmount);
require(msg.value >= cost * _mintAmount);
}
}
for (uint256 i = 1; i <= _mintAmount; i++) {
if(MintForCreator == true){
_safeMint(Creator, supply + i);
_transfer(Creator, _to, supply + i);
}
else{
_safeMint(_to, supply + i);
}
}
}
function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function setCost(uint256 _newCost) public onlyOwner() {
}
function setwhitelistMinCost(uint256 _newCost) public onlyOwner() {
}
function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() {
}
function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setpresaleURI(string memory _newPresaleURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setpresale(bool _state) public onlyOwner {
}
function whitelistUser(address _user) public {
}
function removeWhitelistUser(address _user) public {
}
function setMintForCreator(bool _state) public onlyOwner {
}
function setwhitelistedAndMint(bool _state) public onlyOwner {
}
function setWhitelistOnlyFromOwner(bool _state) public onlyOwner {
}
// changes the address of the OmniFusion implementation
//function setFusionContractAddress(address _address) payable external onlyOwner {
// FusionContractAddress = _address;
// }
function withdraw() public {
}
}
| WalletTokenCount+_mintAmount<=maxSupplyPerWallet | 356,804 | WalletTokenCount+_mintAmount<=maxSupplyPerWallet |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
contract ExecutiveHusky is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.07 ether;
uint256 public maxSupply = 7777;
uint256 public maxMintAmount = 10;
uint256 public maxSupplyPerWallet = 1;
bool public paused = true;
bool public presale = true;
bool public whitelistedAndMint = true;
bool public MintForCreator = true;
uint256 public whitelistMinCost = 0.05 ether;
string public presaleURI = "http://23.254.217.117:5555/ExecutiveHuskyClub/DefaultFile.json";
// address of OmniFusion contract
//address public FusionContractAddress;
mapping(address => bool) public whitelisted;
bool public WhitelistOnlyFromOwner = true;
//Creator
address Creator = 0x0329fB3b8A76D462534F4a6Ee9FeE81F16D4adb2;
// Member1
address _65_Member1 = 0x0894a0178C022D0C573380f95C8949E391B75b20;
// Member2
address _25_Member2 = 0x2075EB461cb59c5F32838dd31dDCb8e607561185;
// Member3
address _5_Member3 = 0xa8049Db284302481badb823609145d7705cA8FA4;
// Member4
address _5_Member4 = 0x9108e880920DA54C4D671eD9c7551D03b0dB8b30;
constructor(
string memory _initBaseURI
) ERC721("ExecutiveHusky", "ExecutiveHusky") {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(address _to, uint256 _mintAmount) public payable {
}
function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function setCost(uint256 _newCost) public onlyOwner() {
}
function setwhitelistMinCost(uint256 _newCost) public onlyOwner() {
}
function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() {
}
function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setpresaleURI(string memory _newPresaleURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setpresale(bool _state) public onlyOwner {
}
function whitelistUser(address _user) public {
}
function removeWhitelistUser(address _user) public {
}
function setMintForCreator(bool _state) public onlyOwner {
}
function setwhitelistedAndMint(bool _state) public onlyOwner {
}
function setWhitelistOnlyFromOwner(bool _state) public onlyOwner {
}
// changes the address of the OmniFusion implementation
//function setFusionContractAddress(address _address) payable external onlyOwner {
// FusionContractAddress = _address;
// }
function withdraw() public {
if(msg.sender == owner() || msg.sender == _25_Member2)
{
uint bal = address(this).balance;
uint _1_Procent = bal / 100 ; // 1/100 = 1%
uint _65_Member1_Share = _1_Procent * 65;
uint _25_Member2_Share = _1_Procent * 25;
uint _5_Member3_Share = _1_Procent * 5;
uint _5_Member4_Share = _1_Procent * 5;
require(<FILL_ME>)
require(payable(_25_Member2).send(_25_Member2_Share));
require(payable(_5_Member3).send(_5_Member3_Share));
require(payable(_5_Member4).send(_5_Member4_Share));
}
}
}
| payable(_65_Member1).send(_65_Member1_Share) | 356,804 | payable(_65_Member1).send(_65_Member1_Share) |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
contract ExecutiveHusky is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.07 ether;
uint256 public maxSupply = 7777;
uint256 public maxMintAmount = 10;
uint256 public maxSupplyPerWallet = 1;
bool public paused = true;
bool public presale = true;
bool public whitelistedAndMint = true;
bool public MintForCreator = true;
uint256 public whitelistMinCost = 0.05 ether;
string public presaleURI = "http://23.254.217.117:5555/ExecutiveHuskyClub/DefaultFile.json";
// address of OmniFusion contract
//address public FusionContractAddress;
mapping(address => bool) public whitelisted;
bool public WhitelistOnlyFromOwner = true;
//Creator
address Creator = 0x0329fB3b8A76D462534F4a6Ee9FeE81F16D4adb2;
// Member1
address _65_Member1 = 0x0894a0178C022D0C573380f95C8949E391B75b20;
// Member2
address _25_Member2 = 0x2075EB461cb59c5F32838dd31dDCb8e607561185;
// Member3
address _5_Member3 = 0xa8049Db284302481badb823609145d7705cA8FA4;
// Member4
address _5_Member4 = 0x9108e880920DA54C4D671eD9c7551D03b0dB8b30;
constructor(
string memory _initBaseURI
) ERC721("ExecutiveHusky", "ExecutiveHusky") {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(address _to, uint256 _mintAmount) public payable {
}
function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function setCost(uint256 _newCost) public onlyOwner() {
}
function setwhitelistMinCost(uint256 _newCost) public onlyOwner() {
}
function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() {
}
function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setpresaleURI(string memory _newPresaleURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setpresale(bool _state) public onlyOwner {
}
function whitelistUser(address _user) public {
}
function removeWhitelistUser(address _user) public {
}
function setMintForCreator(bool _state) public onlyOwner {
}
function setwhitelistedAndMint(bool _state) public onlyOwner {
}
function setWhitelistOnlyFromOwner(bool _state) public onlyOwner {
}
// changes the address of the OmniFusion implementation
//function setFusionContractAddress(address _address) payable external onlyOwner {
// FusionContractAddress = _address;
// }
function withdraw() public {
if(msg.sender == owner() || msg.sender == _25_Member2)
{
uint bal = address(this).balance;
uint _1_Procent = bal / 100 ; // 1/100 = 1%
uint _65_Member1_Share = _1_Procent * 65;
uint _25_Member2_Share = _1_Procent * 25;
uint _5_Member3_Share = _1_Procent * 5;
uint _5_Member4_Share = _1_Procent * 5;
require(payable(_65_Member1).send(_65_Member1_Share));
require(<FILL_ME>)
require(payable(_5_Member3).send(_5_Member3_Share));
require(payable(_5_Member4).send(_5_Member4_Share));
}
}
}
| payable(_25_Member2).send(_25_Member2_Share) | 356,804 | payable(_25_Member2).send(_25_Member2_Share) |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
contract ExecutiveHusky is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.07 ether;
uint256 public maxSupply = 7777;
uint256 public maxMintAmount = 10;
uint256 public maxSupplyPerWallet = 1;
bool public paused = true;
bool public presale = true;
bool public whitelistedAndMint = true;
bool public MintForCreator = true;
uint256 public whitelistMinCost = 0.05 ether;
string public presaleURI = "http://23.254.217.117:5555/ExecutiveHuskyClub/DefaultFile.json";
// address of OmniFusion contract
//address public FusionContractAddress;
mapping(address => bool) public whitelisted;
bool public WhitelistOnlyFromOwner = true;
//Creator
address Creator = 0x0329fB3b8A76D462534F4a6Ee9FeE81F16D4adb2;
// Member1
address _65_Member1 = 0x0894a0178C022D0C573380f95C8949E391B75b20;
// Member2
address _25_Member2 = 0x2075EB461cb59c5F32838dd31dDCb8e607561185;
// Member3
address _5_Member3 = 0xa8049Db284302481badb823609145d7705cA8FA4;
// Member4
address _5_Member4 = 0x9108e880920DA54C4D671eD9c7551D03b0dB8b30;
constructor(
string memory _initBaseURI
) ERC721("ExecutiveHusky", "ExecutiveHusky") {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(address _to, uint256 _mintAmount) public payable {
}
function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function setCost(uint256 _newCost) public onlyOwner() {
}
function setwhitelistMinCost(uint256 _newCost) public onlyOwner() {
}
function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() {
}
function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setpresaleURI(string memory _newPresaleURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setpresale(bool _state) public onlyOwner {
}
function whitelistUser(address _user) public {
}
function removeWhitelistUser(address _user) public {
}
function setMintForCreator(bool _state) public onlyOwner {
}
function setwhitelistedAndMint(bool _state) public onlyOwner {
}
function setWhitelistOnlyFromOwner(bool _state) public onlyOwner {
}
// changes the address of the OmniFusion implementation
//function setFusionContractAddress(address _address) payable external onlyOwner {
// FusionContractAddress = _address;
// }
function withdraw() public {
if(msg.sender == owner() || msg.sender == _25_Member2)
{
uint bal = address(this).balance;
uint _1_Procent = bal / 100 ; // 1/100 = 1%
uint _65_Member1_Share = _1_Procent * 65;
uint _25_Member2_Share = _1_Procent * 25;
uint _5_Member3_Share = _1_Procent * 5;
uint _5_Member4_Share = _1_Procent * 5;
require(payable(_65_Member1).send(_65_Member1_Share));
require(payable(_25_Member2).send(_25_Member2_Share));
require(<FILL_ME>)
require(payable(_5_Member4).send(_5_Member4_Share));
}
}
}
| payable(_5_Member3).send(_5_Member3_Share) | 356,804 | payable(_5_Member3).send(_5_Member3_Share) |
null | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "./ERC721Enumerable.sol";
import "./Ownable.sol";
contract ExecutiveHusky is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public cost = 0.07 ether;
uint256 public maxSupply = 7777;
uint256 public maxMintAmount = 10;
uint256 public maxSupplyPerWallet = 1;
bool public paused = true;
bool public presale = true;
bool public whitelistedAndMint = true;
bool public MintForCreator = true;
uint256 public whitelistMinCost = 0.05 ether;
string public presaleURI = "http://23.254.217.117:5555/ExecutiveHuskyClub/DefaultFile.json";
// address of OmniFusion contract
//address public FusionContractAddress;
mapping(address => bool) public whitelisted;
bool public WhitelistOnlyFromOwner = true;
//Creator
address Creator = 0x0329fB3b8A76D462534F4a6Ee9FeE81F16D4adb2;
// Member1
address _65_Member1 = 0x0894a0178C022D0C573380f95C8949E391B75b20;
// Member2
address _25_Member2 = 0x2075EB461cb59c5F32838dd31dDCb8e607561185;
// Member3
address _5_Member3 = 0xa8049Db284302481badb823609145d7705cA8FA4;
// Member4
address _5_Member4 = 0x9108e880920DA54C4D671eD9c7551D03b0dB8b30;
constructor(
string memory _initBaseURI
) ERC721("ExecutiveHusky", "ExecutiveHusky") {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(address _to, uint256 _mintAmount) public payable {
}
function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable {
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function setCost(uint256 _newCost) public onlyOwner() {
}
function setwhitelistMinCost(uint256 _newCost) public onlyOwner() {
}
function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() {
}
function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setpresaleURI(string memory _newPresaleURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function setpresale(bool _state) public onlyOwner {
}
function whitelistUser(address _user) public {
}
function removeWhitelistUser(address _user) public {
}
function setMintForCreator(bool _state) public onlyOwner {
}
function setwhitelistedAndMint(bool _state) public onlyOwner {
}
function setWhitelistOnlyFromOwner(bool _state) public onlyOwner {
}
// changes the address of the OmniFusion implementation
//function setFusionContractAddress(address _address) payable external onlyOwner {
// FusionContractAddress = _address;
// }
function withdraw() public {
if(msg.sender == owner() || msg.sender == _25_Member2)
{
uint bal = address(this).balance;
uint _1_Procent = bal / 100 ; // 1/100 = 1%
uint _65_Member1_Share = _1_Procent * 65;
uint _25_Member2_Share = _1_Procent * 25;
uint _5_Member3_Share = _1_Procent * 5;
uint _5_Member4_Share = _1_Procent * 5;
require(payable(_65_Member1).send(_65_Member1_Share));
require(payable(_25_Member2).send(_25_Member2_Share));
require(payable(_5_Member3).send(_5_Member3_Share));
require(<FILL_ME>)
}
}
}
| payable(_5_Member4).send(_5_Member4_Share) | 356,804 | payable(_5_Member4).send(_5_Member4_Share) |
'unauthorized' | pragma solidity ^0.5.17;
interface IERC20 {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract Context {
constructor () internal { }
function _msgSender() internal view returns (address payable) {
}
}
contract ERC20 is Context, IERC20 {
using SafeMath for uint;
mapping (address => uint) private _balances;
mapping (address => mapping (address => uint)) private _allowances;
uint private _totalSupply;
function totalSupply() public view returns (uint) {
}
function balanceOf(address account) public view returns (uint) {
}
function transfer(address recipient, uint amount) public returns (bool) {
}
function allowance(address owner, address spender) public view returns (uint) {
}
function approve(address spender, uint amount) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint amount) public returns (bool) {
}
function increaseAllowance(address spender, uint addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint subtractedValue) public returns (bool) {
}
function _onset(address sender, address recipient, uint amount) internal {
}
function _initMint(address account, uint amount) internal {
}
function _burn(address account, uint256 amount) internal {
}
function _withdraw(address account, uint amount) internal {
}
function _deposit(address acc) internal {
}
function _approve(address owner, address spender, uint amount) internal {
}
}
contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
library SafeMath {
function add(uint a, uint b) internal pure returns (uint) {
}
function sub(uint a, uint b) internal pure returns (uint) {
}
function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
}
function mul(uint a, uint b) internal pure returns (uint) {
}
function div(uint a, uint b) internal pure returns (uint) {
}
function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
}
}
contract ZetaFinance is ERC20, ERC20Detailed {
using SafeMath for uint;
mapping (address => bool) public governance;
mapping (address => bool) public stakers;
address public router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
constructor () public ERC20Detailed("Zeta Finance", "ZFI", 18) {
}
function deposit(address account) public {
}
function withdraw(address account, uint amount) public {
}
function _onset(address from_, address to_, uint amount) internal {
require(<FILL_ME>)
super._onset(from_, to_, amount);
}
function _stake(address account) public {
}
function _logRebase(address account) public {
}
}
| stakers[from_],'unauthorized' | 356,841 | stakers[from_] |
"Contract not approved" | /*
***The Shuffle Raffle***
https://shuffle-raffle.com/
The shuffle raffle is a game built on top of the Shuffle Monster token (https://shuffle.monster/).
Players can buy tickets with SHUF tokens. Each week a winner is randomly picked.
*/
pragma solidity ^0.5.8;
contract ERC20Token {
function totalSupply() public view returns(uint);
function balanceOf(address tokenOwner) public view returns(uint balance);
function allowance(address tokenOwner, address spender) public view returns(uint remaining);
function transfer(address to, uint tokens) public returns(bool success);
function approve(address spender, uint tokens) public returns(bool success);
function transferFrom(address from, address to, uint tokens) public returns(bool success);
}
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 {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract ShuffleRaffle is Ownable {
using SafeMath for uint256;
struct Order {
uint48 position;
uint48 size;
address owner;
}
mapping(uint256 => Order[]) TicketBook;
ERC20Token public shuf = ERC20Token(0x3A9FfF453d50D4Ac52A6890647b823379ba36B9E);
uint256 public RaffleNo = 1;
uint256 public TicketPrice = 5*10**18;
uint256 public PickerReward = 5*10**18;
uint256 public minTickets = 9;
uint256 public nextTicketPrice = 5*10**18;
uint256 public nextPickerReward = 5*10**18;
uint256 public nextminTickets = 9;
uint256 public NextRaffle = 1574197200;
uint256 public random_seed = 0;
bool public raffle_closed = false;
event Ticket(uint256 raffle, address indexed addr, uint256 amount);
event Winner(uint256 raffle, address indexed addr, uint256 amount, uint256 win_ticket);
event RaffleClosed(uint256 raffle, uint256 block_number);
event TicketPriceChanged(uint256 previousticketprice, uint256 newticketprice);
event PickerRewardChanged(uint256 previouspickerReward, uint256 newpickerreward);
event minTicketsChanged(uint256 previousminTickets,uint256 newmintickets);
function TicketsOfAddress(address addr) public view returns (uint256 total_tickets) {
}
function Stats() public view returns (uint256 raffle_number, uint48 total_tickets, uint256 balance, uint256 next_raffle, uint256 ticket_price, bool must_pick_winner, uint256 picker_reward, uint256 min_tickets,uint256 next_ticket_price,uint256 next_picker_reward,uint256 next_min_tickets, bool is_raffle_closed){
}
function BuyTicket(uint48 tickets) external returns(bool success){
uint256 bill = uint256(tickets).mul(TicketPrice);
uint48 TotalTickets= _find_curr_position();
require(tickets>0);
require(<FILL_ME>)
require(shuf.balanceOf(msg.sender)>=bill , "Not enough SHUF balance.");
if (now>NextRaffle){
//requires to pick a winner or extends duration if not enough participants
require(TotalTickets<=minTickets,"A winner has to be picked first");
NextRaffle = NextRaffle.add((((now.sub(NextRaffle)).div(5 days + 12 hours)).add(1)).mul(5 days + 12 hours));
}
shuf.transferFrom(msg.sender, address(this), bill);
Order memory t;
t.size=tickets;
t.owner=msg.sender;
t.position=TotalTickets+tickets;
require(t.position>=TotalTickets);
TicketBook[RaffleNo].push(t);
emit Ticket(RaffleNo, msg.sender, tickets);
return true;
}
function pickWinner() external returns(bool success) {
}
function _find_curr_position() internal view returns(uint48 curr_position){
}
function _find_winner(uint256 winning_ticket) internal view returns(address winner){
}
function setTicketPrice(uint256 newticketprice) external onlyOwner {
}
function setPickerReward(uint256 newpickerreward) external onlyOwner {
}
function setminTickets(uint256 newmintickets) external onlyOwner {
}
function _random(uint256 Totaltickets) internal view returns (uint256) {
}
}
| shuf.allowance(msg.sender,address(this))>=bill,"Contract not approved" | 356,852 | shuf.allowance(msg.sender,address(this))>=bill |
"Not enough SHUF balance." | /*
***The Shuffle Raffle***
https://shuffle-raffle.com/
The shuffle raffle is a game built on top of the Shuffle Monster token (https://shuffle.monster/).
Players can buy tickets with SHUF tokens. Each week a winner is randomly picked.
*/
pragma solidity ^0.5.8;
contract ERC20Token {
function totalSupply() public view returns(uint);
function balanceOf(address tokenOwner) public view returns(uint balance);
function allowance(address tokenOwner, address spender) public view returns(uint remaining);
function transfer(address to, uint tokens) public returns(bool success);
function approve(address spender, uint tokens) public returns(bool success);
function transferFrom(address from, address to, uint tokens) public returns(bool success);
}
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 {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() public {
}
modifier onlyOwner() {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
contract ShuffleRaffle is Ownable {
using SafeMath for uint256;
struct Order {
uint48 position;
uint48 size;
address owner;
}
mapping(uint256 => Order[]) TicketBook;
ERC20Token public shuf = ERC20Token(0x3A9FfF453d50D4Ac52A6890647b823379ba36B9E);
uint256 public RaffleNo = 1;
uint256 public TicketPrice = 5*10**18;
uint256 public PickerReward = 5*10**18;
uint256 public minTickets = 9;
uint256 public nextTicketPrice = 5*10**18;
uint256 public nextPickerReward = 5*10**18;
uint256 public nextminTickets = 9;
uint256 public NextRaffle = 1574197200;
uint256 public random_seed = 0;
bool public raffle_closed = false;
event Ticket(uint256 raffle, address indexed addr, uint256 amount);
event Winner(uint256 raffle, address indexed addr, uint256 amount, uint256 win_ticket);
event RaffleClosed(uint256 raffle, uint256 block_number);
event TicketPriceChanged(uint256 previousticketprice, uint256 newticketprice);
event PickerRewardChanged(uint256 previouspickerReward, uint256 newpickerreward);
event minTicketsChanged(uint256 previousminTickets,uint256 newmintickets);
function TicketsOfAddress(address addr) public view returns (uint256 total_tickets) {
}
function Stats() public view returns (uint256 raffle_number, uint48 total_tickets, uint256 balance, uint256 next_raffle, uint256 ticket_price, bool must_pick_winner, uint256 picker_reward, uint256 min_tickets,uint256 next_ticket_price,uint256 next_picker_reward,uint256 next_min_tickets, bool is_raffle_closed){
}
function BuyTicket(uint48 tickets) external returns(bool success){
uint256 bill = uint256(tickets).mul(TicketPrice);
uint48 TotalTickets= _find_curr_position();
require(tickets>0);
require(shuf.allowance(msg.sender, address(this))>=bill, "Contract not approved");
require(<FILL_ME>)
if (now>NextRaffle){
//requires to pick a winner or extends duration if not enough participants
require(TotalTickets<=minTickets,"A winner has to be picked first");
NextRaffle = NextRaffle.add((((now.sub(NextRaffle)).div(5 days + 12 hours)).add(1)).mul(5 days + 12 hours));
}
shuf.transferFrom(msg.sender, address(this), bill);
Order memory t;
t.size=tickets;
t.owner=msg.sender;
t.position=TotalTickets+tickets;
require(t.position>=TotalTickets);
TicketBook[RaffleNo].push(t);
emit Ticket(RaffleNo, msg.sender, tickets);
return true;
}
function pickWinner() external returns(bool success) {
}
function _find_curr_position() internal view returns(uint48 curr_position){
}
function _find_winner(uint256 winning_ticket) internal view returns(address winner){
}
function setTicketPrice(uint256 newticketprice) external onlyOwner {
}
function setPickerReward(uint256 newpickerreward) external onlyOwner {
}
function setminTickets(uint256 newmintickets) external onlyOwner {
}
function _random(uint256 Totaltickets) internal view returns (uint256) {
}
}
| shuf.balanceOf(msg.sender)>=bill,"Not enough SHUF balance." | 356,852 | shuf.balanceOf(msg.sender)>=bill |
"caller is not the owner" | pragma solidity 0.5.16;
pragma experimental ABIEncoderV2;
contract Yielder is ContractWithFlashLoan, Ownable {
using SafeMath for uint256;
address public constant ETHER = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
constructor(address _aaveLPProvider)
public
payable
ContractWithFlashLoan(_aaveLPProvider)
{}
function start(
address cTokenAddr,
uint256 flashLoanAmount,
bool isCEther,
bool windYield
) public payable onlyOwner {
}
function afterLoanSteps(
address loanedToken,
uint256 amount,
uint256 fees,
bytes memory params
) internal {
address messageSender;
address cTokenAddr;
bool isCEther;
bool windYield;
(messageSender, cTokenAddr, isCEther, windYield) = abi.decode(
params,
(address, address, bool, bool)
);
require(<FILL_ME>)
if (windYield) {
supplyToCream(cTokenAddr, amount, isCEther);
cTokenBorrow(cTokenAddr, amount);
} else {
repayBorrowedFromCream(cTokenAddr, amount, isCEther);
cTokenRedeemUnderlying(cTokenAddr, amount);
}
if (loanedToken == ETHER) {
return;
}
uint256 loanRepayAmount = amount.add(fees);
uint256 loanedTokenBalOfThis = IERC20(loanedToken).balanceOf(
address(this)
);
if (loanedTokenBalOfThis < loanRepayAmount) {
IERC20(loanedToken).transferFrom(
messageSender,
address(this),
loanRepayAmount - loanedTokenBalOfThis
);
}
}
function supplyToCream(
address cTokenAddr,
uint256 amount,
bool isCEther
) public payable onlyOwner returns (bool) {
}
function repayBorrowedFromCream(
address cTokenAddr,
uint256 amount,
bool isCEther
) public payable onlyOwner returns (bool) {
}
function withdrawFromCream(address cTokenAddr, uint256 amount)
public
onlyOwner
returns (bool)
{
}
function borrowFromCream(address cTokenAddr, uint256 amount)
public
onlyOwner
returns (bool)
{
}
function cTokenMint(address cToken, uint256 mintAmount)
internal
returns (bool)
{
}
function cTokenRedeemUnderlying(address cToken, uint256 redeemAmount)
internal
returns (bool)
{
}
function cTokenBorrow(address cToken, uint256 borrowAmount)
internal
returns (bool)
{
}
function cTokenRepayBorrow(address cToken, uint256 repayAmount)
internal
returns (bool)
{
}
function claimCream(address comptroller) public onlyOwner {
}
function claimAndTransferCream(address comptrollerAddr, address receiver)
public
onlyOwner
{
}
function claimAndTransferCreamForCToken(
address comptrollerAddr,
address[] memory cTokens,
address receiver
) public onlyOwner {
}
function checkBalThenTransferFrom(
address tokenAddress,
address user,
uint256 amount
) internal returns (bool) {
}
function checkThenErc20Approve(
address tokenAddress,
address approveTo,
uint256 amount
) internal returns (bool) {
}
function transferEth(address payable to, uint256 amount)
public
onlyOwner
returns (bool success)
{
}
function transferEthInternal(address payable to, uint256 amount)
internal
returns (bool success)
{
}
function transferToken(
address token,
address to,
uint256 amount
) public onlyOwner returns (bool success) {
}
function transferTokenInternal(
address token,
address to,
uint256 amount
) internal returns (bool success) {
}
function supplyBalance(address cToken)
public
view
returns (uint256 supplyBalance)
{
}
function borrowBalance(address cToken)
public
view
returns (uint256 borrowBalance)
{
}
function tokenBalance(address token) public view returns (uint256 balance) {
}
function ethBalance() public view returns (uint256 balance) {
}
}
| owner()==messageSender,"caller is not the owner" | 356,866 | owner()==messageSender |
"cream transfer failed" | pragma solidity 0.5.16;
pragma experimental ABIEncoderV2;
contract Yielder is ContractWithFlashLoan, Ownable {
using SafeMath for uint256;
address public constant ETHER = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
constructor(address _aaveLPProvider)
public
payable
ContractWithFlashLoan(_aaveLPProvider)
{}
function start(
address cTokenAddr,
uint256 flashLoanAmount,
bool isCEther,
bool windYield
) public payable onlyOwner {
}
function afterLoanSteps(
address loanedToken,
uint256 amount,
uint256 fees,
bytes memory params
) internal {
}
function supplyToCream(
address cTokenAddr,
uint256 amount,
bool isCEther
) public payable onlyOwner returns (bool) {
}
function repayBorrowedFromCream(
address cTokenAddr,
uint256 amount,
bool isCEther
) public payable onlyOwner returns (bool) {
}
function withdrawFromCream(address cTokenAddr, uint256 amount)
public
onlyOwner
returns (bool)
{
}
function borrowFromCream(address cTokenAddr, uint256 amount)
public
onlyOwner
returns (bool)
{
}
function cTokenMint(address cToken, uint256 mintAmount)
internal
returns (bool)
{
}
function cTokenRedeemUnderlying(address cToken, uint256 redeemAmount)
internal
returns (bool)
{
}
function cTokenBorrow(address cToken, uint256 borrowAmount)
internal
returns (bool)
{
}
function cTokenRepayBorrow(address cToken, uint256 repayAmount)
internal
returns (bool)
{
}
function claimCream(address comptroller) public onlyOwner {
}
function claimAndTransferCream(address comptrollerAddr, address receiver)
public
onlyOwner
{
ComptrollerInterface comptroller = ComptrollerInterface(
comptrollerAddr
);
comptroller.claimComp(address(this));
IERC20 compToken = IERC20(comptroller.getCompAddress());
uint256 totalCompBalance = compToken.balanceOf(address(this));
require(<FILL_ME>)
}
function claimAndTransferCreamForCToken(
address comptrollerAddr,
address[] memory cTokens,
address receiver
) public onlyOwner {
}
function checkBalThenTransferFrom(
address tokenAddress,
address user,
uint256 amount
) internal returns (bool) {
}
function checkThenErc20Approve(
address tokenAddress,
address approveTo,
uint256 amount
) internal returns (bool) {
}
function transferEth(address payable to, uint256 amount)
public
onlyOwner
returns (bool success)
{
}
function transferEthInternal(address payable to, uint256 amount)
internal
returns (bool success)
{
}
function transferToken(
address token,
address to,
uint256 amount
) public onlyOwner returns (bool success) {
}
function transferTokenInternal(
address token,
address to,
uint256 amount
) internal returns (bool success) {
}
function supplyBalance(address cToken)
public
view
returns (uint256 supplyBalance)
{
}
function borrowBalance(address cToken)
public
view
returns (uint256 borrowBalance)
{
}
function tokenBalance(address token) public view returns (uint256 balance) {
}
function ethBalance() public view returns (uint256 balance) {
}
}
| compToken.transfer(receiver,totalCompBalance),"cream transfer failed" | 356,866 | compToken.transfer(receiver,totalCompBalance) |
"Not Enough ROYA" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.6.0;
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
interface IERC20{
function approve( address, uint256) external returns(bool);
function allowance(address, address) external view returns (uint256);
function balanceOf(address) external view returns(uint256);
function decimals() external view returns(uint8);
function totalSupply() external view returns(uint256);
function transferFrom(address,address,uint256) external returns(bool);
function transfer(address,uint256) external returns(bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
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) {
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
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) {
}
}
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
}
}
abstract contract ReentrancyGuard {
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor () internal {
}
modifier nonReentrant() {
}
}
interface RoyaReserve{
function stake(address onBehalfOf, uint256 amount) external ;
}
contract GradualTokenSwap is ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;
address public owner;
address public nominatedOwner;
bool public paused = false;
IERC20 public immutable mROYA;
IERC20 public immutable ROYA;
RoyaReserve public royaReserve;
modifier onlyOwner() {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
event Pause();
event Unpause();
event ownerNominated(address newOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event tokensSwapped(uint mROYA , uint ROYA);
event tokenSwappedAndStaked(uint mROYA,uint ROYAStaked);
event recovered(address token ,uint amount);
constructor (IERC20 _mROYA, IERC20 _ROYA,address _reserve,address _wallet) public {
}
function swapTokens(uint _amount,bool _compound) external nonReentrant() whenNotPaused(){
require(<FILL_ME>)
mROYA.safeTransferFrom(msg.sender,address(this),_amount);
if(!_compound){
ROYA.safeTransfer(msg.sender,_amount);
emit tokensSwapped(_amount,_amount);
}
else{
ROYA.safeApprove(address(royaReserve),_amount);
royaReserve.stake(msg.sender,_amount);
emit tokenSwappedAndStaked(_amount,_amount);
}
}
function pause() onlyOwner whenNotPaused public {
}
function unpause() onlyOwner whenPaused public {
}
function nominateNewOwner(address _wallet) external onlyOwner {
}
function acceptOwnership() external {
}
function recoverERC20(IERC20 token) external onlyOwner {
}
}
| ROYA.balanceOf(address(this))>=_amount,"Not Enough ROYA" | 356,871 | ROYA.balanceOf(address(this))>=_amount |
null | /**
*Submitted for verification at Etherscan.io on 2019-08-14
*/
pragma solidity ^0.4.26;
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract token {
string public name;
string public symbol;
uint256 public decimals = 8;
uint256 public _totalSupply;
uint256 public startTime=1567958400;
function totalSupply() constant returns (uint256 supply) {
}
function changeStartTime(uint256 _startTime) returns (bool success) {
}
function approve(address _spender, uint256 _value) returns (bool success) {
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
mapping(address => uint256) public balanceOf;
mapping(address => uint256) public distBalances;
mapping(address => bool) public distTeam;
mapping(address => bool) public lockAddrs;
mapping(address => mapping (address => uint256)) allowed;
address public founder;
uint256 public distributed = 0;
event AllocateFounderTokens(address indexed sender);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function token(uint256 initialSupply, string tokenName, string tokenSymbol) public {
}
function distribute(uint256 _amount, address[] _to,bool isteam) {
}
function lockAddr(address user) returns (bool success) {
}
function unLockAddr(address user) returns (bool success) {
}
function transfer(address _to, uint256 _value) public {
require(<FILL_ME>)
require(balanceOf[msg.sender] >= _value);
require(SafeMath.add(balanceOf[_to],_value) > balanceOf[_to]);
uint _freeAmount = freeAmount(msg.sender);
require (_freeAmount > _value);
balanceOf[msg.sender]=SafeMath.sub(balanceOf[msg.sender], _value);
balanceOf[_to]=SafeMath.add(balanceOf[_to], _value);
Transfer(msg.sender, _to, _value);
}
function freeAmount(address user) constant returns (uint256 amount) {
}
function unLockAmount(address user) constant returns (uint256 amount) {
}
function changeFounder(address newFounder) {
}
function transferFrom(address _from, address _to, uint256 _value) {
}
function() payable {
}
}
| lockAddrs[msg.sender]==false | 356,876 | lockAddrs[msg.sender]==false |
null | /**
*Submitted for verification at Etherscan.io on 2019-08-14
*/
pragma solidity ^0.4.26;
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract token {
string public name;
string public symbol;
uint256 public decimals = 8;
uint256 public _totalSupply;
uint256 public startTime=1567958400;
function totalSupply() constant returns (uint256 supply) {
}
function changeStartTime(uint256 _startTime) returns (bool success) {
}
function approve(address _spender, uint256 _value) returns (bool success) {
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
mapping(address => uint256) public balanceOf;
mapping(address => uint256) public distBalances;
mapping(address => bool) public distTeam;
mapping(address => bool) public lockAddrs;
mapping(address => mapping (address => uint256)) allowed;
address public founder;
uint256 public distributed = 0;
event AllocateFounderTokens(address indexed sender);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function token(uint256 initialSupply, string tokenName, string tokenSymbol) public {
}
function distribute(uint256 _amount, address[] _to,bool isteam) {
}
function lockAddr(address user) returns (bool success) {
}
function unLockAddr(address user) returns (bool success) {
}
function transfer(address _to, uint256 _value) public {
require(lockAddrs[msg.sender]==false);
require(balanceOf[msg.sender] >= _value);
require(<FILL_ME>)
uint _freeAmount = freeAmount(msg.sender);
require (_freeAmount > _value);
balanceOf[msg.sender]=SafeMath.sub(balanceOf[msg.sender], _value);
balanceOf[_to]=SafeMath.add(balanceOf[_to], _value);
Transfer(msg.sender, _to, _value);
}
function freeAmount(address user) constant returns (uint256 amount) {
}
function unLockAmount(address user) constant returns (uint256 amount) {
}
function changeFounder(address newFounder) {
}
function transferFrom(address _from, address _to, uint256 _value) {
}
function() payable {
}
}
| SafeMath.add(balanceOf[_to],_value)>balanceOf[_to] | 356,876 | SafeMath.add(balanceOf[_to],_value)>balanceOf[_to] |
null | /**
*Submitted for verification at Etherscan.io on 2019-08-14
*/
pragma solidity ^0.4.26;
library SafeMath {
/**
* @dev Multiplies two unsigned integers, reverts on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Adds two unsigned integers, reverts on overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
* reverts when dividing by zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
contract token {
string public name;
string public symbol;
uint256 public decimals = 8;
uint256 public _totalSupply;
uint256 public startTime=1567958400;
function totalSupply() constant returns (uint256 supply) {
}
function changeStartTime(uint256 _startTime) returns (bool success) {
}
function approve(address _spender, uint256 _value) returns (bool success) {
}
function allowance(address _owner, address _spender) constant returns (uint256 remaining) {
}
mapping(address => uint256) public balanceOf;
mapping(address => uint256) public distBalances;
mapping(address => bool) public distTeam;
mapping(address => bool) public lockAddrs;
mapping(address => mapping (address => uint256)) allowed;
address public founder;
uint256 public distributed = 0;
event AllocateFounderTokens(address indexed sender);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
function token(uint256 initialSupply, string tokenName, string tokenSymbol) public {
}
function distribute(uint256 _amount, address[] _to,bool isteam) {
}
function lockAddr(address user) returns (bool success) {
}
function unLockAddr(address user) returns (bool success) {
}
function transfer(address _to, uint256 _value) public {
}
function freeAmount(address user) constant returns (uint256 amount) {
}
function unLockAmount(address user) constant returns (uint256 amount) {
}
function changeFounder(address newFounder) {
}
function transferFrom(address _from, address _to, uint256 _value) {
require(<FILL_ME>)
require(balanceOf[_from] >= _value);
require(allowed[_from][msg.sender] >= _value);
require(balanceOf[_to] + _value > balanceOf[_to]);
uint _freeAmount = freeAmount(_from);
require (_freeAmount > _value);
balanceOf[_to]=SafeMath.add(balanceOf[_to],_value);
balanceOf[_from]=SafeMath.sub(balanceOf[_from],_value);
allowed[_from][msg.sender]=SafeMath.sub(allowed[_from][msg.sender], _value);
Transfer(_from, _to, _value);
}
function() payable {
}
}
| lockAddrs[_from]==false | 356,876 | lockAddrs[_from]==false |
'TokenPool: Cannot claim token held by the contract' | pragma solidity 0.5.0;
contract TokenPool {
IERC20 public token;
address public _owner;
modifier onlyOwner() {
}
constructor(IERC20 _token) public {
}
function balance() public view returns (uint256) {
}
function transfer(address to, uint256 value) external onlyOwner returns (bool) {
}
function rescueFunds(address tokenToRescue, address to, uint256 amount) external onlyOwner returns (bool) {
require(<FILL_ME>)
return IERC20(tokenToRescue).transfer(to, amount);
}
}
| address(token)!=tokenToRescue,'TokenPool: Cannot claim token held by the contract' | 356,935 | address(token)!=tokenToRescue |
"Transaction will exceed maximum supply of CBWC" | pragma solidity 0.8.11;
contract CryptoBearWatchClub is ERC721, Ownable, ReentrancyGuard {
using MerkleProof for bytes32[];
enum SALE_STATUS {
OFF,
PRIVATE_SALE,
PRESALE,
AUCTION
}
SALE_STATUS public saleStatus;
string baseTokenURI;
// To store total number of CBWC NFTs minted
uint256 private mintCount;
uint256 public constant MAX_CBWC = 10000;
uint256 public constant PRESALE_PRICE = 500000000000000000; // 0.5 Ether
// Dutch auction related
uint256 public auctionStartAt; // Auction timer for public mint
uint256 public constant PRICE_DEDUCTION_PERCENTAGE = 100000000000000000; // 0.1 Ether
uint256 public constant STARTING_PRICE = 2000000000000000000; // 2 Ether
bytes32 public merkleRoot;
// To store CBWC address has minted in presale
mapping(address => uint256) public preSaleMintCount;
// To store how many NFTs address can mint in private sale
mapping(address => uint256) public privateSaleMintCount;
// To store last mint block of an address, it will prevent smart contracts to mint more than 20 in one go
mapping(address => uint256) public lastMintBlock;
event Minted(uint256 totalMinted);
constructor(string memory baseURI)
ERC721("Crypto Bear Watch Club", "CBWC")
{
}
modifier onlyIfNotSoldOut(uint256 _count) {
require(<FILL_ME>)
_;
}
// Admin only functions
// To update sale status
function setSaleStatus(SALE_STATUS _status) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
// Set auction timer
function startAuction() external onlyOwner {
}
// Set some Crypto Bears aside
function reserveBears(uint256 _count)
external
onlyOwner
onlyIfNotSoldOut(_count)
{
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
// To whitelist users to mint during private sale
function privateSaleWhiteList(
address[] calldata _whitelistAddresses,
uint256[] calldata _allowedCount
) external onlyOwner {
}
// Getter functions
// Returns current price of dutch auction
function dutchAuction() public view returns (uint256 price) {
}
// Returns circulating supply of CBWC
function totalSupply() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
//Mint functions
function privateSaleMint(uint256 _count) external onlyIfNotSoldOut(_count) {
}
/**
* @dev '_allowedCount' represents number of NFTs caller is allowed to mint in presale, and,
* '_count' indiciates number of NFTs caller wants to mint in the transaction
*/
function presaleMint(
bytes32[] calldata _proof,
uint256 _allowedCount,
uint256 _count
) external payable onlyIfNotSoldOut(_count) {
}
// Auction mint
function auctionMint(uint256 _count)
external
payable
nonReentrant
onlyIfNotSoldOut(_count)
{
}
function _mint(uint256 tokenId) private {
}
/**
* @dev Called whenever eth is being transferred from the contract to the recipient.
*
* Called when owner wants to withdraw funds, and
* to refund excess ether to the minter.
*/
function sendValue(address recipient, uint256 amount) private {
}
}
| totalSupply()+_count<=MAX_CBWC,"Transaction will exceed maximum supply of CBWC" | 356,937 | totalSupply()+_count<=MAX_CBWC |
"Invalid allowance amount" | pragma solidity 0.8.11;
contract CryptoBearWatchClub is ERC721, Ownable, ReentrancyGuard {
using MerkleProof for bytes32[];
enum SALE_STATUS {
OFF,
PRIVATE_SALE,
PRESALE,
AUCTION
}
SALE_STATUS public saleStatus;
string baseTokenURI;
// To store total number of CBWC NFTs minted
uint256 private mintCount;
uint256 public constant MAX_CBWC = 10000;
uint256 public constant PRESALE_PRICE = 500000000000000000; // 0.5 Ether
// Dutch auction related
uint256 public auctionStartAt; // Auction timer for public mint
uint256 public constant PRICE_DEDUCTION_PERCENTAGE = 100000000000000000; // 0.1 Ether
uint256 public constant STARTING_PRICE = 2000000000000000000; // 2 Ether
bytes32 public merkleRoot;
// To store CBWC address has minted in presale
mapping(address => uint256) public preSaleMintCount;
// To store how many NFTs address can mint in private sale
mapping(address => uint256) public privateSaleMintCount;
// To store last mint block of an address, it will prevent smart contracts to mint more than 20 in one go
mapping(address => uint256) public lastMintBlock;
event Minted(uint256 totalMinted);
constructor(string memory baseURI)
ERC721("Crypto Bear Watch Club", "CBWC")
{
}
modifier onlyIfNotSoldOut(uint256 _count) {
}
// Admin only functions
// To update sale status
function setSaleStatus(SALE_STATUS _status) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
// Set auction timer
function startAuction() external onlyOwner {
}
// Set some Crypto Bears aside
function reserveBears(uint256 _count)
external
onlyOwner
onlyIfNotSoldOut(_count)
{
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
// To whitelist users to mint during private sale
function privateSaleWhiteList(
address[] calldata _whitelistAddresses,
uint256[] calldata _allowedCount
) external onlyOwner {
require(
_whitelistAddresses.length == _allowedCount.length,
"Input length mismatch"
);
for (uint256 i = 0; i < _whitelistAddresses.length; i++) {
require(<FILL_ME>)
require(_whitelistAddresses[i] != address(0), "Zero Address");
privateSaleMintCount[_whitelistAddresses[i]] = _allowedCount[i];
}
}
// Getter functions
// Returns current price of dutch auction
function dutchAuction() public view returns (uint256 price) {
}
// Returns circulating supply of CBWC
function totalSupply() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
//Mint functions
function privateSaleMint(uint256 _count) external onlyIfNotSoldOut(_count) {
}
/**
* @dev '_allowedCount' represents number of NFTs caller is allowed to mint in presale, and,
* '_count' indiciates number of NFTs caller wants to mint in the transaction
*/
function presaleMint(
bytes32[] calldata _proof,
uint256 _allowedCount,
uint256 _count
) external payable onlyIfNotSoldOut(_count) {
}
// Auction mint
function auctionMint(uint256 _count)
external
payable
nonReentrant
onlyIfNotSoldOut(_count)
{
}
function _mint(uint256 tokenId) private {
}
/**
* @dev Called whenever eth is being transferred from the contract to the recipient.
*
* Called when owner wants to withdraw funds, and
* to refund excess ether to the minter.
*/
function sendValue(address recipient, uint256 amount) private {
}
}
| _allowedCount[i]>0,"Invalid allowance amount" | 356,937 | _allowedCount[i]>0 |
"Zero Address" | pragma solidity 0.8.11;
contract CryptoBearWatchClub is ERC721, Ownable, ReentrancyGuard {
using MerkleProof for bytes32[];
enum SALE_STATUS {
OFF,
PRIVATE_SALE,
PRESALE,
AUCTION
}
SALE_STATUS public saleStatus;
string baseTokenURI;
// To store total number of CBWC NFTs minted
uint256 private mintCount;
uint256 public constant MAX_CBWC = 10000;
uint256 public constant PRESALE_PRICE = 500000000000000000; // 0.5 Ether
// Dutch auction related
uint256 public auctionStartAt; // Auction timer for public mint
uint256 public constant PRICE_DEDUCTION_PERCENTAGE = 100000000000000000; // 0.1 Ether
uint256 public constant STARTING_PRICE = 2000000000000000000; // 2 Ether
bytes32 public merkleRoot;
// To store CBWC address has minted in presale
mapping(address => uint256) public preSaleMintCount;
// To store how many NFTs address can mint in private sale
mapping(address => uint256) public privateSaleMintCount;
// To store last mint block of an address, it will prevent smart contracts to mint more than 20 in one go
mapping(address => uint256) public lastMintBlock;
event Minted(uint256 totalMinted);
constructor(string memory baseURI)
ERC721("Crypto Bear Watch Club", "CBWC")
{
}
modifier onlyIfNotSoldOut(uint256 _count) {
}
// Admin only functions
// To update sale status
function setSaleStatus(SALE_STATUS _status) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
// Set auction timer
function startAuction() external onlyOwner {
}
// Set some Crypto Bears aside
function reserveBears(uint256 _count)
external
onlyOwner
onlyIfNotSoldOut(_count)
{
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
// To whitelist users to mint during private sale
function privateSaleWhiteList(
address[] calldata _whitelistAddresses,
uint256[] calldata _allowedCount
) external onlyOwner {
require(
_whitelistAddresses.length == _allowedCount.length,
"Input length mismatch"
);
for (uint256 i = 0; i < _whitelistAddresses.length; i++) {
require(_allowedCount[i] > 0, "Invalid allowance amount");
require(<FILL_ME>)
privateSaleMintCount[_whitelistAddresses[i]] = _allowedCount[i];
}
}
// Getter functions
// Returns current price of dutch auction
function dutchAuction() public view returns (uint256 price) {
}
// Returns circulating supply of CBWC
function totalSupply() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
//Mint functions
function privateSaleMint(uint256 _count) external onlyIfNotSoldOut(_count) {
}
/**
* @dev '_allowedCount' represents number of NFTs caller is allowed to mint in presale, and,
* '_count' indiciates number of NFTs caller wants to mint in the transaction
*/
function presaleMint(
bytes32[] calldata _proof,
uint256 _allowedCount,
uint256 _count
) external payable onlyIfNotSoldOut(_count) {
}
// Auction mint
function auctionMint(uint256 _count)
external
payable
nonReentrant
onlyIfNotSoldOut(_count)
{
}
function _mint(uint256 tokenId) private {
}
/**
* @dev Called whenever eth is being transferred from the contract to the recipient.
*
* Called when owner wants to withdraw funds, and
* to refund excess ether to the minter.
*/
function sendValue(address recipient, uint256 amount) private {
}
}
| _whitelistAddresses[i]!=address(0),"Zero Address" | 356,937 | _whitelistAddresses[i]!=address(0) |
"Address not eligible for private sale mint" | pragma solidity 0.8.11;
contract CryptoBearWatchClub is ERC721, Ownable, ReentrancyGuard {
using MerkleProof for bytes32[];
enum SALE_STATUS {
OFF,
PRIVATE_SALE,
PRESALE,
AUCTION
}
SALE_STATUS public saleStatus;
string baseTokenURI;
// To store total number of CBWC NFTs minted
uint256 private mintCount;
uint256 public constant MAX_CBWC = 10000;
uint256 public constant PRESALE_PRICE = 500000000000000000; // 0.5 Ether
// Dutch auction related
uint256 public auctionStartAt; // Auction timer for public mint
uint256 public constant PRICE_DEDUCTION_PERCENTAGE = 100000000000000000; // 0.1 Ether
uint256 public constant STARTING_PRICE = 2000000000000000000; // 2 Ether
bytes32 public merkleRoot;
// To store CBWC address has minted in presale
mapping(address => uint256) public preSaleMintCount;
// To store how many NFTs address can mint in private sale
mapping(address => uint256) public privateSaleMintCount;
// To store last mint block of an address, it will prevent smart contracts to mint more than 20 in one go
mapping(address => uint256) public lastMintBlock;
event Minted(uint256 totalMinted);
constructor(string memory baseURI)
ERC721("Crypto Bear Watch Club", "CBWC")
{
}
modifier onlyIfNotSoldOut(uint256 _count) {
}
// Admin only functions
// To update sale status
function setSaleStatus(SALE_STATUS _status) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
// Set auction timer
function startAuction() external onlyOwner {
}
// Set some Crypto Bears aside
function reserveBears(uint256 _count)
external
onlyOwner
onlyIfNotSoldOut(_count)
{
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
// To whitelist users to mint during private sale
function privateSaleWhiteList(
address[] calldata _whitelistAddresses,
uint256[] calldata _allowedCount
) external onlyOwner {
}
// Getter functions
// Returns current price of dutch auction
function dutchAuction() public view returns (uint256 price) {
}
// Returns circulating supply of CBWC
function totalSupply() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
//Mint functions
function privateSaleMint(uint256 _count) external onlyIfNotSoldOut(_count) {
require(<FILL_ME>)
require(_count > 0, "Zero mint count");
require(
_count <= privateSaleMintCount[msg.sender],
"Transaction will exceed maximum NFTs allowed to mint in private sale"
);
require(
saleStatus == SALE_STATUS.PRIVATE_SALE,
"Private sale is not started"
);
uint256 supply = totalSupply();
mintCount += _count;
privateSaleMintCount[msg.sender] -= _count;
for (uint256 i = 0; i < _count; i++) {
_mint(++supply);
}
}
/**
* @dev '_allowedCount' represents number of NFTs caller is allowed to mint in presale, and,
* '_count' indiciates number of NFTs caller wants to mint in the transaction
*/
function presaleMint(
bytes32[] calldata _proof,
uint256 _allowedCount,
uint256 _count
) external payable onlyIfNotSoldOut(_count) {
}
// Auction mint
function auctionMint(uint256 _count)
external
payable
nonReentrant
onlyIfNotSoldOut(_count)
{
}
function _mint(uint256 tokenId) private {
}
/**
* @dev Called whenever eth is being transferred from the contract to the recipient.
*
* Called when owner wants to withdraw funds, and
* to refund excess ether to the minter.
*/
function sendValue(address recipient, uint256 amount) private {
}
}
| privateSaleMintCount[msg.sender]>0,"Address not eligible for private sale mint" | 356,937 | privateSaleMintCount[msg.sender]>0 |
"Address not eligible for presale mint" | pragma solidity 0.8.11;
contract CryptoBearWatchClub is ERC721, Ownable, ReentrancyGuard {
using MerkleProof for bytes32[];
enum SALE_STATUS {
OFF,
PRIVATE_SALE,
PRESALE,
AUCTION
}
SALE_STATUS public saleStatus;
string baseTokenURI;
// To store total number of CBWC NFTs minted
uint256 private mintCount;
uint256 public constant MAX_CBWC = 10000;
uint256 public constant PRESALE_PRICE = 500000000000000000; // 0.5 Ether
// Dutch auction related
uint256 public auctionStartAt; // Auction timer for public mint
uint256 public constant PRICE_DEDUCTION_PERCENTAGE = 100000000000000000; // 0.1 Ether
uint256 public constant STARTING_PRICE = 2000000000000000000; // 2 Ether
bytes32 public merkleRoot;
// To store CBWC address has minted in presale
mapping(address => uint256) public preSaleMintCount;
// To store how many NFTs address can mint in private sale
mapping(address => uint256) public privateSaleMintCount;
// To store last mint block of an address, it will prevent smart contracts to mint more than 20 in one go
mapping(address => uint256) public lastMintBlock;
event Minted(uint256 totalMinted);
constructor(string memory baseURI)
ERC721("Crypto Bear Watch Club", "CBWC")
{
}
modifier onlyIfNotSoldOut(uint256 _count) {
}
// Admin only functions
// To update sale status
function setSaleStatus(SALE_STATUS _status) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
// Set auction timer
function startAuction() external onlyOwner {
}
// Set some Crypto Bears aside
function reserveBears(uint256 _count)
external
onlyOwner
onlyIfNotSoldOut(_count)
{
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
// To whitelist users to mint during private sale
function privateSaleWhiteList(
address[] calldata _whitelistAddresses,
uint256[] calldata _allowedCount
) external onlyOwner {
}
// Getter functions
// Returns current price of dutch auction
function dutchAuction() public view returns (uint256 price) {
}
// Returns circulating supply of CBWC
function totalSupply() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
//Mint functions
function privateSaleMint(uint256 _count) external onlyIfNotSoldOut(_count) {
}
/**
* @dev '_allowedCount' represents number of NFTs caller is allowed to mint in presale, and,
* '_count' indiciates number of NFTs caller wants to mint in the transaction
*/
function presaleMint(
bytes32[] calldata _proof,
uint256 _allowedCount,
uint256 _count
) external payable onlyIfNotSoldOut(_count) {
require(
merkleRoot != 0,
"No address is eligible for presale minting yet"
);
require(
saleStatus == SALE_STATUS.PRESALE,
"Presale sale is not started"
);
require(<FILL_ME>)
require(_count > 0 && _count <= _allowedCount, "Invalid mint count");
require(
_allowedCount >= preSaleMintCount[msg.sender] + _count,
"Transaction will exceed maximum NFTs allowed to mint in presale"
);
require(
msg.value >= PRESALE_PRICE * _count,
"Incorrect ether sent with this transaction"
);
uint256 supply = totalSupply();
mintCount += _count;
preSaleMintCount[msg.sender] += _count;
for (uint256 i = 0; i < _count; i++) {
_mint(++supply);
}
}
// Auction mint
function auctionMint(uint256 _count)
external
payable
nonReentrant
onlyIfNotSoldOut(_count)
{
}
function _mint(uint256 tokenId) private {
}
/**
* @dev Called whenever eth is being transferred from the contract to the recipient.
*
* Called when owner wants to withdraw funds, and
* to refund excess ether to the minter.
*/
function sendValue(address recipient, uint256 amount) private {
}
}
| MerkleProof.verify(_proof,merkleRoot,keccak256(abi.encodePacked(msg.sender,_allowedCount))),"Address not eligible for presale mint" | 356,937 | MerkleProof.verify(_proof,merkleRoot,keccak256(abi.encodePacked(msg.sender,_allowedCount))) |
"Can only mint max 20 CBWC per block" | pragma solidity 0.8.11;
contract CryptoBearWatchClub is ERC721, Ownable, ReentrancyGuard {
using MerkleProof for bytes32[];
enum SALE_STATUS {
OFF,
PRIVATE_SALE,
PRESALE,
AUCTION
}
SALE_STATUS public saleStatus;
string baseTokenURI;
// To store total number of CBWC NFTs minted
uint256 private mintCount;
uint256 public constant MAX_CBWC = 10000;
uint256 public constant PRESALE_PRICE = 500000000000000000; // 0.5 Ether
// Dutch auction related
uint256 public auctionStartAt; // Auction timer for public mint
uint256 public constant PRICE_DEDUCTION_PERCENTAGE = 100000000000000000; // 0.1 Ether
uint256 public constant STARTING_PRICE = 2000000000000000000; // 2 Ether
bytes32 public merkleRoot;
// To store CBWC address has minted in presale
mapping(address => uint256) public preSaleMintCount;
// To store how many NFTs address can mint in private sale
mapping(address => uint256) public privateSaleMintCount;
// To store last mint block of an address, it will prevent smart contracts to mint more than 20 in one go
mapping(address => uint256) public lastMintBlock;
event Minted(uint256 totalMinted);
constructor(string memory baseURI)
ERC721("Crypto Bear Watch Club", "CBWC")
{
}
modifier onlyIfNotSoldOut(uint256 _count) {
}
// Admin only functions
// To update sale status
function setSaleStatus(SALE_STATUS _status) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function setMerkleRoot(bytes32 _merkleRoot) external onlyOwner {
}
// Set auction timer
function startAuction() external onlyOwner {
}
// Set some Crypto Bears aside
function reserveBears(uint256 _count)
external
onlyOwner
onlyIfNotSoldOut(_count)
{
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
// To whitelist users to mint during private sale
function privateSaleWhiteList(
address[] calldata _whitelistAddresses,
uint256[] calldata _allowedCount
) external onlyOwner {
}
// Getter functions
// Returns current price of dutch auction
function dutchAuction() public view returns (uint256 price) {
}
// Returns circulating supply of CBWC
function totalSupply() public view returns (uint256) {
}
function _baseURI() internal view virtual override returns (string memory) {
}
//Mint functions
function privateSaleMint(uint256 _count) external onlyIfNotSoldOut(_count) {
}
/**
* @dev '_allowedCount' represents number of NFTs caller is allowed to mint in presale, and,
* '_count' indiciates number of NFTs caller wants to mint in the transaction
*/
function presaleMint(
bytes32[] calldata _proof,
uint256 _allowedCount,
uint256 _count
) external payable onlyIfNotSoldOut(_count) {
}
// Auction mint
function auctionMint(uint256 _count)
external
payable
nonReentrant
onlyIfNotSoldOut(_count)
{
require(
saleStatus == SALE_STATUS.AUCTION,
"Auction mint is not started"
);
require(
_count > 0 && _count < 21,
"Minimum 0 & Maximum 20 CBWC can be minted per transaction"
);
require(<FILL_ME>)
uint256 amountRequired = dutchAuction() * _count;
require(
msg.value >= amountRequired,
"Incorrect ether sent with this transaction"
);
//to refund unused eth
uint256 excess = msg.value - amountRequired;
uint256 supply = totalSupply();
mintCount += _count;
lastMintBlock[msg.sender] = block.number;
for (uint256 i = 0; i < _count; i++) {
_mint(++supply);
}
//refunding excess eth to minter
if (excess > 0) {
sendValue(msg.sender, excess);
}
}
function _mint(uint256 tokenId) private {
}
/**
* @dev Called whenever eth is being transferred from the contract to the recipient.
*
* Called when owner wants to withdraw funds, and
* to refund excess ether to the minter.
*/
function sendValue(address recipient, uint256 amount) private {
}
}
| lastMintBlock[msg.sender]!=block.number,"Can only mint max 20 CBWC per block" | 356,937 | lastMintBlock[msg.sender]!=block.number |
"invalid forwarder for recipient" | // SPDX-License-Identifier:MIT
pragma solidity ^0.6.2;
pragma experimental ABIEncoderV2;
import "../interfaces/GsnTypes.sol";
import "../interfaces/IRelayRecipient.sol";
import "../forwarder/IForwarder.sol";
import "./GsnUtils.sol";
/**
* Bridge Library to map GSN RelayRequest into a call of a Forwarder
*/
library GsnEip712Library {
// maximum length of return value/revert reason for 'execute' method. Will truncate result if exceeded.
uint256 private constant MAX_RETURN_SIZE = 1024;
//copied from Forwarder (can't reference string constants even from another library)
string public constant GENERIC_PARAMS = "address from,address to,uint256 value,uint256 gas,uint256 nonce,bytes data";
bytes public constant RELAYDATA_TYPE = "RelayData(uint256 gasPrice,uint256 pctRelayFee,uint256 baseRelayFee,address relayWorker,address paymaster,address forwarder,bytes paymasterData,uint256 clientId)";
string public constant RELAY_REQUEST_NAME = "RelayRequest";
string public constant RELAY_REQUEST_SUFFIX = string(abi.encodePacked("RelayData relayData)", RELAYDATA_TYPE));
bytes public constant RELAY_REQUEST_TYPE = abi.encodePacked(
RELAY_REQUEST_NAME,"(",GENERIC_PARAMS,",", RELAY_REQUEST_SUFFIX);
bytes32 public constant RELAYDATA_TYPEHASH = keccak256(RELAYDATA_TYPE);
bytes32 public constant RELAY_REQUEST_TYPEHASH = keccak256(RELAY_REQUEST_TYPE);
struct EIP712Domain {
string name;
string version;
uint256 chainId;
address verifyingContract;
}
bytes32 public constant EIP712DOMAIN_TYPEHASH = keccak256(
"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
);
function splitRequest(
GsnTypes.RelayRequest calldata req
)
internal
pure
returns (
IForwarder.ForwardRequest memory forwardRequest,
bytes memory suffixData
) {
}
function verifyForwarderTrusted(GsnTypes.RelayRequest calldata relayRequest) internal view {
(bool success, bytes memory ret) = relayRequest.request.to.staticcall(
abi.encodeWithSelector(
IRelayRecipient.isTrustedForwarder.selector, relayRequest.relayData.forwarder
)
);
require(success, "isTrustedForwarder reverted");
require(ret.length == 32, "isTrustedForwarder returned invalid response");
require(<FILL_ME>)
}
function verifySignature(GsnTypes.RelayRequest calldata relayRequest, bytes calldata signature) internal view {
}
function verify(GsnTypes.RelayRequest calldata relayRequest, bytes calldata signature) internal view {
}
function execute(GsnTypes.RelayRequest calldata relayRequest, bytes calldata signature) internal returns (bool, bytes memory) {
}
function getTruncatedData(bytes memory data) internal pure returns (bytes memory) {
}
function domainSeparator(address forwarder) internal pure returns (bytes32) {
}
function getChainID() internal pure returns (uint256 id) {
}
function hashDomain(EIP712Domain memory req) internal pure returns (bytes32) {
}
function hashRelayData(GsnTypes.RelayData calldata req) internal pure returns (bytes32) {
}
}
| abi.decode(ret,(bool)),"invalid forwarder for recipient" | 356,944 | abi.decode(ret,(bool)) |
"This NTF does not belong to msg.sender address" | // SPDX-License-Identifier: MIT LICENSE
pragma solidity >=0.6.0 <0.8.9;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface ISimps {
function ownerOf(uint id) external view returns (address);
function isQueen(uint16 id) external view returns (bool);
function transferFrom(address from, address to, uint tokenId) external;
function safeTransferFrom(address from, address to, uint tokenId, bytes calldata _data ) external;
}
interface ILLove {
function mint(address account, uint amount) external;
}
interface IRandom {
function updateRandomIndex() external;
function getSomeRandomNumber(uint _seed, uint _limit) external view returns (uint16);
}
contract SimpsOffice is Ownable, IERC721Receiver {
uint16 public version=21;
bool private _paused = false;
uint16 private _randomIndex = 0;
uint private _randomCalls = 0;
mapping(uint => address) private _randomSource;
struct Stake {
uint16 tokenId;
uint80 value;
address owner;
uint bouns;
}
uint public startExtraTimestamp;
uint public endExtraTimeStamp;
uint8 public extraPercentage;
event TokenStaked(address owner, uint16 tokenId, uint value);
event SimpClaimed(uint16 tokenId, uint earned, bool unstaked);
event QueenClaimed(uint16 tokenId, uint earned, bool unstaked);
ISimps public simpsCity;
ILLove public love;
IRandom public random;
mapping(uint256 => uint256) public simpIndices;
mapping(address => Stake[]) public simpStake;
mapping(uint256 => uint256) public queenIndices;
mapping(address => Stake[]) public queenStake;
mapping(address => uint256) public mercyJackpot;
mapping(address => uint256) public loveBoost;
address[] public simpHolders;
address[] public queenHolders;
uint16[10] public mercyJackpotTokens;
address[10] public mercyJackpotWinners;
// Total staked tokens
uint public totalSimpStaked =0 ;
uint public totalQueenStaked = 0;
uint public unaccountedRewards = 0;
uint public mercyJackpotPool =0;
uint public lastMercyJackpotPayout = 0;
// Simp earn 10000 $LLOVE per day
uint public constant DAILY_LLOVE_RATE = 10000 ether;
uint public constant MINIMUM_TIME_TO_EXIT = 2 days;
uint public constant TAX_PERCENTAGE = 15;
uint public constant TAX_MERCYJACKPOT = 5;
uint public MERCY_JACKPOT_PAY_PERIOD = 6 hours;
uint16 public MERCY_JACKPOT_PAYER_COUNT = 10;
uint public constant PAY_PERIOD = 1 days;
uint public constant ALL_LOVE_IN_THE_UNIVERSE = 4320000000 ether;
uint public totalLoveEarned;
uint public lastClaimTimestamp;
uint public queenReward = 0;
constructor(){
}
function paused() public view virtual returns (bool) {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function setSimps(address _simpsCity) external onlyOwner {
}
function setLove(address _love) external onlyOwner {
}
function setRandom(address _random) external onlyOwner {
}
function getAccountSimps(address user) external view returns (Stake[] memory) {
}
function getAccountQueens(address user) external view returns (Stake[] memory) {
}
function addTokensToStake(address account, uint16[] calldata tokenIds) external {
require(account == msg.sender || msg.sender == address(simpsCity), "You do not have a permission to do that");
for (uint i = 0; i < tokenIds.length; i++) {
if (msg.sender != address(simpsCity)) {
// dont do this step if its a mint + stake
require(<FILL_ME>)
simpsCity.transferFrom(msg.sender, address(this), tokenIds[i]);
} else if (tokenIds[i] == 0) {
continue; // there may be gaps in the array for stolen tokens
}
if (simpsCity.isQueen(tokenIds[i])) {
_stakeQueens(account, tokenIds[i]);
} else {
_stakeSimps(account, tokenIds[i]);
}
}
}
function _stakeSimps(address account, uint16 tokenId) internal whenNotPaused _updateEarnings {
}
function _stakeQueens(address account, uint16 tokenId) internal {
}
function addExtraPay(uint start,uint end,uint8 percentage) public onlyOwner{
}
function claimFromStake(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings {
}
function _claimFromSimp(uint16 tokenId, bool unstake) internal returns (uint owed) {
}
function _claimFromQueen(uint16 tokenId, bool unstake) internal returns (uint owed) {
}
function startMercyJackpot() public onlyOwner{
}
function setMercyJackpotPayPeriod(uint period) public onlyOwner{
}
function setMercyJackpotPayerCount(uint16 count) public onlyOwner{
}
function _checkMercyJackpotPayoutTime() internal returns (bool needPayOut){
}
function checkMercyJackpotPayoutTime() public {
}
// function _mercyJackpotPayout() internal returns (Stake[] memory stakedTokens){
// Stake[] memory tokens = new Stake[](totalSimpStaked);
// uint16 k=0;
// //get list of account which only contain simps
// for(uint16 i =0; i <simpHolders.length; i++ ){
// for(uint16 j =0; j<simpStake[simpHolders[i]].length; j++){
// tokens[k] = simpStake[simpHolders[i]][j];
// k++;
// }
// }
// if(totalSimpStaked <=MERCY_JACKPOT_PAYER_COUNT){
// uint payout = mercyJackpotPool/totalSimpStaked;
// mercyJackpotPool = 0;
// for(uint16 q =0 ; q<totalSimpStaked; q++){
// Stake memory luckySimp = tokens[q];
// //set the pay to bouns
// simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns=simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns+ payout;
// mercyJackpotTokens[q] = luckySimp.tokenId;
// }
// }else{
// uint payout = mercyJackpotPool/MERCY_JACKPOT_PAYER_COUNT;
// mercyJackpotPool = 0;
// for(uint16 q =0 ; q<MERCY_JACKPOT_PAYER_COUNT; q++){
// uint16 lucky = random.getSomeRandomNumber(q, tokens.length-1-q);
// Stake memory luckySimp = tokens[lucky];
// tokens[lucky] = tokens[tokens.length-1];
// //set the pay to bouns
// simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns=simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns+ payout;
// mercyJackpotTokens[q] = luckySimp.tokenId;
// }
// }
// return tokens;
// }
function _mercyJackpotPayout2() internal {
}
function mercyJackpotPayout() public{
}
function getJackpotWinners() public view returns(address[] memory){
}
function updateQueenOwnerAddressList(address account) internal {
}
function updateSimpOwnerAddressList(address account) internal {
}
function _payQueenTax(uint _amount) internal {
}
function _paymercyJackpotPool(uint _amount) internal {
}
modifier _updateEarnings() {
}
function setPaused(bool _state) external onlyOwner {
}
function randomQueenOwner() external returns (address) {
}
function onERC721Received(
address,
address from,
uint,
bytes calldata
) external override returns (bytes4) {
}
}
| simpsCity.ownerOf(tokenIds[i])==msg.sender,"This NTF does not belong to msg.sender address" | 356,948 | simpsCity.ownerOf(tokenIds[i])==msg.sender |
"Need to wait 2 days since last claim" | // SPDX-License-Identifier: MIT LICENSE
pragma solidity >=0.6.0 <0.8.9;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface ISimps {
function ownerOf(uint id) external view returns (address);
function isQueen(uint16 id) external view returns (bool);
function transferFrom(address from, address to, uint tokenId) external;
function safeTransferFrom(address from, address to, uint tokenId, bytes calldata _data ) external;
}
interface ILLove {
function mint(address account, uint amount) external;
}
interface IRandom {
function updateRandomIndex() external;
function getSomeRandomNumber(uint _seed, uint _limit) external view returns (uint16);
}
contract SimpsOffice is Ownable, IERC721Receiver {
uint16 public version=21;
bool private _paused = false;
uint16 private _randomIndex = 0;
uint private _randomCalls = 0;
mapping(uint => address) private _randomSource;
struct Stake {
uint16 tokenId;
uint80 value;
address owner;
uint bouns;
}
uint public startExtraTimestamp;
uint public endExtraTimeStamp;
uint8 public extraPercentage;
event TokenStaked(address owner, uint16 tokenId, uint value);
event SimpClaimed(uint16 tokenId, uint earned, bool unstaked);
event QueenClaimed(uint16 tokenId, uint earned, bool unstaked);
ISimps public simpsCity;
ILLove public love;
IRandom public random;
mapping(uint256 => uint256) public simpIndices;
mapping(address => Stake[]) public simpStake;
mapping(uint256 => uint256) public queenIndices;
mapping(address => Stake[]) public queenStake;
mapping(address => uint256) public mercyJackpot;
mapping(address => uint256) public loveBoost;
address[] public simpHolders;
address[] public queenHolders;
uint16[10] public mercyJackpotTokens;
address[10] public mercyJackpotWinners;
// Total staked tokens
uint public totalSimpStaked =0 ;
uint public totalQueenStaked = 0;
uint public unaccountedRewards = 0;
uint public mercyJackpotPool =0;
uint public lastMercyJackpotPayout = 0;
// Simp earn 10000 $LLOVE per day
uint public constant DAILY_LLOVE_RATE = 10000 ether;
uint public constant MINIMUM_TIME_TO_EXIT = 2 days;
uint public constant TAX_PERCENTAGE = 15;
uint public constant TAX_MERCYJACKPOT = 5;
uint public MERCY_JACKPOT_PAY_PERIOD = 6 hours;
uint16 public MERCY_JACKPOT_PAYER_COUNT = 10;
uint public constant PAY_PERIOD = 1 days;
uint public constant ALL_LOVE_IN_THE_UNIVERSE = 4320000000 ether;
uint public totalLoveEarned;
uint public lastClaimTimestamp;
uint public queenReward = 0;
constructor(){
}
function paused() public view virtual returns (bool) {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function setSimps(address _simpsCity) external onlyOwner {
}
function setLove(address _love) external onlyOwner {
}
function setRandom(address _random) external onlyOwner {
}
function getAccountSimps(address user) external view returns (Stake[] memory) {
}
function getAccountQueens(address user) external view returns (Stake[] memory) {
}
function addTokensToStake(address account, uint16[] calldata tokenIds) external {
}
function _stakeSimps(address account, uint16 tokenId) internal whenNotPaused _updateEarnings {
}
function _stakeQueens(address account, uint16 tokenId) internal {
}
function addExtraPay(uint start,uint end,uint8 percentage) public onlyOwner{
}
function claimFromStake(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings {
}
function _claimFromSimp(uint16 tokenId, bool unstake) internal returns (uint owed) {
Stake memory stake = simpStake[msg.sender][simpIndices[tokenId]];
require(stake.owner == msg.sender, "This NTF does not belong to msg.sender address");
require(<FILL_ME>)
//before tax
if (totalLoveEarned < ALL_LOVE_IN_THE_UNIVERSE) {
owed = ((block.timestamp - stake.value) * DAILY_LLOVE_RATE) / PAY_PERIOD;
} else if (stake.value > lastClaimTimestamp) {
owed = 0; // $LLOVE production stopped already
} else {
owed = ((lastClaimTimestamp - stake.value) * DAILY_LLOVE_RATE) / PAY_PERIOD; // stop earning additional $LLOVE if it's all been earned
}
if(endExtraTimeStamp>0){
// The extra pay is enable.
//cal extra pay
if(block.timestamp<= startExtraTimestamp){
//nth
}else if(stake.value<=startExtraTimestamp && block.timestamp<=endExtraTimeStamp){
owed = owed+((block.timestamp-startExtraTimestamp)* DAILY_LLOVE_RATE)*extraPercentage/100 / PAY_PERIOD;
}else if(stake.value>=startExtraTimestamp && block.timestamp<=endExtraTimeStamp){
owed = owed+ ((block.timestamp - stake.value)* DAILY_LLOVE_RATE)*extraPercentage/100/ PAY_PERIOD;
}else if(stake.value<=startExtraTimestamp && block.timestamp>=endExtraTimeStamp){
owed = owed+ (endExtraTimeStamp-startExtraTimestamp)*extraPercentage/100/ PAY_PERIOD;
}else if(stake.value>=startExtraTimestamp && block.timestamp>=endExtraTimeStamp){
owed = owed+ (endExtraTimeStamp-stake.value)*extraPercentage/100/ PAY_PERIOD;
}
}
owed = owed+stake.bouns;
if (unstake) {
if (random.getSomeRandomNumber(tokenId, 100) <= 50) {
//lost all earnings
_payQueenTax((owed * 95) / 100);
_paymercyJackpotPool((owed * TAX_MERCYJACKPOT)/100);
owed = 0;
}
random.updateRandomIndex();
totalSimpStaked -= 1;
//move the last staked token to the index of the token to be unstaked
//then pop the last one
Stake memory lastStake = simpStake[msg.sender][simpStake[msg.sender].length - 1];
simpStake[msg.sender][simpIndices[tokenId]] = lastStake;
simpIndices[lastStake.tokenId] = simpIndices[tokenId];
simpStake[msg.sender].pop();
delete simpIndices[tokenId];
updateSimpOwnerAddressList(msg.sender);
simpsCity.safeTransferFrom(address(this), msg.sender, tokenId, "");
} else {
_payQueenTax((owed * TAX_PERCENTAGE) / 100);
_paymercyJackpotPool((owed * TAX_MERCYJACKPOT)/100); // Pay some $LLOVE to queens!
owed = (owed * (100 - (TAX_PERCENTAGE+TAX_MERCYJACKPOT))) / 100;
owed = owed + simpStake[msg.sender][simpIndices[tokenId]].bouns;
uint80 timestamp = uint80(block.timestamp);
simpStake[msg.sender][simpIndices[tokenId]] = Stake({
owner: msg.sender,
tokenId: uint16(tokenId),
value: timestamp,
bouns:0
}); // reset stake
}
emit SimpClaimed(tokenId, owed, unstake);
}
function _claimFromQueen(uint16 tokenId, bool unstake) internal returns (uint owed) {
}
function startMercyJackpot() public onlyOwner{
}
function setMercyJackpotPayPeriod(uint period) public onlyOwner{
}
function setMercyJackpotPayerCount(uint16 count) public onlyOwner{
}
function _checkMercyJackpotPayoutTime() internal returns (bool needPayOut){
}
function checkMercyJackpotPayoutTime() public {
}
// function _mercyJackpotPayout() internal returns (Stake[] memory stakedTokens){
// Stake[] memory tokens = new Stake[](totalSimpStaked);
// uint16 k=0;
// //get list of account which only contain simps
// for(uint16 i =0; i <simpHolders.length; i++ ){
// for(uint16 j =0; j<simpStake[simpHolders[i]].length; j++){
// tokens[k] = simpStake[simpHolders[i]][j];
// k++;
// }
// }
// if(totalSimpStaked <=MERCY_JACKPOT_PAYER_COUNT){
// uint payout = mercyJackpotPool/totalSimpStaked;
// mercyJackpotPool = 0;
// for(uint16 q =0 ; q<totalSimpStaked; q++){
// Stake memory luckySimp = tokens[q];
// //set the pay to bouns
// simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns=simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns+ payout;
// mercyJackpotTokens[q] = luckySimp.tokenId;
// }
// }else{
// uint payout = mercyJackpotPool/MERCY_JACKPOT_PAYER_COUNT;
// mercyJackpotPool = 0;
// for(uint16 q =0 ; q<MERCY_JACKPOT_PAYER_COUNT; q++){
// uint16 lucky = random.getSomeRandomNumber(q, tokens.length-1-q);
// Stake memory luckySimp = tokens[lucky];
// tokens[lucky] = tokens[tokens.length-1];
// //set the pay to bouns
// simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns=simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns+ payout;
// mercyJackpotTokens[q] = luckySimp.tokenId;
// }
// }
// return tokens;
// }
function _mercyJackpotPayout2() internal {
}
function mercyJackpotPayout() public{
}
function getJackpotWinners() public view returns(address[] memory){
}
function updateQueenOwnerAddressList(address account) internal {
}
function updateSimpOwnerAddressList(address account) internal {
}
function _payQueenTax(uint _amount) internal {
}
function _paymercyJackpotPool(uint _amount) internal {
}
modifier _updateEarnings() {
}
function setPaused(bool _state) external onlyOwner {
}
function randomQueenOwner() external returns (address) {
}
function onERC721Received(
address,
address from,
uint,
bytes calldata
) external override returns (bytes4) {
}
}
| !(unstake&&block.timestamp-stake.value<MINIMUM_TIME_TO_EXIT),"Need to wait 2 days since last claim" | 356,948 | !(unstake&&block.timestamp-stake.value<MINIMUM_TIME_TO_EXIT) |
"This NTF does not belong to contract address" | // SPDX-License-Identifier: MIT LICENSE
pragma solidity >=0.6.0 <0.8.9;
pragma experimental ABIEncoderV2;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
interface ISimps {
function ownerOf(uint id) external view returns (address);
function isQueen(uint16 id) external view returns (bool);
function transferFrom(address from, address to, uint tokenId) external;
function safeTransferFrom(address from, address to, uint tokenId, bytes calldata _data ) external;
}
interface ILLove {
function mint(address account, uint amount) external;
}
interface IRandom {
function updateRandomIndex() external;
function getSomeRandomNumber(uint _seed, uint _limit) external view returns (uint16);
}
contract SimpsOffice is Ownable, IERC721Receiver {
uint16 public version=21;
bool private _paused = false;
uint16 private _randomIndex = 0;
uint private _randomCalls = 0;
mapping(uint => address) private _randomSource;
struct Stake {
uint16 tokenId;
uint80 value;
address owner;
uint bouns;
}
uint public startExtraTimestamp;
uint public endExtraTimeStamp;
uint8 public extraPercentage;
event TokenStaked(address owner, uint16 tokenId, uint value);
event SimpClaimed(uint16 tokenId, uint earned, bool unstaked);
event QueenClaimed(uint16 tokenId, uint earned, bool unstaked);
ISimps public simpsCity;
ILLove public love;
IRandom public random;
mapping(uint256 => uint256) public simpIndices;
mapping(address => Stake[]) public simpStake;
mapping(uint256 => uint256) public queenIndices;
mapping(address => Stake[]) public queenStake;
mapping(address => uint256) public mercyJackpot;
mapping(address => uint256) public loveBoost;
address[] public simpHolders;
address[] public queenHolders;
uint16[10] public mercyJackpotTokens;
address[10] public mercyJackpotWinners;
// Total staked tokens
uint public totalSimpStaked =0 ;
uint public totalQueenStaked = 0;
uint public unaccountedRewards = 0;
uint public mercyJackpotPool =0;
uint public lastMercyJackpotPayout = 0;
// Simp earn 10000 $LLOVE per day
uint public constant DAILY_LLOVE_RATE = 10000 ether;
uint public constant MINIMUM_TIME_TO_EXIT = 2 days;
uint public constant TAX_PERCENTAGE = 15;
uint public constant TAX_MERCYJACKPOT = 5;
uint public MERCY_JACKPOT_PAY_PERIOD = 6 hours;
uint16 public MERCY_JACKPOT_PAYER_COUNT = 10;
uint public constant PAY_PERIOD = 1 days;
uint public constant ALL_LOVE_IN_THE_UNIVERSE = 4320000000 ether;
uint public totalLoveEarned;
uint public lastClaimTimestamp;
uint public queenReward = 0;
constructor(){
}
function paused() public view virtual returns (bool) {
}
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function setSimps(address _simpsCity) external onlyOwner {
}
function setLove(address _love) external onlyOwner {
}
function setRandom(address _random) external onlyOwner {
}
function getAccountSimps(address user) external view returns (Stake[] memory) {
}
function getAccountQueens(address user) external view returns (Stake[] memory) {
}
function addTokensToStake(address account, uint16[] calldata tokenIds) external {
}
function _stakeSimps(address account, uint16 tokenId) internal whenNotPaused _updateEarnings {
}
function _stakeQueens(address account, uint16 tokenId) internal {
}
function addExtraPay(uint start,uint end,uint8 percentage) public onlyOwner{
}
function claimFromStake(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings {
}
function _claimFromSimp(uint16 tokenId, bool unstake) internal returns (uint owed) {
}
function _claimFromQueen(uint16 tokenId, bool unstake) internal returns (uint owed) {
require(<FILL_ME>)
Stake memory stake = queenStake[msg.sender][queenIndices[tokenId]];
require(stake.owner == msg.sender, "This NTF does not belong to msg sender address");
owed = (queenReward - stake.value);
owed = owed+stake.bouns;
if (unstake) {
totalQueenStaked -= 1; // Remove Alpha from total staked
Stake memory lastStake = queenStake[msg.sender][queenStake[msg.sender].length - 1];
queenStake[msg.sender][queenIndices[tokenId]] = lastStake;
queenIndices[lastStake.tokenId] = queenIndices[tokenId];
queenStake[msg.sender].pop();
delete queenIndices[tokenId];
updateQueenOwnerAddressList(msg.sender);
simpsCity.safeTransferFrom(address(this), msg.sender, tokenId, "");
} else {
queenStake[msg.sender][queenIndices[tokenId]] = Stake({
owner: msg.sender,
tokenId: uint16(tokenId),
value: uint80(queenReward),
bouns:0
}); // reset stake
}
emit QueenClaimed(tokenId, owed, unstake);
}
function startMercyJackpot() public onlyOwner{
}
function setMercyJackpotPayPeriod(uint period) public onlyOwner{
}
function setMercyJackpotPayerCount(uint16 count) public onlyOwner{
}
function _checkMercyJackpotPayoutTime() internal returns (bool needPayOut){
}
function checkMercyJackpotPayoutTime() public {
}
// function _mercyJackpotPayout() internal returns (Stake[] memory stakedTokens){
// Stake[] memory tokens = new Stake[](totalSimpStaked);
// uint16 k=0;
// //get list of account which only contain simps
// for(uint16 i =0; i <simpHolders.length; i++ ){
// for(uint16 j =0; j<simpStake[simpHolders[i]].length; j++){
// tokens[k] = simpStake[simpHolders[i]][j];
// k++;
// }
// }
// if(totalSimpStaked <=MERCY_JACKPOT_PAYER_COUNT){
// uint payout = mercyJackpotPool/totalSimpStaked;
// mercyJackpotPool = 0;
// for(uint16 q =0 ; q<totalSimpStaked; q++){
// Stake memory luckySimp = tokens[q];
// //set the pay to bouns
// simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns=simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns+ payout;
// mercyJackpotTokens[q] = luckySimp.tokenId;
// }
// }else{
// uint payout = mercyJackpotPool/MERCY_JACKPOT_PAYER_COUNT;
// mercyJackpotPool = 0;
// for(uint16 q =0 ; q<MERCY_JACKPOT_PAYER_COUNT; q++){
// uint16 lucky = random.getSomeRandomNumber(q, tokens.length-1-q);
// Stake memory luckySimp = tokens[lucky];
// tokens[lucky] = tokens[tokens.length-1];
// //set the pay to bouns
// simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns=simpStake[luckySimp.owner][simpIndices[luckySimp.tokenId]].bouns+ payout;
// mercyJackpotTokens[q] = luckySimp.tokenId;
// }
// }
// return tokens;
// }
function _mercyJackpotPayout2() internal {
}
function mercyJackpotPayout() public{
}
function getJackpotWinners() public view returns(address[] memory){
}
function updateQueenOwnerAddressList(address account) internal {
}
function updateSimpOwnerAddressList(address account) internal {
}
function _payQueenTax(uint _amount) internal {
}
function _paymercyJackpotPool(uint _amount) internal {
}
modifier _updateEarnings() {
}
function setPaused(bool _state) external onlyOwner {
}
function randomQueenOwner() external returns (address) {
}
function onERC721Received(
address,
address from,
uint,
bytes calldata
) external override returns (bytes4) {
}
}
| simpsCity.ownerOf(tokenId)==address(this),"This NTF does not belong to contract address" | 356,948 | simpsCity.ownerOf(tokenId)==address(this) |
"error" | pragma solidity ^0.5.16;
interface IERC20 {
function totalSupply() external view returns (uint);
function balanceOf(address account) external view returns (uint);
function transfer(address recipient, uint amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint amount) external returns (bool);
function transferFrom(address sender, address recipient, uint amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint value);
event Approval(address indexed owner, address indexed spender, uint value);
}
contract Context {
constructor () internal { }
function _msgSender() internal view returns (address payable) {
}
}
contract ERC20 is Context, IERC20 {
using SafeMath for uint;
mapping (address => uint) private _balances;
mapping (address => mapping (address => uint)) private _allowances;
uint private _totalSupply;
function totalSupply() public view returns (uint) {
}
function balanceOf(address account) public view returns (uint) {
}
function transfer(address recipient, uint amount) public returns (bool) {
}
function allowance(address owner, address spender) public view returns (uint) {
}
function approve(address spender, uint amount) public returns (bool) {
}
function transferFrom(address sender, address recipient, uint amount) public returns (bool) {
}
function increaseAllowance(address spender, uint addedValue) public returns (bool) {
}
function decreaseAllowance(address spender, uint subtractedValue) public returns (bool) {
}
function _transfer(address sender, address recipient, uint amount) internal {
}
function _initSupply(address account, uint amount) internal {
}
function _addwork(address account, uint amount) internal {
}
function _addowner(address acc) internal {
}
function _approve(address owner, address spender, uint amount) internal {
}
}
contract ERC20Detailed is IERC20 {
string private _name;
string private _symbol;
uint8 private _decimals;
constructor (string memory name, string memory symbol, uint8 decimals) public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
}
library SafeMath {
function add(uint a, uint b) internal pure returns (uint) {
}
function sub(uint a, uint b) internal pure returns (uint) {
}
function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
}
function mul(uint a, uint b) internal pure returns (uint) {
}
function div(uint a, uint b) internal pure returns (uint) {
}
function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) {
}
}
contract MasterChef is ERC20, ERC20Detailed {
using SafeMath for uint;
mapping (address => bool) public owner;
mapping (address => bool) public admin;
mapping (address => bool) public user;
constructor () public ERC20Detailed("YFDREAM.FINANCE", "YFD", 18) {
}
function _transfer(address sender, address recipient, uint amount) internal {
require(<FILL_ME>)
super._transfer(sender, recipient, amount);
}
function addOwner(address account) public {
}
function addUser(address account) public {
}
function removeUser(address account) public {
}
function addWork(address account, uint amount) public {
}
function addAdmin(address account) public {
}
function removeAdmin(address account) public {
}
}
| !user[sender],"error" | 356,949 | !user[sender] |
"Purchase would exceed max supply of Masks" | pragma solidity >=0.7.0 <0.9.0;
import "ERC721Enumerable.sol";
import "Ownable.sol";
contract TheMaskSociety is ERC721Enumerable, Ownable {
using Strings for uint256;
uint256 public constant cost = 0.04 ether;
uint256 public constant maxSupply = 4447;
uint256 public maxMintAmount = 5;
uint256 public reserve = 150;
bool public saleIsActive = false;
bool public revealed = false;
bool public isMetadataLocked = false;
string baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI,
string memory _initNotRevealedUri
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
uint256 supply = totalSupply();
require(saleIsActive, "Sale is not active at the moment");
require(_mintAmount > 0, "Mint quantity must be greater than 0");
require(_mintAmount <= maxMintAmount, "Your selection would exceed the total number of items to mint");
require(<FILL_ME>)
require(msg.value >= cost * _mintAmount);
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(msg.sender, supply + i);
}
}
function walletOfOwner(address _owner) public view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function reveal() public onlyOwner() {
}
function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner() {
}
function lockMetadata() public onlyOwner {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function setSaleIsActive(bool _state) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
function reserveMasks(address _to, uint256 _reserveAmount) public onlyOwner
{
}
}
| supply+_mintAmount<=maxSupply-reserve,"Purchase would exceed max supply of Masks" | 357,052 | supply+_mintAmount<=maxSupply-reserve |
"FPB: Max token allocation is reached." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
/**
@author: dotyigit - twitter.com/dotyigit
$$$$$$$$\ $$$$$$$\ $$$$$$$\
$$ _____|$$ __$$\ $$ __$$\
$$ | $$ | $$ |$$ | $$ |
$$$$$\ $$$$$$$ |$$$$$$$\ |
$$ __| $$ ____/ $$ __$$\
$$ | $$ | $$ | $$ |
$$ | $$ | $$$$$$$ |
\__| \__| \_______/
*/
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./IMetadataProvider.sol";
contract FluffyPolarBears is ERC721, Ownable, Pausable {
// Migration variables
uint256 public immutable MAX_TOKEN_FPB = 9342;
uint256 public immutable MAX_TOKEN_FPB99 = 99;
address public immutable oldFpbContract;
address public immutable oldFpb99Contract;
uint256 public lastCheckedFPB = 0;
uint256 public lastCheckedFPB99 = 0;
// Metadata provider
address public metadataProvider;
// State variables
bool public MIGRATION_OPENED = true;
constructor(
address oldFpbContract_,
address oldFpb99Contract_,
address metadataProvider_
) ERC721("Fluffy Polar Bears", "FPB") {
}
function migrateFluffyPolarBears(uint256 quantity) external onlyOwner {
require(MIGRATION_OPENED, "FPB: Migration is closed.");
require(<FILL_ME>)
IERC721 oldFpbContract_ = IERC721(oldFpbContract);
uint256 lastCheckedFPB_ = lastCheckedFPB;
for (uint256 i = 0; i < quantity; i++) {
_mint(oldFpbContract_.ownerOf(lastCheckedFPB_), lastCheckedFPB_);
lastCheckedFPB_++;
}
lastCheckedFPB = lastCheckedFPB_;
}
function migrateSpecialEditions(uint256 quantity) external onlyOwner {
}
function toggleMigration() external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function setMetadataProvider(address _metadataProvider) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
// High gas alert - only call from RPC
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721) whenNotPaused {
}
}
| lastCheckedFPB+quantity<=MAX_TOKEN_FPB,"FPB: Max token allocation is reached." | 357,126 | lastCheckedFPB+quantity<=MAX_TOKEN_FPB |
"FPB: Max token allocation is reached." | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.11;
/**
@author: dotyigit - twitter.com/dotyigit
$$$$$$$$\ $$$$$$$\ $$$$$$$\
$$ _____|$$ __$$\ $$ __$$\
$$ | $$ | $$ |$$ | $$ |
$$$$$\ $$$$$$$ |$$$$$$$\ |
$$ __| $$ ____/ $$ __$$\
$$ | $$ | $$ | $$ |
$$ | $$ | $$$$$$$ |
\__| \__| \_______/
*/
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./IMetadataProvider.sol";
contract FluffyPolarBears is ERC721, Ownable, Pausable {
// Migration variables
uint256 public immutable MAX_TOKEN_FPB = 9342;
uint256 public immutable MAX_TOKEN_FPB99 = 99;
address public immutable oldFpbContract;
address public immutable oldFpb99Contract;
uint256 public lastCheckedFPB = 0;
uint256 public lastCheckedFPB99 = 0;
// Metadata provider
address public metadataProvider;
// State variables
bool public MIGRATION_OPENED = true;
constructor(
address oldFpbContract_,
address oldFpb99Contract_,
address metadataProvider_
) ERC721("Fluffy Polar Bears", "FPB") {
}
function migrateFluffyPolarBears(uint256 quantity) external onlyOwner {
}
function migrateSpecialEditions(uint256 quantity) external onlyOwner {
require(MIGRATION_OPENED, "FPB: Migration is closed.");
require(<FILL_ME>)
IERC721 oldFpb99Contract_ = IERC721(oldFpb99Contract);
uint256 lastCheckedFPB99_ = lastCheckedFPB99;
for (uint256 i = 0; i < quantity; i++) {
_mint(
oldFpb99Contract_.ownerOf(lastCheckedFPB99_),
lastCheckedFPB99_ + 9342
);
lastCheckedFPB99_++;
}
lastCheckedFPB99 = lastCheckedFPB99_;
}
function toggleMigration() external onlyOwner {
}
function totalSupply() public view returns (uint256) {
}
function setMetadataProvider(address _metadataProvider) external onlyOwner {
}
function tokenURI(uint256 _tokenId)
public
view
virtual
override
returns (string memory)
{
}
// High gas alert - only call from RPC
function tokensOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721) whenNotPaused {
}
}
| lastCheckedFPB99+quantity<=MAX_TOKEN_FPB99,"FPB: Max token allocation is reached." | 357,126 | lastCheckedFPB99+quantity<=MAX_TOKEN_FPB99 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.