comment
stringlengths 1
211
⌀ | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"not owning item" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/introspection/IERC165.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
interface IXanaAddressRegistry {
function auction() external view returns (address);
function marketplace() external view returns (address);
function tokenRegistry() external view returns (address);
}
interface IXanaMarketplace {
function validateItemSold(
address,
uint256,
address,
address
) external;
function getPrice(address) external view returns (int256);
}
interface IXanaTokenRegistry {
function enabled(address) external returns (bool);
}
contract XanaBundleMarketplace is
OwnableUpgradeable,
ReentrancyGuardUpgradeable
{
using SafeMath for uint256;
using AddressUpgradeable for address payable;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.Bytes32Set;
/// @notice Events for the contract
event ItemListed(
address indexed owner,
string bundleID,
address payToken,
uint256 price,
uint256 startingTime
);
event ItemSold(
address indexed seller,
address indexed buyer,
string bundleID,
address payToken,
int256 unitPrice,
uint256 price
);
event ItemUpdated(
address indexed owner,
string bundleID,
address[] nft,
uint256[] tokenId,
uint256[] quantity,
address payToken,
uint256 newPrice
);
event ItemCanceled(address indexed owner, string bundleID);
event OfferCreated(
address indexed creator,
string bundleID,
address payToken,
uint256 price,
uint256 deadline
);
event OfferCanceled(address indexed creator, string bundleID);
event UpdatePlatformFee(uint256 platformFee);
event UpdatePlatformFeeRecipient(address payable platformFeeRecipient);
/// @notice Structure for Bundle Item Listing
struct Listing {
address[] nfts;
uint256[] tokenIds;
uint256[] quantities;
address payToken;
uint256 price;
uint256 startingTime;
}
/// @notice Structure for bundle offer
struct Offer {
IERC20 payToken;
uint256 price;
uint256 deadline;
}
bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd;
bytes4 private constant INTERFACE_ID_ERC1155 = 0xd9b67a26;
/// @notice Owner -> Bundle ID -> Bundle Listing item
mapping(address => mapping(bytes32 => Listing)) public listings;
/// @notice Bundle ID -> Wwner
mapping(bytes32 => address) public owners;
mapping(address => mapping(uint256 => EnumerableSet.Bytes32Set)) bundleIdsPerItem;
mapping(bytes32 => mapping(address => mapping(uint256 => uint256))) nftIndexes;
mapping(bytes32 => string) bundleIds;
/// @notice Bundle ID -> Offerer -> Offer
mapping(bytes32 => mapping(address => Offer)) public offers;
/// @notice Platform fee
uint256 public platformFee;
/// @notice reward token owner
address public rewardTokenOwner;
/// @notice reward token
IERC20 public RWT;
/// @notice reward fee
uint256 public rewardFee;
/// @notice Platform fee receipient
address payable public feeReceipient;
/// @notice Address registry
IXanaAddressRegistry public addressRegistry;
modifier onlyContract() {
}
/// @notice Contract initializer
function initialize(address payable _feeRecipient, uint256 _platformFee, IERC20 _RWT, address _rewardTokenOwner, IXanaAddressRegistry _addressRegistry, uint256 _rewardFee)
public
initializer
{
}
/// @notice Method for get NFT bundle listing
/// @param _owner Owner address
/// @param _bundleID Bundle ID
function getListing(address _owner, string memory _bundleID)
external
view
returns (
address[] memory nfts,
uint256[] memory tokenIds,
uint256[] memory quantities,
uint256 price,
uint256 startingTime
)
{
}
/// @notice Method for listing NFT bundle
/// @param _bundleID Bundle ID
/// @param _nftAddresses Addresses of NFT contract
/// @param _tokenIds Token IDs of NFT
/// @param _quantities token amounts to list (needed for ERC-1155 NFTs, set as 1 for ERC-721)
/// @param _price sale price for bundle
/// @param _startingTime scheduling for a future sale
function listItem(
string memory _bundleID,
address[] calldata _nftAddresses,
uint256[] calldata _tokenIds,
uint256[] calldata _quantities,
address _payToken,
uint256 _price,
uint256 _startingTime
) external {
}
/// @notice Method for canceling listed NFT bundle
function cancelListing(string memory _bundleID) external nonReentrant {
}
/// @notice Method for updating listed NFT bundle
/// @param _bundleID Bundle ID
/// @param _newPrice New sale price for bundle
function updateListing(
string memory _bundleID,
address _payToken,
uint256 _newPrice
) external nonReentrant {
}
/// @notice Method for buying listed NFT bundle
/// @param _bundleID Bundle ID
/* function buyItem(string memory _bundleID) external payable nonReentrant {
bytes32 bundleID = _getBundleID(_bundleID);
address owner = owners[bundleID];
require(owner != address(0), "invalid id");
Listing memory listing = listings[owner][bundleID];
require(listing.payToken == address(0), "invalid pay token");
require(msg.value >= listing.price, "insufficient balance to buy");
_buyItem(_bundleID, address(0));
} */
/// @notice Method for buying listed NFT bundle
/// @param _bundleID Bundle ID
function buyItem(string memory _bundleID, address _payToken)
external
nonReentrant
{
}
function _buyItem(string memory _bundleID, address _payToken) private {
}
/// @notice Method for offering bundle item
/// @param _bundleID Bundle ID
/// @param _payToken Paying token
/// @param _price Price
/// @param _deadline Offer expiration
function createOffer(
string memory _bundleID,
IERC20 _payToken,
uint256 _price,
uint256 _deadline
) external {
}
/// @notice Method for canceling the offer
/// @param _bundleID Bundle ID
function cancelOffer(string memory _bundleID) external {
}
/// @notice Method for accepting the offer
function acceptOffer(string memory _bundleID, address _creator)
external
nonReentrant
{
bytes32 bundleID = _getBundleID(_bundleID);
require(<FILL_ME>)
Offer memory offer = offers[bundleID][_creator];
require(offer.deadline > _getNow(), "offer not exists or expired");
uint256 price = offer.price;
uint256 feeAmount = price.mul(platformFee).div(1e4);
offer.payToken.safeTransferFrom(_creator, feeReceipient, feeAmount);
offer.payToken.safeTransferFrom(
_creator,
_msgSender(),
price.sub(feeAmount)
);
// Transfer NFT to buyer
Listing memory listing = listings[_msgSender()][bundleID];
for (uint256 i; i < listing.nfts.length; i++) {
if (_supportsInterface(listing.nfts[i], INTERFACE_ID_ERC721)) {
IERC721(listing.nfts[i]).safeTransferFrom(
_msgSender(),
_creator,
listing.tokenIds[i]
);
} else {
IERC1155(listing.nfts[i]).safeTransferFrom(
_msgSender(),
_creator,
listing.tokenIds[i],
listing.quantities[i],
bytes("")
);
}
IXanaMarketplace(addressRegistry.marketplace()).validateItemSold(
listing.nfts[i],
listing.tokenIds[i],
owners[bundleID],
_creator
);
}
delete (listings[_msgSender()][bundleID]);
listing.price = 0;
listings[_creator][bundleID] = listing;
owners[bundleID] = _creator;
delete (offers[bundleID][_creator]);
emit ItemSold(
_msgSender(),
_creator,
_bundleID,
address(offer.payToken),
IXanaMarketplace(addressRegistry.marketplace()).getPrice(address(offer.payToken)),
offer.price
);
emit OfferCanceled(_creator, _bundleID);
}
/**
@notice Method for updating platform fee
@dev Only admin
@param _platformFee uint256 the platform fee to set
*/
function updatePlatformFee(uint256 _platformFee) external onlyOwner {
}
/**
@notice Method for updating reward fee
@dev Only admin
@param _rewardFee uint256 the reward fee to set
*/
function updateBundleRewardFee(uint256 _rewardFee) external onlyOwner {
}
/**
@notice Method for updating platform fee address
@dev Only admin
@param _platformFeeRecipient payable address the address to sends the funds to
*/
function updatePlatformFeeRecipient(address payable _platformFeeRecipient)
external
onlyOwner
{
}
/**
@notice Update XanaAddressRegistry contract
@dev Only admin
*/
function updateAddressRegistry(address _registry) external onlyOwner {
}
/**
* @notice Validate and cancel listing
* @dev Only marketplace can access
*/
function validateItemSold(
address _nftAddress,
uint256 _tokenId,
uint256 _quantity
) external onlyContract {
}
////////////////////////////
/// Internal and Private ///
////////////////////////////
function _supportsInterface(address _addr, bytes4 iface)
internal
view
returns (bool)
{
}
function _check721Owning(
address _nft,
uint256 _tokenId,
address _owner
) internal view {
}
function _check1155Owning(
address _nft,
uint256 _tokenId,
uint256 _quantity,
address _owner
) internal view {
}
function _getNow() internal view virtual returns (uint256) {
}
function _cancelListing(address _owner, string memory _bundleID) private {
}
function _getBundleID(string memory _bundleID)
private
pure
returns (bytes32)
{
}
/// @notice Method for set Reward Token
/// @param _rwtTokenAddr Reward Token Address
function setBundleRWTAddr(address _rwtTokenAddr)
external
onlyOwner
{
}
/// @notice Method for set owner address
/// @param _rwtSenderAddr New owner address
function setBundleRWTSenderAddr(address _rwtSenderAddr)
external
onlyOwner
{
}
}
| owners[bundleID]==_msgSender(),"not owning item" | 287,461 | owners[bundleID]==_msgSender() |
"not owning item" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/introspection/IERC165.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
interface IXanaAddressRegistry {
function auction() external view returns (address);
function marketplace() external view returns (address);
function tokenRegistry() external view returns (address);
}
interface IXanaMarketplace {
function validateItemSold(
address,
uint256,
address,
address
) external;
function getPrice(address) external view returns (int256);
}
interface IXanaTokenRegistry {
function enabled(address) external returns (bool);
}
contract XanaBundleMarketplace is
OwnableUpgradeable,
ReentrancyGuardUpgradeable
{
using SafeMath for uint256;
using AddressUpgradeable for address payable;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.Bytes32Set;
/// @notice Events for the contract
event ItemListed(
address indexed owner,
string bundleID,
address payToken,
uint256 price,
uint256 startingTime
);
event ItemSold(
address indexed seller,
address indexed buyer,
string bundleID,
address payToken,
int256 unitPrice,
uint256 price
);
event ItemUpdated(
address indexed owner,
string bundleID,
address[] nft,
uint256[] tokenId,
uint256[] quantity,
address payToken,
uint256 newPrice
);
event ItemCanceled(address indexed owner, string bundleID);
event OfferCreated(
address indexed creator,
string bundleID,
address payToken,
uint256 price,
uint256 deadline
);
event OfferCanceled(address indexed creator, string bundleID);
event UpdatePlatformFee(uint256 platformFee);
event UpdatePlatformFeeRecipient(address payable platformFeeRecipient);
/// @notice Structure for Bundle Item Listing
struct Listing {
address[] nfts;
uint256[] tokenIds;
uint256[] quantities;
address payToken;
uint256 price;
uint256 startingTime;
}
/// @notice Structure for bundle offer
struct Offer {
IERC20 payToken;
uint256 price;
uint256 deadline;
}
bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd;
bytes4 private constant INTERFACE_ID_ERC1155 = 0xd9b67a26;
/// @notice Owner -> Bundle ID -> Bundle Listing item
mapping(address => mapping(bytes32 => Listing)) public listings;
/// @notice Bundle ID -> Wwner
mapping(bytes32 => address) public owners;
mapping(address => mapping(uint256 => EnumerableSet.Bytes32Set)) bundleIdsPerItem;
mapping(bytes32 => mapping(address => mapping(uint256 => uint256))) nftIndexes;
mapping(bytes32 => string) bundleIds;
/// @notice Bundle ID -> Offerer -> Offer
mapping(bytes32 => mapping(address => Offer)) public offers;
/// @notice Platform fee
uint256 public platformFee;
/// @notice reward token owner
address public rewardTokenOwner;
/// @notice reward token
IERC20 public RWT;
/// @notice reward fee
uint256 public rewardFee;
/// @notice Platform fee receipient
address payable public feeReceipient;
/// @notice Address registry
IXanaAddressRegistry public addressRegistry;
modifier onlyContract() {
}
/// @notice Contract initializer
function initialize(address payable _feeRecipient, uint256 _platformFee, IERC20 _RWT, address _rewardTokenOwner, IXanaAddressRegistry _addressRegistry, uint256 _rewardFee)
public
initializer
{
}
/// @notice Method for get NFT bundle listing
/// @param _owner Owner address
/// @param _bundleID Bundle ID
function getListing(address _owner, string memory _bundleID)
external
view
returns (
address[] memory nfts,
uint256[] memory tokenIds,
uint256[] memory quantities,
uint256 price,
uint256 startingTime
)
{
}
/// @notice Method for listing NFT bundle
/// @param _bundleID Bundle ID
/// @param _nftAddresses Addresses of NFT contract
/// @param _tokenIds Token IDs of NFT
/// @param _quantities token amounts to list (needed for ERC-1155 NFTs, set as 1 for ERC-721)
/// @param _price sale price for bundle
/// @param _startingTime scheduling for a future sale
function listItem(
string memory _bundleID,
address[] calldata _nftAddresses,
uint256[] calldata _tokenIds,
uint256[] calldata _quantities,
address _payToken,
uint256 _price,
uint256 _startingTime
) external {
}
/// @notice Method for canceling listed NFT bundle
function cancelListing(string memory _bundleID) external nonReentrant {
}
/// @notice Method for updating listed NFT bundle
/// @param _bundleID Bundle ID
/// @param _newPrice New sale price for bundle
function updateListing(
string memory _bundleID,
address _payToken,
uint256 _newPrice
) external nonReentrant {
}
/// @notice Method for buying listed NFT bundle
/// @param _bundleID Bundle ID
/* function buyItem(string memory _bundleID) external payable nonReentrant {
bytes32 bundleID = _getBundleID(_bundleID);
address owner = owners[bundleID];
require(owner != address(0), "invalid id");
Listing memory listing = listings[owner][bundleID];
require(listing.payToken == address(0), "invalid pay token");
require(msg.value >= listing.price, "insufficient balance to buy");
_buyItem(_bundleID, address(0));
} */
/// @notice Method for buying listed NFT bundle
/// @param _bundleID Bundle ID
function buyItem(string memory _bundleID, address _payToken)
external
nonReentrant
{
}
function _buyItem(string memory _bundleID, address _payToken) private {
}
/// @notice Method for offering bundle item
/// @param _bundleID Bundle ID
/// @param _payToken Paying token
/// @param _price Price
/// @param _deadline Offer expiration
function createOffer(
string memory _bundleID,
IERC20 _payToken,
uint256 _price,
uint256 _deadline
) external {
}
/// @notice Method for canceling the offer
/// @param _bundleID Bundle ID
function cancelOffer(string memory _bundleID) external {
}
/// @notice Method for accepting the offer
function acceptOffer(string memory _bundleID, address _creator)
external
nonReentrant
{
}
/**
@notice Method for updating platform fee
@dev Only admin
@param _platformFee uint256 the platform fee to set
*/
function updatePlatformFee(uint256 _platformFee) external onlyOwner {
}
/**
@notice Method for updating reward fee
@dev Only admin
@param _rewardFee uint256 the reward fee to set
*/
function updateBundleRewardFee(uint256 _rewardFee) external onlyOwner {
}
/**
@notice Method for updating platform fee address
@dev Only admin
@param _platformFeeRecipient payable address the address to sends the funds to
*/
function updatePlatformFeeRecipient(address payable _platformFeeRecipient)
external
onlyOwner
{
}
/**
@notice Update XanaAddressRegistry contract
@dev Only admin
*/
function updateAddressRegistry(address _registry) external onlyOwner {
}
/**
* @notice Validate and cancel listing
* @dev Only marketplace can access
*/
function validateItemSold(
address _nftAddress,
uint256 _tokenId,
uint256 _quantity
) external onlyContract {
}
////////////////////////////
/// Internal and Private ///
////////////////////////////
function _supportsInterface(address _addr, bytes4 iface)
internal
view
returns (bool)
{
}
function _check721Owning(
address _nft,
uint256 _tokenId,
address _owner
) internal view {
require(<FILL_ME>)
}
function _check1155Owning(
address _nft,
uint256 _tokenId,
uint256 _quantity,
address _owner
) internal view {
}
function _getNow() internal view virtual returns (uint256) {
}
function _cancelListing(address _owner, string memory _bundleID) private {
}
function _getBundleID(string memory _bundleID)
private
pure
returns (bytes32)
{
}
/// @notice Method for set Reward Token
/// @param _rwtTokenAddr Reward Token Address
function setBundleRWTAddr(address _rwtTokenAddr)
external
onlyOwner
{
}
/// @notice Method for set owner address
/// @param _rwtSenderAddr New owner address
function setBundleRWTSenderAddr(address _rwtSenderAddr)
external
onlyOwner
{
}
}
| IERC721(_nft).ownerOf(_tokenId)==_owner,"not owning item" | 287,461 | IERC721(_nft).ownerOf(_tokenId)==_owner |
"not owning item" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.12;
import "@openzeppelin/contracts/introspection/IERC165.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/EnumerableSet.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/ReentrancyGuardUpgradeable.sol";
interface IXanaAddressRegistry {
function auction() external view returns (address);
function marketplace() external view returns (address);
function tokenRegistry() external view returns (address);
}
interface IXanaMarketplace {
function validateItemSold(
address,
uint256,
address,
address
) external;
function getPrice(address) external view returns (int256);
}
interface IXanaTokenRegistry {
function enabled(address) external returns (bool);
}
contract XanaBundleMarketplace is
OwnableUpgradeable,
ReentrancyGuardUpgradeable
{
using SafeMath for uint256;
using AddressUpgradeable for address payable;
using SafeERC20 for IERC20;
using EnumerableSet for EnumerableSet.Bytes32Set;
/// @notice Events for the contract
event ItemListed(
address indexed owner,
string bundleID,
address payToken,
uint256 price,
uint256 startingTime
);
event ItemSold(
address indexed seller,
address indexed buyer,
string bundleID,
address payToken,
int256 unitPrice,
uint256 price
);
event ItemUpdated(
address indexed owner,
string bundleID,
address[] nft,
uint256[] tokenId,
uint256[] quantity,
address payToken,
uint256 newPrice
);
event ItemCanceled(address indexed owner, string bundleID);
event OfferCreated(
address indexed creator,
string bundleID,
address payToken,
uint256 price,
uint256 deadline
);
event OfferCanceled(address indexed creator, string bundleID);
event UpdatePlatformFee(uint256 platformFee);
event UpdatePlatformFeeRecipient(address payable platformFeeRecipient);
/// @notice Structure for Bundle Item Listing
struct Listing {
address[] nfts;
uint256[] tokenIds;
uint256[] quantities;
address payToken;
uint256 price;
uint256 startingTime;
}
/// @notice Structure for bundle offer
struct Offer {
IERC20 payToken;
uint256 price;
uint256 deadline;
}
bytes4 private constant INTERFACE_ID_ERC721 = 0x80ac58cd;
bytes4 private constant INTERFACE_ID_ERC1155 = 0xd9b67a26;
/// @notice Owner -> Bundle ID -> Bundle Listing item
mapping(address => mapping(bytes32 => Listing)) public listings;
/// @notice Bundle ID -> Wwner
mapping(bytes32 => address) public owners;
mapping(address => mapping(uint256 => EnumerableSet.Bytes32Set)) bundleIdsPerItem;
mapping(bytes32 => mapping(address => mapping(uint256 => uint256))) nftIndexes;
mapping(bytes32 => string) bundleIds;
/// @notice Bundle ID -> Offerer -> Offer
mapping(bytes32 => mapping(address => Offer)) public offers;
/// @notice Platform fee
uint256 public platformFee;
/// @notice reward token owner
address public rewardTokenOwner;
/// @notice reward token
IERC20 public RWT;
/// @notice reward fee
uint256 public rewardFee;
/// @notice Platform fee receipient
address payable public feeReceipient;
/// @notice Address registry
IXanaAddressRegistry public addressRegistry;
modifier onlyContract() {
}
/// @notice Contract initializer
function initialize(address payable _feeRecipient, uint256 _platformFee, IERC20 _RWT, address _rewardTokenOwner, IXanaAddressRegistry _addressRegistry, uint256 _rewardFee)
public
initializer
{
}
/// @notice Method for get NFT bundle listing
/// @param _owner Owner address
/// @param _bundleID Bundle ID
function getListing(address _owner, string memory _bundleID)
external
view
returns (
address[] memory nfts,
uint256[] memory tokenIds,
uint256[] memory quantities,
uint256 price,
uint256 startingTime
)
{
}
/// @notice Method for listing NFT bundle
/// @param _bundleID Bundle ID
/// @param _nftAddresses Addresses of NFT contract
/// @param _tokenIds Token IDs of NFT
/// @param _quantities token amounts to list (needed for ERC-1155 NFTs, set as 1 for ERC-721)
/// @param _price sale price for bundle
/// @param _startingTime scheduling for a future sale
function listItem(
string memory _bundleID,
address[] calldata _nftAddresses,
uint256[] calldata _tokenIds,
uint256[] calldata _quantities,
address _payToken,
uint256 _price,
uint256 _startingTime
) external {
}
/// @notice Method for canceling listed NFT bundle
function cancelListing(string memory _bundleID) external nonReentrant {
}
/// @notice Method for updating listed NFT bundle
/// @param _bundleID Bundle ID
/// @param _newPrice New sale price for bundle
function updateListing(
string memory _bundleID,
address _payToken,
uint256 _newPrice
) external nonReentrant {
}
/// @notice Method for buying listed NFT bundle
/// @param _bundleID Bundle ID
/* function buyItem(string memory _bundleID) external payable nonReentrant {
bytes32 bundleID = _getBundleID(_bundleID);
address owner = owners[bundleID];
require(owner != address(0), "invalid id");
Listing memory listing = listings[owner][bundleID];
require(listing.payToken == address(0), "invalid pay token");
require(msg.value >= listing.price, "insufficient balance to buy");
_buyItem(_bundleID, address(0));
} */
/// @notice Method for buying listed NFT bundle
/// @param _bundleID Bundle ID
function buyItem(string memory _bundleID, address _payToken)
external
nonReentrant
{
}
function _buyItem(string memory _bundleID, address _payToken) private {
}
/// @notice Method for offering bundle item
/// @param _bundleID Bundle ID
/// @param _payToken Paying token
/// @param _price Price
/// @param _deadline Offer expiration
function createOffer(
string memory _bundleID,
IERC20 _payToken,
uint256 _price,
uint256 _deadline
) external {
}
/// @notice Method for canceling the offer
/// @param _bundleID Bundle ID
function cancelOffer(string memory _bundleID) external {
}
/// @notice Method for accepting the offer
function acceptOffer(string memory _bundleID, address _creator)
external
nonReentrant
{
}
/**
@notice Method for updating platform fee
@dev Only admin
@param _platformFee uint256 the platform fee to set
*/
function updatePlatformFee(uint256 _platformFee) external onlyOwner {
}
/**
@notice Method for updating reward fee
@dev Only admin
@param _rewardFee uint256 the reward fee to set
*/
function updateBundleRewardFee(uint256 _rewardFee) external onlyOwner {
}
/**
@notice Method for updating platform fee address
@dev Only admin
@param _platformFeeRecipient payable address the address to sends the funds to
*/
function updatePlatformFeeRecipient(address payable _platformFeeRecipient)
external
onlyOwner
{
}
/**
@notice Update XanaAddressRegistry contract
@dev Only admin
*/
function updateAddressRegistry(address _registry) external onlyOwner {
}
/**
* @notice Validate and cancel listing
* @dev Only marketplace can access
*/
function validateItemSold(
address _nftAddress,
uint256 _tokenId,
uint256 _quantity
) external onlyContract {
}
////////////////////////////
/// Internal and Private ///
////////////////////////////
function _supportsInterface(address _addr, bytes4 iface)
internal
view
returns (bool)
{
}
function _check721Owning(
address _nft,
uint256 _tokenId,
address _owner
) internal view {
}
function _check1155Owning(
address _nft,
uint256 _tokenId,
uint256 _quantity,
address _owner
) internal view {
require(<FILL_ME>)
}
function _getNow() internal view virtual returns (uint256) {
}
function _cancelListing(address _owner, string memory _bundleID) private {
}
function _getBundleID(string memory _bundleID)
private
pure
returns (bytes32)
{
}
/// @notice Method for set Reward Token
/// @param _rwtTokenAddr Reward Token Address
function setBundleRWTAddr(address _rwtTokenAddr)
external
onlyOwner
{
}
/// @notice Method for set owner address
/// @param _rwtSenderAddr New owner address
function setBundleRWTSenderAddr(address _rwtSenderAddr)
external
onlyOwner
{
}
}
| IERC1155(_nft).balanceOf(_owner,_tokenId)>=_quantity,"not owning item" | 287,461 | IERC1155(_nft).balanceOf(_owner,_tokenId)>=_quantity |
"Purchase would exceed TCCC_MAX" | pragma solidity ^0.8.0;
/**
* @title Counters
* @author Matt Condon (@shrugs)
* @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number
* of elements in a mapping, issuing ERC721 ids, or counting request ids.
*
* Include with `using Counters for Counters.Counter;`
*/
library Counters {
struct Counter {
// This variable should never be directly accessed by users of the library: interactions must be restricted to
// the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
// this feature: see https://github.com/ethereum/solidity/issues/4637
uint256 _value; // default: 0
}
function current(Counter storage counter) internal view returns (uint256) {
}
function increment(Counter storage counter) internal {
}
function decrement(Counter storage counter) internal {
}
}
pragma solidity ^0.8.0;
contract TheCryptoCommaClub is ERC721Enumerable, Ownable {
using Counters for Counters.Counter;
using Strings for uint256;
address payable private _PaymentAddress = payable(0xBbD5798234E62C2e3c78eCd03aA1Ca051862E4fB);
uint256 public TCCC_MAX = 10000;
uint256 public PURCHASE_LIMIT = 5;
uint256 public PRICE = 200_000_000_000_000_000; // 0.2 ETH
uint256 private _activeDateTime = 1634515200; // Date and time (GMT): Monday, October 18, 2021 12:00:00 AM
string private _contractURI = "";
string private _tokenBaseURI1 = "";
string private _tokenBaseURI2 = "";
string private _tokenBaseURI3 = "";
string private _tokenBaseURI4 = "";
string private _tokenBaseURI5 = "";
string private _tokenBaseURI6 = "";
Counters.Counter private _publicTCCC;
constructor() ERC721("The Crypto Comma Club", "TCCC") {}
function setPaymentAddress(address paymentAddress) external onlyOwner {
}
function setActiveDateTime(uint256 activeDateTime) external onlyOwner {
}
function setContractURI(string memory URI) external onlyOwner {
}
function setBaseURI(
string memory URI1,
string memory URI2,
string memory URI3,
string memory URI4,
string memory URI5,
string memory URI6
) external onlyOwner {
}
function setMintPrice(uint256 mintPrice) external onlyOwner {
}
function setPurchaseLimit(uint256 purchaseLimit) external onlyOwner {
}
function setMaxLimit(uint256 maxLimit) external onlyOwner {
}
function gift(address to, uint256 numberOfTokens) external onlyOwner {
}
function purchase(uint256 numberOfTokens) external payable {
require(
numberOfTokens <= PURCHASE_LIMIT,
"Can only mint up to purchase limit"
);
require(<FILL_ME>)
if (msg.sender != owner()) {
require(
block.timestamp > _activeDateTime,
"Contract is not active"
);
require(
PRICE * numberOfTokens <= msg.value,
"ETH amount is not sufficient"
);
_PaymentAddress.transfer(msg.value);
}
for (uint256 i = 0; i < numberOfTokens; i++) {
uint256 tokenId = _publicTCCC.current();
if (_publicTCCC.current() < TCCC_MAX) {
_publicTCCC.increment();
_safeMint(msg.sender, tokenId);
}
}
}
function contractURI() public view returns (string memory) {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721)
returns (string memory)
{
}
function withdraw() external onlyOwner {
}
}
| _publicTCCC.current()<TCCC_MAX,"Purchase would exceed TCCC_MAX" | 287,660 | _publicTCCC.current()<TCCC_MAX |
null | // 69696969 69696969
// 6969 696969 696969 6969
// 969 69 6969696 6969 6969 696
// 969 696969696 696969696969 696
// 969 69696969696 6969696969696 696
// 696 9696969696969 969696969696 969
// 696 696969696969 969696969 969
// 696 696 96969 _=_ 9696969 69 696
// 9696 969696 q(-_-)p 696969 6969
// 96969696 '_) (_` 69696969
// 96 /__/ \ 69
// 69 _(<_ / )_ 96
// 6969 (__\_\_|_/__) 9696
// __ ___ ___ _______ __ ________ _____ _______ _____ _____ _____
// \ \ / / | | \ \ / /_ _| /\ \ \ / / ____|/ ____|__ __|_ _/ ____|_ _| /\
// \ \ /\ / /| | | |\ V / | | / \ \ \ / /| |__ | (___ | | | || | __ | | / \
// \ \/ \/ / | | | | > < | | / /\ \ \ \/ / | __| \___ \ | | | || | |_ | | | / /\ \
// \ /\ / | |__| |/ . \ _| |_ / ____ \ \ / | |____ ____) | | | _| || |__| |_| |_ / ____ \
// \/ \/ \____//_/ \_\_____/_/ \_\ \/ |______|_____/ |_| |_____\_____|_____/_/ \_\
// Wuxia Vestigia introduces randomized Chinese martial art legendary gears and a newly imagined Wuxia Universe built by the community.
// Stats, images, martial art moves, and other functionality are intentionally omitted for others to interpret.
// Feel free to use Wuxia Vestigia in any way you want.
// Wuxia Vestigia is free to mint, max 20 per transaction, directly from contract.
// 一个由社区锻造的新武侠世界
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract WUXIA_VESTIGIA is ERC721Enumerable, Ownable, RandomlyAssigned {
using Strings for uint256;
string public baseExtension = ".json";
uint256 public cost = 0.00 ether;
uint256 public maxXIA = 7800;
uint256 public maxMintAmount = 20;
bool public paused = false;
string public baseURI = "https://ipfs.io/ipfs/QmV22U14yj3RaUoCvocR3GUYs2NDzQ2SKJHSUDZHfN8uRd/";
constructor(
) ERC721("Wuxia Vestigia", "XIA")
RandomlyAssigned(7800, 1) {}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmount) public payable {
require(!paused);
require(_mintAmount > 0);
require(_mintAmount <= maxMintAmount);
require(<FILL_ME>)
require(msg.value >= cost * _mintAmount);
for (uint256 i = 1; i <= _mintAmount; i++) {
uint256 mintIndex = nextToken();
if (totalSupply() < maxXIA) {
_safeMint(_msgSender(), mintIndex);
}
}
}
function walletOfOwner(address _owner)
public
view
returns (uint256[] memory)
{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function withdraw() public payable onlyOwner {
}
}
| totalSupply()+_mintAmount<=maxXIA | 287,693 | totalSupply()+_mintAmount<=maxXIA |
"4" | // SPDX-License-Identifier: GPL-3.0
// Author: Pagzi Tech Inc. | 2021
pragma solidity ^0.8.10;
import "./pagzi/ERC721Enum.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract MetaMobs is ERC721Enum, Ownable, PaymentSplitter, ReentrancyGuard {
using Strings for uint256;
string public baseURI;
uint256 public cost = 0.045 ether;
uint256 public maxMobs = 3333;
uint256 public maxMint = 50;
bool public paused = false;
mapping(address => bool) public whitelisted;
address[] private addressList = [
0x2d0F4bcD4D2f08FAbD5a9e6Ed7c7eE86aFC3B73f,
0x723eC21b513b9cc7c9ED7838e10d640de0b9d0fa
];
uint[] private shareList = [25,75];
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721P(_name, _symbol)
PaymentSplitter( addressList, shareList ){
}
// internal
function _baseURI() internal view virtual returns (string memory) {
}
// public
function mint(address _to, uint256 _mintAmount) public payable nonReentrant{
uint256 s = totalSupply();
require(!paused, "1" );
require(_mintAmount > 0, "2" );
require(_mintAmount <= maxMint, "3" );
require(<FILL_ME>)
if (msg.sender != owner()) {
if(whitelisted[msg.sender] != true) {
require(msg.value >= cost * _mintAmount);
}
}
for (uint256 i = 0; i < _mintAmount; ++i) {
_safeMint(_to, s + i, "");
}
}
function gift(uint[] calldata quantity, address[] calldata recipient) external onlyOwner{
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function setCost(uint256 _newCost) public onlyOwner {
}
function setMaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setMaxMobs(uint256 _newMaxMobs) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function whitelistMob(address _user) public onlyOwner {
}
function removeWLMob(address _user) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| s+_mintAmount<=maxMobs,"4" | 287,989 | s+_mintAmount<=maxMobs |
"Too many" | // SPDX-License-Identifier: GPL-3.0
// Author: Pagzi Tech Inc. | 2021
pragma solidity ^0.8.10;
import "./pagzi/ERC721Enum.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract MetaMobs is ERC721Enum, Ownable, PaymentSplitter, ReentrancyGuard {
using Strings for uint256;
string public baseURI;
uint256 public cost = 0.045 ether;
uint256 public maxMobs = 3333;
uint256 public maxMint = 50;
bool public paused = false;
mapping(address => bool) public whitelisted;
address[] private addressList = [
0x2d0F4bcD4D2f08FAbD5a9e6Ed7c7eE86aFC3B73f,
0x723eC21b513b9cc7c9ED7838e10d640de0b9d0fa
];
uint[] private shareList = [25,75];
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721P(_name, _symbol)
PaymentSplitter( addressList, shareList ){
}
// internal
function _baseURI() internal view virtual returns (string memory) {
}
// public
function mint(address _to, uint256 _mintAmount) public payable nonReentrant{
}
function gift(uint[] calldata quantity, address[] calldata recipient) external onlyOwner{
require(quantity.length == recipient.length, "Provide quantities and recipients" );
uint totalQuantity = 0;
uint256 s = totalSupply();
for(uint i = 0; i < quantity.length; ++i){
totalQuantity += quantity[i];
}
require(<FILL_ME>)
delete totalQuantity;
for(uint i = 0; i < recipient.length; ++i){
for(uint j = 0; j < quantity[i]; ++j){
_safeMint( recipient[i], s++, "" );
}
}
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
//only owner
function setCost(uint256 _newCost) public onlyOwner {
}
function setMaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
function setMaxMobs(uint256 _newMaxMobs) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function whitelistMob(address _user) public onlyOwner {
}
function removeWLMob(address _user) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| s+totalQuantity<=maxMobs,"Too many" | 287,989 | s+totalQuantity<=maxMobs |
null | contract RainbowSquared is ERC721Enumerable, Ownable {
using Strings for uint256;
string public baseURI;
string public baseExtension = ".json";
uint256 public NFT_PRICE = 0.02 ether;
uint256 public MAX_SUPPLY = 10000;
uint256 public MAX_NFT_PURCHASE = 20;
bool public paused = false;
constructor(
string memory _name,
string memory _symbol,
string memory _initBaseURI
) ERC721(_name, _symbol) {
}
// internal
function _baseURI() internal view virtual override returns (string memory) {
}
// public
function mint(uint256 _mintAmountMax20) public payable {
uint256 supply = totalSupply();
require(!paused);
require(_mintAmountMax20 > 0);
require(_mintAmountMax20 <= MAX_NFT_PURCHASE);
require(<FILL_ME>)
if (msg.sender != owner()) {
require(msg.value >= NFT_PRICE * _mintAmountMax20);
}
for (uint256 i = 1; i <= _mintAmountMax20; 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 setCost(uint256 _newCost) public onlyOwner() {
}
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function pause(bool _state) public onlyOwner {
}
function withdraw() public payable onlyOwner {
}
}
| supply+_mintAmountMax20<=MAX_SUPPLY | 288,008 | supply+_mintAmountMax20<=MAX_SUPPLY |
"Supply exceeded!" | pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
pragma solidity >=0.6.0 <0.8.0;
contract ChunkyBunnies is ERC721, Ownable {
using SafeMath for uint256;
uint256 private _price = 30000000000000000;
bool private _paused = true;
uint private _reserve = 100;
uint private _presalemax = 1200;
bool private _presale = false;
mapping (address => uint) public presalebunnies;
address _t1 = 0xE6306EB16d3F4ACbddfE68BcF3E473E085762716;
address _t2 = 0x00Ec891371BBD69d4cc75F6a55DcD9792a6f0Be6;
constructor(string memory _baseURI) ERC721('Chunky Bunnies', 'ChunkyBunnies') {
}
//MINT x amount of bunnies
function mint(uint256 _num) public payable {
uint supply = totalSupply();
require(!_paused, "Minting is currently paused!");
require(_num < 21, "You can only mint 20 Bunnies with each transaction!");
require(<FILL_ME>)
require(msg.value >= _price * _num, "ETH sent not correct!");
for(uint i = 0; i < _num; i++) {
_safeMint(msg.sender, supply+i);
}
}
function premint(uint256 _num) public payable {
}
function setPresale(bool _value) public onlyOwner {
}
//GIVEAWAY x tokens to specific address
function giveAway(address _to, uint256 _num) external onlyOwner() {
}
//CHANGE PAUSE STATE
function pause(bool _value) public onlyOwner {
}
//GET PRICE
function getPrice() public view returns (uint256) {
}
//RETURN ALL TOKENS OF A SPECIFIC ADDRESS
function walletOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
//WITHDRAW CONTRACT BALANCE TO DEFINED ADDRESS
function withdraw() public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
}
| supply+_num<6000-_reserve,"Supply exceeded!" | 288,037 | supply+_num<6000-_reserve |
"Exceeds the amount allowed for each wallet!" | pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
}
}
pragma solidity >=0.6.0 <0.8.0;
contract ChunkyBunnies is ERC721, Ownable {
using SafeMath for uint256;
uint256 private _price = 30000000000000000;
bool private _paused = true;
uint private _reserve = 100;
uint private _presalemax = 1200;
bool private _presale = false;
mapping (address => uint) public presalebunnies;
address _t1 = 0xE6306EB16d3F4ACbddfE68BcF3E473E085762716;
address _t2 = 0x00Ec891371BBD69d4cc75F6a55DcD9792a6f0Be6;
constructor(string memory _baseURI) ERC721('Chunky Bunnies', 'ChunkyBunnies') {
}
//MINT x amount of bunnies
function mint(uint256 _num) public payable {
}
function premint(uint256 _num) public payable {
uint supply = totalSupply();
require(_presale, "Presale is not active!");
require(_num <= _presalemax, "Supply exceeded!");
require(supply + _num < 6000-_reserve, "Supply exceeded!");
require(_num < 21, "You can only mint 20 Bunnies with each transaction!");
require(<FILL_ME>)
require(msg.value >= _price * _num, "ETH sent not correct!");
for(uint i = 0; i < _num; i++) {
_safeMint(msg.sender, supply+i);
}
presalebunnies[msg.sender]+=_num;
_presalemax -=_num;
}
function setPresale(bool _value) public onlyOwner {
}
//GIVEAWAY x tokens to specific address
function giveAway(address _to, uint256 _num) external onlyOwner() {
}
//CHANGE PAUSE STATE
function pause(bool _value) public onlyOwner {
}
//GET PRICE
function getPrice() public view returns (uint256) {
}
//RETURN ALL TOKENS OF A SPECIFIC ADDRESS
function walletOfOwner(address _owner)
external
view
returns (uint256[] memory)
{
}
//WITHDRAW CONTRACT BALANCE TO DEFINED ADDRESS
function withdraw() public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
}
| presalebunnies[msg.sender]+_num<31,"Exceeds the amount allowed for each wallet!" | 288,037 | presalebunnies[msg.sender]+_num<31 |
"Purchase would exceed max supply of Pawns" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
contract KyokoPawnV2 is
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
OwnableUpgradeable
{
using SafeMathUpgradeable for uint256;
using SafeERC20Upgradeable for IERC20Upgradeable;
uint256 public pawnPrice;
uint256 public constant MAX_PAWN = 1000;
uint256 public constant maxPawnPurchase = 10;
bool public saleIsActive;
string private _baseURIextended;
address public multiSign;
address public applyToken;
struct INFO {
address adr;
uint8 amount;
}
mapping(address => uint256) public preSales;
function initialize(address _multiSign) public initializer {
}
function setPreSales(INFO[] memory _whiteList) public onlyOwner {
}
function setPreSale(address _adr, uint256 _amount) public onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
returns (bool)
{
}
/*
* Pause sale if active, make active if paused
*/
function setSaleState() public onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setApplyToken(address _applyToken) external onlyOwner {
}
function setPawnPrice(uint256 _price) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function mintPawnForSales(uint256 _number) public payable {
require(saleIsActive, "Sale must be active to mint Pawn");
require(
_number <= maxPawnPurchase,
"Can only mint 10 tokens at a time"
);
require(<FILL_ME>)
uint256 totalCost = pawnPrice.mul(_number);
IERC20Upgradeable(applyToken).safeTransferFrom(
msg.sender,
multiSign,
totalCost
);
for (uint256 i = 0; i < _number; i++) {
uint256 mintIndex = totalSupply();
if (mintIndex < MAX_PAWN) {
_mint(msg.sender, mintIndex);
}
}
}
modifier checkScles() {
}
function mintPawn() public checkScles {
}
}
| totalSupply().add(_number)<=MAX_PAWN,"Purchase would exceed max supply of Pawns" | 288,047 | totalSupply().add(_number)<=MAX_PAWN |
"You are not on the white list" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol";
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
contract KyokoPawnV2 is
ERC721Upgradeable,
ERC721EnumerableUpgradeable,
OwnableUpgradeable
{
using SafeMathUpgradeable for uint256;
using SafeERC20Upgradeable for IERC20Upgradeable;
uint256 public pawnPrice;
uint256 public constant MAX_PAWN = 1000;
uint256 public constant maxPawnPurchase = 10;
bool public saleIsActive;
string private _baseURIextended;
address public multiSign;
address public applyToken;
struct INFO {
address adr;
uint8 amount;
}
mapping(address => uint256) public preSales;
function initialize(address _multiSign) public initializer {
}
function setPreSales(INFO[] memory _whiteList) public onlyOwner {
}
function setPreSale(address _adr, uint256 _amount) public onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal override(ERC721Upgradeable, ERC721EnumerableUpgradeable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
returns (bool)
{
}
/*
* Pause sale if active, make active if paused
*/
function setSaleState() public onlyOwner {
}
function setBaseURI(string memory baseURI_) external onlyOwner {
}
function setApplyToken(address _applyToken) external onlyOwner {
}
function setPawnPrice(uint256 _price) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function mintPawnForSales(uint256 _number) public payable {
}
modifier checkScles() {
require(<FILL_ME>)
_;
}
function mintPawn() public checkScles {
}
}
| preSales[msg.sender]>0,"You are not on the white list" | 288,047 | preSales[msg.sender]>0 |
"AINT YO TOKEN" | // SPDX-License-Identifier: MIT LICENSE
pragma solidity ^0.8.0;
import "./IERC721Receiver.sol";
import "./Pausable.sol";
import "./Goat.sol";
import "./EGGS.sol";
contract Isle is Ownable, IERC721Receiver, Pausable {
// maximum alpha score for a Goat
uint8 public constant MAX_ALPHA = 8;
bool lock;
// struct to store a stake's token, owner, and earning values
struct Stake {
uint16 tokenId;
uint80 value;
address owner;
}
event TokenStaked(address owner, uint256 tokenId, uint256 value);
event TortoiseClaimed(uint256 tokenId, uint256 earned, bool unstaked);
event GoatClaimed(uint256 tokenId, uint256 earned, bool unstaked);
// reference to the Goat NFT contract
Goat goat;
// reference to the $EGGS contract for minting $EGGS earnings
EGGS eggs;
//Tokens in STAKING
mapping(address => mapping(uint256 => uint256)) public mymap;
uint256 contador;
mapping(address => uint256) public contadorArr;
//End Tokens in STAKING
// maps tokenId to stake
mapping(uint256 => Stake) public isle;
// maps alpha to all Goat stakes with that alpha
mapping(uint256 => Stake[]) public pack;
// tracks location of each Goat in Pack
mapping(uint256 => uint256) public packIndices;
// total alpha scores staked
uint256 public totalAlphaStaked = 0;
// any rewards distributed when no wolves are staked
uint256 public unaccountedRewards = 0;
// amount of $EGGS due for each alpha point staked
uint256 public eggsPerAlpha = 0;
// totalNFT staked
uint256 public totalNFT;
// tortoise earn 10000 $EGGS per day
uint256 public constant DAILY_EGGS_RATE = 10000 ether;
// tortoise must have 2 days worth of $EGGS to unstake or else it's too cold
//uint256 public constant MINIMUM_TO_EXIT = 2 days;
uint256 public constant MINIMUM_TO_EXIT = 2 days;
// Goat take a 20% tax on all $EGGS claimed
uint256 public constant EGGS_CLAIM_TAX_PERCENTAGE = 20;
// there will only ever be (roughly) 2.4 billion $EGGS earned through staking
uint256 public constant MAXIMUM_GLOBAL_EGGS = 2400000000 ether;
// amount of $EGGS earned so far
uint256 public totalEggsEarned;
// number of Tortoise staked in the Isle
uint256 public totalTortoiseStaked;
// the last time $EGGS was claimed
uint256 public lastClaimTimestamp;
// emergency rescue to allow unstaking without any checks but without $EGGS
bool public rescueEnabled = false;
/**
* @param _goat reference to the Tortoise NFT contract
* @param _eggs reference to the $EGGS token
*/
constructor(address _goat, address _eggs) {
}
/** STAKING */
/**
* adds Tortoises and Goats to the Isle and Pack
* @param account the address of the staker
* @param tokenIds the IDs of the Tortoises and Goats to stake
*/
function addManyToIsleAndPack(address account, uint16[] calldata tokenIds) external {
require(account == _msgSender() || _msgSender() == address(goat), "DONT GIVE YOUR TOKENS AWAY");
for (uint i = 0; i < tokenIds.length; i++) {
if (_msgSender() != address(goat)) { // dont do this step if its a mint + stake
require(<FILL_ME>)
goat.transferFrom(_msgSender(), address(this), tokenIds[i]);
} else if (tokenIds[i] == 0) {
continue; // there may be gaps in the array for stolen tokens
}
if (isTortoise(tokenIds[i]))
_addTortoiseToIsle(account, tokenIds[i]);
else
_addGoatToPack(account, tokenIds[i]);
}
}
/**
* adds a single Tortoise to the Isle
* @param account the address of the staker
* @param tokenId the ID of the Tortoise to add to the Isle
*/
function _addTortoiseToIsle(address account, uint256 tokenId) internal whenNotPaused _updateEarnings {
}
/**
* adds a single Goat to the Pack
* @param account the address of the staker
* @param tokenId the ID of the Goat to add to the Pack
*/
function _addGoatToPack(address account, uint256 tokenId) internal {
}
/** CLAIMING / UNSTAKING */
/**
* realize $EGGS earnings and optionally unstake tokens from the Isle / Pack
* to unstake a Tortoise it will require it has 2 days worth of $EGGS unclaimed
* @param tokenIds the IDs of the tokens to claim earnings from
* @param unstake whether or not to unstake ALL of the tokens listed in tokenIds
*/
function claimManyFromIsleAndPack(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings {
}
/**
* realize $EGGS earnings for a single Tortoise and optionally unstake it
* if not unstaking, pay a 20% tax to the staked Goats
* if unstaking, there is a 50% chance all $EGGS is stolen
* @param tokenId the ID of the Tortoise to claim earnings from
* @param unstake whether or not to unstake the Tortoise
* @return owed - the amount of $EGGS earned
*/
function _claimTortoiseFromIsle(uint256 tokenId, bool unstake) internal returns (uint256 owed) {
}
/**
* realize $EGGS earnings for a single Goat and optionally unstake it
* Wolves earn $EGGS proportional to their Alpha rank
* @param tokenId the ID of the Goat to claim earnings from
* @param unstake whether or not to unstake the Goat
* @return owed - the amount of $EGGS earned
*/
function _claimGoatFromPack(uint256 tokenId, bool unstake) internal returns (uint256 owed) {
}
/**
* emergency unstake tokens
* @param tokenIds the IDs of the tokens to claim earnings from
*/
function rescue(uint256[] calldata tokenIds) external {
}
/** ACCOUNTING */
/**
* add $EGGS to claimable pot for the Pack
* @param amount $EGGS to add to the pot
*/
function _payGoatTax(uint256 amount) internal {
}
/**
* tracks $EGGS earnings to ensure it stops once 2.4 billion is eclipsed
*/
modifier _updateEarnings() {
}
/** ADMIN */
/**
* allows owner to enable "rescue mode"
* simplifies accounting, prioritizes tokens out in emergency
*/
function setRescueEnabled(bool _enabled) external onlyOwner {
}
/**
* enables owner to pause / unpause minting
*/
function setPaused(bool _paused) external onlyOwner {
}
/** READ ONLY */
/**
* checks if a token is a Tortoise
* @param tokenId the ID of the token to check
* @return tortoise - whether or not a token is a Tortoise
*/
function isTortoise(uint256 tokenId) public view returns (bool tortoise) {
}
/**
* gets the alpha score for a Goat
* @param tokenId the ID of the Goat to get the alpha score for
* @return the alpha score of the Goat (5-8)
*/
function _alphaForGoat(uint256 tokenId) internal view returns (uint8) {
}
/**
* chooses a random Goat thief when a newly minted token is stolen
* @param seed a random value to choose a Goat from
* @return the owner of the randomly selected Goat thief
*/
function randomGoatOwner(uint256 seed) external view returns (address) {
}
/**
* generates a pseudorandom number
* @param seed a value ensure different outcomes for different sources in the same block
* @return a pseudorandom value
*/
function random(uint256 seed) internal view returns (uint256) {
}
function onERC721Received(
address,
address from,
uint256,
bytes calldata
) external pure override returns (bytes4) {
}
function _addNFT(address _address, uint256 tokenId) internal {
}
function _deleNFT(address _address, uint256 tokenId) internal {
}
function searchNFT(address _address) public view returns(uint[] memory) {
}
}
| goat.ownerOf(tokenIds[i])==_msgSender(),"AINT YO TOKEN" | 288,076 | goat.ownerOf(tokenIds[i])==_msgSender() |
"GONNA BE COLD WITHOUT TWO DAY'S EGGS" | // SPDX-License-Identifier: MIT LICENSE
pragma solidity ^0.8.0;
import "./IERC721Receiver.sol";
import "./Pausable.sol";
import "./Goat.sol";
import "./EGGS.sol";
contract Isle is Ownable, IERC721Receiver, Pausable {
// maximum alpha score for a Goat
uint8 public constant MAX_ALPHA = 8;
bool lock;
// struct to store a stake's token, owner, and earning values
struct Stake {
uint16 tokenId;
uint80 value;
address owner;
}
event TokenStaked(address owner, uint256 tokenId, uint256 value);
event TortoiseClaimed(uint256 tokenId, uint256 earned, bool unstaked);
event GoatClaimed(uint256 tokenId, uint256 earned, bool unstaked);
// reference to the Goat NFT contract
Goat goat;
// reference to the $EGGS contract for minting $EGGS earnings
EGGS eggs;
//Tokens in STAKING
mapping(address => mapping(uint256 => uint256)) public mymap;
uint256 contador;
mapping(address => uint256) public contadorArr;
//End Tokens in STAKING
// maps tokenId to stake
mapping(uint256 => Stake) public isle;
// maps alpha to all Goat stakes with that alpha
mapping(uint256 => Stake[]) public pack;
// tracks location of each Goat in Pack
mapping(uint256 => uint256) public packIndices;
// total alpha scores staked
uint256 public totalAlphaStaked = 0;
// any rewards distributed when no wolves are staked
uint256 public unaccountedRewards = 0;
// amount of $EGGS due for each alpha point staked
uint256 public eggsPerAlpha = 0;
// totalNFT staked
uint256 public totalNFT;
// tortoise earn 10000 $EGGS per day
uint256 public constant DAILY_EGGS_RATE = 10000 ether;
// tortoise must have 2 days worth of $EGGS to unstake or else it's too cold
//uint256 public constant MINIMUM_TO_EXIT = 2 days;
uint256 public constant MINIMUM_TO_EXIT = 2 days;
// Goat take a 20% tax on all $EGGS claimed
uint256 public constant EGGS_CLAIM_TAX_PERCENTAGE = 20;
// there will only ever be (roughly) 2.4 billion $EGGS earned through staking
uint256 public constant MAXIMUM_GLOBAL_EGGS = 2400000000 ether;
// amount of $EGGS earned so far
uint256 public totalEggsEarned;
// number of Tortoise staked in the Isle
uint256 public totalTortoiseStaked;
// the last time $EGGS was claimed
uint256 public lastClaimTimestamp;
// emergency rescue to allow unstaking without any checks but without $EGGS
bool public rescueEnabled = false;
/**
* @param _goat reference to the Tortoise NFT contract
* @param _eggs reference to the $EGGS token
*/
constructor(address _goat, address _eggs) {
}
/** STAKING */
/**
* adds Tortoises and Goats to the Isle and Pack
* @param account the address of the staker
* @param tokenIds the IDs of the Tortoises and Goats to stake
*/
function addManyToIsleAndPack(address account, uint16[] calldata tokenIds) external {
}
/**
* adds a single Tortoise to the Isle
* @param account the address of the staker
* @param tokenId the ID of the Tortoise to add to the Isle
*/
function _addTortoiseToIsle(address account, uint256 tokenId) internal whenNotPaused _updateEarnings {
}
/**
* adds a single Goat to the Pack
* @param account the address of the staker
* @param tokenId the ID of the Goat to add to the Pack
*/
function _addGoatToPack(address account, uint256 tokenId) internal {
}
/** CLAIMING / UNSTAKING */
/**
* realize $EGGS earnings and optionally unstake tokens from the Isle / Pack
* to unstake a Tortoise it will require it has 2 days worth of $EGGS unclaimed
* @param tokenIds the IDs of the tokens to claim earnings from
* @param unstake whether or not to unstake ALL of the tokens listed in tokenIds
*/
function claimManyFromIsleAndPack(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings {
}
/**
* realize $EGGS earnings for a single Tortoise and optionally unstake it
* if not unstaking, pay a 20% tax to the staked Goats
* if unstaking, there is a 50% chance all $EGGS is stolen
* @param tokenId the ID of the Tortoise to claim earnings from
* @param unstake whether or not to unstake the Tortoise
* @return owed - the amount of $EGGS earned
*/
function _claimTortoiseFromIsle(uint256 tokenId, bool unstake) internal returns (uint256 owed) {
require(!lock);
lock = true;
Stake memory stake = isle[tokenId];
require(stake.owner == _msgSender(), "SWIPER, NO SWIPING");
require(<FILL_ME>)
if (totalEggsEarned < MAXIMUM_GLOBAL_EGGS) {
owed = (block.timestamp - stake.value) * DAILY_EGGS_RATE / 1 days;
} else if (stake.value > lastClaimTimestamp) {
owed = 0; // $EGGS production stopped already
} else {
owed = (lastClaimTimestamp - stake.value) * DAILY_EGGS_RATE / 1 days; // stop earning additional $EGGS if it's all been earned
}
if (unstake) {
if (random(tokenId) & 1 == 1) { // 50% chance of all $EGGS stolen
_payGoatTax(owed);
owed = 0;
}
goat.safeTransferFrom(address(this), _msgSender(), tokenId, ""); // send back Tortoise
delete isle[tokenId];
totalTortoiseStaked -= 1;
totalNFT -= 1;
_deleNFT(_msgSender(),tokenId);
} else {
_payGoatTax(owed * EGGS_CLAIM_TAX_PERCENTAGE / 100); // percentage tax to staked goats
owed = owed * (100 - EGGS_CLAIM_TAX_PERCENTAGE) / 100; // remainder goes to goat owner
isle[tokenId] = Stake({
owner: _msgSender(),
tokenId: uint16(tokenId),
value: uint80(block.timestamp)
}); // reset stake
}
emit TortoiseClaimed(tokenId, owed, unstake);
lock = false;
}
/**
* realize $EGGS earnings for a single Goat and optionally unstake it
* Wolves earn $EGGS proportional to their Alpha rank
* @param tokenId the ID of the Goat to claim earnings from
* @param unstake whether or not to unstake the Goat
* @return owed - the amount of $EGGS earned
*/
function _claimGoatFromPack(uint256 tokenId, bool unstake) internal returns (uint256 owed) {
}
/**
* emergency unstake tokens
* @param tokenIds the IDs of the tokens to claim earnings from
*/
function rescue(uint256[] calldata tokenIds) external {
}
/** ACCOUNTING */
/**
* add $EGGS to claimable pot for the Pack
* @param amount $EGGS to add to the pot
*/
function _payGoatTax(uint256 amount) internal {
}
/**
* tracks $EGGS earnings to ensure it stops once 2.4 billion is eclipsed
*/
modifier _updateEarnings() {
}
/** ADMIN */
/**
* allows owner to enable "rescue mode"
* simplifies accounting, prioritizes tokens out in emergency
*/
function setRescueEnabled(bool _enabled) external onlyOwner {
}
/**
* enables owner to pause / unpause minting
*/
function setPaused(bool _paused) external onlyOwner {
}
/** READ ONLY */
/**
* checks if a token is a Tortoise
* @param tokenId the ID of the token to check
* @return tortoise - whether or not a token is a Tortoise
*/
function isTortoise(uint256 tokenId) public view returns (bool tortoise) {
}
/**
* gets the alpha score for a Goat
* @param tokenId the ID of the Goat to get the alpha score for
* @return the alpha score of the Goat (5-8)
*/
function _alphaForGoat(uint256 tokenId) internal view returns (uint8) {
}
/**
* chooses a random Goat thief when a newly minted token is stolen
* @param seed a random value to choose a Goat from
* @return the owner of the randomly selected Goat thief
*/
function randomGoatOwner(uint256 seed) external view returns (address) {
}
/**
* generates a pseudorandom number
* @param seed a value ensure different outcomes for different sources in the same block
* @return a pseudorandom value
*/
function random(uint256 seed) internal view returns (uint256) {
}
function onERC721Received(
address,
address from,
uint256,
bytes calldata
) external pure override returns (bytes4) {
}
function _addNFT(address _address, uint256 tokenId) internal {
}
function _deleNFT(address _address, uint256 tokenId) internal {
}
function searchNFT(address _address) public view returns(uint[] memory) {
}
}
| !(unstake&&block.timestamp-stake.value<MINIMUM_TO_EXIT),"GONNA BE COLD WITHOUT TWO DAY'S EGGS" | 288,076 | !(unstake&&block.timestamp-stake.value<MINIMUM_TO_EXIT) |
"AINT A PART OF THE PACK" | // SPDX-License-Identifier: MIT LICENSE
pragma solidity ^0.8.0;
import "./IERC721Receiver.sol";
import "./Pausable.sol";
import "./Goat.sol";
import "./EGGS.sol";
contract Isle is Ownable, IERC721Receiver, Pausable {
// maximum alpha score for a Goat
uint8 public constant MAX_ALPHA = 8;
bool lock;
// struct to store a stake's token, owner, and earning values
struct Stake {
uint16 tokenId;
uint80 value;
address owner;
}
event TokenStaked(address owner, uint256 tokenId, uint256 value);
event TortoiseClaimed(uint256 tokenId, uint256 earned, bool unstaked);
event GoatClaimed(uint256 tokenId, uint256 earned, bool unstaked);
// reference to the Goat NFT contract
Goat goat;
// reference to the $EGGS contract for minting $EGGS earnings
EGGS eggs;
//Tokens in STAKING
mapping(address => mapping(uint256 => uint256)) public mymap;
uint256 contador;
mapping(address => uint256) public contadorArr;
//End Tokens in STAKING
// maps tokenId to stake
mapping(uint256 => Stake) public isle;
// maps alpha to all Goat stakes with that alpha
mapping(uint256 => Stake[]) public pack;
// tracks location of each Goat in Pack
mapping(uint256 => uint256) public packIndices;
// total alpha scores staked
uint256 public totalAlphaStaked = 0;
// any rewards distributed when no wolves are staked
uint256 public unaccountedRewards = 0;
// amount of $EGGS due for each alpha point staked
uint256 public eggsPerAlpha = 0;
// totalNFT staked
uint256 public totalNFT;
// tortoise earn 10000 $EGGS per day
uint256 public constant DAILY_EGGS_RATE = 10000 ether;
// tortoise must have 2 days worth of $EGGS to unstake or else it's too cold
//uint256 public constant MINIMUM_TO_EXIT = 2 days;
uint256 public constant MINIMUM_TO_EXIT = 2 days;
// Goat take a 20% tax on all $EGGS claimed
uint256 public constant EGGS_CLAIM_TAX_PERCENTAGE = 20;
// there will only ever be (roughly) 2.4 billion $EGGS earned through staking
uint256 public constant MAXIMUM_GLOBAL_EGGS = 2400000000 ether;
// amount of $EGGS earned so far
uint256 public totalEggsEarned;
// number of Tortoise staked in the Isle
uint256 public totalTortoiseStaked;
// the last time $EGGS was claimed
uint256 public lastClaimTimestamp;
// emergency rescue to allow unstaking without any checks but without $EGGS
bool public rescueEnabled = false;
/**
* @param _goat reference to the Tortoise NFT contract
* @param _eggs reference to the $EGGS token
*/
constructor(address _goat, address _eggs) {
}
/** STAKING */
/**
* adds Tortoises and Goats to the Isle and Pack
* @param account the address of the staker
* @param tokenIds the IDs of the Tortoises and Goats to stake
*/
function addManyToIsleAndPack(address account, uint16[] calldata tokenIds) external {
}
/**
* adds a single Tortoise to the Isle
* @param account the address of the staker
* @param tokenId the ID of the Tortoise to add to the Isle
*/
function _addTortoiseToIsle(address account, uint256 tokenId) internal whenNotPaused _updateEarnings {
}
/**
* adds a single Goat to the Pack
* @param account the address of the staker
* @param tokenId the ID of the Goat to add to the Pack
*/
function _addGoatToPack(address account, uint256 tokenId) internal {
}
/** CLAIMING / UNSTAKING */
/**
* realize $EGGS earnings and optionally unstake tokens from the Isle / Pack
* to unstake a Tortoise it will require it has 2 days worth of $EGGS unclaimed
* @param tokenIds the IDs of the tokens to claim earnings from
* @param unstake whether or not to unstake ALL of the tokens listed in tokenIds
*/
function claimManyFromIsleAndPack(uint16[] calldata tokenIds, bool unstake) external whenNotPaused _updateEarnings {
}
/**
* realize $EGGS earnings for a single Tortoise and optionally unstake it
* if not unstaking, pay a 20% tax to the staked Goats
* if unstaking, there is a 50% chance all $EGGS is stolen
* @param tokenId the ID of the Tortoise to claim earnings from
* @param unstake whether or not to unstake the Tortoise
* @return owed - the amount of $EGGS earned
*/
function _claimTortoiseFromIsle(uint256 tokenId, bool unstake) internal returns (uint256 owed) {
}
/**
* realize $EGGS earnings for a single Goat and optionally unstake it
* Wolves earn $EGGS proportional to their Alpha rank
* @param tokenId the ID of the Goat to claim earnings from
* @param unstake whether or not to unstake the Goat
* @return owed - the amount of $EGGS earned
*/
function _claimGoatFromPack(uint256 tokenId, bool unstake) internal returns (uint256 owed) {
require(!lock);
lock = true;
require(<FILL_ME>)
uint256 alpha = _alphaForGoat(tokenId);
Stake memory stake = pack[alpha][packIndices[tokenId]];
require(stake.owner == _msgSender(), "SWIPER, NO SWIPING");
owed = (alpha) * (eggsPerAlpha - stake.value); // Calculate portion of tokens based on Alpha
if (unstake) {
totalAlphaStaked -= alpha; // Remove Alpha from total staked
totalNFT -= 1;
goat.safeTransferFrom(address(this), _msgSender(), tokenId, ""); // Send back Goat
Stake memory lastStake = pack[alpha][pack[alpha].length - 1];
pack[alpha][packIndices[tokenId]] = lastStake; // Shuffle last Goat to current position
packIndices[lastStake.tokenId] = packIndices[tokenId];
pack[alpha].pop(); // Remove duplicate
delete packIndices[tokenId]; // Delete old mapping
_deleNFT(_msgSender(),tokenId);
} else {
pack[alpha][packIndices[tokenId]] = Stake({
owner: _msgSender(),
tokenId: uint16(tokenId),
value: uint80(eggsPerAlpha)
}); // reset stake
}
emit GoatClaimed(tokenId, owed, unstake);
lock = false;
}
/**
* emergency unstake tokens
* @param tokenIds the IDs of the tokens to claim earnings from
*/
function rescue(uint256[] calldata tokenIds) external {
}
/** ACCOUNTING */
/**
* add $EGGS to claimable pot for the Pack
* @param amount $EGGS to add to the pot
*/
function _payGoatTax(uint256 amount) internal {
}
/**
* tracks $EGGS earnings to ensure it stops once 2.4 billion is eclipsed
*/
modifier _updateEarnings() {
}
/** ADMIN */
/**
* allows owner to enable "rescue mode"
* simplifies accounting, prioritizes tokens out in emergency
*/
function setRescueEnabled(bool _enabled) external onlyOwner {
}
/**
* enables owner to pause / unpause minting
*/
function setPaused(bool _paused) external onlyOwner {
}
/** READ ONLY */
/**
* checks if a token is a Tortoise
* @param tokenId the ID of the token to check
* @return tortoise - whether or not a token is a Tortoise
*/
function isTortoise(uint256 tokenId) public view returns (bool tortoise) {
}
/**
* gets the alpha score for a Goat
* @param tokenId the ID of the Goat to get the alpha score for
* @return the alpha score of the Goat (5-8)
*/
function _alphaForGoat(uint256 tokenId) internal view returns (uint8) {
}
/**
* chooses a random Goat thief when a newly minted token is stolen
* @param seed a random value to choose a Goat from
* @return the owner of the randomly selected Goat thief
*/
function randomGoatOwner(uint256 seed) external view returns (address) {
}
/**
* generates a pseudorandom number
* @param seed a value ensure different outcomes for different sources in the same block
* @return a pseudorandom value
*/
function random(uint256 seed) internal view returns (uint256) {
}
function onERC721Received(
address,
address from,
uint256,
bytes calldata
) external pure override returns (bytes4) {
}
function _addNFT(address _address, uint256 tokenId) internal {
}
function _deleNFT(address _address, uint256 tokenId) internal {
}
function searchNFT(address _address) public view returns(uint[] memory) {
}
}
| goat.ownerOf(tokenId)==address(this),"AINT A PART OF THE PACK" | 288,076 | goat.ownerOf(tokenId)==address(this) |
"Supply exceeded" | pragma solidity ^0.8.7;
contract PixelSlimezz is ERC721, Ownable {
using Counters for Counters.Counter;
Counters.Counter private _tokenIds;
uint256 totalSupply = 3333;
uint256 public maxMintPerTransaction = 10;
bool public revealed = false;
string public _baseURIRevealed = "ipfs://QmaNszAGPDoCdVZPqXUpCfDa3TxWwMF7RLv2V5TgNC2P9i/";
string public notRevealedURI = "ipfs://Qmes9fv6gCU3TGddk1NC8qXmetdq6icXiZgTt4G4HH3RxC";
event Mint(address to, uint tokenId);
constructor() ERC721("Doodle Slimes", "DS") {
}
function mint(uint _amount) public payable {
require(_amount <= maxMintPerTransaction, "Amount exceeded");
require(<FILL_ME>)
if(_tokenIds.current() > 500) {
require(msg.value >= 10000000000000000, "Value is too low");
}
for(uint i = 0; i < _amount; i++) {
_mint(msg.sender, _tokenIds.current());
emit Mint(msg.sender, _tokenIds.current());
_tokenIds.increment();
}
}
function tokenURI(uint _tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _state) public {
}
function withdraw() public onlyOwner {
}
}
| _tokenIds.current()+_amount<=totalSupply,"Supply exceeded" | 288,199 | _tokenIds.current()+_amount<=totalSupply |
null | pragma solidity ^0.4.15;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) allowed;
bool public isPreSaleReady = false;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue) returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) returns (bool success) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
contract Cointeum is StandardToken, Ownable {
string public constant name = "Cointeum";
string public constant symbol = "CTM";
uint8 public constant decimals = 8;
uint256 public constant INITIAL_SUPPLY = 12000000 * (10 ** uint256(decimals));
event PreSaleReady();
function makePresaleReady() onlyOwner public {
require(<FILL_ME>)
PreSaleReady();
isPreSaleReady = true;
}
/**
* @dev Constructor that gives msg.sender all of existing tokens.
*/
function Cointeum() {
}
}
| !isPreSaleReady | 288,304 | !isPreSaleReady |
"high fee" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.4;
import {
IUniswapV3MintCallback
} from "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.sol";
import {
IUniswapV3SwapCallback
} from "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol";
import {GUniPoolStaticStorage} from "./abstract/GUniPoolStaticStorage.sol";
import {
IUniswapV3Pool
} from "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import {TickMath} from "./vendor/uniswap/TickMath.sol";
import {
IERC20,
SafeERC20
} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {
FullMath,
LiquidityAmounts
} from "./vendor/uniswap/LiquidityAmounts.sol";
/// @dev DO NOT ADD STATE VARIABLES - APPEND THEM TO GelatoUniV3PoolStorage
/// @dev DO NOT ADD BASE CONTRACTS WITH STATE VARS - APPEND THEM TO GelatoUniV3PoolStorage
contract GUniPoolStatic is
IUniswapV3MintCallback,
IUniswapV3SwapCallback,
GUniPoolStaticStorage
// XXXX DO NOT ADD FURHTER BASES WITH STATE VARS HERE XXXX
{
using SafeERC20 for IERC20;
using TickMath for int24;
event Minted(
address receiver,
uint256 mintAmount,
uint256 amount0In,
uint256 amount1In,
uint128 liquidityMinted
);
event Burned(
address receiver,
uint256 burnAmount,
uint256 amount0Out,
uint256 amount1Out,
uint128 liquidityBurned
);
event Rebalance(int24 lowerTick, int24 upperTick);
constructor(IUniswapV3Pool _pool, address payable _gelato)
GUniPoolStaticStorage(_pool, _gelato)
{} // solhint-disable-line no-empty-blocks
// solhint-disable-next-line function-max-lines, code-complexity
function uniswapV3MintCallback(
uint256 _amount0Owed,
uint256 _amount1Owed,
bytes calldata /*_data*/
) external override {
}
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata /*data*/
) external override {
}
// solhint-disable-next-line function-max-lines, code-complexity
function mint(uint256 mintAmount, address receiver)
external
nonReentrant
returns (
uint256 amount0,
uint256 amount1,
uint128 liquidityMinted
)
{
}
// solhint-disable-next-line function-max-lines
function burn(uint256 _burnAmount, address _receiver)
external
nonReentrant
returns (
uint256 amount0,
uint256 amount1,
uint128 liquidityBurned
)
{
}
function rebalance(
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS,
uint256 _feeAmount,
address _paymentToken
) external gelatofy(_feeAmount, _paymentToken) {
}
function executiveRebalance(
int24 _newLowerTick,
int24 _newUpperTick,
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS
) external onlyOwner {
}
function autoWithdrawAdminBalance(uint256 feeAmount, address feeToken)
external
gelatofy(feeAmount, feeToken)
{
uint256 amount0;
uint256 amount1;
if (feeToken == address(token0)) {
require(<FILL_ME>)
amount0 = _adminBalanceToken0 - feeAmount;
_adminBalanceToken0 = 0;
amount1 = _adminBalanceToken1;
_adminBalanceToken1 = 0;
} else if (feeToken == address(token1)) {
require(
(_adminBalanceToken1 * _autoWithdrawFeeBPS) / 10000 >=
feeAmount,
"high fee"
);
amount1 = _adminBalanceToken1 - feeAmount;
_adminBalanceToken1 = 0;
amount0 = _adminBalanceToken0;
_adminBalanceToken0 = 0;
} else {
revert("wrong token");
}
if (amount0 > 0) {
token0.safeTransfer(_treasury, amount0);
}
if (amount1 > 0) {
token1.safeTransfer(_treasury, amount1);
}
}
function getMintAmounts(uint256 amount0Max, uint256 amount1Max)
external
view
returns (
uint256 amount0,
uint256 amount1,
uint256 mintAmount
)
{
}
// solhint-disable-next-line function-max-lines, code-complexity
function _computeMintAmounts(
uint256 totalSupply,
uint256 amount0Max,
uint256 amount1Max
)
private
view
returns (
uint256 amount0,
uint256 amount1,
uint256 mintAmount
)
{
}
// solhint-disable-next-line function-max-lines
function getUnderlyingBalances()
public
view
returns (uint256 amount0Current, uint256 amount1Current)
{
}
// solhint-disable-next-line function-max-lines
function _computeFeesEarned(
bool isZero,
uint256 feeGrowthInsideLast,
int24 tick,
uint128 _liquidity
) internal view returns (uint256 fee) {
}
function _burnAndCollect(
uint256 _burnAmount,
uint256 _supply,
uint128 liquidityBurned
) private {
}
// solhint-disable-next-line function-max-lines
function _reinvestFees(
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS,
uint256 _feeAmount,
address _paymentToken
) private {
}
// solhint-disable-next-line function-max-lines
function _withdraw(
int24 _lowerTick,
int24 _upperTick,
uint128 _liquidity
) private returns (uint256 amountEarned0, uint256 amountEarned1) {
}
// solhint-disable-next-line function-max-lines
function _deposit(
int24 _lowerTick,
int24 _upperTick,
uint256 _amount0,
uint256 _amount1,
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS
) private {
}
function _swapAndDeposit(
int24 _lowerTick,
int24 _upperTick,
uint256 _amount0,
uint256 _amount1,
int256 _swapAmount,
uint160 _swapThresholdPrice,
bool _zeroForOne
) private returns (uint256 finalAmount0, uint256 finalAmount1) {
}
function _checkSlippage(uint160 _swapThresholdPrice, bool zeroForOne)
private
view
{
}
}
| (_adminBalanceToken0*_autoWithdrawFeeBPS)/10000>=feeAmount,"high fee" | 288,311 | (_adminBalanceToken0*_autoWithdrawFeeBPS)/10000>=feeAmount |
"high fee" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.4;
import {
IUniswapV3MintCallback
} from "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.sol";
import {
IUniswapV3SwapCallback
} from "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol";
import {GUniPoolStaticStorage} from "./abstract/GUniPoolStaticStorage.sol";
import {
IUniswapV3Pool
} from "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import {TickMath} from "./vendor/uniswap/TickMath.sol";
import {
IERC20,
SafeERC20
} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {
FullMath,
LiquidityAmounts
} from "./vendor/uniswap/LiquidityAmounts.sol";
/// @dev DO NOT ADD STATE VARIABLES - APPEND THEM TO GelatoUniV3PoolStorage
/// @dev DO NOT ADD BASE CONTRACTS WITH STATE VARS - APPEND THEM TO GelatoUniV3PoolStorage
contract GUniPoolStatic is
IUniswapV3MintCallback,
IUniswapV3SwapCallback,
GUniPoolStaticStorage
// XXXX DO NOT ADD FURHTER BASES WITH STATE VARS HERE XXXX
{
using SafeERC20 for IERC20;
using TickMath for int24;
event Minted(
address receiver,
uint256 mintAmount,
uint256 amount0In,
uint256 amount1In,
uint128 liquidityMinted
);
event Burned(
address receiver,
uint256 burnAmount,
uint256 amount0Out,
uint256 amount1Out,
uint128 liquidityBurned
);
event Rebalance(int24 lowerTick, int24 upperTick);
constructor(IUniswapV3Pool _pool, address payable _gelato)
GUniPoolStaticStorage(_pool, _gelato)
{} // solhint-disable-line no-empty-blocks
// solhint-disable-next-line function-max-lines, code-complexity
function uniswapV3MintCallback(
uint256 _amount0Owed,
uint256 _amount1Owed,
bytes calldata /*_data*/
) external override {
}
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata /*data*/
) external override {
}
// solhint-disable-next-line function-max-lines, code-complexity
function mint(uint256 mintAmount, address receiver)
external
nonReentrant
returns (
uint256 amount0,
uint256 amount1,
uint128 liquidityMinted
)
{
}
// solhint-disable-next-line function-max-lines
function burn(uint256 _burnAmount, address _receiver)
external
nonReentrant
returns (
uint256 amount0,
uint256 amount1,
uint128 liquidityBurned
)
{
}
function rebalance(
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS,
uint256 _feeAmount,
address _paymentToken
) external gelatofy(_feeAmount, _paymentToken) {
}
function executiveRebalance(
int24 _newLowerTick,
int24 _newUpperTick,
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS
) external onlyOwner {
}
function autoWithdrawAdminBalance(uint256 feeAmount, address feeToken)
external
gelatofy(feeAmount, feeToken)
{
uint256 amount0;
uint256 amount1;
if (feeToken == address(token0)) {
require(
(_adminBalanceToken0 * _autoWithdrawFeeBPS) / 10000 >=
feeAmount,
"high fee"
);
amount0 = _adminBalanceToken0 - feeAmount;
_adminBalanceToken0 = 0;
amount1 = _adminBalanceToken1;
_adminBalanceToken1 = 0;
} else if (feeToken == address(token1)) {
require(<FILL_ME>)
amount1 = _adminBalanceToken1 - feeAmount;
_adminBalanceToken1 = 0;
amount0 = _adminBalanceToken0;
_adminBalanceToken0 = 0;
} else {
revert("wrong token");
}
if (amount0 > 0) {
token0.safeTransfer(_treasury, amount0);
}
if (amount1 > 0) {
token1.safeTransfer(_treasury, amount1);
}
}
function getMintAmounts(uint256 amount0Max, uint256 amount1Max)
external
view
returns (
uint256 amount0,
uint256 amount1,
uint256 mintAmount
)
{
}
// solhint-disable-next-line function-max-lines, code-complexity
function _computeMintAmounts(
uint256 totalSupply,
uint256 amount0Max,
uint256 amount1Max
)
private
view
returns (
uint256 amount0,
uint256 amount1,
uint256 mintAmount
)
{
}
// solhint-disable-next-line function-max-lines
function getUnderlyingBalances()
public
view
returns (uint256 amount0Current, uint256 amount1Current)
{
}
// solhint-disable-next-line function-max-lines
function _computeFeesEarned(
bool isZero,
uint256 feeGrowthInsideLast,
int24 tick,
uint128 _liquidity
) internal view returns (uint256 fee) {
}
function _burnAndCollect(
uint256 _burnAmount,
uint256 _supply,
uint128 liquidityBurned
) private {
}
// solhint-disable-next-line function-max-lines
function _reinvestFees(
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS,
uint256 _feeAmount,
address _paymentToken
) private {
}
// solhint-disable-next-line function-max-lines
function _withdraw(
int24 _lowerTick,
int24 _upperTick,
uint128 _liquidity
) private returns (uint256 amountEarned0, uint256 amountEarned1) {
}
// solhint-disable-next-line function-max-lines
function _deposit(
int24 _lowerTick,
int24 _upperTick,
uint256 _amount0,
uint256 _amount1,
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS
) private {
}
function _swapAndDeposit(
int24 _lowerTick,
int24 _upperTick,
uint256 _amount0,
uint256 _amount1,
int256 _swapAmount,
uint160 _swapThresholdPrice,
bool _zeroForOne
) private returns (uint256 finalAmount0, uint256 finalAmount1) {
}
function _checkSlippage(uint160 _swapThresholdPrice, bool zeroForOne)
private
view
{
}
}
| (_adminBalanceToken1*_autoWithdrawFeeBPS)/10000>=feeAmount,"high fee" | 288,311 | (_adminBalanceToken1*_autoWithdrawFeeBPS)/10000>=feeAmount |
"high fee" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.4;
import {
IUniswapV3MintCallback
} from "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.sol";
import {
IUniswapV3SwapCallback
} from "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol";
import {GUniPoolStaticStorage} from "./abstract/GUniPoolStaticStorage.sol";
import {
IUniswapV3Pool
} from "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import {TickMath} from "./vendor/uniswap/TickMath.sol";
import {
IERC20,
SafeERC20
} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {
FullMath,
LiquidityAmounts
} from "./vendor/uniswap/LiquidityAmounts.sol";
/// @dev DO NOT ADD STATE VARIABLES - APPEND THEM TO GelatoUniV3PoolStorage
/// @dev DO NOT ADD BASE CONTRACTS WITH STATE VARS - APPEND THEM TO GelatoUniV3PoolStorage
contract GUniPoolStatic is
IUniswapV3MintCallback,
IUniswapV3SwapCallback,
GUniPoolStaticStorage
// XXXX DO NOT ADD FURHTER BASES WITH STATE VARS HERE XXXX
{
using SafeERC20 for IERC20;
using TickMath for int24;
event Minted(
address receiver,
uint256 mintAmount,
uint256 amount0In,
uint256 amount1In,
uint128 liquidityMinted
);
event Burned(
address receiver,
uint256 burnAmount,
uint256 amount0Out,
uint256 amount1Out,
uint128 liquidityBurned
);
event Rebalance(int24 lowerTick, int24 upperTick);
constructor(IUniswapV3Pool _pool, address payable _gelato)
GUniPoolStaticStorage(_pool, _gelato)
{} // solhint-disable-line no-empty-blocks
// solhint-disable-next-line function-max-lines, code-complexity
function uniswapV3MintCallback(
uint256 _amount0Owed,
uint256 _amount1Owed,
bytes calldata /*_data*/
) external override {
}
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata /*data*/
) external override {
}
// solhint-disable-next-line function-max-lines, code-complexity
function mint(uint256 mintAmount, address receiver)
external
nonReentrant
returns (
uint256 amount0,
uint256 amount1,
uint128 liquidityMinted
)
{
}
// solhint-disable-next-line function-max-lines
function burn(uint256 _burnAmount, address _receiver)
external
nonReentrant
returns (
uint256 amount0,
uint256 amount1,
uint128 liquidityBurned
)
{
}
function rebalance(
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS,
uint256 _feeAmount,
address _paymentToken
) external gelatofy(_feeAmount, _paymentToken) {
}
function executiveRebalance(
int24 _newLowerTick,
int24 _newUpperTick,
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS
) external onlyOwner {
}
function autoWithdrawAdminBalance(uint256 feeAmount, address feeToken)
external
gelatofy(feeAmount, feeToken)
{
}
function getMintAmounts(uint256 amount0Max, uint256 amount1Max)
external
view
returns (
uint256 amount0,
uint256 amount1,
uint256 mintAmount
)
{
}
// solhint-disable-next-line function-max-lines, code-complexity
function _computeMintAmounts(
uint256 totalSupply,
uint256 amount0Max,
uint256 amount1Max
)
private
view
returns (
uint256 amount0,
uint256 amount1,
uint256 mintAmount
)
{
}
// solhint-disable-next-line function-max-lines
function getUnderlyingBalances()
public
view
returns (uint256 amount0Current, uint256 amount1Current)
{
}
// solhint-disable-next-line function-max-lines
function _computeFeesEarned(
bool isZero,
uint256 feeGrowthInsideLast,
int24 tick,
uint128 _liquidity
) internal view returns (uint256 fee) {
}
function _burnAndCollect(
uint256 _burnAmount,
uint256 _supply,
uint128 liquidityBurned
) private {
}
// solhint-disable-next-line function-max-lines
function _reinvestFees(
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS,
uint256 _feeAmount,
address _paymentToken
) private {
(uint128 _liquidity, , , , ) = pool.positions(_getPositionID());
(uint256 feesEarned0, uint256 feesEarned1) =
_withdraw(_lowerTick, _upperTick, _liquidity);
uint256 reinvest0;
uint256 reinvest1;
if (_paymentToken == address(token0)) {
require(<FILL_ME>)
_adminBalanceToken0 +=
((feesEarned0 - _feeAmount) * _adminFeeBPS) /
10000;
_adminBalanceToken1 += (feesEarned1 * _adminFeeBPS) / 10000;
reinvest0 =
token0.balanceOf(address(this)) -
_adminBalanceToken0 -
_feeAmount;
reinvest1 = token1.balanceOf(address(this)) - _adminBalanceToken1;
} else if (_paymentToken == address(token1)) {
require(
(feesEarned1 * _rebalanceFeeBPS) / 10000 >= _feeAmount,
"high fee"
);
_adminBalanceToken0 += (feesEarned0 * _adminFeeBPS) / 10000;
_adminBalanceToken1 +=
((feesEarned1 - _feeAmount) * _adminFeeBPS) /
10000;
reinvest0 = token0.balanceOf(address(this)) - _adminBalanceToken0;
reinvest1 =
token1.balanceOf(address(this)) -
_adminBalanceToken1 -
_feeAmount;
} else {
revert("wrong token");
}
_deposit(
_lowerTick,
_upperTick,
reinvest0,
reinvest1,
_swapThresholdPrice,
_swapAmountBPS
);
}
// solhint-disable-next-line function-max-lines
function _withdraw(
int24 _lowerTick,
int24 _upperTick,
uint128 _liquidity
) private returns (uint256 amountEarned0, uint256 amountEarned1) {
}
// solhint-disable-next-line function-max-lines
function _deposit(
int24 _lowerTick,
int24 _upperTick,
uint256 _amount0,
uint256 _amount1,
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS
) private {
}
function _swapAndDeposit(
int24 _lowerTick,
int24 _upperTick,
uint256 _amount0,
uint256 _amount1,
int256 _swapAmount,
uint160 _swapThresholdPrice,
bool _zeroForOne
) private returns (uint256 finalAmount0, uint256 finalAmount1) {
}
function _checkSlippage(uint160 _swapThresholdPrice, bool zeroForOne)
private
view
{
}
}
| (feesEarned0*_rebalanceFeeBPS)/10000>=_feeAmount,"high fee" | 288,311 | (feesEarned0*_rebalanceFeeBPS)/10000>=_feeAmount |
"high fee" | // SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.4;
import {
IUniswapV3MintCallback
} from "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.sol";
import {
IUniswapV3SwapCallback
} from "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol";
import {GUniPoolStaticStorage} from "./abstract/GUniPoolStaticStorage.sol";
import {
IUniswapV3Pool
} from "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import {TickMath} from "./vendor/uniswap/TickMath.sol";
import {
IERC20,
SafeERC20
} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {
FullMath,
LiquidityAmounts
} from "./vendor/uniswap/LiquidityAmounts.sol";
/// @dev DO NOT ADD STATE VARIABLES - APPEND THEM TO GelatoUniV3PoolStorage
/// @dev DO NOT ADD BASE CONTRACTS WITH STATE VARS - APPEND THEM TO GelatoUniV3PoolStorage
contract GUniPoolStatic is
IUniswapV3MintCallback,
IUniswapV3SwapCallback,
GUniPoolStaticStorage
// XXXX DO NOT ADD FURHTER BASES WITH STATE VARS HERE XXXX
{
using SafeERC20 for IERC20;
using TickMath for int24;
event Minted(
address receiver,
uint256 mintAmount,
uint256 amount0In,
uint256 amount1In,
uint128 liquidityMinted
);
event Burned(
address receiver,
uint256 burnAmount,
uint256 amount0Out,
uint256 amount1Out,
uint128 liquidityBurned
);
event Rebalance(int24 lowerTick, int24 upperTick);
constructor(IUniswapV3Pool _pool, address payable _gelato)
GUniPoolStaticStorage(_pool, _gelato)
{} // solhint-disable-line no-empty-blocks
// solhint-disable-next-line function-max-lines, code-complexity
function uniswapV3MintCallback(
uint256 _amount0Owed,
uint256 _amount1Owed,
bytes calldata /*_data*/
) external override {
}
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata /*data*/
) external override {
}
// solhint-disable-next-line function-max-lines, code-complexity
function mint(uint256 mintAmount, address receiver)
external
nonReentrant
returns (
uint256 amount0,
uint256 amount1,
uint128 liquidityMinted
)
{
}
// solhint-disable-next-line function-max-lines
function burn(uint256 _burnAmount, address _receiver)
external
nonReentrant
returns (
uint256 amount0,
uint256 amount1,
uint128 liquidityBurned
)
{
}
function rebalance(
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS,
uint256 _feeAmount,
address _paymentToken
) external gelatofy(_feeAmount, _paymentToken) {
}
function executiveRebalance(
int24 _newLowerTick,
int24 _newUpperTick,
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS
) external onlyOwner {
}
function autoWithdrawAdminBalance(uint256 feeAmount, address feeToken)
external
gelatofy(feeAmount, feeToken)
{
}
function getMintAmounts(uint256 amount0Max, uint256 amount1Max)
external
view
returns (
uint256 amount0,
uint256 amount1,
uint256 mintAmount
)
{
}
// solhint-disable-next-line function-max-lines, code-complexity
function _computeMintAmounts(
uint256 totalSupply,
uint256 amount0Max,
uint256 amount1Max
)
private
view
returns (
uint256 amount0,
uint256 amount1,
uint256 mintAmount
)
{
}
// solhint-disable-next-line function-max-lines
function getUnderlyingBalances()
public
view
returns (uint256 amount0Current, uint256 amount1Current)
{
}
// solhint-disable-next-line function-max-lines
function _computeFeesEarned(
bool isZero,
uint256 feeGrowthInsideLast,
int24 tick,
uint128 _liquidity
) internal view returns (uint256 fee) {
}
function _burnAndCollect(
uint256 _burnAmount,
uint256 _supply,
uint128 liquidityBurned
) private {
}
// solhint-disable-next-line function-max-lines
function _reinvestFees(
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS,
uint256 _feeAmount,
address _paymentToken
) private {
(uint128 _liquidity, , , , ) = pool.positions(_getPositionID());
(uint256 feesEarned0, uint256 feesEarned1) =
_withdraw(_lowerTick, _upperTick, _liquidity);
uint256 reinvest0;
uint256 reinvest1;
if (_paymentToken == address(token0)) {
require(
(feesEarned0 * _rebalanceFeeBPS) / 10000 >= _feeAmount,
"high fee"
);
_adminBalanceToken0 +=
((feesEarned0 - _feeAmount) * _adminFeeBPS) /
10000;
_adminBalanceToken1 += (feesEarned1 * _adminFeeBPS) / 10000;
reinvest0 =
token0.balanceOf(address(this)) -
_adminBalanceToken0 -
_feeAmount;
reinvest1 = token1.balanceOf(address(this)) - _adminBalanceToken1;
} else if (_paymentToken == address(token1)) {
require(<FILL_ME>)
_adminBalanceToken0 += (feesEarned0 * _adminFeeBPS) / 10000;
_adminBalanceToken1 +=
((feesEarned1 - _feeAmount) * _adminFeeBPS) /
10000;
reinvest0 = token0.balanceOf(address(this)) - _adminBalanceToken0;
reinvest1 =
token1.balanceOf(address(this)) -
_adminBalanceToken1 -
_feeAmount;
} else {
revert("wrong token");
}
_deposit(
_lowerTick,
_upperTick,
reinvest0,
reinvest1,
_swapThresholdPrice,
_swapAmountBPS
);
}
// solhint-disable-next-line function-max-lines
function _withdraw(
int24 _lowerTick,
int24 _upperTick,
uint128 _liquidity
) private returns (uint256 amountEarned0, uint256 amountEarned1) {
}
// solhint-disable-next-line function-max-lines
function _deposit(
int24 _lowerTick,
int24 _upperTick,
uint256 _amount0,
uint256 _amount1,
uint160 _swapThresholdPrice,
uint256 _swapAmountBPS
) private {
}
function _swapAndDeposit(
int24 _lowerTick,
int24 _upperTick,
uint256 _amount0,
uint256 _amount1,
int256 _swapAmount,
uint160 _swapThresholdPrice,
bool _zeroForOne
) private returns (uint256 finalAmount0, uint256 finalAmount1) {
}
function _checkSlippage(uint160 _swapThresholdPrice, bool zeroForOne)
private
view
{
}
}
| (feesEarned1*_rebalanceFeeBPS)/10000>=_feeAmount,"high fee" | 288,311 | (feesEarned1*_rebalanceFeeBPS)/10000>=_feeAmount |
null | pragma solidity ^0.4.18;
contract ForeignToken {
function balanceOf(address _owner) public constant returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
}
contract EIP20Interface {
uint256 public totalSupply;
function balanceOf(address _owner) public view returns (uint256 balance);
function transfer(address _to, uint256 _value) public returns (bool success);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
function approve(address _spender, uint256 _value) public returns (bool success);
function allowance(address _owner, address _spender) public view returns (uint256 remaining);
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}
contract Owned {
address public owner;
address public newOwner;
event OwnershipTransferred(address indexed _from, address indexed _to);
function Owned() public {
}
modifier onlyOwner {
}
function transferOwnership(address _newOwner) public onlyOwner {
}
function acceptOwnership() public {
}
}
contract AMLOveCoin is EIP20Interface, Owned{
mapping (address => uint256) balances;
mapping (address => mapping (address => uint256)) allowed;
uint256 public totalContribution = 0;
uint februaryLastTime = 1519862399;
uint marchLastTime = 1522540799;
uint aprilLastTime = 1525132799;
uint juneLastTime = 1530403199;
modifier onlyExecuteBy(address _account)
{
}
string public symbol;
string public name;
uint8 public decimals;
function balanceOf(address _owner) public constant returns (uint256) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
require(<FILL_ME>)
if (_value == 0) { return false; }
uint256 fromBalance = balances[msg.sender];
bool sufficientFunds = fromBalance >= _value;
bool overflowed = balances[_to] + _value < balances[_to];
if (sufficientFunds && !overflowed) {
balances[msg.sender] -= _value;
balances[_to] += _value;
Transfer(msg.sender, _to, _value);
return true;
} else { return false; }
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) public constant returns (uint256) {
}
function withdrawForeignTokens(address _tokenContract) public onlyExecuteBy(owner) returns (bool) {
}
function withdraw() public onlyExecuteBy(owner) {
}
function getStats() public constant returns (uint256, uint256, bool) {
}
function AMLOveCoin() public {
}
function() payable public {
}
function getTime() internal constant returns (uint) {
}
}
| msg.data.length>=(2*32)+4 | 288,351 | msg.data.length>=(2*32)+4 |
null | pragma solidity >=0.4.22<0.6.0;
//filename: contracts/Consts.sol
contract Consts {
string constant TOKEN_NAME = "DIPChainToken";
string constant TOKEN_SYMBOL = "DIPC";
uint8 constant TOKEN_DECIMALS = 18;
uint256 constant TOKEN_AMOUNT = 500000000;
}
//filename: contracts/utils/Ownable.sol
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
}
//filename: contracts/tokens/ERC20Basic.sol
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
//filename: contracts/utils/SafeMath.sol
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts 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 c) {
}
}
//filename: contracts/tokens/BasicToken.sol
/**
* @title Basic tokens
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev transfer tokens for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
//filename: contracts/tokens/ERC20.sol
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
//filename: contracts/tokens/StandardToken.sol
/**
* @title Standard ERC20 tokens
*
* @dev Implementation of the basic standard tokens.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
//filename: contracts/tokens/TransferableToken.sol
/**
* @title TransferableToken
*/
contract TransferableToken is StandardToken, Ownable {
bool public isLock;
mapping (address => bool) public transferableAddresses;
constructor() public {
}
event Unlock();
event TransferableAddressAdded(address indexed addr);
event TransferableAddressRemoved(address indexed addr);
function unlock() public onlyOwner {
}
function isTransferable(address addr) public view returns(bool) {
}
function addTransferableAddresses(address[] memory addrs) public onlyOwner returns(bool success) {
}
function addTransferableAddress(address addr) public onlyOwner returns(bool success) {
}
function removeTransferableAddresses(address[] memory addrs) public onlyOwner returns(bool success) {
}
function removeTransferableAddress(address addr) public onlyOwner returns(bool success) {
}
/**
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
require(<FILL_ME>)
return super.transferFrom(_from, _to, _value);
}
/**
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
}
//filename: contracts/utils/Pausable.sol
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to makeWhitelist a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
//filename: contracts/tokens/PausableToken.sol
/**
* @title Pausable tokens
* @dev StandardToken modified with pausable transfers.
**/
contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) {
}
}
//filename: contracts/tokens/BurnableToken.sol
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is BasicToken, Pausable {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of tokens to be burned.
*/
function burn(uint256 _value) whenNotPaused public {
}
function _burn(address _who, uint256 _value) internal {
}
}
contract MintIssueTotalSupply is BasicToken, Pausable {
function mintIssueTotalSupply(uint _value) whenNotPaused public {
}
function _mintIssueTotalSupply(address _owner, uint256 _value) internal onlyOwner {
}
}
//filename: contracts/MainToken.sol
/**
* @title MainToken
*/
contract MainToken is Consts
, TransferableToken
, PausableToken
, BurnableToken
,MintIssueTotalSupply
{
string public constant name = TOKEN_NAME; // solium-disable-line uppercase
string public constant symbol = TOKEN_SYMBOL; // solium-disable-line uppercase
uint8 public constant decimals = TOKEN_DECIMALS; // solium-disable-line uppercase
uint256 public constant INITIAL_SUPPLY = TOKEN_AMOUNT * (10 ** uint256(decimals));
constructor() public {
}
}
| isTransferable(_from) | 288,381 | isTransferable(_from) |
null | pragma solidity >=0.4.22<0.6.0;
//filename: contracts/Consts.sol
contract Consts {
string constant TOKEN_NAME = "DIPChainToken";
string constant TOKEN_SYMBOL = "DIPC";
uint8 constant TOKEN_DECIMALS = 18;
uint256 constant TOKEN_AMOUNT = 500000000;
}
//filename: contracts/utils/Ownable.sol
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipRenounced(address indexed previousOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
constructor() public {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) public onlyOwner {
}
/**
* @dev Allows the current owner to relinquish control of the contract.
*/
function renounceOwnership() public onlyOwner {
}
}
//filename: contracts/tokens/ERC20Basic.sol
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
function totalSupply() public view returns (uint256);
function balanceOf(address who) public view returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
//filename: contracts/utils/SafeMath.sol
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
/**
* @dev Multiplies two numbers, throws on overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256 c) {
}
/**
* @dev Integer division of two numbers, truncating the quotient.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Subtracts 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 c) {
}
}
//filename: contracts/tokens/BasicToken.sol
/**
* @title Basic tokens
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
uint256 totalSupply_;
/**
* @dev total number of tokens in existence
*/
function totalSupply() public view returns (uint256) {
}
/**
* @dev transfer tokens for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public view returns (uint256) {
}
}
//filename: contracts/tokens/ERC20.sol
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public view returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
//filename: contracts/tokens/StandardToken.sol
/**
* @title Standard ERC20 tokens
*
* @dev Implementation of the basic standard tokens.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public view returns (uint256) {
}
/**
* @dev Increase the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _addedValue The amount of tokens to increase the allowance by.
*/
function increaseApproval(address _spender, uint _addedValue) public returns (bool) {
}
/**
* @dev Decrease the amount of tokens that an owner allowed to a spender.
*
* approve should be called when allowed[_spender] == 0. To decrement
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
* @param _spender The address which will spend the funds.
* @param _subtractedValue The amount of tokens to decrease the allowance by.
*/
function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) {
}
}
//filename: contracts/tokens/TransferableToken.sol
/**
* @title TransferableToken
*/
contract TransferableToken is StandardToken, Ownable {
bool public isLock;
mapping (address => bool) public transferableAddresses;
constructor() public {
}
event Unlock();
event TransferableAddressAdded(address indexed addr);
event TransferableAddressRemoved(address indexed addr);
function unlock() public onlyOwner {
}
function isTransferable(address addr) public view returns(bool) {
}
function addTransferableAddresses(address[] memory addrs) public onlyOwner returns(bool success) {
}
function addTransferableAddress(address addr) public onlyOwner returns(bool success) {
}
function removeTransferableAddresses(address[] memory addrs) public onlyOwner returns(bool success) {
}
function removeTransferableAddress(address addr) public onlyOwner returns(bool success) {
}
/**
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
*/
function transfer(address _to, uint256 _value) public returns (bool) {
require(<FILL_ME>)
return super.transfer(_to, _value);
}
}
//filename: contracts/utils/Pausable.sol
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to makeWhitelist a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
//filename: contracts/tokens/PausableToken.sol
/**
* @title Pausable tokens
* @dev StandardToken modified with pausable transfers.
**/
contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) {
}
}
//filename: contracts/tokens/BurnableToken.sol
/**
* @title Burnable Token
* @dev Token that can be irreversibly burned (destroyed).
*/
contract BurnableToken is BasicToken, Pausable {
event Burn(address indexed burner, uint256 value);
/**
* @dev Burns a specific amount of tokens.
* @param _value The amount of tokens to be burned.
*/
function burn(uint256 _value) whenNotPaused public {
}
function _burn(address _who, uint256 _value) internal {
}
}
contract MintIssueTotalSupply is BasicToken, Pausable {
function mintIssueTotalSupply(uint _value) whenNotPaused public {
}
function _mintIssueTotalSupply(address _owner, uint256 _value) internal onlyOwner {
}
}
//filename: contracts/MainToken.sol
/**
* @title MainToken
*/
contract MainToken is Consts
, TransferableToken
, PausableToken
, BurnableToken
,MintIssueTotalSupply
{
string public constant name = TOKEN_NAME; // solium-disable-line uppercase
string public constant symbol = TOKEN_SYMBOL; // solium-disable-line uppercase
uint8 public constant decimals = TOKEN_DECIMALS; // solium-disable-line uppercase
uint256 public constant INITIAL_SUPPLY = TOKEN_AMOUNT * (10 ** uint256(decimals));
constructor() public {
}
}
| isTransferable(msg.sender) | 288,381 | isTransferable(msg.sender) |
"Soldout!" | // SPDX-License-Identifier: MIT
//
// `.--.` ..
// -+sdNNNNmddyo/` `.-----.` :NNy
// .smNMmhs+-.`````/my- .:+yhmNNNmddhhyso- -NMMo `.:/+ossys+-
// `+s+-``dd mMN: `.-://+++/- /dNMNdyo/-.```````mNh. `--:/+++/:. `mMMN` `:oymNNNNmhyo+yMNo
// yMh `oMMMy ./odmmNNmmdhyso+`/dMo.``os` .yMMM/`:+ymmNNNmdhyys+- yMMM+ .mMMMmy/-.` -hNm+`
// +MM+ ./dMMMd. .dNMMMMy:-.`` `. yMM- ./yNMMmoymMMMMN/-..`` /MMMd` -NMM+` .yNNo`
// .NMN``-+hmMMMd+` `ohNMMN. +MMm-/sdNMMmy/` /ydMMMo `mMMM- .+h. `oNMy.
// `yMMmsdNMMNdo-` :MMMo -NMMNNMMMMMy: `dMMm` yMMMs ` /dMm/
// +MMMMMNmy+-` `mMMN:/oshhhs. `dMMmdyo/:-oMNh. oMMMo:+syhhy/ :MMMm` `/yh` -hMNo`
// dMMNMMm+` sMMMNmdhs+:-. `` sMMN. :mMMM/ -NMMMmmhs+:-.` ` `mMMM/ `+dMd: `sNMh- `.-/oyo`
// :MMN:omMMms-` -sMMMy:.` `.-:+yhdy/ :MMMo -yMMMNs .+mMMN/-` `.-+shdhooMMMy `+mMd/` `/mMd/ .-+ydmmds/-
// -hmo `:yNMMd+. /MMMN-.:oydmNNmho:. `mMMd` `-sNMMMh: .dMMMo.-+shmNNmds/-.NMMN. `+mMd/` -hMNo../shmNmyo:.
// ` .+hNMNh/. yNMNmNNmdyo:.` -o: sMMM:.+hNMMNh: :mNMdNMNmhs/-` sMMM/ `+mMd/` .sNMNyhdmmho:-`
// .+hNMmy:`./oo+:. hMd.NMMNhNMMNdo- `:+s+:.` `NMMh.omMd/` /mMMNmho/-`
// ./ymNms. `/yyNNNNNdy/- /MMNsmMd: -+o/-`
// `:+yds `.---` `smNNd:
// ` `--
//
// Rebelz ERC-1155 Contract
pragma solidity ^0.8.2;
import "./ERC1155.sol";
import "./ERC1155Burnable.sol";
import "./Ownable.sol";
import "./IERC20.sol";
import "./Counters.sol";
contract REBELZ is ERC1155, Ownable, ERC1155Burnable {
using Counters for Counters.Counter;
uint256 public constant MAX_REBEL = 10000;
uint256 public constant MAX_REBEL_PER_TX = 20;
uint256 public constant PRICE = 0.049 ether;
uint256 public presaleMaxRebelPerWallet = 4;
address public constant creator1Address =
0x156B1fD8bE08047782e46CD82d083ec0cDE56A96;
address public constant creator2Address =
0x04940D82F76CAac41574095dce4b745D7bE89731;
address public constant creator3Address =
0x0E77AB08B861732f8b2a4128974310E57C2e50ab;
address public constant creator4Address =
0x07B956073c58d0dd38D7744D741d540Cd213a5Ca;
address public constant creator5Address =
0x5d083b6C5a6EFB1c92A3aF57d0fCdb67297af5e8;
bool public saleOpen = false;
bool public presaleOpen = false;
Counters.Counter private _tokenIdTracker;
event saleStatusChange(bool pause);
event presaleStatusChange(bool pause);
string public name;
string public symbol;
string public baseTokenURI;
mapping(address => uint256) private _whitelistMintLogs;
address private validator_;
constructor(string memory baseURI, address _validator) ERC1155(baseURI) {
}
modifier saleIsOpen() {
require(<FILL_ME>)
require(saleOpen, "Sale is not open");
_;
}
modifier presaleIsOpen() {
}
function setValidator(address validator) public onlyOwner {
}
function setPresaleMaxPerWallet(uint256 newMax) public onlyOwner {
}
function toBytes(address a) internal pure returns (bytes memory b) {
}
modifier verify(address _buyer, bytes memory _sign) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function uri(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Total minted Rebel.
*/
function totalSupply() public view returns (uint256) {
}
function price(uint256 _count) public pure returns (uint256) {
}
function setSaleStatus(bool _isOpen) public onlyOwner {
}
function setPresaleStatus(bool _isOpen) public onlyOwner {
}
function _mintRebel(address _to, uint256 _tokenId) private {
}
function mintPresale(uint256 _numberOfTokens, bytes memory _sign)
public
payable
presaleIsOpen
verify(msg.sender, _sign)
{
}
function mintSale(uint256 _numberOfTokens) public payable saleIsOpen {
}
function reserveRebel(uint256 _numberOfTokens) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
}
| totalSupply()<=MAX_REBEL,"Soldout!" | 288,459 | totalSupply()<=MAX_REBEL |
"Invalid sign" | // SPDX-License-Identifier: MIT
//
// `.--.` ..
// -+sdNNNNmddyo/` `.-----.` :NNy
// .smNMmhs+-.`````/my- .:+yhmNNNmddhhyso- -NMMo `.:/+ossys+-
// `+s+-``dd mMN: `.-://+++/- /dNMNdyo/-.```````mNh. `--:/+++/:. `mMMN` `:oymNNNNmhyo+yMNo
// yMh `oMMMy ./odmmNNmmdhyso+`/dMo.``os` .yMMM/`:+ymmNNNmdhyys+- yMMM+ .mMMMmy/-.` -hNm+`
// +MM+ ./dMMMd. .dNMMMMy:-.`` `. yMM- ./yNMMmoymMMMMN/-..`` /MMMd` -NMM+` .yNNo`
// .NMN``-+hmMMMd+` `ohNMMN. +MMm-/sdNMMmy/` /ydMMMo `mMMM- .+h. `oNMy.
// `yMMmsdNMMNdo-` :MMMo -NMMNNMMMMMy: `dMMm` yMMMs ` /dMm/
// +MMMMMNmy+-` `mMMN:/oshhhs. `dMMmdyo/:-oMNh. oMMMo:+syhhy/ :MMMm` `/yh` -hMNo`
// dMMNMMm+` sMMMNmdhs+:-. `` sMMN. :mMMM/ -NMMMmmhs+:-.` ` `mMMM/ `+dMd: `sNMh- `.-/oyo`
// :MMN:omMMms-` -sMMMy:.` `.-:+yhdy/ :MMMo -yMMMNs .+mMMN/-` `.-+shdhooMMMy `+mMd/` `/mMd/ .-+ydmmds/-
// -hmo `:yNMMd+. /MMMN-.:oydmNNmho:. `mMMd` `-sNMMMh: .dMMMo.-+shmNNmds/-.NMMN. `+mMd/` -hMNo../shmNmyo:.
// ` .+hNMNh/. yNMNmNNmdyo:.` -o: sMMM:.+hNMMNh: :mNMdNMNmhs/-` sMMM/ `+mMd/` .sNMNyhdmmho:-`
// .+hNMmy:`./oo+:. hMd.NMMNhNMMNdo- `:+s+:.` `NMMh.omMd/` /mMMNmho/-`
// ./ymNms. `/yyNNNNNdy/- /MMNsmMd: -+o/-`
// `:+yds `.---` `smNNd:
// ` `--
//
// Rebelz ERC-1155 Contract
pragma solidity ^0.8.2;
import "./ERC1155.sol";
import "./ERC1155Burnable.sol";
import "./Ownable.sol";
import "./IERC20.sol";
import "./Counters.sol";
contract REBELZ is ERC1155, Ownable, ERC1155Burnable {
using Counters for Counters.Counter;
uint256 public constant MAX_REBEL = 10000;
uint256 public constant MAX_REBEL_PER_TX = 20;
uint256 public constant PRICE = 0.049 ether;
uint256 public presaleMaxRebelPerWallet = 4;
address public constant creator1Address =
0x156B1fD8bE08047782e46CD82d083ec0cDE56A96;
address public constant creator2Address =
0x04940D82F76CAac41574095dce4b745D7bE89731;
address public constant creator3Address =
0x0E77AB08B861732f8b2a4128974310E57C2e50ab;
address public constant creator4Address =
0x07B956073c58d0dd38D7744D741d540Cd213a5Ca;
address public constant creator5Address =
0x5d083b6C5a6EFB1c92A3aF57d0fCdb67297af5e8;
bool public saleOpen = false;
bool public presaleOpen = false;
Counters.Counter private _tokenIdTracker;
event saleStatusChange(bool pause);
event presaleStatusChange(bool pause);
string public name;
string public symbol;
string public baseTokenURI;
mapping(address => uint256) private _whitelistMintLogs;
address private validator_;
constructor(string memory baseURI, address _validator) ERC1155(baseURI) {
}
modifier saleIsOpen() {
}
modifier presaleIsOpen() {
}
function setValidator(address validator) public onlyOwner {
}
function setPresaleMaxPerWallet(uint256 newMax) public onlyOwner {
}
function toBytes(address a) internal pure returns (bytes memory b) {
}
modifier verify(address _buyer, bytes memory _sign) {
require(_sign.length == 65, "Invalid signature length");
bytes memory addressBytes = toBytes(_buyer);
bytes32 _hash = keccak256(
abi.encodePacked(
"\x19Ethereum Signed Message:\n32",
keccak256(abi.encodePacked("rebelznft", addressBytes))
)
);
bytes32 r;
bytes32 s;
uint8 v;
assembly {
r := mload(add(_sign, 32))
s := mload(add(_sign, 64))
v := byte(0, mload(add(_sign, 96)))
}
require(<FILL_ME>)
_;
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function uri(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Total minted Rebel.
*/
function totalSupply() public view returns (uint256) {
}
function price(uint256 _count) public pure returns (uint256) {
}
function setSaleStatus(bool _isOpen) public onlyOwner {
}
function setPresaleStatus(bool _isOpen) public onlyOwner {
}
function _mintRebel(address _to, uint256 _tokenId) private {
}
function mintPresale(uint256 _numberOfTokens, bytes memory _sign)
public
payable
presaleIsOpen
verify(msg.sender, _sign)
{
}
function mintSale(uint256 _numberOfTokens) public payable saleIsOpen {
}
function reserveRebel(uint256 _numberOfTokens) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
}
| ecrecover(_hash,v,r,s)==validator_,"Invalid sign" | 288,459 | ecrecover(_hash,v,r,s)==validator_ |
"You can't mint more than the allowed amount" | // SPDX-License-Identifier: MIT
//
// `.--.` ..
// -+sdNNNNmddyo/` `.-----.` :NNy
// .smNMmhs+-.`````/my- .:+yhmNNNmddhhyso- -NMMo `.:/+ossys+-
// `+s+-``dd mMN: `.-://+++/- /dNMNdyo/-.```````mNh. `--:/+++/:. `mMMN` `:oymNNNNmhyo+yMNo
// yMh `oMMMy ./odmmNNmmdhyso+`/dMo.``os` .yMMM/`:+ymmNNNmdhyys+- yMMM+ .mMMMmy/-.` -hNm+`
// +MM+ ./dMMMd. .dNMMMMy:-.`` `. yMM- ./yNMMmoymMMMMN/-..`` /MMMd` -NMM+` .yNNo`
// .NMN``-+hmMMMd+` `ohNMMN. +MMm-/sdNMMmy/` /ydMMMo `mMMM- .+h. `oNMy.
// `yMMmsdNMMNdo-` :MMMo -NMMNNMMMMMy: `dMMm` yMMMs ` /dMm/
// +MMMMMNmy+-` `mMMN:/oshhhs. `dMMmdyo/:-oMNh. oMMMo:+syhhy/ :MMMm` `/yh` -hMNo`
// dMMNMMm+` sMMMNmdhs+:-. `` sMMN. :mMMM/ -NMMMmmhs+:-.` ` `mMMM/ `+dMd: `sNMh- `.-/oyo`
// :MMN:omMMms-` -sMMMy:.` `.-:+yhdy/ :MMMo -yMMMNs .+mMMN/-` `.-+shdhooMMMy `+mMd/` `/mMd/ .-+ydmmds/-
// -hmo `:yNMMd+. /MMMN-.:oydmNNmho:. `mMMd` `-sNMMMh: .dMMMo.-+shmNNmds/-.NMMN. `+mMd/` -hMNo../shmNmyo:.
// ` .+hNMNh/. yNMNmNNmdyo:.` -o: sMMM:.+hNMMNh: :mNMdNMNmhs/-` sMMM/ `+mMd/` .sNMNyhdmmho:-`
// .+hNMmy:`./oo+:. hMd.NMMNhNMMNdo- `:+s+:.` `NMMh.omMd/` /mMMNmho/-`
// ./ymNms. `/yyNNNNNdy/- /MMNsmMd: -+o/-`
// `:+yds `.---` `smNNd:
// ` `--
//
// Rebelz ERC-1155 Contract
pragma solidity ^0.8.2;
import "./ERC1155.sol";
import "./ERC1155Burnable.sol";
import "./Ownable.sol";
import "./IERC20.sol";
import "./Counters.sol";
contract REBELZ is ERC1155, Ownable, ERC1155Burnable {
using Counters for Counters.Counter;
uint256 public constant MAX_REBEL = 10000;
uint256 public constant MAX_REBEL_PER_TX = 20;
uint256 public constant PRICE = 0.049 ether;
uint256 public presaleMaxRebelPerWallet = 4;
address public constant creator1Address =
0x156B1fD8bE08047782e46CD82d083ec0cDE56A96;
address public constant creator2Address =
0x04940D82F76CAac41574095dce4b745D7bE89731;
address public constant creator3Address =
0x0E77AB08B861732f8b2a4128974310E57C2e50ab;
address public constant creator4Address =
0x07B956073c58d0dd38D7744D741d540Cd213a5Ca;
address public constant creator5Address =
0x5d083b6C5a6EFB1c92A3aF57d0fCdb67297af5e8;
bool public saleOpen = false;
bool public presaleOpen = false;
Counters.Counter private _tokenIdTracker;
event saleStatusChange(bool pause);
event presaleStatusChange(bool pause);
string public name;
string public symbol;
string public baseTokenURI;
mapping(address => uint256) private _whitelistMintLogs;
address private validator_;
constructor(string memory baseURI, address _validator) ERC1155(baseURI) {
}
modifier saleIsOpen() {
}
modifier presaleIsOpen() {
}
function setValidator(address validator) public onlyOwner {
}
function setPresaleMaxPerWallet(uint256 newMax) public onlyOwner {
}
function toBytes(address a) internal pure returns (bytes memory b) {
}
modifier verify(address _buyer, bytes memory _sign) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function uri(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Total minted Rebel.
*/
function totalSupply() public view returns (uint256) {
}
function price(uint256 _count) public pure returns (uint256) {
}
function setSaleStatus(bool _isOpen) public onlyOwner {
}
function setPresaleStatus(bool _isOpen) public onlyOwner {
}
function _mintRebel(address _to, uint256 _tokenId) private {
}
function mintPresale(uint256 _numberOfTokens, bytes memory _sign)
public
payable
presaleIsOpen
verify(msg.sender, _sign)
{
uint256 total = totalSupply();
address wallet = _msgSender();
require(_numberOfTokens > 0, "You can't mint 0 Rebel");
require(<FILL_ME>)
require(
total + _numberOfTokens <= MAX_REBEL,
"Purchase would exceed max supply of Rebelz"
);
require(msg.value >= price(_numberOfTokens), "Value below price");
for (uint8 i = 0; i < _numberOfTokens; i++) {
uint256 tokenToMint = totalSupply();
_mintRebel(wallet, tokenToMint);
_whitelistMintLogs[wallet] += 1;
}
}
function mintSale(uint256 _numberOfTokens) public payable saleIsOpen {
}
function reserveRebel(uint256 _numberOfTokens) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
}
| _whitelistMintLogs[wallet]+_numberOfTokens<=presaleMaxRebelPerWallet,"You can't mint more than the allowed amount" | 288,459 | _whitelistMintLogs[wallet]+_numberOfTokens<=presaleMaxRebelPerWallet |
"Purchase would exceed max supply of Rebelz" | // SPDX-License-Identifier: MIT
//
// `.--.` ..
// -+sdNNNNmddyo/` `.-----.` :NNy
// .smNMmhs+-.`````/my- .:+yhmNNNmddhhyso- -NMMo `.:/+ossys+-
// `+s+-``dd mMN: `.-://+++/- /dNMNdyo/-.```````mNh. `--:/+++/:. `mMMN` `:oymNNNNmhyo+yMNo
// yMh `oMMMy ./odmmNNmmdhyso+`/dMo.``os` .yMMM/`:+ymmNNNmdhyys+- yMMM+ .mMMMmy/-.` -hNm+`
// +MM+ ./dMMMd. .dNMMMMy:-.`` `. yMM- ./yNMMmoymMMMMN/-..`` /MMMd` -NMM+` .yNNo`
// .NMN``-+hmMMMd+` `ohNMMN. +MMm-/sdNMMmy/` /ydMMMo `mMMM- .+h. `oNMy.
// `yMMmsdNMMNdo-` :MMMo -NMMNNMMMMMy: `dMMm` yMMMs ` /dMm/
// +MMMMMNmy+-` `mMMN:/oshhhs. `dMMmdyo/:-oMNh. oMMMo:+syhhy/ :MMMm` `/yh` -hMNo`
// dMMNMMm+` sMMMNmdhs+:-. `` sMMN. :mMMM/ -NMMMmmhs+:-.` ` `mMMM/ `+dMd: `sNMh- `.-/oyo`
// :MMN:omMMms-` -sMMMy:.` `.-:+yhdy/ :MMMo -yMMMNs .+mMMN/-` `.-+shdhooMMMy `+mMd/` `/mMd/ .-+ydmmds/-
// -hmo `:yNMMd+. /MMMN-.:oydmNNmho:. `mMMd` `-sNMMMh: .dMMMo.-+shmNNmds/-.NMMN. `+mMd/` -hMNo../shmNmyo:.
// ` .+hNMNh/. yNMNmNNmdyo:.` -o: sMMM:.+hNMMNh: :mNMdNMNmhs/-` sMMM/ `+mMd/` .sNMNyhdmmho:-`
// .+hNMmy:`./oo+:. hMd.NMMNhNMMNdo- `:+s+:.` `NMMh.omMd/` /mMMNmho/-`
// ./ymNms. `/yyNNNNNdy/- /MMNsmMd: -+o/-`
// `:+yds `.---` `smNNd:
// ` `--
//
// Rebelz ERC-1155 Contract
pragma solidity ^0.8.2;
import "./ERC1155.sol";
import "./ERC1155Burnable.sol";
import "./Ownable.sol";
import "./IERC20.sol";
import "./Counters.sol";
contract REBELZ is ERC1155, Ownable, ERC1155Burnable {
using Counters for Counters.Counter;
uint256 public constant MAX_REBEL = 10000;
uint256 public constant MAX_REBEL_PER_TX = 20;
uint256 public constant PRICE = 0.049 ether;
uint256 public presaleMaxRebelPerWallet = 4;
address public constant creator1Address =
0x156B1fD8bE08047782e46CD82d083ec0cDE56A96;
address public constant creator2Address =
0x04940D82F76CAac41574095dce4b745D7bE89731;
address public constant creator3Address =
0x0E77AB08B861732f8b2a4128974310E57C2e50ab;
address public constant creator4Address =
0x07B956073c58d0dd38D7744D741d540Cd213a5Ca;
address public constant creator5Address =
0x5d083b6C5a6EFB1c92A3aF57d0fCdb67297af5e8;
bool public saleOpen = false;
bool public presaleOpen = false;
Counters.Counter private _tokenIdTracker;
event saleStatusChange(bool pause);
event presaleStatusChange(bool pause);
string public name;
string public symbol;
string public baseTokenURI;
mapping(address => uint256) private _whitelistMintLogs;
address private validator_;
constructor(string memory baseURI, address _validator) ERC1155(baseURI) {
}
modifier saleIsOpen() {
}
modifier presaleIsOpen() {
}
function setValidator(address validator) public onlyOwner {
}
function setPresaleMaxPerWallet(uint256 newMax) public onlyOwner {
}
function toBytes(address a) internal pure returns (bytes memory b) {
}
modifier verify(address _buyer, bytes memory _sign) {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
function uri(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
}
/**
* @dev Total minted Rebel.
*/
function totalSupply() public view returns (uint256) {
}
function price(uint256 _count) public pure returns (uint256) {
}
function setSaleStatus(bool _isOpen) public onlyOwner {
}
function setPresaleStatus(bool _isOpen) public onlyOwner {
}
function _mintRebel(address _to, uint256 _tokenId) private {
}
function mintPresale(uint256 _numberOfTokens, bytes memory _sign)
public
payable
presaleIsOpen
verify(msg.sender, _sign)
{
uint256 total = totalSupply();
address wallet = _msgSender();
require(_numberOfTokens > 0, "You can't mint 0 Rebel");
require(
_whitelistMintLogs[wallet] + _numberOfTokens <=
presaleMaxRebelPerWallet,
"You can't mint more than the allowed amount"
);
require(<FILL_ME>)
require(msg.value >= price(_numberOfTokens), "Value below price");
for (uint8 i = 0; i < _numberOfTokens; i++) {
uint256 tokenToMint = totalSupply();
_mintRebel(wallet, tokenToMint);
_whitelistMintLogs[wallet] += 1;
}
}
function mintSale(uint256 _numberOfTokens) public payable saleIsOpen {
}
function reserveRebel(uint256 _numberOfTokens) public onlyOwner {
}
function withdrawAll() public onlyOwner {
}
function _widthdraw(address _address, uint256 _amount) private {
}
}
| total+_numberOfTokens<=MAX_REBEL,"Purchase would exceed max supply of Rebelz" | 288,459 | total+_numberOfTokens<=MAX_REBEL |
"doesn't own garden!" | // SPDX-License-Identifier: MIT
// _
// (` ). _
// ( ). .:(` )`.
// ) _( '`. :( . )
// .=(`( . ) .-- `. ( ) )
// (( (..__.:'-' .+( ) ` _` ) )
// `. `( ) ) ( . ) ( ) ._
// ) ` __.:' ) ( ( )) `-'.-(` )
// ) ) ( ) --' `- __.' :( ))
// .-' (_.' .') `( ) ))
// (_ ) dream gardener ` __.:'
//
// --..,___.--,--'`,---..-.--+--.,,-,,..._.--..-._.-a:f--.
//
// by @eddietree
pragma solidity ^0.8.0;
import "./Base64.sol";
import "./DreamSeedProduct.sol";
contract DreamGardenersNFT is DreamSeedProduct {
enum GardenerType {
DREAM, // 0
NIGHTMARE // 1
}
struct GardenerData {
GardenerType gardenerType;
uint16 index; // index depending on type
}
struct GardenerSupplyData {
string metaURI;
uint16 minted;
uint16 numRevealed;
}
address public contractDreamGardens;
GardenerData[] public gardeners;
GardenerSupplyData[2] public supplyData;
bytes4 constant sigOwnerOfGarden = bytes4(keccak256("ownerOf(uint256)"));
bytes4 constant sigIsNightmare = bytes4(keccak256("isNightmare(uint256)"));
constructor(address _proxyRegistryAddress) ERC721TradableBurnable("Dream Gardeners NFT", "DREAMGARDENER", _proxyRegistryAddress) {
}
function setContractDreamGardens(address newAddress) external onlyOwner {
}
function setRevealedURI(GardenerType gardenerType, string memory _value) external onlyOwner {
}
function setNumRevealed(GardenerType gardenerType, uint16 numRevealed) external onlyOwner {
}
function getSupplyInfo(GardenerType gardenerType) external view returns (string memory, uint16, uint16) {
}
function tokenURI(uint256 _tokenId) override public view returns (string memory) {
}
function isOwnerOfGarden(address ownerAddress, uint256 gardenTokenId) private returns (bool) {
}
function isGardenNightmare(uint256 gardenTokenId) private returns (bool) {
}
// mints
function reserveGardener(uint numberOfTokens, GardenerType gardenerType) external onlyOwner {
}
function _mintTo(address receiver, GardenerType gardenerType) private {
}
function mintGardener(uint256 gardenTokenId, uint256 seedTokenId) external {
require(mintIsActive, "Must be active to mint tokens");
require(<FILL_ME>)
// destroy seed
burnDreamSeed(seedTokenId);
// mint gardener
GardenerType gardenerType = isGardenNightmare(gardenTokenId) ? GardenerType.NIGHTMARE : GardenerType.DREAM;
_mintTo(msg.sender, gardenerType);
}
}
| isOwnerOfGarden(msg.sender,gardenTokenId),"doesn't own garden!" | 288,523 | isOwnerOfGarden(msg.sender,gardenTokenId) |
"Would exceed max reserved amount" | pragma solidity ^0.8.12;
contract Toeken is ERC20, Ownable, ReentrancyGuard {
IERC721 public TiptoePunks;
IERC721 public FootPunks;
uint256 internal reserved;
uint256 public startTime;
mapping(address => uint256) public rewards;
mapping(address => uint256) public lastUpdate;
mapping(address => bool) public allowed;
uint256 public constant TIPTOE_BASE_RATE = 5 ether;
uint256 public constant FOOT_BASE_RATE = 75 ether;
uint256 public constant MAX_RESERVED_AMOUNT = 100_000 ether;
constructor(address tiptoePunks, address footPunks) ERC20("Toeken", "TOEKEN") {
}
modifier onlyAllowed() {
}
function setTiptoePunks(address tiptoePunks) public onlyOwner {
}
function setFootPunks(address footPunks) public onlyOwner {
}
function startRewards(uint256 timestamp) public onlyOwner {
}
function stopRewards() public onlyOwner {
}
function setAllowed(address account, bool isAllowed) public onlyOwner {
}
function reserve(uint256 amount) external onlyOwner {
require(<FILL_ME>)
_mint(msg.sender, amount);
reserved += amount;
}
function burn(uint256 amount) external onlyOwner {
}
function getClaimable(address account) external view returns (uint256) {
}
function getPending(address account) internal view returns (uint256) {
}
function update(address from, address to) external onlyAllowed {
}
function claim(address account) external nonReentrant {
}
}
| reserved+amount<=MAX_RESERVED_AMOUNT,"Would exceed max reserved amount" | 288,754 | reserved+amount<=MAX_RESERVED_AMOUNT |
"Whitelist allocation for user has been reached" | // SPDX-License-Identifier: MIT
// @title: Cryptowalkers
// @author: Manifest Futures
pragma solidity ^0.8.0;
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/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract Cryptowalkers is
ERC721,
ERC721Enumerable,
ERC721URIStorage,
Ownable,
ReentrancyGuard
{
using Address for address payable;
using SafeMath for uint256;
struct WhitelistDetails {
string whitelistType;
uint256 amountToMint;
}
struct WhitelistUserStatus {
uint256 whitelistLevel;
uint256 amountMinted;
bool limitReached;
}
enum State {
Setup,
Whitelist,
Public
}
mapping(uint256 => WhitelistDetails) public _whitelistDetails;
mapping(address => WhitelistUserStatus) public _whitelistUserStatus;
mapping(uint256 => bool) private _walkerDetailsChanged;
State private _state;
string private _tokenUriBase;
uint256 private _nextTokenId;
uint256 private _startingIndex;
uint256 private _amountReserved;
bool private _reservedMinted;
uint256 public constant MAX_CRYPTOWALKERS = 10000;
uint256 public constant MAX_MINT = 10;
uint256 public constant RESERVED_CRYPTOWALKERS = 400;
uint256 public WALKER_PRICE = 8E16; // 0.08ETH
uint256 public UPDATE_DETAILS_PRICE = 8E15; // 0.008ETH
event WalkerDetailsChange(
uint256 indexed _tokenId,
string _name,
string _description
);
constructor() ERC721("Cryptowalkers", "Walkers") {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function baseTokenURI() public view virtual returns (string memory) {
}
function setTokenURI(string memory tokenUriBase_) public onlyOwner {
}
function state() public view virtual returns (State) {
}
function setStateToSetup() public onlyOwner {
}
function setStateToWhitelist() public onlyOwner {
}
function setStateToPublic() public onlyOwner {
}
function addUserToWhitelistByIndex(
address userToWhitelist,
uint256 whitelistDetailsIndex
) public onlyOwner returns (bool) {
}
function addUsersToWhitelistByIndex(
address[] memory usersToWhitelist,
uint256 whitelistDetailsIndex
) public onlyOwner returns (bool) {
}
function checkUserMintStatus(address user, uint256 amountToMint) public view {
require(<FILL_ME>)
require(
amountToMint <=
_whitelistDetails[_whitelistUserStatus[user].whitelistLevel]
.amountToMint,
"You can only mint the amount allowed for your whitelist level"
);
}
function updateUserWhitelistStatus(address user) private {
}
function mintReserve(address reserveAddress, uint256 amountToReserve) public onlyOwner {
}
function mintWalkers(uint256 amountOfWalkers)
public
payable
virtual
nonReentrant
returns (uint256)
{
}
function changeWalkerDetails(
uint256 tokenId,
string memory newName,
string memory newDescription
) public payable {
}
function setMintPricing(uint256 newPrice) public onlyOwner {
}
function setDetailsPricing(uint256 newPrice) public onlyOwner {
}
function withdrawAllEth() public virtual onlyOwner {
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| !_whitelistUserStatus[user].limitReached,"Whitelist allocation for user has been reached" | 288,805 | !_whitelistUserStatus[user].limitReached |
"Reserve minting has already been completed" | // SPDX-License-Identifier: MIT
// @title: Cryptowalkers
// @author: Manifest Futures
pragma solidity ^0.8.0;
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/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract Cryptowalkers is
ERC721,
ERC721Enumerable,
ERC721URIStorage,
Ownable,
ReentrancyGuard
{
using Address for address payable;
using SafeMath for uint256;
struct WhitelistDetails {
string whitelistType;
uint256 amountToMint;
}
struct WhitelistUserStatus {
uint256 whitelistLevel;
uint256 amountMinted;
bool limitReached;
}
enum State {
Setup,
Whitelist,
Public
}
mapping(uint256 => WhitelistDetails) public _whitelistDetails;
mapping(address => WhitelistUserStatus) public _whitelistUserStatus;
mapping(uint256 => bool) private _walkerDetailsChanged;
State private _state;
string private _tokenUriBase;
uint256 private _nextTokenId;
uint256 private _startingIndex;
uint256 private _amountReserved;
bool private _reservedMinted;
uint256 public constant MAX_CRYPTOWALKERS = 10000;
uint256 public constant MAX_MINT = 10;
uint256 public constant RESERVED_CRYPTOWALKERS = 400;
uint256 public WALKER_PRICE = 8E16; // 0.08ETH
uint256 public UPDATE_DETAILS_PRICE = 8E15; // 0.008ETH
event WalkerDetailsChange(
uint256 indexed _tokenId,
string _name,
string _description
);
constructor() ERC721("Cryptowalkers", "Walkers") {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function baseTokenURI() public view virtual returns (string memory) {
}
function setTokenURI(string memory tokenUriBase_) public onlyOwner {
}
function state() public view virtual returns (State) {
}
function setStateToSetup() public onlyOwner {
}
function setStateToWhitelist() public onlyOwner {
}
function setStateToPublic() public onlyOwner {
}
function addUserToWhitelistByIndex(
address userToWhitelist,
uint256 whitelistDetailsIndex
) public onlyOwner returns (bool) {
}
function addUsersToWhitelistByIndex(
address[] memory usersToWhitelist,
uint256 whitelistDetailsIndex
) public onlyOwner returns (bool) {
}
function checkUserMintStatus(address user, uint256 amountToMint) public view {
}
function updateUserWhitelistStatus(address user) private {
}
function mintReserve(address reserveAddress, uint256 amountToReserve) public onlyOwner {
require(<FILL_ME>)
require(_amountReserved.add(amountToReserve) <= RESERVED_CRYPTOWALKERS, "Reserving too many Cryptowalkers");
if (totalSupply() == 0){
_nextTokenId = _startingIndex;
}
for (uint256 i = 0; i < amountToReserve; i++) {
_safeMint(reserveAddress, _nextTokenId);
_nextTokenId = _nextTokenId.add(1);
}
_amountReserved = _amountReserved.add(amountToReserve);
if (_amountReserved == RESERVED_CRYPTOWALKERS) {
_reservedMinted = true;
}
}
function mintWalkers(uint256 amountOfWalkers)
public
payable
virtual
nonReentrant
returns (uint256)
{
}
function changeWalkerDetails(
uint256 tokenId,
string memory newName,
string memory newDescription
) public payable {
}
function setMintPricing(uint256 newPrice) public onlyOwner {
}
function setDetailsPricing(uint256 newPrice) public onlyOwner {
}
function withdrawAllEth() public virtual onlyOwner {
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| !_reservedMinted,"Reserve minting has already been completed" | 288,805 | !_reservedMinted |
"Reserving too many Cryptowalkers" | // SPDX-License-Identifier: MIT
// @title: Cryptowalkers
// @author: Manifest Futures
pragma solidity ^0.8.0;
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/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract Cryptowalkers is
ERC721,
ERC721Enumerable,
ERC721URIStorage,
Ownable,
ReentrancyGuard
{
using Address for address payable;
using SafeMath for uint256;
struct WhitelistDetails {
string whitelistType;
uint256 amountToMint;
}
struct WhitelistUserStatus {
uint256 whitelistLevel;
uint256 amountMinted;
bool limitReached;
}
enum State {
Setup,
Whitelist,
Public
}
mapping(uint256 => WhitelistDetails) public _whitelistDetails;
mapping(address => WhitelistUserStatus) public _whitelistUserStatus;
mapping(uint256 => bool) private _walkerDetailsChanged;
State private _state;
string private _tokenUriBase;
uint256 private _nextTokenId;
uint256 private _startingIndex;
uint256 private _amountReserved;
bool private _reservedMinted;
uint256 public constant MAX_CRYPTOWALKERS = 10000;
uint256 public constant MAX_MINT = 10;
uint256 public constant RESERVED_CRYPTOWALKERS = 400;
uint256 public WALKER_PRICE = 8E16; // 0.08ETH
uint256 public UPDATE_DETAILS_PRICE = 8E15; // 0.008ETH
event WalkerDetailsChange(
uint256 indexed _tokenId,
string _name,
string _description
);
constructor() ERC721("Cryptowalkers", "Walkers") {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function baseTokenURI() public view virtual returns (string memory) {
}
function setTokenURI(string memory tokenUriBase_) public onlyOwner {
}
function state() public view virtual returns (State) {
}
function setStateToSetup() public onlyOwner {
}
function setStateToWhitelist() public onlyOwner {
}
function setStateToPublic() public onlyOwner {
}
function addUserToWhitelistByIndex(
address userToWhitelist,
uint256 whitelistDetailsIndex
) public onlyOwner returns (bool) {
}
function addUsersToWhitelistByIndex(
address[] memory usersToWhitelist,
uint256 whitelistDetailsIndex
) public onlyOwner returns (bool) {
}
function checkUserMintStatus(address user, uint256 amountToMint) public view {
}
function updateUserWhitelistStatus(address user) private {
}
function mintReserve(address reserveAddress, uint256 amountToReserve) public onlyOwner {
require(!_reservedMinted, "Reserve minting has already been completed");
require(<FILL_ME>)
if (totalSupply() == 0){
_nextTokenId = _startingIndex;
}
for (uint256 i = 0; i < amountToReserve; i++) {
_safeMint(reserveAddress, _nextTokenId);
_nextTokenId = _nextTokenId.add(1);
}
_amountReserved = _amountReserved.add(amountToReserve);
if (_amountReserved == RESERVED_CRYPTOWALKERS) {
_reservedMinted = true;
}
}
function mintWalkers(uint256 amountOfWalkers)
public
payable
virtual
nonReentrant
returns (uint256)
{
}
function changeWalkerDetails(
uint256 tokenId,
string memory newName,
string memory newDescription
) public payable {
}
function setMintPricing(uint256 newPrice) public onlyOwner {
}
function setDetailsPricing(uint256 newPrice) public onlyOwner {
}
function withdrawAllEth() public virtual onlyOwner {
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| _amountReserved.add(amountToReserve)<=RESERVED_CRYPTOWALKERS,"Reserving too many Cryptowalkers" | 288,805 | _amountReserved.add(amountToReserve)<=RESERVED_CRYPTOWALKERS |
"Sorry, there is not that many Cryptowalkers left." | // SPDX-License-Identifier: MIT
// @title: Cryptowalkers
// @author: Manifest Futures
pragma solidity ^0.8.0;
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/utils/Strings.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract Cryptowalkers is
ERC721,
ERC721Enumerable,
ERC721URIStorage,
Ownable,
ReentrancyGuard
{
using Address for address payable;
using SafeMath for uint256;
struct WhitelistDetails {
string whitelistType;
uint256 amountToMint;
}
struct WhitelistUserStatus {
uint256 whitelistLevel;
uint256 amountMinted;
bool limitReached;
}
enum State {
Setup,
Whitelist,
Public
}
mapping(uint256 => WhitelistDetails) public _whitelistDetails;
mapping(address => WhitelistUserStatus) public _whitelistUserStatus;
mapping(uint256 => bool) private _walkerDetailsChanged;
State private _state;
string private _tokenUriBase;
uint256 private _nextTokenId;
uint256 private _startingIndex;
uint256 private _amountReserved;
bool private _reservedMinted;
uint256 public constant MAX_CRYPTOWALKERS = 10000;
uint256 public constant MAX_MINT = 10;
uint256 public constant RESERVED_CRYPTOWALKERS = 400;
uint256 public WALKER_PRICE = 8E16; // 0.08ETH
uint256 public UPDATE_DETAILS_PRICE = 8E15; // 0.008ETH
event WalkerDetailsChange(
uint256 indexed _tokenId,
string _name,
string _description
);
constructor() ERC721("Cryptowalkers", "Walkers") {
}
function tokenURI(uint256 tokenId)
public
view
override(ERC721, ERC721URIStorage)
returns (string memory)
{
}
function baseTokenURI() public view virtual returns (string memory) {
}
function setTokenURI(string memory tokenUriBase_) public onlyOwner {
}
function state() public view virtual returns (State) {
}
function setStateToSetup() public onlyOwner {
}
function setStateToWhitelist() public onlyOwner {
}
function setStateToPublic() public onlyOwner {
}
function addUserToWhitelistByIndex(
address userToWhitelist,
uint256 whitelistDetailsIndex
) public onlyOwner returns (bool) {
}
function addUsersToWhitelistByIndex(
address[] memory usersToWhitelist,
uint256 whitelistDetailsIndex
) public onlyOwner returns (bool) {
}
function checkUserMintStatus(address user, uint256 amountToMint) public view {
}
function updateUserWhitelistStatus(address user) private {
}
function mintReserve(address reserveAddress, uint256 amountToReserve) public onlyOwner {
}
function mintWalkers(uint256 amountOfWalkers)
public
payable
virtual
nonReentrant
returns (uint256)
{
address recipient = msg.sender;
require(_state != State.Setup, "Cryptowalkers aren't available yet");
if (_state == State.Whitelist) {
checkUserMintStatus(recipient, amountOfWalkers);
}
require(<FILL_ME>)
require(
amountOfWalkers <= MAX_MINT,
"You can only mint 10 Cryptowalkers at a time."
);
uint256 firstWalkerReceived = _nextTokenId;
for (uint256 i = 0; i < amountOfWalkers; i++) {
_safeMint(recipient, _nextTokenId);
_nextTokenId = _nextTokenId.add(1);
if (_state == State.Whitelist) {
updateUserWhitelistStatus(recipient);
}
}
return firstWalkerReceived;
}
function changeWalkerDetails(
uint256 tokenId,
string memory newName,
string memory newDescription
) public payable {
}
function setMintPricing(uint256 newPrice) public onlyOwner {
}
function setDetailsPricing(uint256 newPrice) public onlyOwner {
}
function withdrawAllEth() public virtual onlyOwner {
}
function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721, ERC721Enumerable)
returns (bool)
{
}
}
| totalSupply().add(1)<=MAX_CRYPTOWALKERS,"Sorry, there is not that many Cryptowalkers left." | 288,805 | totalSupply().add(1)<=MAX_CRYPTOWALKERS |
"Address not whitelisted for pre-sale minting" | //
//ÔûêÔûêÔûêÔûêÔûêÔûêÔòùÔûæÔûêÔûêÔòùÔûêÔûêÔûêÔòùÔûæÔûæÔûêÔûêÔòùÔûæÔûêÔûêÔûêÔûêÔûêÔòùÔûæÔûêÔûêÔûêÔûêÔûêÔûêÔòùÔûæÔûêÔûêÔòùÔûæÔûæÔûæÔûêÔûêÔòùÔûêÔûêÔûêÔòùÔûæÔûæÔûêÔûêÔòùÔûêÔûêÔòùÔûæÔûæÔûêÔûêÔòùÔûæÔûêÔûêÔûêÔûêÔûêÔûêÔòùÔÇâÔÇâÔûêÔûêÔûêÔòùÔûæÔûæÔûêÔûêÔòùÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔòùÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔûêÔòù
//ÔûêÔûêÔòöÔòÉÔòÉÔûêÔûêÔòùÔûêÔûêÔòæÔûêÔûêÔûêÔûêÔòùÔûæÔûêÔûêÔòæÔûêÔûêÔòöÔòÉÔòÉÔûêÔûêÔòùÔûêÔûêÔòöÔòÉÔòÉÔûêÔûêÔòùÔûêÔûêÔòæÔûæÔûæÔûæÔûêÔûêÔòæÔûêÔûêÔûêÔûêÔòùÔûæÔûêÔûêÔòæÔûêÔûêÔòæÔûæÔûêÔûêÔòöÔòØÔûêÔûêÔòöÔòÉÔòÉÔòÉÔòÉÔòØÔÇâÔÇâÔûêÔûêÔûêÔûêÔòùÔûæÔûêÔûêÔòæÔûêÔûêÔòöÔòÉÔòÉÔòÉÔòÉÔòØÔòÜÔòÉÔòÉÔûêÔûêÔòöÔòÉÔòÉÔòØ
//ÔûêÔûêÔòæÔûæÔûæÔûêÔûêÔòæÔûêÔûêÔòæÔûêÔûêÔòöÔûêÔûêÔòùÔûêÔûêÔòæÔûêÔûêÔòæÔûæÔûæÔûêÔûêÔòæÔûêÔûêÔûêÔûêÔûêÔûêÔòöÔòØÔûêÔûêÔòæÔûæÔûæÔûæÔûêÔûêÔòæÔûêÔûêÔòöÔûêÔûêÔòùÔûêÔûêÔòæÔûêÔûêÔûêÔûêÔûêÔòÉÔòØÔûæÔòÜÔûêÔûêÔûêÔûêÔûêÔòùÔûæÔÇâÔÇâÔûêÔûêÔòöÔûêÔûêÔòùÔûêÔûêÔòæÔûêÔûêÔûêÔûêÔûêÔòùÔûæÔûæÔûæÔûæÔûæÔûêÔûêÔòæÔûæÔûæÔûæ
//ÔûêÔûêÔòæÔûæÔûæÔûêÔûêÔòæÔûêÔûêÔòæÔûêÔûêÔòæÔòÜÔûêÔûêÔûêÔûêÔòæÔûêÔûêÔòæÔûæÔûæÔûêÔûêÔòæÔûêÔûêÔòöÔòÉÔòÉÔòÉÔòØÔûæÔûêÔûêÔòæÔûæÔûæÔûæÔûêÔûêÔòæÔûêÔûêÔòæÔòÜÔûêÔûêÔûêÔûêÔòæÔûêÔûêÔòöÔòÉÔûêÔûêÔòùÔûæÔûæÔòÜÔòÉÔòÉÔòÉÔûêÔûêÔòùÔÇâÔÇâÔûêÔûêÔòæÔòÜÔûêÔûêÔûêÔûêÔòæÔûêÔûêÔòöÔòÉÔòÉÔòØÔûæÔûæÔûæÔûæÔûæÔûêÔûêÔòæÔûæÔûæÔûæ
//ÔûêÔûêÔûêÔûêÔûêÔûêÔòöÔòØÔûêÔûêÔòæÔûêÔûêÔòæÔûæÔòÜÔûêÔûêÔûêÔòæÔòÜÔûêÔûêÔûêÔûêÔûêÔòöÔòØÔûêÔûêÔòæÔûæÔûæÔûæÔûæÔûæÔòÜÔûêÔûêÔûêÔûêÔûêÔûêÔòöÔòØÔûêÔûêÔòæÔûæÔòÜÔûêÔûêÔûêÔòæÔûêÔûêÔòæÔûæÔòÜÔûêÔûêÔòùÔûêÔûêÔûêÔûêÔûêÔûêÔòöÔòØÔÇâÔÇâÔûêÔûêÔòæÔûæÔòÜÔûêÔûêÔûêÔòæÔûêÔûêÔòæÔûæÔûæÔûæÔûæÔûæÔûæÔûæÔûæÔûêÔûêÔòæÔûæÔûæÔûæ
//ÔòÜÔòÉÔòÉÔòÉÔòÉÔòÉÔòØÔûæÔòÜÔòÉÔòØÔòÜÔòÉÔòØÔûæÔûæÔòÜÔòÉÔòÉÔòØÔûæÔòÜÔòÉÔòÉÔòÉÔòÉÔòØÔûæÔòÜÔòÉÔòØÔûæÔûæÔûæÔûæÔûæÔûæÔòÜÔòÉÔòÉÔòÉÔòÉÔòÉÔòØÔûæÔòÜÔòÉÔòØÔûæÔûæÔòÜÔòÉÔòÉÔòØÔòÜÔòÉÔòØÔûæÔûæÔòÜÔòÉÔòØÔòÜÔòÉÔòÉÔòÉÔòÉÔòÉÔòØÔûæÔÇâÔÇâÔòÜÔòÉÔòØÔûæÔûæÔòÜÔòÉÔòÉÔòØÔòÜÔòÉÔòØÔûæÔûæÔûæÔûæÔûæÔûæÔûæÔûæÔòÜÔòÉÔòØÔûæÔûæÔûæ
//
pragma solidity >=0.8.0;
/**
* @dev contract module which defines Dino Punks NFT Collection
* and all the interactions it uses
*/
contract DinoPunks is ERC721Enumerable, Ownable, PaymentSplitter, ReentrancyGuard {
using Strings for uint256;
//@dev Attributes for NFT configuration
string internal baseURI;
uint256 public cost = 0.05 ether;
uint256 public maxSupply = 8888;
uint256 public maxMintAmount = 5;
mapping(address => uint256) public whitelist;
mapping(uint256 => string) private _tokenURIs;
mapping(address => bool) presaleAddress;
uint256[] mintedEditions;
bool public presale;
bool public paused = true;
bool public revealed;
// @dev inner attributes of the contract
/**
* @dev Create an instance of Dino Punks contract
* @param _initBaseURI Base URI for NFT metadata.
*/
constructor(
string memory _initBaseURI
// address[] memory _payees,
// uint256[] memory _amount,
) ERC721("DinoPunks", "DinoPunks"){
}
/**
* @dev get base URI for NFT metadata
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* @dev set new max supply for the smart contract
* @param _newMaxSupply new max supply
*/
function setNewMaxSupply(uint256 _newMaxSupply) public onlyOwner {
}
/**
*
* @dev Mint edition to a wallet
* @param _to wallet receiving the edition(s).
* @param _mintAmount number of editions to mint.
*/
function mint(address _to, uint256 _mintAmount) public payable nonReentrant {
require(paused == false,"Minting is paused");
require(_mintAmount <= maxMintAmount, "Cannot exceed max mint amount");
if(presale == true)
require(<FILL_ME>)
uint256 supply = totalSupply();
require(
supply + _mintAmount <= maxSupply,
"Not enough mintable editions !"
);
require(
msg.value >= cost * _mintAmount,
"Insufficient transaction amount."
);
for (uint256 i = 1; i <= _mintAmount; i++) {
_safeMint(_to, supply + i);
}
}
/**
* @dev whitelistMint edition to a wallet
* @param _to wallet receiving the edition(s).
* @param _mintAmount number of editions to mint.
*/
function freeMint(address _to, uint256 _mintAmount) public nonReentrant{
}
/**
* @dev get balance contained in the smart contract
*/
function getBalance() public view onlyOwner returns (uint256) {
}
/**
* @dev change cost of NFT
* @param _newCost new cost of each edition
*/
function setCost(uint256 _newCost) public onlyOwner {
}
/**
* @dev restrict max mintable amount of edition at a time
* @param _newmaxMintAmount new max mintable amount
*/
function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner {
}
/**
* @dev change metadata uri
* @param _newBaseURI new URI for metadata
*/
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
/**
* @dev Disable minting process
*/
function pause() public onlyOwner {
}
/**
* @dev Activate presaleAddress
*/
function activatePresale() public onlyOwner {
}
/**
* @dev Activate presaleAddress
*/
function presaleMembers(address[] memory _presaleAddress) public onlyOwner {
}
/**
* @dev Add user to white list
* @param _user Users wallet to whitelist
*/
function whitelistUserBatch(
address[] memory _user,
uint256[] memory _amount
) public onlyOwner {
}
/**
* @dev Reveal metadata
* @param _newURI new metadata URI
*/
function reveal(string memory _newURI) public onlyOwner {
}
/**
* @dev Get token URI
* @param tokenId ID of the token to retrieve
*/
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function burn(uint256[] memory _tokenIds) public onlyOwner {
}
}
| presaleAddress[msg.sender]==true,"Address not whitelisted for pre-sale minting" | 288,824 | presaleAddress[msg.sender]==true |
null | contract Referrers is Ownable {
using SafeMath for uint256;
// Referrer bonus in %
uint public referrerBonusSale;
uint public referrerBonusWin;
uint public _referrerId;
// mapping referrerId to address
mapping(uint => address) public referrerToAddress;
// Tickets referals: tokeId => referrerId
mapping(uint => uint) public ticketToReferrer;
// Tickets of referrer
mapping(uint => uint[]) public referrerTickets;
// mapping address to referrerId
mapping(address => uint) public addressToReferrer;
mapping(uint => uint) public totalEarnReferrer;
constructor() public {
}
function _setTicketReferrer(uint _tokenId, uint _referrer) internal {
require(<FILL_ME>)
ticketToReferrer[_tokenId] = _referrer;
referrerTickets[_referrer].push(_tokenId);
}
function registerReferrer() public {
}
function getReferrerTickets(uint _referrer) public view returns (uint[]) {
}
// Admin methods
function setReferrerBonusWin(uint _amount) public onlyOwner {
}
function setReferrerBonusSale(uint _amount) public onlyOwner {
}
//End admin methods
}
| ticketToReferrer[_tokenId]==0 | 288,896 | ticketToReferrer[_tokenId]==0 |
null | contract Referrers is Ownable {
using SafeMath for uint256;
// Referrer bonus in %
uint public referrerBonusSale;
uint public referrerBonusWin;
uint public _referrerId;
// mapping referrerId to address
mapping(uint => address) public referrerToAddress;
// Tickets referals: tokeId => referrerId
mapping(uint => uint) public ticketToReferrer;
// Tickets of referrer
mapping(uint => uint[]) public referrerTickets;
// mapping address to referrerId
mapping(address => uint) public addressToReferrer;
mapping(uint => uint) public totalEarnReferrer;
constructor() public {
}
function _setTicketReferrer(uint _tokenId, uint _referrer) internal {
}
function registerReferrer() public {
require(<FILL_ME>)
_referrerId = _referrerId.add(1);
addressToReferrer[msg.sender] = _referrerId;
referrerToAddress[_referrerId] = msg.sender;
}
function getReferrerTickets(uint _referrer) public view returns (uint[]) {
}
// Admin methods
function setReferrerBonusWin(uint _amount) public onlyOwner {
}
function setReferrerBonusSale(uint _amount) public onlyOwner {
}
//End admin methods
}
| addressToReferrer[msg.sender]==0 | 288,896 | addressToReferrer[msg.sender]==0 |
null | /**
*Submitted for verification at Etherscan.io on 2019-05-28
*/
pragma solidity ^0.4.26;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
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 ERC20 {
function totalSupply() public view returns (uint256);
function balanceOf(address _who) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool);
function allowance(address _owner, address _spender) public view returns (uint256);
function approve(address _spender, uint256 _value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract StandardToken is ERC20 {
using SafeMath for uint256;
uint256 public totalSupply;
mapping(address => uint256) internal balances;
mapping(address => mapping (address => uint256)) internal allowed;
modifier validDestination( address _to )
{
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function transfer(address _to, uint256 _value)
public
validDestination(_to)
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
validDestination(_to)
returns (bool)
{
}
function burn(uint _value) public returns (bool)
{
}
function burnFrom(address _from, uint256 _value) public validDestination(_from) returns (bool)
{
}
function approve(address _spender, uint256 _value) public validDestination(_spender) returns (bool) {
}
function allowance(address _owner, address _spender) public view 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 Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function pause() public onlyOwner whenNotPaused {
}
function unpause() public onlyOwner whenPaused {
}
}
contract Freezable is Ownable {
mapping (address => bool) public frozenAccount;
event Freeze(address indexed target, bool frozen);
event Unfreeze(address indexed target, bool frozen);
modifier isNotFrozen(address _target) {
require(<FILL_ME>)
_;
}
modifier isFrozen(address _target) {
}
function freeze(address _target) public onlyOwner isNotFrozen(_target) {
}
function unfreeze(address _target) public onlyOwner isFrozen(_target) {
}
}
/**
* @title Pausable token
* @dev StandardToken modified with pausable transfers.
**/
contract PausableToken is StandardToken, Pausable, Freezable {
function transfer(address _to, uint256 _value)
public
whenNotPaused
isNotFrozen(msg.sender)
isNotFrozen(_to)
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
whenNotPaused
isNotFrozen(_from)
isNotFrozen(_to)
returns (bool)
{
}
function burn(uint256 _value)
public
whenNotPaused
isNotFrozen(msg.sender)
returns (bool)
{
}
function burnFrom(address _to, uint256 _value)
public
whenNotPaused
isNotFrozen(_to)
returns (bool)
{
}
function approve(
address _spender,
uint256 _value
)
public
whenNotPaused
isNotFrozen(msg.sender)
isNotFrozen(_spender)
returns (bool)
{
}
}
contract TimeLockable is Ownable {
using SafeMath for uint256;
uint256 private constant SECOND_IN_DAY = 86400;
mapping (address => uint256) internal lockedBaseQuantity;
event LockAccount(address indexed target, uint256 value);
function setTimeLockAccount(address _target, uint256 _value)
internal
onlyOwner
returns (bool)
{
}
function lockedNow(address _target) internal view returns ( uint256 ) {
}
function _getLockedRate(uint256 _timeNow) private pure returns(uint256 lockedRate) {
}
}
/**
* @title DKHAN Token
* @dev time lock(sequential unlock), puase, burn, freeze added.
**/
contract DKHAN is PausableToken, TimeLockable {
using SafeMath for uint256;
string public name;
string public symbol;
uint256 public constant decimals = 12;
uint256 public totalSupply;
constructor(
uint256 initialSupply,
string memory tokenName,
string memory tokenSymbol
)
public
{
}
modifier canTransper(address _from, uint256 _value) {
}
function balanceAvailable(address _from) public view returns ( uint256 ) {
}
function lockedInfo(address _from) public view returns ( uint256 _lockedNow, uint256 _lockedAtFirst ) {
}
function lockAndTransfer(address _to, uint256 _value)
public
onlyOwner
returns (bool)
{
}
function transfer(address _to, uint _value)
public
canTransper(msg.sender, _value)
returns (bool)
{
}
function transferFrom(address _from, address _to, uint _value)
public
canTransper(_from, _value)
returns (bool)
{
}
function burn(uint _value) // Cannot burn locked amount
public
canTransper(msg.sender, _value)
returns (bool)
{
}
function burnFrom(address _from, uint256 _value) // Cannot burn locked amount
public
canTransper(_from, _value)
returns (bool)
{
}
}
| !frozenAccount[_target] | 289,126 | !frozenAccount[_target] |
null | /**
*Submitted for verification at Etherscan.io on 2019-05-28
*/
pragma solidity ^0.4.26;
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
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 ERC20 {
function totalSupply() public view returns (uint256);
function balanceOf(address _who) public view returns (uint256);
function transfer(address _to, uint256 _value) public returns (bool);
function transferFrom(address _from, address _to, uint256 _value) public returns (bool);
function allowance(address _owner, address _spender) public view returns (uint256);
function approve(address _spender, uint256 _value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
contract StandardToken is ERC20 {
using SafeMath for uint256;
uint256 public totalSupply;
mapping(address => uint256) internal balances;
mapping(address => mapping (address => uint256)) internal allowed;
modifier validDestination( address _to )
{
}
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256) {
}
function transfer(address _to, uint256 _value)
public
validDestination(_to)
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
validDestination(_to)
returns (bool)
{
}
function burn(uint _value) public returns (bool)
{
}
function burnFrom(address _from, uint256 _value) public validDestination(_from) returns (bool)
{
}
function approve(address _spender, uint256 _value) public validDestination(_spender) returns (bool) {
}
function allowance(address _owner, address _spender) public view 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 Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
modifier whenNotPaused() {
}
modifier whenPaused() {
}
function pause() public onlyOwner whenNotPaused {
}
function unpause() public onlyOwner whenPaused {
}
}
contract Freezable is Ownable {
mapping (address => bool) public frozenAccount;
event Freeze(address indexed target, bool frozen);
event Unfreeze(address indexed target, bool frozen);
modifier isNotFrozen(address _target) {
}
modifier isFrozen(address _target) {
require(<FILL_ME>)
_;
}
function freeze(address _target) public onlyOwner isNotFrozen(_target) {
}
function unfreeze(address _target) public onlyOwner isFrozen(_target) {
}
}
/**
* @title Pausable token
* @dev StandardToken modified with pausable transfers.
**/
contract PausableToken is StandardToken, Pausable, Freezable {
function transfer(address _to, uint256 _value)
public
whenNotPaused
isNotFrozen(msg.sender)
isNotFrozen(_to)
returns (bool)
{
}
function transferFrom(address _from, address _to, uint256 _value)
public
whenNotPaused
isNotFrozen(_from)
isNotFrozen(_to)
returns (bool)
{
}
function burn(uint256 _value)
public
whenNotPaused
isNotFrozen(msg.sender)
returns (bool)
{
}
function burnFrom(address _to, uint256 _value)
public
whenNotPaused
isNotFrozen(_to)
returns (bool)
{
}
function approve(
address _spender,
uint256 _value
)
public
whenNotPaused
isNotFrozen(msg.sender)
isNotFrozen(_spender)
returns (bool)
{
}
}
contract TimeLockable is Ownable {
using SafeMath for uint256;
uint256 private constant SECOND_IN_DAY = 86400;
mapping (address => uint256) internal lockedBaseQuantity;
event LockAccount(address indexed target, uint256 value);
function setTimeLockAccount(address _target, uint256 _value)
internal
onlyOwner
returns (bool)
{
}
function lockedNow(address _target) internal view returns ( uint256 ) {
}
function _getLockedRate(uint256 _timeNow) private pure returns(uint256 lockedRate) {
}
}
/**
* @title DKHAN Token
* @dev time lock(sequential unlock), puase, burn, freeze added.
**/
contract DKHAN is PausableToken, TimeLockable {
using SafeMath for uint256;
string public name;
string public symbol;
uint256 public constant decimals = 12;
uint256 public totalSupply;
constructor(
uint256 initialSupply,
string memory tokenName,
string memory tokenSymbol
)
public
{
}
modifier canTransper(address _from, uint256 _value) {
}
function balanceAvailable(address _from) public view returns ( uint256 ) {
}
function lockedInfo(address _from) public view returns ( uint256 _lockedNow, uint256 _lockedAtFirst ) {
}
function lockAndTransfer(address _to, uint256 _value)
public
onlyOwner
returns (bool)
{
}
function transfer(address _to, uint _value)
public
canTransper(msg.sender, _value)
returns (bool)
{
}
function transferFrom(address _from, address _to, uint _value)
public
canTransper(_from, _value)
returns (bool)
{
}
function burn(uint _value) // Cannot burn locked amount
public
canTransper(msg.sender, _value)
returns (bool)
{
}
function burnFrom(address _from, uint256 _value) // Cannot burn locked amount
public
canTransper(_from, _value)
returns (bool)
{
}
}
| frozenAccount[_target] | 289,126 | frozenAccount[_target] |
"Only if unlocked" | pragma solidity ^0.5.0;
contract GenArt721 is CustomERC721Metadata {
using SafeMath for uint256;
event Mint(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _projectId,
uint256 _invocations,
uint256 _value
);
struct Project {
string name;
string artist;
string description;
string website;
string license;
bool dynamic;
address payable artistAddress;
address payable additionalPayee;
uint256 additionalPayeePercentage;
uint256 secondMarketRoyalty;
uint256 pricePerTokenInWei;
string projectBaseURI;
string projectBaseIpfsURI;
uint256 invocations;
uint256 maxInvocations;
string scriptJSON;
mapping(uint256 => string) scripts;
uint scriptCount;
string ipfsHash;
uint256 hashes;
bool useIpfs;
bool active;
bool locked;
bool paused;
}
uint256 constant ONE_MILLION = 1_000_000;
mapping(uint256 => Project) projects;
address payable public artblocksAddress;
uint256 public artblocksPercentage = 10;
mapping(uint256 => string) public staticIpfsImageLink;
mapping(uint256 => uint256) public tokenIdToProjectId;
mapping(uint256 => uint256[]) internal projectIdToTokenIds;
mapping(uint256 => bytes32[]) internal tokenIdToHashes;
mapping(bytes32 => uint256) public hashToTokenId;
address public admin;
mapping(address => bool) public isWhitelisted;
uint256 public nextProjectId;
modifier onlyValidTokenId(uint256 _tokenId) {
}
modifier onlyUnlocked(uint256 _projectId) {
require(<FILL_ME>)
_;
}
modifier onlyArtist(uint256 _projectId) {
}
modifier onlyAdmin() {
}
modifier onlyWhitelisted() {
}
modifier onlyArtistOrWhitelisted(uint256 _projectId) {
}
constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) public {
}
function purchase(uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function purchaseTo(address _to, uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) {
}
function _splitFunds(uint256 _projectId) internal {
}
function updateArtblocksAddress(address payable _artblocksAddress) public onlyAdmin {
}
function updateArtblocksPercentage(uint256 _artblocksPercentage) public onlyAdmin {
}
function addWhitelisted(address _address) public onlyAdmin {
}
function removeWhitelisted(address _address) public onlyAdmin {
}
function toggleProjectIsLocked(uint256 _projectId) public onlyWhitelisted onlyUnlocked(_projectId) {
}
function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
}
function updateProjectArtistAddress(uint256 _projectId, address payable _artistAddress) public onlyArtistOrWhitelisted(_projectId) {
}
function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) {
}
function addProject(uint256 _pricePerTokenInWei, bool _dynamic) public onlyWhitelisted {
}
function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public {
}
function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectAdditionalPayeeInfo(uint256 _projectId, address payable _additionalPayee, uint256 _additionalPayeePercentage) onlyArtist(_projectId) public {
}
function updateProjectSecondaryMarketRoyaltyPercentage(uint256 _projectId, uint256 _secondMarketRoyalty) onlyArtist(_projectId) public {
}
function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public {
}
function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public {
}
function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectHashesGenerated(uint256 _projectId, uint256 _hashes) onlyUnlocked(_projectId) onlyWhitelisted() public {
}
function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public {
}
function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public {
}
function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtist(_projectId) public {
}
function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) {
}
function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address additionalPayee, uint256 additionalPayeePercentage) {
}
function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, uint256 hashes, string memory ipfsHash, bool locked, bool paused) {
}
function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){
}
function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) {
}
function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){
}
function showTokenHashes(uint _tokenId) public view returns (bytes32[] memory){
}
function tokensOfOwner(address owner) external view returns (uint256[] memory) {
}
function getRoyaltyData(uint256 _tokenId) public view returns (address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID) {
}
function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) {
}
}
| !projects[_projectId].locked,"Only if unlocked" | 289,156 | !projects[_projectId].locked |
"Only artist or whitelisted" | pragma solidity ^0.5.0;
contract GenArt721 is CustomERC721Metadata {
using SafeMath for uint256;
event Mint(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _projectId,
uint256 _invocations,
uint256 _value
);
struct Project {
string name;
string artist;
string description;
string website;
string license;
bool dynamic;
address payable artistAddress;
address payable additionalPayee;
uint256 additionalPayeePercentage;
uint256 secondMarketRoyalty;
uint256 pricePerTokenInWei;
string projectBaseURI;
string projectBaseIpfsURI;
uint256 invocations;
uint256 maxInvocations;
string scriptJSON;
mapping(uint256 => string) scripts;
uint scriptCount;
string ipfsHash;
uint256 hashes;
bool useIpfs;
bool active;
bool locked;
bool paused;
}
uint256 constant ONE_MILLION = 1_000_000;
mapping(uint256 => Project) projects;
address payable public artblocksAddress;
uint256 public artblocksPercentage = 10;
mapping(uint256 => string) public staticIpfsImageLink;
mapping(uint256 => uint256) public tokenIdToProjectId;
mapping(uint256 => uint256[]) internal projectIdToTokenIds;
mapping(uint256 => bytes32[]) internal tokenIdToHashes;
mapping(bytes32 => uint256) public hashToTokenId;
address public admin;
mapping(address => bool) public isWhitelisted;
uint256 public nextProjectId;
modifier onlyValidTokenId(uint256 _tokenId) {
}
modifier onlyUnlocked(uint256 _projectId) {
}
modifier onlyArtist(uint256 _projectId) {
}
modifier onlyAdmin() {
}
modifier onlyWhitelisted() {
}
modifier onlyArtistOrWhitelisted(uint256 _projectId) {
require(<FILL_ME>)
_;
}
constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) public {
}
function purchase(uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function purchaseTo(address _to, uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) {
}
function _splitFunds(uint256 _projectId) internal {
}
function updateArtblocksAddress(address payable _artblocksAddress) public onlyAdmin {
}
function updateArtblocksPercentage(uint256 _artblocksPercentage) public onlyAdmin {
}
function addWhitelisted(address _address) public onlyAdmin {
}
function removeWhitelisted(address _address) public onlyAdmin {
}
function toggleProjectIsLocked(uint256 _projectId) public onlyWhitelisted onlyUnlocked(_projectId) {
}
function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
}
function updateProjectArtistAddress(uint256 _projectId, address payable _artistAddress) public onlyArtistOrWhitelisted(_projectId) {
}
function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) {
}
function addProject(uint256 _pricePerTokenInWei, bool _dynamic) public onlyWhitelisted {
}
function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public {
}
function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectAdditionalPayeeInfo(uint256 _projectId, address payable _additionalPayee, uint256 _additionalPayeePercentage) onlyArtist(_projectId) public {
}
function updateProjectSecondaryMarketRoyaltyPercentage(uint256 _projectId, uint256 _secondMarketRoyalty) onlyArtist(_projectId) public {
}
function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public {
}
function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public {
}
function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectHashesGenerated(uint256 _projectId, uint256 _hashes) onlyUnlocked(_projectId) onlyWhitelisted() public {
}
function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public {
}
function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public {
}
function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtist(_projectId) public {
}
function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) {
}
function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address additionalPayee, uint256 additionalPayeePercentage) {
}
function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, uint256 hashes, string memory ipfsHash, bool locked, bool paused) {
}
function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){
}
function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) {
}
function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){
}
function showTokenHashes(uint _tokenId) public view returns (bytes32[] memory){
}
function tokensOfOwner(address owner) external view returns (uint256[] memory) {
}
function getRoyaltyData(uint256 _tokenId) public view returns (address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID) {
}
function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) {
}
}
| isWhitelisted[msg.sender]||msg.sender==projects[_projectId].artistAddress,"Only artist or whitelisted" | 289,156 | isWhitelisted[msg.sender]||msg.sender==projects[_projectId].artistAddress |
"Must not exceed max invocations" | pragma solidity ^0.5.0;
contract GenArt721 is CustomERC721Metadata {
using SafeMath for uint256;
event Mint(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _projectId,
uint256 _invocations,
uint256 _value
);
struct Project {
string name;
string artist;
string description;
string website;
string license;
bool dynamic;
address payable artistAddress;
address payable additionalPayee;
uint256 additionalPayeePercentage;
uint256 secondMarketRoyalty;
uint256 pricePerTokenInWei;
string projectBaseURI;
string projectBaseIpfsURI;
uint256 invocations;
uint256 maxInvocations;
string scriptJSON;
mapping(uint256 => string) scripts;
uint scriptCount;
string ipfsHash;
uint256 hashes;
bool useIpfs;
bool active;
bool locked;
bool paused;
}
uint256 constant ONE_MILLION = 1_000_000;
mapping(uint256 => Project) projects;
address payable public artblocksAddress;
uint256 public artblocksPercentage = 10;
mapping(uint256 => string) public staticIpfsImageLink;
mapping(uint256 => uint256) public tokenIdToProjectId;
mapping(uint256 => uint256[]) internal projectIdToTokenIds;
mapping(uint256 => bytes32[]) internal tokenIdToHashes;
mapping(bytes32 => uint256) public hashToTokenId;
address public admin;
mapping(address => bool) public isWhitelisted;
uint256 public nextProjectId;
modifier onlyValidTokenId(uint256 _tokenId) {
}
modifier onlyUnlocked(uint256 _projectId) {
}
modifier onlyArtist(uint256 _projectId) {
}
modifier onlyAdmin() {
}
modifier onlyWhitelisted() {
}
modifier onlyArtistOrWhitelisted(uint256 _projectId) {
}
constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) public {
}
function purchase(uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function purchaseTo(address _to, uint256 _projectId) public payable returns (uint256 _tokenId) {
require(msg.value >= projects[_projectId].pricePerTokenInWei, "Must send at least pricePerTokenInWei");
require(<FILL_ME>)
require(projects[_projectId].active || msg.sender == projects[_projectId].artistAddress, "Project must exist and be active");
require(!projects[_projectId].paused || msg.sender == projects[_projectId].artistAddress, "Purchases are paused.");
uint256 tokenId = _mintToken(_to, _projectId);
_splitFunds(_projectId);
return tokenId;
}
function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) {
}
function _splitFunds(uint256 _projectId) internal {
}
function updateArtblocksAddress(address payable _artblocksAddress) public onlyAdmin {
}
function updateArtblocksPercentage(uint256 _artblocksPercentage) public onlyAdmin {
}
function addWhitelisted(address _address) public onlyAdmin {
}
function removeWhitelisted(address _address) public onlyAdmin {
}
function toggleProjectIsLocked(uint256 _projectId) public onlyWhitelisted onlyUnlocked(_projectId) {
}
function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
}
function updateProjectArtistAddress(uint256 _projectId, address payable _artistAddress) public onlyArtistOrWhitelisted(_projectId) {
}
function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) {
}
function addProject(uint256 _pricePerTokenInWei, bool _dynamic) public onlyWhitelisted {
}
function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public {
}
function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectAdditionalPayeeInfo(uint256 _projectId, address payable _additionalPayee, uint256 _additionalPayeePercentage) onlyArtist(_projectId) public {
}
function updateProjectSecondaryMarketRoyaltyPercentage(uint256 _projectId, uint256 _secondMarketRoyalty) onlyArtist(_projectId) public {
}
function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public {
}
function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public {
}
function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectHashesGenerated(uint256 _projectId, uint256 _hashes) onlyUnlocked(_projectId) onlyWhitelisted() public {
}
function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public {
}
function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public {
}
function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtist(_projectId) public {
}
function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) {
}
function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address additionalPayee, uint256 additionalPayeePercentage) {
}
function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, uint256 hashes, string memory ipfsHash, bool locked, bool paused) {
}
function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){
}
function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) {
}
function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){
}
function showTokenHashes(uint _tokenId) public view returns (bytes32[] memory){
}
function tokensOfOwner(address owner) external view returns (uint256[] memory) {
}
function getRoyaltyData(uint256 _tokenId) public view returns (address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID) {
}
function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) {
}
}
| projects[_projectId].invocations.add(1)<=projects[_projectId].maxInvocations,"Must not exceed max invocations" | 289,156 | projects[_projectId].invocations.add(1)<=projects[_projectId].maxInvocations |
"Project must exist and be active" | pragma solidity ^0.5.0;
contract GenArt721 is CustomERC721Metadata {
using SafeMath for uint256;
event Mint(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _projectId,
uint256 _invocations,
uint256 _value
);
struct Project {
string name;
string artist;
string description;
string website;
string license;
bool dynamic;
address payable artistAddress;
address payable additionalPayee;
uint256 additionalPayeePercentage;
uint256 secondMarketRoyalty;
uint256 pricePerTokenInWei;
string projectBaseURI;
string projectBaseIpfsURI;
uint256 invocations;
uint256 maxInvocations;
string scriptJSON;
mapping(uint256 => string) scripts;
uint scriptCount;
string ipfsHash;
uint256 hashes;
bool useIpfs;
bool active;
bool locked;
bool paused;
}
uint256 constant ONE_MILLION = 1_000_000;
mapping(uint256 => Project) projects;
address payable public artblocksAddress;
uint256 public artblocksPercentage = 10;
mapping(uint256 => string) public staticIpfsImageLink;
mapping(uint256 => uint256) public tokenIdToProjectId;
mapping(uint256 => uint256[]) internal projectIdToTokenIds;
mapping(uint256 => bytes32[]) internal tokenIdToHashes;
mapping(bytes32 => uint256) public hashToTokenId;
address public admin;
mapping(address => bool) public isWhitelisted;
uint256 public nextProjectId;
modifier onlyValidTokenId(uint256 _tokenId) {
}
modifier onlyUnlocked(uint256 _projectId) {
}
modifier onlyArtist(uint256 _projectId) {
}
modifier onlyAdmin() {
}
modifier onlyWhitelisted() {
}
modifier onlyArtistOrWhitelisted(uint256 _projectId) {
}
constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) public {
}
function purchase(uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function purchaseTo(address _to, uint256 _projectId) public payable returns (uint256 _tokenId) {
require(msg.value >= projects[_projectId].pricePerTokenInWei, "Must send at least pricePerTokenInWei");
require(projects[_projectId].invocations.add(1) <= projects[_projectId].maxInvocations, "Must not exceed max invocations");
require(<FILL_ME>)
require(!projects[_projectId].paused || msg.sender == projects[_projectId].artistAddress, "Purchases are paused.");
uint256 tokenId = _mintToken(_to, _projectId);
_splitFunds(_projectId);
return tokenId;
}
function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) {
}
function _splitFunds(uint256 _projectId) internal {
}
function updateArtblocksAddress(address payable _artblocksAddress) public onlyAdmin {
}
function updateArtblocksPercentage(uint256 _artblocksPercentage) public onlyAdmin {
}
function addWhitelisted(address _address) public onlyAdmin {
}
function removeWhitelisted(address _address) public onlyAdmin {
}
function toggleProjectIsLocked(uint256 _projectId) public onlyWhitelisted onlyUnlocked(_projectId) {
}
function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
}
function updateProjectArtistAddress(uint256 _projectId, address payable _artistAddress) public onlyArtistOrWhitelisted(_projectId) {
}
function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) {
}
function addProject(uint256 _pricePerTokenInWei, bool _dynamic) public onlyWhitelisted {
}
function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public {
}
function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectAdditionalPayeeInfo(uint256 _projectId, address payable _additionalPayee, uint256 _additionalPayeePercentage) onlyArtist(_projectId) public {
}
function updateProjectSecondaryMarketRoyaltyPercentage(uint256 _projectId, uint256 _secondMarketRoyalty) onlyArtist(_projectId) public {
}
function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public {
}
function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public {
}
function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectHashesGenerated(uint256 _projectId, uint256 _hashes) onlyUnlocked(_projectId) onlyWhitelisted() public {
}
function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public {
}
function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public {
}
function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtist(_projectId) public {
}
function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) {
}
function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address additionalPayee, uint256 additionalPayeePercentage) {
}
function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, uint256 hashes, string memory ipfsHash, bool locked, bool paused) {
}
function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){
}
function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) {
}
function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){
}
function showTokenHashes(uint _tokenId) public view returns (bytes32[] memory){
}
function tokensOfOwner(address owner) external view returns (uint256[] memory) {
}
function getRoyaltyData(uint256 _tokenId) public view returns (address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID) {
}
function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) {
}
}
| projects[_projectId].active||msg.sender==projects[_projectId].artistAddress,"Project must exist and be active" | 289,156 | projects[_projectId].active||msg.sender==projects[_projectId].artistAddress |
"Purchases are paused." | pragma solidity ^0.5.0;
contract GenArt721 is CustomERC721Metadata {
using SafeMath for uint256;
event Mint(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _projectId,
uint256 _invocations,
uint256 _value
);
struct Project {
string name;
string artist;
string description;
string website;
string license;
bool dynamic;
address payable artistAddress;
address payable additionalPayee;
uint256 additionalPayeePercentage;
uint256 secondMarketRoyalty;
uint256 pricePerTokenInWei;
string projectBaseURI;
string projectBaseIpfsURI;
uint256 invocations;
uint256 maxInvocations;
string scriptJSON;
mapping(uint256 => string) scripts;
uint scriptCount;
string ipfsHash;
uint256 hashes;
bool useIpfs;
bool active;
bool locked;
bool paused;
}
uint256 constant ONE_MILLION = 1_000_000;
mapping(uint256 => Project) projects;
address payable public artblocksAddress;
uint256 public artblocksPercentage = 10;
mapping(uint256 => string) public staticIpfsImageLink;
mapping(uint256 => uint256) public tokenIdToProjectId;
mapping(uint256 => uint256[]) internal projectIdToTokenIds;
mapping(uint256 => bytes32[]) internal tokenIdToHashes;
mapping(bytes32 => uint256) public hashToTokenId;
address public admin;
mapping(address => bool) public isWhitelisted;
uint256 public nextProjectId;
modifier onlyValidTokenId(uint256 _tokenId) {
}
modifier onlyUnlocked(uint256 _projectId) {
}
modifier onlyArtist(uint256 _projectId) {
}
modifier onlyAdmin() {
}
modifier onlyWhitelisted() {
}
modifier onlyArtistOrWhitelisted(uint256 _projectId) {
}
constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) public {
}
function purchase(uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function purchaseTo(address _to, uint256 _projectId) public payable returns (uint256 _tokenId) {
require(msg.value >= projects[_projectId].pricePerTokenInWei, "Must send at least pricePerTokenInWei");
require(projects[_projectId].invocations.add(1) <= projects[_projectId].maxInvocations, "Must not exceed max invocations");
require(projects[_projectId].active || msg.sender == projects[_projectId].artistAddress, "Project must exist and be active");
require(<FILL_ME>)
uint256 tokenId = _mintToken(_to, _projectId);
_splitFunds(_projectId);
return tokenId;
}
function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) {
}
function _splitFunds(uint256 _projectId) internal {
}
function updateArtblocksAddress(address payable _artblocksAddress) public onlyAdmin {
}
function updateArtblocksPercentage(uint256 _artblocksPercentage) public onlyAdmin {
}
function addWhitelisted(address _address) public onlyAdmin {
}
function removeWhitelisted(address _address) public onlyAdmin {
}
function toggleProjectIsLocked(uint256 _projectId) public onlyWhitelisted onlyUnlocked(_projectId) {
}
function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
}
function updateProjectArtistAddress(uint256 _projectId, address payable _artistAddress) public onlyArtistOrWhitelisted(_projectId) {
}
function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) {
}
function addProject(uint256 _pricePerTokenInWei, bool _dynamic) public onlyWhitelisted {
}
function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public {
}
function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectAdditionalPayeeInfo(uint256 _projectId, address payable _additionalPayee, uint256 _additionalPayeePercentage) onlyArtist(_projectId) public {
}
function updateProjectSecondaryMarketRoyaltyPercentage(uint256 _projectId, uint256 _secondMarketRoyalty) onlyArtist(_projectId) public {
}
function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public {
}
function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public {
}
function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectHashesGenerated(uint256 _projectId, uint256 _hashes) onlyUnlocked(_projectId) onlyWhitelisted() public {
}
function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public {
}
function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public {
}
function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtist(_projectId) public {
}
function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) {
}
function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address additionalPayee, uint256 additionalPayeePercentage) {
}
function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, uint256 hashes, string memory ipfsHash, bool locked, bool paused) {
}
function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){
}
function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) {
}
function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){
}
function showTokenHashes(uint _tokenId) public view returns (bytes32[] memory){
}
function tokensOfOwner(address owner) external view returns (uint256[] memory) {
}
function getRoyaltyData(uint256 _tokenId) public view returns (address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID) {
}
function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) {
}
}
| !projects[_projectId].paused||msg.sender==projects[_projectId].artistAddress,"Purchases are paused." | 289,156 | !projects[_projectId].paused||msg.sender==projects[_projectId].artistAddress |
"Can not modify hashes generated after a token is minted." | pragma solidity ^0.5.0;
contract GenArt721 is CustomERC721Metadata {
using SafeMath for uint256;
event Mint(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _projectId,
uint256 _invocations,
uint256 _value
);
struct Project {
string name;
string artist;
string description;
string website;
string license;
bool dynamic;
address payable artistAddress;
address payable additionalPayee;
uint256 additionalPayeePercentage;
uint256 secondMarketRoyalty;
uint256 pricePerTokenInWei;
string projectBaseURI;
string projectBaseIpfsURI;
uint256 invocations;
uint256 maxInvocations;
string scriptJSON;
mapping(uint256 => string) scripts;
uint scriptCount;
string ipfsHash;
uint256 hashes;
bool useIpfs;
bool active;
bool locked;
bool paused;
}
uint256 constant ONE_MILLION = 1_000_000;
mapping(uint256 => Project) projects;
address payable public artblocksAddress;
uint256 public artblocksPercentage = 10;
mapping(uint256 => string) public staticIpfsImageLink;
mapping(uint256 => uint256) public tokenIdToProjectId;
mapping(uint256 => uint256[]) internal projectIdToTokenIds;
mapping(uint256 => bytes32[]) internal tokenIdToHashes;
mapping(bytes32 => uint256) public hashToTokenId;
address public admin;
mapping(address => bool) public isWhitelisted;
uint256 public nextProjectId;
modifier onlyValidTokenId(uint256 _tokenId) {
}
modifier onlyUnlocked(uint256 _projectId) {
}
modifier onlyArtist(uint256 _projectId) {
}
modifier onlyAdmin() {
}
modifier onlyWhitelisted() {
}
modifier onlyArtistOrWhitelisted(uint256 _projectId) {
}
constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) public {
}
function purchase(uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function purchaseTo(address _to, uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) {
}
function _splitFunds(uint256 _projectId) internal {
}
function updateArtblocksAddress(address payable _artblocksAddress) public onlyAdmin {
}
function updateArtblocksPercentage(uint256 _artblocksPercentage) public onlyAdmin {
}
function addWhitelisted(address _address) public onlyAdmin {
}
function removeWhitelisted(address _address) public onlyAdmin {
}
function toggleProjectIsLocked(uint256 _projectId) public onlyWhitelisted onlyUnlocked(_projectId) {
}
function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
}
function updateProjectArtistAddress(uint256 _projectId, address payable _artistAddress) public onlyArtistOrWhitelisted(_projectId) {
}
function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) {
}
function addProject(uint256 _pricePerTokenInWei, bool _dynamic) public onlyWhitelisted {
}
function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public {
}
function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectAdditionalPayeeInfo(uint256 _projectId, address payable _additionalPayee, uint256 _additionalPayeePercentage) onlyArtist(_projectId) public {
}
function updateProjectSecondaryMarketRoyaltyPercentage(uint256 _projectId, uint256 _secondMarketRoyalty) onlyArtist(_projectId) public {
}
function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public {
}
function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public {
}
function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectHashesGenerated(uint256 _projectId, uint256 _hashes) onlyUnlocked(_projectId) onlyWhitelisted() public {
require(<FILL_ME>)
require(projects[_projectId].dynamic, "Can only modify hashes on dynamic projects.");
require(_hashes <= 100 && _hashes >= 0, "Hashes generated must be a positive integer and max hashes per invocation are 100");
projects[_projectId].hashes = _hashes;
}
function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public {
}
function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public {
}
function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtist(_projectId) public {
}
function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) {
}
function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address additionalPayee, uint256 additionalPayeePercentage) {
}
function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, uint256 hashes, string memory ipfsHash, bool locked, bool paused) {
}
function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){
}
function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) {
}
function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){
}
function showTokenHashes(uint _tokenId) public view returns (bytes32[] memory){
}
function tokensOfOwner(address owner) external view returns (uint256[] memory) {
}
function getRoyaltyData(uint256 _tokenId) public view returns (address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID) {
}
function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) {
}
}
| projects[_projectId].invocations==0,"Can not modify hashes generated after a token is minted." | 289,156 | projects[_projectId].invocations==0 |
"Can only modify hashes on dynamic projects." | pragma solidity ^0.5.0;
contract GenArt721 is CustomERC721Metadata {
using SafeMath for uint256;
event Mint(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _projectId,
uint256 _invocations,
uint256 _value
);
struct Project {
string name;
string artist;
string description;
string website;
string license;
bool dynamic;
address payable artistAddress;
address payable additionalPayee;
uint256 additionalPayeePercentage;
uint256 secondMarketRoyalty;
uint256 pricePerTokenInWei;
string projectBaseURI;
string projectBaseIpfsURI;
uint256 invocations;
uint256 maxInvocations;
string scriptJSON;
mapping(uint256 => string) scripts;
uint scriptCount;
string ipfsHash;
uint256 hashes;
bool useIpfs;
bool active;
bool locked;
bool paused;
}
uint256 constant ONE_MILLION = 1_000_000;
mapping(uint256 => Project) projects;
address payable public artblocksAddress;
uint256 public artblocksPercentage = 10;
mapping(uint256 => string) public staticIpfsImageLink;
mapping(uint256 => uint256) public tokenIdToProjectId;
mapping(uint256 => uint256[]) internal projectIdToTokenIds;
mapping(uint256 => bytes32[]) internal tokenIdToHashes;
mapping(bytes32 => uint256) public hashToTokenId;
address public admin;
mapping(address => bool) public isWhitelisted;
uint256 public nextProjectId;
modifier onlyValidTokenId(uint256 _tokenId) {
}
modifier onlyUnlocked(uint256 _projectId) {
}
modifier onlyArtist(uint256 _projectId) {
}
modifier onlyAdmin() {
}
modifier onlyWhitelisted() {
}
modifier onlyArtistOrWhitelisted(uint256 _projectId) {
}
constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) public {
}
function purchase(uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function purchaseTo(address _to, uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) {
}
function _splitFunds(uint256 _projectId) internal {
}
function updateArtblocksAddress(address payable _artblocksAddress) public onlyAdmin {
}
function updateArtblocksPercentage(uint256 _artblocksPercentage) public onlyAdmin {
}
function addWhitelisted(address _address) public onlyAdmin {
}
function removeWhitelisted(address _address) public onlyAdmin {
}
function toggleProjectIsLocked(uint256 _projectId) public onlyWhitelisted onlyUnlocked(_projectId) {
}
function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
}
function updateProjectArtistAddress(uint256 _projectId, address payable _artistAddress) public onlyArtistOrWhitelisted(_projectId) {
}
function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) {
}
function addProject(uint256 _pricePerTokenInWei, bool _dynamic) public onlyWhitelisted {
}
function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public {
}
function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectAdditionalPayeeInfo(uint256 _projectId, address payable _additionalPayee, uint256 _additionalPayeePercentage) onlyArtist(_projectId) public {
}
function updateProjectSecondaryMarketRoyaltyPercentage(uint256 _projectId, uint256 _secondMarketRoyalty) onlyArtist(_projectId) public {
}
function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public {
}
function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public {
}
function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectHashesGenerated(uint256 _projectId, uint256 _hashes) onlyUnlocked(_projectId) onlyWhitelisted() public {
require(projects[_projectId].invocations == 0, "Can not modify hashes generated after a token is minted.");
require(<FILL_ME>)
require(_hashes <= 100 && _hashes >= 0, "Hashes generated must be a positive integer and max hashes per invocation are 100");
projects[_projectId].hashes = _hashes;
}
function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public {
}
function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public {
}
function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtist(_projectId) public {
}
function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) {
}
function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address additionalPayee, uint256 additionalPayeePercentage) {
}
function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, uint256 hashes, string memory ipfsHash, bool locked, bool paused) {
}
function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){
}
function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) {
}
function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){
}
function showTokenHashes(uint _tokenId) public view returns (bytes32[] memory){
}
function tokensOfOwner(address owner) external view returns (uint256[] memory) {
}
function getRoyaltyData(uint256 _tokenId) public view returns (address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID) {
}
function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) {
}
}
| projects[_projectId].dynamic,"Can only modify hashes on dynamic projects." | 289,156 | projects[_projectId].dynamic |
"there are no scripts to remove" | pragma solidity ^0.5.0;
contract GenArt721 is CustomERC721Metadata {
using SafeMath for uint256;
event Mint(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _projectId,
uint256 _invocations,
uint256 _value
);
struct Project {
string name;
string artist;
string description;
string website;
string license;
bool dynamic;
address payable artistAddress;
address payable additionalPayee;
uint256 additionalPayeePercentage;
uint256 secondMarketRoyalty;
uint256 pricePerTokenInWei;
string projectBaseURI;
string projectBaseIpfsURI;
uint256 invocations;
uint256 maxInvocations;
string scriptJSON;
mapping(uint256 => string) scripts;
uint scriptCount;
string ipfsHash;
uint256 hashes;
bool useIpfs;
bool active;
bool locked;
bool paused;
}
uint256 constant ONE_MILLION = 1_000_000;
mapping(uint256 => Project) projects;
address payable public artblocksAddress;
uint256 public artblocksPercentage = 10;
mapping(uint256 => string) public staticIpfsImageLink;
mapping(uint256 => uint256) public tokenIdToProjectId;
mapping(uint256 => uint256[]) internal projectIdToTokenIds;
mapping(uint256 => bytes32[]) internal tokenIdToHashes;
mapping(bytes32 => uint256) public hashToTokenId;
address public admin;
mapping(address => bool) public isWhitelisted;
uint256 public nextProjectId;
modifier onlyValidTokenId(uint256 _tokenId) {
}
modifier onlyUnlocked(uint256 _projectId) {
}
modifier onlyArtist(uint256 _projectId) {
}
modifier onlyAdmin() {
}
modifier onlyWhitelisted() {
}
modifier onlyArtistOrWhitelisted(uint256 _projectId) {
}
constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) public {
}
function purchase(uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function purchaseTo(address _to, uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) {
}
function _splitFunds(uint256 _projectId) internal {
}
function updateArtblocksAddress(address payable _artblocksAddress) public onlyAdmin {
}
function updateArtblocksPercentage(uint256 _artblocksPercentage) public onlyAdmin {
}
function addWhitelisted(address _address) public onlyAdmin {
}
function removeWhitelisted(address _address) public onlyAdmin {
}
function toggleProjectIsLocked(uint256 _projectId) public onlyWhitelisted onlyUnlocked(_projectId) {
}
function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
}
function updateProjectArtistAddress(uint256 _projectId, address payable _artistAddress) public onlyArtistOrWhitelisted(_projectId) {
}
function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) {
}
function addProject(uint256 _pricePerTokenInWei, bool _dynamic) public onlyWhitelisted {
}
function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public {
}
function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectAdditionalPayeeInfo(uint256 _projectId, address payable _additionalPayee, uint256 _additionalPayeePercentage) onlyArtist(_projectId) public {
}
function updateProjectSecondaryMarketRoyaltyPercentage(uint256 _projectId, uint256 _secondMarketRoyalty) onlyArtist(_projectId) public {
}
function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public {
}
function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public {
}
function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectHashesGenerated(uint256 _projectId, uint256 _hashes) onlyUnlocked(_projectId) onlyWhitelisted() public {
}
function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
require(<FILL_ME>)
delete projects[_projectId].scripts[projects[_projectId].scriptCount - 1];
projects[_projectId].scriptCount = projects[_projectId].scriptCount.sub(1);
}
function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public {
}
function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public {
}
function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtist(_projectId) public {
}
function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) {
}
function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address additionalPayee, uint256 additionalPayeePercentage) {
}
function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, uint256 hashes, string memory ipfsHash, bool locked, bool paused) {
}
function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){
}
function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) {
}
function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){
}
function showTokenHashes(uint _tokenId) public view returns (bytes32[] memory){
}
function tokensOfOwner(address owner) external view returns (uint256[] memory) {
}
function getRoyaltyData(uint256 _tokenId) public view returns (address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID) {
}
function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) {
}
}
| projects[_projectId].scriptCount>0,"there are no scripts to remove" | 289,156 | projects[_projectId].scriptCount>0 |
"can only set static IPFS hash for static projects" | pragma solidity ^0.5.0;
contract GenArt721 is CustomERC721Metadata {
using SafeMath for uint256;
event Mint(
address indexed _to,
uint256 indexed _tokenId,
uint256 indexed _projectId,
uint256 _invocations,
uint256 _value
);
struct Project {
string name;
string artist;
string description;
string website;
string license;
bool dynamic;
address payable artistAddress;
address payable additionalPayee;
uint256 additionalPayeePercentage;
uint256 secondMarketRoyalty;
uint256 pricePerTokenInWei;
string projectBaseURI;
string projectBaseIpfsURI;
uint256 invocations;
uint256 maxInvocations;
string scriptJSON;
mapping(uint256 => string) scripts;
uint scriptCount;
string ipfsHash;
uint256 hashes;
bool useIpfs;
bool active;
bool locked;
bool paused;
}
uint256 constant ONE_MILLION = 1_000_000;
mapping(uint256 => Project) projects;
address payable public artblocksAddress;
uint256 public artblocksPercentage = 10;
mapping(uint256 => string) public staticIpfsImageLink;
mapping(uint256 => uint256) public tokenIdToProjectId;
mapping(uint256 => uint256[]) internal projectIdToTokenIds;
mapping(uint256 => bytes32[]) internal tokenIdToHashes;
mapping(bytes32 => uint256) public hashToTokenId;
address public admin;
mapping(address => bool) public isWhitelisted;
uint256 public nextProjectId;
modifier onlyValidTokenId(uint256 _tokenId) {
}
modifier onlyUnlocked(uint256 _projectId) {
}
modifier onlyArtist(uint256 _projectId) {
}
modifier onlyAdmin() {
}
modifier onlyWhitelisted() {
}
modifier onlyArtistOrWhitelisted(uint256 _projectId) {
}
constructor(string memory _tokenName, string memory _tokenSymbol) CustomERC721Metadata(_tokenName, _tokenSymbol) public {
}
function purchase(uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function purchaseTo(address _to, uint256 _projectId) public payable returns (uint256 _tokenId) {
}
function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) {
}
function _splitFunds(uint256 _projectId) internal {
}
function updateArtblocksAddress(address payable _artblocksAddress) public onlyAdmin {
}
function updateArtblocksPercentage(uint256 _artblocksPercentage) public onlyAdmin {
}
function addWhitelisted(address _address) public onlyAdmin {
}
function removeWhitelisted(address _address) public onlyAdmin {
}
function toggleProjectIsLocked(uint256 _projectId) public onlyWhitelisted onlyUnlocked(_projectId) {
}
function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted {
}
function updateProjectArtistAddress(uint256 _projectId, address payable _artistAddress) public onlyArtistOrWhitelisted(_projectId) {
}
function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) {
}
function addProject(uint256 _pricePerTokenInWei, bool _dynamic) public onlyWhitelisted {
}
function updateProjectPricePerTokenInWei(uint256 _projectId, uint256 _pricePerTokenInWei) onlyArtist(_projectId) public {
}
function updateProjectName(uint256 _projectId, string memory _projectName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectArtistName(uint256 _projectId, string memory _projectArtistName) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectAdditionalPayeeInfo(uint256 _projectId, address payable _additionalPayee, uint256 _additionalPayeePercentage) onlyArtist(_projectId) public {
}
function updateProjectSecondaryMarketRoyaltyPercentage(uint256 _projectId, uint256 _secondMarketRoyalty) onlyArtist(_projectId) public {
}
function updateProjectDescription(uint256 _projectId, string memory _projectDescription) onlyArtist(_projectId) public {
}
function updateProjectWebsite(uint256 _projectId, string memory _projectWebsite) onlyArtist(_projectId) public {
}
function updateProjectLicense(uint256 _projectId, string memory _projectLicense) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectMaxInvocations(uint256 _projectId, uint256 _maxInvocations) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectHashesGenerated(uint256 _projectId, uint256 _hashes) onlyUnlocked(_projectId) onlyWhitelisted() public {
}
function addProjectScript(uint256 _projectId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScript(uint256 _projectId, uint256 _scriptId, string memory _script) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function removeProjectLastScript(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectScriptJSON(uint256 _projectId, string memory _projectScriptJSON) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) onlyArtist(_projectId) public {
}
function updateProjectBaseIpfsURI(uint256 _projectId, string memory _projectBaseIpfsURI) onlyArtist(_projectId) public {
}
function toggleProjectUseIpfsForStatic(uint256 _projectId) onlyArtist(_projectId) public {
require(<FILL_ME>)
projects[_projectId].useIpfs = !projects[_projectId].useIpfs;
}
function toggleProjectIsDynamic(uint256 _projectId) onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) public {
}
function overrideTokenDynamicImageWithIpfsLink(uint256 _tokenId, string memory _ipfsHash) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function clearTokenIpfsImageUri(uint256 _tokenId) onlyArtist(tokenIdToProjectId[_tokenId]) public {
}
function projectDetails(uint256 _projectId) view public returns (string memory projectName, string memory artist, string memory description, string memory website, string memory license, bool dynamic) {
}
function projectTokenInfo(uint256 _projectId) view public returns (address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address additionalPayee, uint256 additionalPayeePercentage) {
}
function projectScriptInfo(uint256 _projectId) view public returns (string memory scriptJSON, uint256 scriptCount, uint256 hashes, string memory ipfsHash, bool locked, bool paused) {
}
function projectScriptByIndex(uint256 _projectId, uint256 _index) view public returns (string memory){
}
function projectURIInfo(uint256 _projectId) view public returns (string memory projectBaseURI, string memory projectBaseIpfsURI, bool useIpfs) {
}
function projectShowAllTokens(uint _projectId) public view returns (uint256[] memory){
}
function showTokenHashes(uint _tokenId) public view returns (bytes32[] memory){
}
function tokensOfOwner(address owner) external view returns (uint256[] memory) {
}
function getRoyaltyData(uint256 _tokenId) public view returns (address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID) {
}
function tokenURI(uint256 _tokenId) external view onlyValidTokenId(_tokenId) returns (string memory) {
}
}
| !projects[_projectId].dynamic,"can only set static IPFS hash for static projects" | 289,156 | !projects[_projectId].dynamic |
"ERC721ReceiverMock: reverting" | // SPDX-License-Identifier: MIT
pragma solidity ^0.5.0;
contract ERC721ReceiverMock is IERC721Receiver {
bytes4 private _retval;
bool private _reverts;
event Received(address operator, address from, uint256 tokenId, bytes data, uint256 gas);
constructor (bytes4 retval, bool reverts) public {
}
function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data)
public returns (bytes4)
{
require(<FILL_ME>)
emit Received(operator, from, tokenId, data, gasleft());
return _retval;
}
}
| !_reverts,"ERC721ReceiverMock: reverting" | 289,157 | !_reverts |
"token is paused." | contract Controller is ControllerInterface, Ownable {
WrappedToken public token;
MembersInterface public members;
address public bridge;
constructor(WrappedToken _token) {
}
modifier onlyBridge() {
}
// setters
event MembersSet(MembersInterface indexed members);
function setMembers(MembersInterface _members) external onlyOwner returns (bool) {
}
event BridgeSet(address indexed bridge);
function setBridge(address _bridge) external onlyOwner returns (bool) {
}
// only owner actions on token
event Paused();
function pause() external onlyOwner returns (bool) {
}
event Unpaused();
function unpause() external onlyOwner returns (bool) {
}
// only bridge actions on token
function mint(address to, uint amount) external override onlyBridge returns (bool) {
require(to != address(0), "invalid to address");
require(<FILL_ME>)
token.mint(to, amount);
return true;
}
function burn(uint value) external override onlyBridge returns (bool) {
}
// all accessible
function isCustodian(address addr) external override view returns (bool) {
}
function isBroker(address addr) external override view returns (bool) {
}
function getToken() external override view returns (ERC20) {
}
// overriding
function renounceOwnership() public override onlyOwner {
}
}
| !token.paused(),"token is paused." | 289,184 | !token.paused() |
"Error: Sale has not started" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.2;
interface ERCMintable {
//function crowdSaleMint(address to, uint256 amount) external returns(bool);
function mint(address to, uint256 amount) external;
}
/**
* @title IPM Token CrowdSale
* @dev CrowdSale contract for IPM Token:
*
* Tokens for Sale: 9M IPM
* Minted on demand up to the hard cap per round.
* Unsold supply won't be minted and will result in a
* lower circulating supply after the sale. Unsold tokens of each round
* don't transfer to the next round
*
* PRIVATE ROUND:
* - whitelisted
* - garuanteed allocation, overminted gets reduced from last round
* - duration of 2 days (10.09.2020 - 12.09.2020)
* - Min-Max allocation per address 2 ETH - 50 ETH
* - 1M flexible Cap (ETH price on launch could result in more)
* - 1 IPM = ~0.15 USD
*
* ROUND 1:
* - duration of 2 days (14.09.2020 - 16.09.2020)
* - 1 IPM = ~0.2 USD
* - 1M IPM Hard Cap
*
* ROUND 2:
* - duration of 2 days (18.09.2020 - 20.09.2020)
* - 1 IPM = 0.3 USD
* - 2M IPM Hard Cap
*
* ROUND 3:
* - duration of 6 days (22.09.2020 - 28.09.2020)
* - 1 IPM = 0.4 USD
* - 5M IPM Hard Cap (possible less, based on private round)
*
* After CrowdSale:
* Cooldown phase of 5 days begins
* and will unpause all tokens.
*
* More at https://timers.network/
*
* @author @KTimersnetwork
*/
contract IPMCrowdSale {
using SafeMath for uint256;
//////////////////////////////////////
// Contract configuration //
//////////////////////////////////////
// owner
address owner;
// allow pausing of contract to halt everything beside
// administrative functions
bool public paused = true;
// min payment for private round
uint256 public constant PRIVATE_PAYMENT_MIN = 2 ether;
// min payment for other rounds
uint256 public constant PUBLIC_PAYMENT_MIN = 0.1 ether;
// max payment is always equal
uint256 public constant PAYMENT_MAX = 50 ether;
// crowdsale can mint 9m IPM at maximum for all rounds
uint256 public constant MAXIMUM_MINTABLE_TOKENS = 9000000000000000000000000;
// start of private round 09/10/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_START = 1599739200;
// end of private round 09/12/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_END = 1599912000;
// private sale limit 1m
uint256 public constant PRIVATE_ROUND_CAP = 1000000 * (10**18);
// start of round 1 09/14/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_START = 1600084800;
// end of round 1 09/16/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_END = 1600257600;
// round 1 sale limit 1m
uint256 public constant ROUND_1_CAP = 1000000 * (10**18);
// start of round 2 09/18/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_START = 1600430400;
// end of round 2 09/20/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_END = 1600603200;
// round 2 sale limit 2m
uint256 public constant ROUND_2_CAP = 2000000 * (10**18);
// start of round 3 09/22/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_START = 1600776000;
// end of round 3 09/28/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_END = 1601294400;
// round 3 sale limit 5m
uint256 public constant ROUND_3_CAP = 5000000 * (10**18);
// sold tokens private round
uint256 public privateRoundSold;
// sold tokens round 1
uint256 public round1Sold;
// sold tokens round 2
uint256 public round2Sold;
// sold tokens round 3
uint256 public round3Sold;
// private round white list
mapping(address => uint256) public whitelist;
// contributors
mapping(address => uint256) public contributors;
// current rate
uint256 public ipmPerETH;
// IPM token references
address public ipmTokenAddress;
// withdrawal
address public foundation1Address;
address public foundation2Address;
//////////////////////////////////////
// Control functions / modifiers //
//////////////////////////////////////
function isPrivateRoundActive() public view returns(bool) {
}
function isRound1Active() public view returns(bool) {
}
function isRound2Active() public view returns(bool) {
}
function isRound3Active() public view returns(bool) {
}
function hasStarted() public view returns(bool) {
}
function hasEnded() public view returns(bool) {
}
modifier onlyOwner() {
}
modifier ifPaused() {
}
modifier ifNotPaused() {
}
modifier saleActive() {
require(<FILL_ME>)
require(hasEnded() == false, "Error: Sale has already ended");
require(isPrivateRoundActive() || isRound1Active() || isRound2Active() || isRound3Active(), "Error: No round active at the moment");
_;
}
//////////////////////////////////////
// Events //
//////////////////////////////////////
event IPMPurchase(
address indexed beneficiary,
uint256 tokensPurchased,
uint256 weiUsed
);
//////////////////////////////////////
// Implementation //
//////////////////////////////////////
constructor() public {
}
function getCurrentIPMRatio() external view returns(uint256) {
}
function getCurrentRound() external view returns(string memory) {
}
function getCurrentCap() public view returns (uint256) {
}
/**
* @dev Used to update the current eth price of 1 IPM
* Function is needed to set the final price ahead
* of each round and for possible big price changes
* of eth itself to keep somewhat stable usd prices
*/
function updateIPMPerETH(uint256 _tokens) external onlyOwner {
}
function unpause() external onlyOwner ifPaused {
}
function pause() external onlyOwner ifNotPaused {
}
function getTokenAddress() external view returns(address) {
}
function setIPMTokenContract(address _token) external onlyOwner ifPaused {
}
function setWhitelist(address[] calldata _beneficiaries, uint256[] calldata _weiAmounts) external onlyOwner {
}
function addOrUpdateWhitelistEntry(address _beneficiary, uint256 _weiAmount) external onlyOwner {
}
function removeWhitelistEntry(address _beneficiary) external onlyOwner {
}
function isWhitelisted(address _beneficiary) public view returns(bool) {
}
function setFoundation1Address(address _foundationAddress) external onlyOwner {
}
function setFoundation2Address(address _foundationAddress) external onlyOwner {
}
function withdrawFunds() external onlyOwner {
}
/**
* @dev Default fallback function that will also allow
* the contract owner to deposit additional ETH,
* without triggering the IPM purchase functionality.
*/
receive() external payable {
}
function _buyTokens(address _beneficiary, uint256 _amountPayedInWei) internal saleActive {
}
function _calculateTokensForPayment(uint256 payedWei) internal view returns(uint256) {
}
function _hasAllowance(address _beneficiary) internal view returns(bool) {
}
function _getCurrentRemainingIPM() internal view returns(uint256) {
}
function _getPrivateRoundOverhead() internal view returns(uint256) {
}
}
| hasStarted()==true,"Error: Sale has not started" | 289,197 | hasStarted()==true |
"Error: Sale has already ended" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.2;
interface ERCMintable {
//function crowdSaleMint(address to, uint256 amount) external returns(bool);
function mint(address to, uint256 amount) external;
}
/**
* @title IPM Token CrowdSale
* @dev CrowdSale contract for IPM Token:
*
* Tokens for Sale: 9M IPM
* Minted on demand up to the hard cap per round.
* Unsold supply won't be minted and will result in a
* lower circulating supply after the sale. Unsold tokens of each round
* don't transfer to the next round
*
* PRIVATE ROUND:
* - whitelisted
* - garuanteed allocation, overminted gets reduced from last round
* - duration of 2 days (10.09.2020 - 12.09.2020)
* - Min-Max allocation per address 2 ETH - 50 ETH
* - 1M flexible Cap (ETH price on launch could result in more)
* - 1 IPM = ~0.15 USD
*
* ROUND 1:
* - duration of 2 days (14.09.2020 - 16.09.2020)
* - 1 IPM = ~0.2 USD
* - 1M IPM Hard Cap
*
* ROUND 2:
* - duration of 2 days (18.09.2020 - 20.09.2020)
* - 1 IPM = 0.3 USD
* - 2M IPM Hard Cap
*
* ROUND 3:
* - duration of 6 days (22.09.2020 - 28.09.2020)
* - 1 IPM = 0.4 USD
* - 5M IPM Hard Cap (possible less, based on private round)
*
* After CrowdSale:
* Cooldown phase of 5 days begins
* and will unpause all tokens.
*
* More at https://timers.network/
*
* @author @KTimersnetwork
*/
contract IPMCrowdSale {
using SafeMath for uint256;
//////////////////////////////////////
// Contract configuration //
//////////////////////////////////////
// owner
address owner;
// allow pausing of contract to halt everything beside
// administrative functions
bool public paused = true;
// min payment for private round
uint256 public constant PRIVATE_PAYMENT_MIN = 2 ether;
// min payment for other rounds
uint256 public constant PUBLIC_PAYMENT_MIN = 0.1 ether;
// max payment is always equal
uint256 public constant PAYMENT_MAX = 50 ether;
// crowdsale can mint 9m IPM at maximum for all rounds
uint256 public constant MAXIMUM_MINTABLE_TOKENS = 9000000000000000000000000;
// start of private round 09/10/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_START = 1599739200;
// end of private round 09/12/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_END = 1599912000;
// private sale limit 1m
uint256 public constant PRIVATE_ROUND_CAP = 1000000 * (10**18);
// start of round 1 09/14/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_START = 1600084800;
// end of round 1 09/16/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_END = 1600257600;
// round 1 sale limit 1m
uint256 public constant ROUND_1_CAP = 1000000 * (10**18);
// start of round 2 09/18/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_START = 1600430400;
// end of round 2 09/20/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_END = 1600603200;
// round 2 sale limit 2m
uint256 public constant ROUND_2_CAP = 2000000 * (10**18);
// start of round 3 09/22/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_START = 1600776000;
// end of round 3 09/28/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_END = 1601294400;
// round 3 sale limit 5m
uint256 public constant ROUND_3_CAP = 5000000 * (10**18);
// sold tokens private round
uint256 public privateRoundSold;
// sold tokens round 1
uint256 public round1Sold;
// sold tokens round 2
uint256 public round2Sold;
// sold tokens round 3
uint256 public round3Sold;
// private round white list
mapping(address => uint256) public whitelist;
// contributors
mapping(address => uint256) public contributors;
// current rate
uint256 public ipmPerETH;
// IPM token references
address public ipmTokenAddress;
// withdrawal
address public foundation1Address;
address public foundation2Address;
//////////////////////////////////////
// Control functions / modifiers //
//////////////////////////////////////
function isPrivateRoundActive() public view returns(bool) {
}
function isRound1Active() public view returns(bool) {
}
function isRound2Active() public view returns(bool) {
}
function isRound3Active() public view returns(bool) {
}
function hasStarted() public view returns(bool) {
}
function hasEnded() public view returns(bool) {
}
modifier onlyOwner() {
}
modifier ifPaused() {
}
modifier ifNotPaused() {
}
modifier saleActive() {
require(hasStarted() == true, "Error: Sale has not started");
require(<FILL_ME>)
require(isPrivateRoundActive() || isRound1Active() || isRound2Active() || isRound3Active(), "Error: No round active at the moment");
_;
}
//////////////////////////////////////
// Events //
//////////////////////////////////////
event IPMPurchase(
address indexed beneficiary,
uint256 tokensPurchased,
uint256 weiUsed
);
//////////////////////////////////////
// Implementation //
//////////////////////////////////////
constructor() public {
}
function getCurrentIPMRatio() external view returns(uint256) {
}
function getCurrentRound() external view returns(string memory) {
}
function getCurrentCap() public view returns (uint256) {
}
/**
* @dev Used to update the current eth price of 1 IPM
* Function is needed to set the final price ahead
* of each round and for possible big price changes
* of eth itself to keep somewhat stable usd prices
*/
function updateIPMPerETH(uint256 _tokens) external onlyOwner {
}
function unpause() external onlyOwner ifPaused {
}
function pause() external onlyOwner ifNotPaused {
}
function getTokenAddress() external view returns(address) {
}
function setIPMTokenContract(address _token) external onlyOwner ifPaused {
}
function setWhitelist(address[] calldata _beneficiaries, uint256[] calldata _weiAmounts) external onlyOwner {
}
function addOrUpdateWhitelistEntry(address _beneficiary, uint256 _weiAmount) external onlyOwner {
}
function removeWhitelistEntry(address _beneficiary) external onlyOwner {
}
function isWhitelisted(address _beneficiary) public view returns(bool) {
}
function setFoundation1Address(address _foundationAddress) external onlyOwner {
}
function setFoundation2Address(address _foundationAddress) external onlyOwner {
}
function withdrawFunds() external onlyOwner {
}
/**
* @dev Default fallback function that will also allow
* the contract owner to deposit additional ETH,
* without triggering the IPM purchase functionality.
*/
receive() external payable {
}
function _buyTokens(address _beneficiary, uint256 _amountPayedInWei) internal saleActive {
}
function _calculateTokensForPayment(uint256 payedWei) internal view returns(uint256) {
}
function _hasAllowance(address _beneficiary) internal view returns(bool) {
}
function _getCurrentRemainingIPM() internal view returns(uint256) {
}
function _getPrivateRoundOverhead() internal view returns(uint256) {
}
}
| hasEnded()==false,"Error: Sale has already ended" | 289,197 | hasEnded()==false |
"Error: No round active at the moment" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.2;
interface ERCMintable {
//function crowdSaleMint(address to, uint256 amount) external returns(bool);
function mint(address to, uint256 amount) external;
}
/**
* @title IPM Token CrowdSale
* @dev CrowdSale contract for IPM Token:
*
* Tokens for Sale: 9M IPM
* Minted on demand up to the hard cap per round.
* Unsold supply won't be minted and will result in a
* lower circulating supply after the sale. Unsold tokens of each round
* don't transfer to the next round
*
* PRIVATE ROUND:
* - whitelisted
* - garuanteed allocation, overminted gets reduced from last round
* - duration of 2 days (10.09.2020 - 12.09.2020)
* - Min-Max allocation per address 2 ETH - 50 ETH
* - 1M flexible Cap (ETH price on launch could result in more)
* - 1 IPM = ~0.15 USD
*
* ROUND 1:
* - duration of 2 days (14.09.2020 - 16.09.2020)
* - 1 IPM = ~0.2 USD
* - 1M IPM Hard Cap
*
* ROUND 2:
* - duration of 2 days (18.09.2020 - 20.09.2020)
* - 1 IPM = 0.3 USD
* - 2M IPM Hard Cap
*
* ROUND 3:
* - duration of 6 days (22.09.2020 - 28.09.2020)
* - 1 IPM = 0.4 USD
* - 5M IPM Hard Cap (possible less, based on private round)
*
* After CrowdSale:
* Cooldown phase of 5 days begins
* and will unpause all tokens.
*
* More at https://timers.network/
*
* @author @KTimersnetwork
*/
contract IPMCrowdSale {
using SafeMath for uint256;
//////////////////////////////////////
// Contract configuration //
//////////////////////////////////////
// owner
address owner;
// allow pausing of contract to halt everything beside
// administrative functions
bool public paused = true;
// min payment for private round
uint256 public constant PRIVATE_PAYMENT_MIN = 2 ether;
// min payment for other rounds
uint256 public constant PUBLIC_PAYMENT_MIN = 0.1 ether;
// max payment is always equal
uint256 public constant PAYMENT_MAX = 50 ether;
// crowdsale can mint 9m IPM at maximum for all rounds
uint256 public constant MAXIMUM_MINTABLE_TOKENS = 9000000000000000000000000;
// start of private round 09/10/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_START = 1599739200;
// end of private round 09/12/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_END = 1599912000;
// private sale limit 1m
uint256 public constant PRIVATE_ROUND_CAP = 1000000 * (10**18);
// start of round 1 09/14/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_START = 1600084800;
// end of round 1 09/16/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_END = 1600257600;
// round 1 sale limit 1m
uint256 public constant ROUND_1_CAP = 1000000 * (10**18);
// start of round 2 09/18/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_START = 1600430400;
// end of round 2 09/20/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_END = 1600603200;
// round 2 sale limit 2m
uint256 public constant ROUND_2_CAP = 2000000 * (10**18);
// start of round 3 09/22/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_START = 1600776000;
// end of round 3 09/28/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_END = 1601294400;
// round 3 sale limit 5m
uint256 public constant ROUND_3_CAP = 5000000 * (10**18);
// sold tokens private round
uint256 public privateRoundSold;
// sold tokens round 1
uint256 public round1Sold;
// sold tokens round 2
uint256 public round2Sold;
// sold tokens round 3
uint256 public round3Sold;
// private round white list
mapping(address => uint256) public whitelist;
// contributors
mapping(address => uint256) public contributors;
// current rate
uint256 public ipmPerETH;
// IPM token references
address public ipmTokenAddress;
// withdrawal
address public foundation1Address;
address public foundation2Address;
//////////////////////////////////////
// Control functions / modifiers //
//////////////////////////////////////
function isPrivateRoundActive() public view returns(bool) {
}
function isRound1Active() public view returns(bool) {
}
function isRound2Active() public view returns(bool) {
}
function isRound3Active() public view returns(bool) {
}
function hasStarted() public view returns(bool) {
}
function hasEnded() public view returns(bool) {
}
modifier onlyOwner() {
}
modifier ifPaused() {
}
modifier ifNotPaused() {
}
modifier saleActive() {
require(hasStarted() == true, "Error: Sale has not started");
require(hasEnded() == false, "Error: Sale has already ended");
require(<FILL_ME>)
_;
}
//////////////////////////////////////
// Events //
//////////////////////////////////////
event IPMPurchase(
address indexed beneficiary,
uint256 tokensPurchased,
uint256 weiUsed
);
//////////////////////////////////////
// Implementation //
//////////////////////////////////////
constructor() public {
}
function getCurrentIPMRatio() external view returns(uint256) {
}
function getCurrentRound() external view returns(string memory) {
}
function getCurrentCap() public view returns (uint256) {
}
/**
* @dev Used to update the current eth price of 1 IPM
* Function is needed to set the final price ahead
* of each round and for possible big price changes
* of eth itself to keep somewhat stable usd prices
*/
function updateIPMPerETH(uint256 _tokens) external onlyOwner {
}
function unpause() external onlyOwner ifPaused {
}
function pause() external onlyOwner ifNotPaused {
}
function getTokenAddress() external view returns(address) {
}
function setIPMTokenContract(address _token) external onlyOwner ifPaused {
}
function setWhitelist(address[] calldata _beneficiaries, uint256[] calldata _weiAmounts) external onlyOwner {
}
function addOrUpdateWhitelistEntry(address _beneficiary, uint256 _weiAmount) external onlyOwner {
}
function removeWhitelistEntry(address _beneficiary) external onlyOwner {
}
function isWhitelisted(address _beneficiary) public view returns(bool) {
}
function setFoundation1Address(address _foundationAddress) external onlyOwner {
}
function setFoundation2Address(address _foundationAddress) external onlyOwner {
}
function withdrawFunds() external onlyOwner {
}
/**
* @dev Default fallback function that will also allow
* the contract owner to deposit additional ETH,
* without triggering the IPM purchase functionality.
*/
receive() external payable {
}
function _buyTokens(address _beneficiary, uint256 _amountPayedInWei) internal saleActive {
}
function _calculateTokensForPayment(uint256 payedWei) internal view returns(uint256) {
}
function _hasAllowance(address _beneficiary) internal view returns(bool) {
}
function _getCurrentRemainingIPM() internal view returns(uint256) {
}
function _getPrivateRoundOverhead() internal view returns(uint256) {
}
}
| isPrivateRoundActive()||isRound1Active()||isRound2Active()||isRound3Active(),"Error: No round active at the moment" | 289,197 | isPrivateRoundActive()||isRound1Active()||isRound2Active()||isRound3Active() |
"Error: Address is not whitelisted" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.2;
interface ERCMintable {
//function crowdSaleMint(address to, uint256 amount) external returns(bool);
function mint(address to, uint256 amount) external;
}
/**
* @title IPM Token CrowdSale
* @dev CrowdSale contract for IPM Token:
*
* Tokens for Sale: 9M IPM
* Minted on demand up to the hard cap per round.
* Unsold supply won't be minted and will result in a
* lower circulating supply after the sale. Unsold tokens of each round
* don't transfer to the next round
*
* PRIVATE ROUND:
* - whitelisted
* - garuanteed allocation, overminted gets reduced from last round
* - duration of 2 days (10.09.2020 - 12.09.2020)
* - Min-Max allocation per address 2 ETH - 50 ETH
* - 1M flexible Cap (ETH price on launch could result in more)
* - 1 IPM = ~0.15 USD
*
* ROUND 1:
* - duration of 2 days (14.09.2020 - 16.09.2020)
* - 1 IPM = ~0.2 USD
* - 1M IPM Hard Cap
*
* ROUND 2:
* - duration of 2 days (18.09.2020 - 20.09.2020)
* - 1 IPM = 0.3 USD
* - 2M IPM Hard Cap
*
* ROUND 3:
* - duration of 6 days (22.09.2020 - 28.09.2020)
* - 1 IPM = 0.4 USD
* - 5M IPM Hard Cap (possible less, based on private round)
*
* After CrowdSale:
* Cooldown phase of 5 days begins
* and will unpause all tokens.
*
* More at https://timers.network/
*
* @author @KTimersnetwork
*/
contract IPMCrowdSale {
using SafeMath for uint256;
//////////////////////////////////////
// Contract configuration //
//////////////////////////////////////
// owner
address owner;
// allow pausing of contract to halt everything beside
// administrative functions
bool public paused = true;
// min payment for private round
uint256 public constant PRIVATE_PAYMENT_MIN = 2 ether;
// min payment for other rounds
uint256 public constant PUBLIC_PAYMENT_MIN = 0.1 ether;
// max payment is always equal
uint256 public constant PAYMENT_MAX = 50 ether;
// crowdsale can mint 9m IPM at maximum for all rounds
uint256 public constant MAXIMUM_MINTABLE_TOKENS = 9000000000000000000000000;
// start of private round 09/10/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_START = 1599739200;
// end of private round 09/12/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_END = 1599912000;
// private sale limit 1m
uint256 public constant PRIVATE_ROUND_CAP = 1000000 * (10**18);
// start of round 1 09/14/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_START = 1600084800;
// end of round 1 09/16/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_END = 1600257600;
// round 1 sale limit 1m
uint256 public constant ROUND_1_CAP = 1000000 * (10**18);
// start of round 2 09/18/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_START = 1600430400;
// end of round 2 09/20/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_END = 1600603200;
// round 2 sale limit 2m
uint256 public constant ROUND_2_CAP = 2000000 * (10**18);
// start of round 3 09/22/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_START = 1600776000;
// end of round 3 09/28/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_END = 1601294400;
// round 3 sale limit 5m
uint256 public constant ROUND_3_CAP = 5000000 * (10**18);
// sold tokens private round
uint256 public privateRoundSold;
// sold tokens round 1
uint256 public round1Sold;
// sold tokens round 2
uint256 public round2Sold;
// sold tokens round 3
uint256 public round3Sold;
// private round white list
mapping(address => uint256) public whitelist;
// contributors
mapping(address => uint256) public contributors;
// current rate
uint256 public ipmPerETH;
// IPM token references
address public ipmTokenAddress;
// withdrawal
address public foundation1Address;
address public foundation2Address;
//////////////////////////////////////
// Control functions / modifiers //
//////////////////////////////////////
function isPrivateRoundActive() public view returns(bool) {
}
function isRound1Active() public view returns(bool) {
}
function isRound2Active() public view returns(bool) {
}
function isRound3Active() public view returns(bool) {
}
function hasStarted() public view returns(bool) {
}
function hasEnded() public view returns(bool) {
}
modifier onlyOwner() {
}
modifier ifPaused() {
}
modifier ifNotPaused() {
}
modifier saleActive() {
}
//////////////////////////////////////
// Events //
//////////////////////////////////////
event IPMPurchase(
address indexed beneficiary,
uint256 tokensPurchased,
uint256 weiUsed
);
//////////////////////////////////////
// Implementation //
//////////////////////////////////////
constructor() public {
}
function getCurrentIPMRatio() external view returns(uint256) {
}
function getCurrentRound() external view returns(string memory) {
}
function getCurrentCap() public view returns (uint256) {
}
/**
* @dev Used to update the current eth price of 1 IPM
* Function is needed to set the final price ahead
* of each round and for possible big price changes
* of eth itself to keep somewhat stable usd prices
*/
function updateIPMPerETH(uint256 _tokens) external onlyOwner {
}
function unpause() external onlyOwner ifPaused {
}
function pause() external onlyOwner ifNotPaused {
}
function getTokenAddress() external view returns(address) {
}
function setIPMTokenContract(address _token) external onlyOwner ifPaused {
}
function setWhitelist(address[] calldata _beneficiaries, uint256[] calldata _weiAmounts) external onlyOwner {
}
function addOrUpdateWhitelistEntry(address _beneficiary, uint256 _weiAmount) external onlyOwner {
}
function removeWhitelistEntry(address _beneficiary) external onlyOwner {
require(<FILL_ME>)
whitelist[_beneficiary] = 0;
delete whitelist[_beneficiary];
}
function isWhitelisted(address _beneficiary) public view returns(bool) {
}
function setFoundation1Address(address _foundationAddress) external onlyOwner {
}
function setFoundation2Address(address _foundationAddress) external onlyOwner {
}
function withdrawFunds() external onlyOwner {
}
/**
* @dev Default fallback function that will also allow
* the contract owner to deposit additional ETH,
* without triggering the IPM purchase functionality.
*/
receive() external payable {
}
function _buyTokens(address _beneficiary, uint256 _amountPayedInWei) internal saleActive {
}
function _calculateTokensForPayment(uint256 payedWei) internal view returns(uint256) {
}
function _hasAllowance(address _beneficiary) internal view returns(bool) {
}
function _getCurrentRemainingIPM() internal view returns(uint256) {
}
function _getPrivateRoundOverhead() internal view returns(uint256) {
}
}
| whitelist[_beneficiary]>0,"Error: Address is not whitelisted" | 289,197 | whitelist[_beneficiary]>0 |
"Error: Withdrawal during active rounds is not allowed" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.2;
interface ERCMintable {
//function crowdSaleMint(address to, uint256 amount) external returns(bool);
function mint(address to, uint256 amount) external;
}
/**
* @title IPM Token CrowdSale
* @dev CrowdSale contract for IPM Token:
*
* Tokens for Sale: 9M IPM
* Minted on demand up to the hard cap per round.
* Unsold supply won't be minted and will result in a
* lower circulating supply after the sale. Unsold tokens of each round
* don't transfer to the next round
*
* PRIVATE ROUND:
* - whitelisted
* - garuanteed allocation, overminted gets reduced from last round
* - duration of 2 days (10.09.2020 - 12.09.2020)
* - Min-Max allocation per address 2 ETH - 50 ETH
* - 1M flexible Cap (ETH price on launch could result in more)
* - 1 IPM = ~0.15 USD
*
* ROUND 1:
* - duration of 2 days (14.09.2020 - 16.09.2020)
* - 1 IPM = ~0.2 USD
* - 1M IPM Hard Cap
*
* ROUND 2:
* - duration of 2 days (18.09.2020 - 20.09.2020)
* - 1 IPM = 0.3 USD
* - 2M IPM Hard Cap
*
* ROUND 3:
* - duration of 6 days (22.09.2020 - 28.09.2020)
* - 1 IPM = 0.4 USD
* - 5M IPM Hard Cap (possible less, based on private round)
*
* After CrowdSale:
* Cooldown phase of 5 days begins
* and will unpause all tokens.
*
* More at https://timers.network/
*
* @author @KTimersnetwork
*/
contract IPMCrowdSale {
using SafeMath for uint256;
//////////////////////////////////////
// Contract configuration //
//////////////////////////////////////
// owner
address owner;
// allow pausing of contract to halt everything beside
// administrative functions
bool public paused = true;
// min payment for private round
uint256 public constant PRIVATE_PAYMENT_MIN = 2 ether;
// min payment for other rounds
uint256 public constant PUBLIC_PAYMENT_MIN = 0.1 ether;
// max payment is always equal
uint256 public constant PAYMENT_MAX = 50 ether;
// crowdsale can mint 9m IPM at maximum for all rounds
uint256 public constant MAXIMUM_MINTABLE_TOKENS = 9000000000000000000000000;
// start of private round 09/10/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_START = 1599739200;
// end of private round 09/12/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_END = 1599912000;
// private sale limit 1m
uint256 public constant PRIVATE_ROUND_CAP = 1000000 * (10**18);
// start of round 1 09/14/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_START = 1600084800;
// end of round 1 09/16/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_END = 1600257600;
// round 1 sale limit 1m
uint256 public constant ROUND_1_CAP = 1000000 * (10**18);
// start of round 2 09/18/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_START = 1600430400;
// end of round 2 09/20/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_END = 1600603200;
// round 2 sale limit 2m
uint256 public constant ROUND_2_CAP = 2000000 * (10**18);
// start of round 3 09/22/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_START = 1600776000;
// end of round 3 09/28/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_END = 1601294400;
// round 3 sale limit 5m
uint256 public constant ROUND_3_CAP = 5000000 * (10**18);
// sold tokens private round
uint256 public privateRoundSold;
// sold tokens round 1
uint256 public round1Sold;
// sold tokens round 2
uint256 public round2Sold;
// sold tokens round 3
uint256 public round3Sold;
// private round white list
mapping(address => uint256) public whitelist;
// contributors
mapping(address => uint256) public contributors;
// current rate
uint256 public ipmPerETH;
// IPM token references
address public ipmTokenAddress;
// withdrawal
address public foundation1Address;
address public foundation2Address;
//////////////////////////////////////
// Control functions / modifiers //
//////////////////////////////////////
function isPrivateRoundActive() public view returns(bool) {
}
function isRound1Active() public view returns(bool) {
}
function isRound2Active() public view returns(bool) {
}
function isRound3Active() public view returns(bool) {
}
function hasStarted() public view returns(bool) {
}
function hasEnded() public view returns(bool) {
}
modifier onlyOwner() {
}
modifier ifPaused() {
}
modifier ifNotPaused() {
}
modifier saleActive() {
}
//////////////////////////////////////
// Events //
//////////////////////////////////////
event IPMPurchase(
address indexed beneficiary,
uint256 tokensPurchased,
uint256 weiUsed
);
//////////////////////////////////////
// Implementation //
//////////////////////////////////////
constructor() public {
}
function getCurrentIPMRatio() external view returns(uint256) {
}
function getCurrentRound() external view returns(string memory) {
}
function getCurrentCap() public view returns (uint256) {
}
/**
* @dev Used to update the current eth price of 1 IPM
* Function is needed to set the final price ahead
* of each round and for possible big price changes
* of eth itself to keep somewhat stable usd prices
*/
function updateIPMPerETH(uint256 _tokens) external onlyOwner {
}
function unpause() external onlyOwner ifPaused {
}
function pause() external onlyOwner ifNotPaused {
}
function getTokenAddress() external view returns(address) {
}
function setIPMTokenContract(address _token) external onlyOwner ifPaused {
}
function setWhitelist(address[] calldata _beneficiaries, uint256[] calldata _weiAmounts) external onlyOwner {
}
function addOrUpdateWhitelistEntry(address _beneficiary, uint256 _weiAmount) external onlyOwner {
}
function removeWhitelistEntry(address _beneficiary) external onlyOwner {
}
function isWhitelisted(address _beneficiary) public view returns(bool) {
}
function setFoundation1Address(address _foundationAddress) external onlyOwner {
}
function setFoundation2Address(address _foundationAddress) external onlyOwner {
}
function withdrawFunds() external onlyOwner {
require(hasStarted() == true, "Error: No reason to withdraw funds before sale has started");
require(<FILL_ME>)
require(foundation1Address != address(0), 'Error: No foundation1 wallet set');
require(foundation2Address != address(0), 'Error: No foundation2 wallet set');
uint256 fundsAvailable = address(this).balance;
require(fundsAvailable > 0, "Error: No funds available to withdraw");
uint256 amountForFoundation1Wallet = fundsAvailable.div(100).mul(70);
uint256 amountForFoundation2Wallet = fundsAvailable.sub(amountForFoundation1Wallet);
require(amountForFoundation1Wallet.add(amountForFoundation2Wallet) == fundsAvailable, "Error: Amount to be sent is not equal the funds");
payable(foundation1Address).transfer(amountForFoundation1Wallet);
payable(foundation2Address).transfer(amountForFoundation2Wallet);
}
/**
* @dev Default fallback function that will also allow
* the contract owner to deposit additional ETH,
* without triggering the IPM purchase functionality.
*/
receive() external payable {
}
function _buyTokens(address _beneficiary, uint256 _amountPayedInWei) internal saleActive {
}
function _calculateTokensForPayment(uint256 payedWei) internal view returns(uint256) {
}
function _hasAllowance(address _beneficiary) internal view returns(bool) {
}
function _getCurrentRemainingIPM() internal view returns(uint256) {
}
function _getPrivateRoundOverhead() internal view returns(uint256) {
}
}
| isPrivateRoundActive()==false&&isRound1Active()==false&&isRound2Active()==false&&isRound3Active()==false,"Error: Withdrawal during active rounds is not allowed" | 289,197 | isPrivateRoundActive()==false&&isRound1Active()==false&&isRound2Active()==false&&isRound3Active()==false |
"Error: Amount to be sent is not equal the funds" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.2;
interface ERCMintable {
//function crowdSaleMint(address to, uint256 amount) external returns(bool);
function mint(address to, uint256 amount) external;
}
/**
* @title IPM Token CrowdSale
* @dev CrowdSale contract for IPM Token:
*
* Tokens for Sale: 9M IPM
* Minted on demand up to the hard cap per round.
* Unsold supply won't be minted and will result in a
* lower circulating supply after the sale. Unsold tokens of each round
* don't transfer to the next round
*
* PRIVATE ROUND:
* - whitelisted
* - garuanteed allocation, overminted gets reduced from last round
* - duration of 2 days (10.09.2020 - 12.09.2020)
* - Min-Max allocation per address 2 ETH - 50 ETH
* - 1M flexible Cap (ETH price on launch could result in more)
* - 1 IPM = ~0.15 USD
*
* ROUND 1:
* - duration of 2 days (14.09.2020 - 16.09.2020)
* - 1 IPM = ~0.2 USD
* - 1M IPM Hard Cap
*
* ROUND 2:
* - duration of 2 days (18.09.2020 - 20.09.2020)
* - 1 IPM = 0.3 USD
* - 2M IPM Hard Cap
*
* ROUND 3:
* - duration of 6 days (22.09.2020 - 28.09.2020)
* - 1 IPM = 0.4 USD
* - 5M IPM Hard Cap (possible less, based on private round)
*
* After CrowdSale:
* Cooldown phase of 5 days begins
* and will unpause all tokens.
*
* More at https://timers.network/
*
* @author @KTimersnetwork
*/
contract IPMCrowdSale {
using SafeMath for uint256;
//////////////////////////////////////
// Contract configuration //
//////////////////////////////////////
// owner
address owner;
// allow pausing of contract to halt everything beside
// administrative functions
bool public paused = true;
// min payment for private round
uint256 public constant PRIVATE_PAYMENT_MIN = 2 ether;
// min payment for other rounds
uint256 public constant PUBLIC_PAYMENT_MIN = 0.1 ether;
// max payment is always equal
uint256 public constant PAYMENT_MAX = 50 ether;
// crowdsale can mint 9m IPM at maximum for all rounds
uint256 public constant MAXIMUM_MINTABLE_TOKENS = 9000000000000000000000000;
// start of private round 09/10/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_START = 1599739200;
// end of private round 09/12/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_END = 1599912000;
// private sale limit 1m
uint256 public constant PRIVATE_ROUND_CAP = 1000000 * (10**18);
// start of round 1 09/14/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_START = 1600084800;
// end of round 1 09/16/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_END = 1600257600;
// round 1 sale limit 1m
uint256 public constant ROUND_1_CAP = 1000000 * (10**18);
// start of round 2 09/18/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_START = 1600430400;
// end of round 2 09/20/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_END = 1600603200;
// round 2 sale limit 2m
uint256 public constant ROUND_2_CAP = 2000000 * (10**18);
// start of round 3 09/22/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_START = 1600776000;
// end of round 3 09/28/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_END = 1601294400;
// round 3 sale limit 5m
uint256 public constant ROUND_3_CAP = 5000000 * (10**18);
// sold tokens private round
uint256 public privateRoundSold;
// sold tokens round 1
uint256 public round1Sold;
// sold tokens round 2
uint256 public round2Sold;
// sold tokens round 3
uint256 public round3Sold;
// private round white list
mapping(address => uint256) public whitelist;
// contributors
mapping(address => uint256) public contributors;
// current rate
uint256 public ipmPerETH;
// IPM token references
address public ipmTokenAddress;
// withdrawal
address public foundation1Address;
address public foundation2Address;
//////////////////////////////////////
// Control functions / modifiers //
//////////////////////////////////////
function isPrivateRoundActive() public view returns(bool) {
}
function isRound1Active() public view returns(bool) {
}
function isRound2Active() public view returns(bool) {
}
function isRound3Active() public view returns(bool) {
}
function hasStarted() public view returns(bool) {
}
function hasEnded() public view returns(bool) {
}
modifier onlyOwner() {
}
modifier ifPaused() {
}
modifier ifNotPaused() {
}
modifier saleActive() {
}
//////////////////////////////////////
// Events //
//////////////////////////////////////
event IPMPurchase(
address indexed beneficiary,
uint256 tokensPurchased,
uint256 weiUsed
);
//////////////////////////////////////
// Implementation //
//////////////////////////////////////
constructor() public {
}
function getCurrentIPMRatio() external view returns(uint256) {
}
function getCurrentRound() external view returns(string memory) {
}
function getCurrentCap() public view returns (uint256) {
}
/**
* @dev Used to update the current eth price of 1 IPM
* Function is needed to set the final price ahead
* of each round and for possible big price changes
* of eth itself to keep somewhat stable usd prices
*/
function updateIPMPerETH(uint256 _tokens) external onlyOwner {
}
function unpause() external onlyOwner ifPaused {
}
function pause() external onlyOwner ifNotPaused {
}
function getTokenAddress() external view returns(address) {
}
function setIPMTokenContract(address _token) external onlyOwner ifPaused {
}
function setWhitelist(address[] calldata _beneficiaries, uint256[] calldata _weiAmounts) external onlyOwner {
}
function addOrUpdateWhitelistEntry(address _beneficiary, uint256 _weiAmount) external onlyOwner {
}
function removeWhitelistEntry(address _beneficiary) external onlyOwner {
}
function isWhitelisted(address _beneficiary) public view returns(bool) {
}
function setFoundation1Address(address _foundationAddress) external onlyOwner {
}
function setFoundation2Address(address _foundationAddress) external onlyOwner {
}
function withdrawFunds() external onlyOwner {
require(hasStarted() == true, "Error: No reason to withdraw funds before sale has started");
require(
isPrivateRoundActive() == false &&
isRound1Active() == false &&
isRound2Active() == false &&
isRound3Active() == false,
"Error: Withdrawal during active rounds is not allowed"
);
require(foundation1Address != address(0), 'Error: No foundation1 wallet set');
require(foundation2Address != address(0), 'Error: No foundation2 wallet set');
uint256 fundsAvailable = address(this).balance;
require(fundsAvailable > 0, "Error: No funds available to withdraw");
uint256 amountForFoundation1Wallet = fundsAvailable.div(100).mul(70);
uint256 amountForFoundation2Wallet = fundsAvailable.sub(amountForFoundation1Wallet);
require(<FILL_ME>)
payable(foundation1Address).transfer(amountForFoundation1Wallet);
payable(foundation2Address).transfer(amountForFoundation2Wallet);
}
/**
* @dev Default fallback function that will also allow
* the contract owner to deposit additional ETH,
* without triggering the IPM purchase functionality.
*/
receive() external payable {
}
function _buyTokens(address _beneficiary, uint256 _amountPayedInWei) internal saleActive {
}
function _calculateTokensForPayment(uint256 payedWei) internal view returns(uint256) {
}
function _hasAllowance(address _beneficiary) internal view returns(bool) {
}
function _getCurrentRemainingIPM() internal view returns(uint256) {
}
function _getPrivateRoundOverhead() internal view returns(uint256) {
}
}
| amountForFoundation1Wallet.add(amountForFoundation2Wallet)==fundsAvailable,"Error: Amount to be sent is not equal the funds" | 289,197 | amountForFoundation1Wallet.add(amountForFoundation2Wallet)==fundsAvailable |
"Error: Address is not allowed to purchase" | // SPDX-License-Identifier: MIT
pragma solidity 0.6.2;
interface ERCMintable {
//function crowdSaleMint(address to, uint256 amount) external returns(bool);
function mint(address to, uint256 amount) external;
}
/**
* @title IPM Token CrowdSale
* @dev CrowdSale contract for IPM Token:
*
* Tokens for Sale: 9M IPM
* Minted on demand up to the hard cap per round.
* Unsold supply won't be minted and will result in a
* lower circulating supply after the sale. Unsold tokens of each round
* don't transfer to the next round
*
* PRIVATE ROUND:
* - whitelisted
* - garuanteed allocation, overminted gets reduced from last round
* - duration of 2 days (10.09.2020 - 12.09.2020)
* - Min-Max allocation per address 2 ETH - 50 ETH
* - 1M flexible Cap (ETH price on launch could result in more)
* - 1 IPM = ~0.15 USD
*
* ROUND 1:
* - duration of 2 days (14.09.2020 - 16.09.2020)
* - 1 IPM = ~0.2 USD
* - 1M IPM Hard Cap
*
* ROUND 2:
* - duration of 2 days (18.09.2020 - 20.09.2020)
* - 1 IPM = 0.3 USD
* - 2M IPM Hard Cap
*
* ROUND 3:
* - duration of 6 days (22.09.2020 - 28.09.2020)
* - 1 IPM = 0.4 USD
* - 5M IPM Hard Cap (possible less, based on private round)
*
* After CrowdSale:
* Cooldown phase of 5 days begins
* and will unpause all tokens.
*
* More at https://timers.network/
*
* @author @KTimersnetwork
*/
contract IPMCrowdSale {
using SafeMath for uint256;
//////////////////////////////////////
// Contract configuration //
//////////////////////////////////////
// owner
address owner;
// allow pausing of contract to halt everything beside
// administrative functions
bool public paused = true;
// min payment for private round
uint256 public constant PRIVATE_PAYMENT_MIN = 2 ether;
// min payment for other rounds
uint256 public constant PUBLIC_PAYMENT_MIN = 0.1 ether;
// max payment is always equal
uint256 public constant PAYMENT_MAX = 50 ether;
// crowdsale can mint 9m IPM at maximum for all rounds
uint256 public constant MAXIMUM_MINTABLE_TOKENS = 9000000000000000000000000;
// start of private round 09/10/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_START = 1599739200;
// end of private round 09/12/2020 @ 12:00pm UTC
uint256 public constant PRIVATE_ROUND_END = 1599912000;
// private sale limit 1m
uint256 public constant PRIVATE_ROUND_CAP = 1000000 * (10**18);
// start of round 1 09/14/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_START = 1600084800;
// end of round 1 09/16/2020 @ 12:00pm UTC
uint256 public constant ROUND_1_END = 1600257600;
// round 1 sale limit 1m
uint256 public constant ROUND_1_CAP = 1000000 * (10**18);
// start of round 2 09/18/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_START = 1600430400;
// end of round 2 09/20/2020 @ 12:00pm UTC
uint256 public constant ROUND_2_END = 1600603200;
// round 2 sale limit 2m
uint256 public constant ROUND_2_CAP = 2000000 * (10**18);
// start of round 3 09/22/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_START = 1600776000;
// end of round 3 09/28/2020 @ 12:00pm UTC
uint256 public constant ROUND_3_END = 1601294400;
// round 3 sale limit 5m
uint256 public constant ROUND_3_CAP = 5000000 * (10**18);
// sold tokens private round
uint256 public privateRoundSold;
// sold tokens round 1
uint256 public round1Sold;
// sold tokens round 2
uint256 public round2Sold;
// sold tokens round 3
uint256 public round3Sold;
// private round white list
mapping(address => uint256) public whitelist;
// contributors
mapping(address => uint256) public contributors;
// current rate
uint256 public ipmPerETH;
// IPM token references
address public ipmTokenAddress;
// withdrawal
address public foundation1Address;
address public foundation2Address;
//////////////////////////////////////
// Control functions / modifiers //
//////////////////////////////////////
function isPrivateRoundActive() public view returns(bool) {
}
function isRound1Active() public view returns(bool) {
}
function isRound2Active() public view returns(bool) {
}
function isRound3Active() public view returns(bool) {
}
function hasStarted() public view returns(bool) {
}
function hasEnded() public view returns(bool) {
}
modifier onlyOwner() {
}
modifier ifPaused() {
}
modifier ifNotPaused() {
}
modifier saleActive() {
}
//////////////////////////////////////
// Events //
//////////////////////////////////////
event IPMPurchase(
address indexed beneficiary,
uint256 tokensPurchased,
uint256 weiUsed
);
//////////////////////////////////////
// Implementation //
//////////////////////////////////////
constructor() public {
}
function getCurrentIPMRatio() external view returns(uint256) {
}
function getCurrentRound() external view returns(string memory) {
}
function getCurrentCap() public view returns (uint256) {
}
/**
* @dev Used to update the current eth price of 1 IPM
* Function is needed to set the final price ahead
* of each round and for possible big price changes
* of eth itself to keep somewhat stable usd prices
*/
function updateIPMPerETH(uint256 _tokens) external onlyOwner {
}
function unpause() external onlyOwner ifPaused {
}
function pause() external onlyOwner ifNotPaused {
}
function getTokenAddress() external view returns(address) {
}
function setIPMTokenContract(address _token) external onlyOwner ifPaused {
}
function setWhitelist(address[] calldata _beneficiaries, uint256[] calldata _weiAmounts) external onlyOwner {
}
function addOrUpdateWhitelistEntry(address _beneficiary, uint256 _weiAmount) external onlyOwner {
}
function removeWhitelistEntry(address _beneficiary) external onlyOwner {
}
function isWhitelisted(address _beneficiary) public view returns(bool) {
}
function setFoundation1Address(address _foundationAddress) external onlyOwner {
}
function setFoundation2Address(address _foundationAddress) external onlyOwner {
}
function withdrawFunds() external onlyOwner {
}
/**
* @dev Default fallback function that will also allow
* the contract owner to deposit additional ETH,
* without triggering the IPM purchase functionality.
*/
receive() external payable {
}
function _buyTokens(address _beneficiary, uint256 _amountPayedInWei) internal saleActive {
require(_beneficiary != address(0), "Error: Burn/Mint address cant purchase tokens");
require(<FILL_ME>)
require(_amountPayedInWei <= PAYMENT_MAX, "Error: Paymed exceeds maximum single purchase");
uint256 tokensForPayment = _calculateTokensForPayment(_amountPayedInWei);
uint256 tokensLeft = _getCurrentRemainingIPM();
require(tokensForPayment > 0, "Error: payment too low. no tokens for this wei amount");
require(tokensLeft > 0, "Error: No tokens left for this round");
require(tokensLeft >= tokensForPayment, "Error: Purchase exceeds remaining tokens for this round");
if(isPrivateRoundActive()) {
uint256 alreadyPurchased = contributors[_beneficiary];
uint256 allowedToPurchase = whitelist[_beneficiary];
if(alreadyPurchased == 0) {
require(_amountPayedInWei >= PRIVATE_PAYMENT_MIN, "Error: Payment smaller than minimum payment");
}
uint256 combinedPurchase = alreadyPurchased.add(_amountPayedInWei);
require(combinedPurchase <= allowedToPurchase, "Error: This purchase exceeds the whitelisted limited");
}
require(_amountPayedInWei >= PUBLIC_PAYMENT_MIN, "Error: Payment smaller than minimum payment");
ERCMintable(ipmTokenAddress).mint(_beneficiary, tokensForPayment);
if(isRound1Active()) {
round1Sold = round1Sold.add(tokensForPayment);
} else if(isRound2Active()) {
round2Sold = round2Sold.add(tokensForPayment);
} else if(isRound3Active()) {
round3Sold = round3Sold.add(tokensForPayment);
} else {
privateRoundSold = privateRoundSold.add(tokensForPayment);
}
contributors[_beneficiary] = contributors[_beneficiary].add(_amountPayedInWei);
emit IPMPurchase(
_beneficiary,
tokensForPayment,
_amountPayedInWei
);
}
function _calculateTokensForPayment(uint256 payedWei) internal view returns(uint256) {
}
function _hasAllowance(address _beneficiary) internal view returns(bool) {
}
function _getCurrentRemainingIPM() internal view returns(uint256) {
}
function _getPrivateRoundOverhead() internal view returns(uint256) {
}
}
| _hasAllowance(_beneficiary),"Error: Address is not allowed to purchase" | 289,197 | _hasAllowance(_beneficiary) |
"must be on the list" | // SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.7.6;
import "@openzeppelin/contracts/math/Math.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/math/SignedSafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/drafts/ERC20Permit.sol";
import "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3MintCallback.sol";
import "@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol";
import "@uniswap/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import "@uniswap/v3-core/contracts/libraries/TickMath.sol";
import "@uniswap/v3-core/contracts/libraries/FullMath.sol";
import "@uniswap/v3-periphery/contracts/libraries/LiquidityAmounts.sol";
import "./interfaces/IVault.sol";
import "./interfaces/IUniversalVault.sol";
// @title Hypervisor
// @notice A Uniswap V2-like interface with fungible liquidity to Uniswap V3
// which allows for arbitrary liquidity provision: one-sided, lop-sided, and
// balanced
contract Hypervisor is IVault, IUniswapV3MintCallback, IUniswapV3SwapCallback, ERC20Permit {
using SafeERC20 for IERC20;
using SafeMath for uint256;
using SignedSafeMath for int256;
IUniswapV3Pool public pool;
IERC20 public token0;
IERC20 public token1;
uint24 public fee;
int24 public tickSpacing;
int24 public baseLower;
int24 public baseUpper;
int24 public limitLower;
int24 public limitUpper;
address public owner;
uint256 public deposit0Max;
uint256 public deposit1Max;
uint256 public maxTotalSupply;
mapping(address => bool) public list;
bool public whitelisted;
bool public directDeposit;
uint256 public constant PRECISION = 1e36;
// @param _pool Uniswap V3 pool for which liquidity is managed
// @param _owner Owner of the Hypervisor
constructor(
address _pool,
address _owner,
string memory name,
string memory symbol
) ERC20Permit(name) ERC20(name, symbol) {
}
// @dev Should never be called directly by client, `to` can be frontrun
// @param deposit0 Amount of token0 transfered from sender to Hypervisor
// @param deposit1 Amount of token1 transfered from sender to Hypervisor
// @param to Address to which liquidity tokens are minted
// @param from Address from which asset tokens are transferred
// @return shares Quantity of liquidity tokens minted as a result of deposit
function deposit(
uint256 deposit0,
uint256 deposit1,
address to,
address from
) external override returns (uint256 shares) {
require(deposit0 > 0 || deposit1 > 0, "deposits must be nonzero");
require(deposit0 <= deposit0Max && deposit1 <= deposit1Max, "deposits must be less than maximum amounts");
require(to != address(0) && to != address(this), "to");
require(<FILL_ME>)
// update fees
(uint128 baseLiquidity, uint128 limitLiquidity) = zeroBurn();
uint160 sqrtPrice = TickMath.getSqrtRatioAtTick(currentTick());
uint256 price = FullMath.mulDiv(uint256(sqrtPrice).mul(uint256(sqrtPrice)), PRECISION, 2**(96 * 2));
(uint256 pool0, uint256 pool1) = getTotalAmounts();
uint256 deposit0PricedInToken1 = deposit0.mul(price).div(PRECISION);
shares = deposit1.add(deposit0PricedInToken1);
if (deposit0 > 0) {
token0.safeTransferFrom(from, address(this), deposit0);
}
if (deposit1 > 0) {
token1.safeTransferFrom(from, address(this), deposit1);
}
if (totalSupply() != 0) {
uint256 pool0PricedInToken1 = pool0.mul(price).div(PRECISION);
shares = shares.mul(totalSupply()).div(pool0PricedInToken1.add(pool1));
if (directDeposit) {
baseLiquidity = _liquidityForAmounts(
baseLower,
baseUpper,
token0.balanceOf(address(this)),
token1.balanceOf(address(this))
);
_mintLiquidity(baseLower, baseUpper, baseLiquidity, address(this));
limitLiquidity = _liquidityForAmounts(
limitLower,
limitUpper,
token0.balanceOf(address(this)),
token1.balanceOf(address(this))
);
_mintLiquidity(limitLower, limitUpper, limitLiquidity, address(this));
}
}
_mint(to, shares);
emit Deposit(from, to, shares, deposit0, deposit1);
// Check total supply cap not exceeded. A value of 0 means no limit.
require(maxTotalSupply == 0 || totalSupply() <= maxTotalSupply, "maxTotalSupply");
}
function zeroBurn() internal returns(uint128 baseLiquidity, uint128 limitLiquidity) {
}
function pullLiquidity(
uint256 shares
) external onlyOwner returns(
uint256 base0,
uint256 base1,
uint256 limit0,
uint256 limit1
) {
}
// @param shares Number of liquidity tokens to redeem as pool assets
// @param to Address to which redeemed pool assets are sent
// @param from Address from which liquidity tokens are sent
// @return amount0 Amount of token0 redeemed by the submitted liquidity tokens
// @return amount1 Amount of token1 redeemed by the submitted liquidity tokens
function withdraw(
uint256 shares,
address to,
address from
) external override returns (uint256 amount0, uint256 amount1) {
}
// @param _baseLower The lower tick of the base position
// @param _baseUpper The upper tick of the base position
// @param _limitLower The lower tick of the limit position
// @param _limitUpper The upper tick of the limit position
// @param feeRecipient Address of recipient of 10% of earned fees since last rebalance
// @param swapQuantity Quantity of tokens to swap; if quantity is positive,
// `swapQuantity` token0 are swaped for token1, if negative, `swapQuantity`
// token1 is swaped for token0
function rebalance(
int24 _baseLower,
int24 _baseUpper,
int24 _limitLower,
int24 _limitUpper,
address feeRecipient,
int256 swapQuantity
) external override onlyOwner {
}
function pendingFees() external onlyOwner returns (uint256 fees0, uint256 fees1) {
}
function addBaseLiquidity(uint256 amount0, uint256 amount1) external onlyOwner {
}
function addLimitLiquidity(uint256 amount0, uint256 amount1) external onlyOwner {
}
function _mintLiquidity(
int24 tickLower,
int24 tickUpper,
uint128 liquidity,
address payer
) internal returns (uint256 amount0, uint256 amount1) {
}
function _burnLiquidity(
int24 tickLower,
int24 tickUpper,
uint128 liquidity,
address to,
bool collectAll
) internal returns (uint256 amount0, uint256 amount1) {
}
function _liquidityForShares(
int24 tickLower,
int24 tickUpper,
uint256 shares
) internal view returns (uint128) {
}
function _position(int24 tickLower, int24 tickUpper)
internal
view
returns (
uint128 liquidity,
uint128 tokensOwed0,
uint128 tokensOwed1
)
{
}
function uniswapV3MintCallback(
uint256 amount0,
uint256 amount1,
bytes calldata data
) external override {
}
function uniswapV3SwapCallback(
int256 amount0Delta,
int256 amount1Delta,
bytes calldata data
) external override {
}
// @return total0 Quantity of token0 in both positions and unused in the Hypervisor
// @return total1 Quantity of token1 in both positions and unused in the Hypervisor
function getTotalAmounts() public view override returns (uint256 total0, uint256 total1) {
}
// @return liquidity Amount of total liquidity in the base position
// @return amount0 Estimated amount of token0 that could be collected by
// burning the base position
// @return amount1 Estimated amount of token1 that could be collected by
// burning the base position
function getBasePosition()
public
view
returns (
uint128 liquidity,
uint256 amount0,
uint256 amount1
)
{
}
// @return liquidity Amount of total liquidity in the limit position
// @return amount0 Estimated amount of token0 that could be collected by
// burning the limit position
// @return amount1 Estimated amount of token1 that could be collected by
// burning the limit position
function getLimitPosition()
public
view
returns (
uint128 liquidity,
uint256 amount0,
uint256 amount1
)
{
}
function _amountsForLiquidity(
int24 tickLower,
int24 tickUpper,
uint128 liquidity
) internal view returns (uint256, uint256) {
}
function _liquidityForAmounts(
int24 tickLower,
int24 tickUpper,
uint256 amount0,
uint256 amount1
) internal view returns (uint128) {
}
// @return tick Uniswap pool's current price tick
function currentTick() public view returns (int24 tick) {
}
function _uint128Safe(uint256 x) internal pure returns (uint128) {
}
// @param _maxTotalSupply The maximum liquidity token supply the contract allows
function setMaxTotalSupply(uint256 _maxTotalSupply) external onlyOwner {
}
// @param _deposit0Max The maximum amount of token0 allowed in a deposit
// @param _deposit1Max The maximum amount of token1 allowed in a deposit
function setDepositMax(uint256 _deposit0Max, uint256 _deposit1Max) external onlyOwner {
}
function appendList(address[] memory listed) external onlyOwner {
}
function removeListed(address listed) external onlyOwner {
}
function toggleDirectDeposit() external onlyOwner {
}
function toggleWhitelist() external onlyOwner {
}
function transferOwnership(address newOwner) external onlyOwner {
}
modifier onlyOwner {
}
}
| !whitelisted||list[msg.sender],"must be on the list" | 289,338 | !whitelisted||list[msg.sender] |
"invalid parameter(s)" | /**
* Copyright (c) 2019 STX AG [email protected]
* No license
*/
pragma solidity 0.5.3;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
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) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
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 {
}
}
contract KyberNetworkProxyInterface {
function swapEtherToToken(IERC20 token, uint minConversionRate) public payable returns (uint);
function swapTokenToToken(IERC20 src, uint srcAmount, IERC20 dest, uint minConversionRate) public returns (uint);
}
contract PaymentsLayer {
using SafeERC20 for IERC20;
using SafeMath for uint256;
address public constant DAI_ADDRESS = 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359; // 0x9Ad61E35f8309aF944136283157FABCc5AD371E5;
IERC20 public dai = IERC20(DAI_ADDRESS);
address public constant ETH_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
event PaymentForwarded(address indexed from, address indexed to, address indexed srcToken, uint256 amountDai, uint256 amountSrc, uint256 changeDai, bytes encodedFunctionCall);
function forwardEth(KyberNetworkProxyInterface _kyberNetworkProxy, IERC20 _srcToken, uint256 _minimumRate, address _destinationAddress, bytes memory _encodedFunctionCall) public payable {
require(<FILL_ME>)
uint256 srcQuantity = address(_srcToken) == ETH_TOKEN_ADDRESS ? msg.value : _srcToken.allowance(msg.sender, address(this));
if (address(_srcToken) != ETH_TOKEN_ADDRESS) {
_srcToken.safeTransferFrom(msg.sender, address(this), srcQuantity);
require(_srcToken.allowance(address(this), address(_kyberNetworkProxy)) == 0, "non-zero initial _kyberNetworkProxy allowance");
require(_srcToken.approve(address(_kyberNetworkProxy), srcQuantity), "approving _kyberNetworkProxy failed");
}
uint256 amountDai = address(_srcToken) == ETH_TOKEN_ADDRESS ? _kyberNetworkProxy.swapEtherToToken.value(srcQuantity)(dai, _minimumRate) : _kyberNetworkProxy.swapTokenToToken(_srcToken, srcQuantity, dai, _minimumRate);
require(amountDai >= srcQuantity.mul(_minimumRate).div(1e18), "_kyberNetworkProxy failed");
require(dai.allowance(address(this), _destinationAddress) == 0, "non-zero initial destination allowance");
require(dai.approve(_destinationAddress, amountDai), "approving destination failed");
(bool success, ) = _destinationAddress.call(_encodedFunctionCall);
require(success, "destination call failed");
uint256 changeDai = dai.allowance(address(this), _destinationAddress);
if (changeDai > 0) {
dai.safeTransfer(msg.sender, changeDai);
require(dai.approve(_destinationAddress, 0), "un-approving destination failed");
}
emit PaymentForwarded(msg.sender, _destinationAddress, address(_srcToken), amountDai.sub(changeDai), srcQuantity, changeDai, _encodedFunctionCall);
}
}
| address(_srcToken)!=address(0)&&_minimumRate>0&&_destinationAddress!=address(0),"invalid parameter(s)" | 289,366 | address(_srcToken)!=address(0)&&_minimumRate>0&&_destinationAddress!=address(0) |
"non-zero initial _kyberNetworkProxy allowance" | /**
* Copyright (c) 2019 STX AG [email protected]
* No license
*/
pragma solidity 0.5.3;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
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) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
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 {
}
}
contract KyberNetworkProxyInterface {
function swapEtherToToken(IERC20 token, uint minConversionRate) public payable returns (uint);
function swapTokenToToken(IERC20 src, uint srcAmount, IERC20 dest, uint minConversionRate) public returns (uint);
}
contract PaymentsLayer {
using SafeERC20 for IERC20;
using SafeMath for uint256;
address public constant DAI_ADDRESS = 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359; // 0x9Ad61E35f8309aF944136283157FABCc5AD371E5;
IERC20 public dai = IERC20(DAI_ADDRESS);
address public constant ETH_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
event PaymentForwarded(address indexed from, address indexed to, address indexed srcToken, uint256 amountDai, uint256 amountSrc, uint256 changeDai, bytes encodedFunctionCall);
function forwardEth(KyberNetworkProxyInterface _kyberNetworkProxy, IERC20 _srcToken, uint256 _minimumRate, address _destinationAddress, bytes memory _encodedFunctionCall) public payable {
require(address(_srcToken) != address(0) && _minimumRate > 0 && _destinationAddress != address(0), "invalid parameter(s)");
uint256 srcQuantity = address(_srcToken) == ETH_TOKEN_ADDRESS ? msg.value : _srcToken.allowance(msg.sender, address(this));
if (address(_srcToken) != ETH_TOKEN_ADDRESS) {
_srcToken.safeTransferFrom(msg.sender, address(this), srcQuantity);
require(<FILL_ME>)
require(_srcToken.approve(address(_kyberNetworkProxy), srcQuantity), "approving _kyberNetworkProxy failed");
}
uint256 amountDai = address(_srcToken) == ETH_TOKEN_ADDRESS ? _kyberNetworkProxy.swapEtherToToken.value(srcQuantity)(dai, _minimumRate) : _kyberNetworkProxy.swapTokenToToken(_srcToken, srcQuantity, dai, _minimumRate);
require(amountDai >= srcQuantity.mul(_minimumRate).div(1e18), "_kyberNetworkProxy failed");
require(dai.allowance(address(this), _destinationAddress) == 0, "non-zero initial destination allowance");
require(dai.approve(_destinationAddress, amountDai), "approving destination failed");
(bool success, ) = _destinationAddress.call(_encodedFunctionCall);
require(success, "destination call failed");
uint256 changeDai = dai.allowance(address(this), _destinationAddress);
if (changeDai > 0) {
dai.safeTransfer(msg.sender, changeDai);
require(dai.approve(_destinationAddress, 0), "un-approving destination failed");
}
emit PaymentForwarded(msg.sender, _destinationAddress, address(_srcToken), amountDai.sub(changeDai), srcQuantity, changeDai, _encodedFunctionCall);
}
}
| _srcToken.allowance(address(this),address(_kyberNetworkProxy))==0,"non-zero initial _kyberNetworkProxy allowance" | 289,366 | _srcToken.allowance(address(this),address(_kyberNetworkProxy))==0 |
"approving _kyberNetworkProxy failed" | /**
* Copyright (c) 2019 STX AG [email protected]
* No license
*/
pragma solidity 0.5.3;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
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) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
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 {
}
}
contract KyberNetworkProxyInterface {
function swapEtherToToken(IERC20 token, uint minConversionRate) public payable returns (uint);
function swapTokenToToken(IERC20 src, uint srcAmount, IERC20 dest, uint minConversionRate) public returns (uint);
}
contract PaymentsLayer {
using SafeERC20 for IERC20;
using SafeMath for uint256;
address public constant DAI_ADDRESS = 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359; // 0x9Ad61E35f8309aF944136283157FABCc5AD371E5;
IERC20 public dai = IERC20(DAI_ADDRESS);
address public constant ETH_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
event PaymentForwarded(address indexed from, address indexed to, address indexed srcToken, uint256 amountDai, uint256 amountSrc, uint256 changeDai, bytes encodedFunctionCall);
function forwardEth(KyberNetworkProxyInterface _kyberNetworkProxy, IERC20 _srcToken, uint256 _minimumRate, address _destinationAddress, bytes memory _encodedFunctionCall) public payable {
require(address(_srcToken) != address(0) && _minimumRate > 0 && _destinationAddress != address(0), "invalid parameter(s)");
uint256 srcQuantity = address(_srcToken) == ETH_TOKEN_ADDRESS ? msg.value : _srcToken.allowance(msg.sender, address(this));
if (address(_srcToken) != ETH_TOKEN_ADDRESS) {
_srcToken.safeTransferFrom(msg.sender, address(this), srcQuantity);
require(_srcToken.allowance(address(this), address(_kyberNetworkProxy)) == 0, "non-zero initial _kyberNetworkProxy allowance");
require(<FILL_ME>)
}
uint256 amountDai = address(_srcToken) == ETH_TOKEN_ADDRESS ? _kyberNetworkProxy.swapEtherToToken.value(srcQuantity)(dai, _minimumRate) : _kyberNetworkProxy.swapTokenToToken(_srcToken, srcQuantity, dai, _minimumRate);
require(amountDai >= srcQuantity.mul(_minimumRate).div(1e18), "_kyberNetworkProxy failed");
require(dai.allowance(address(this), _destinationAddress) == 0, "non-zero initial destination allowance");
require(dai.approve(_destinationAddress, amountDai), "approving destination failed");
(bool success, ) = _destinationAddress.call(_encodedFunctionCall);
require(success, "destination call failed");
uint256 changeDai = dai.allowance(address(this), _destinationAddress);
if (changeDai > 0) {
dai.safeTransfer(msg.sender, changeDai);
require(dai.approve(_destinationAddress, 0), "un-approving destination failed");
}
emit PaymentForwarded(msg.sender, _destinationAddress, address(_srcToken), amountDai.sub(changeDai), srcQuantity, changeDai, _encodedFunctionCall);
}
}
| _srcToken.approve(address(_kyberNetworkProxy),srcQuantity),"approving _kyberNetworkProxy failed" | 289,366 | _srcToken.approve(address(_kyberNetworkProxy),srcQuantity) |
"non-zero initial destination allowance" | /**
* Copyright (c) 2019 STX AG [email protected]
* No license
*/
pragma solidity 0.5.3;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
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) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
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 {
}
}
contract KyberNetworkProxyInterface {
function swapEtherToToken(IERC20 token, uint minConversionRate) public payable returns (uint);
function swapTokenToToken(IERC20 src, uint srcAmount, IERC20 dest, uint minConversionRate) public returns (uint);
}
contract PaymentsLayer {
using SafeERC20 for IERC20;
using SafeMath for uint256;
address public constant DAI_ADDRESS = 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359; // 0x9Ad61E35f8309aF944136283157FABCc5AD371E5;
IERC20 public dai = IERC20(DAI_ADDRESS);
address public constant ETH_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
event PaymentForwarded(address indexed from, address indexed to, address indexed srcToken, uint256 amountDai, uint256 amountSrc, uint256 changeDai, bytes encodedFunctionCall);
function forwardEth(KyberNetworkProxyInterface _kyberNetworkProxy, IERC20 _srcToken, uint256 _minimumRate, address _destinationAddress, bytes memory _encodedFunctionCall) public payable {
require(address(_srcToken) != address(0) && _minimumRate > 0 && _destinationAddress != address(0), "invalid parameter(s)");
uint256 srcQuantity = address(_srcToken) == ETH_TOKEN_ADDRESS ? msg.value : _srcToken.allowance(msg.sender, address(this));
if (address(_srcToken) != ETH_TOKEN_ADDRESS) {
_srcToken.safeTransferFrom(msg.sender, address(this), srcQuantity);
require(_srcToken.allowance(address(this), address(_kyberNetworkProxy)) == 0, "non-zero initial _kyberNetworkProxy allowance");
require(_srcToken.approve(address(_kyberNetworkProxy), srcQuantity), "approving _kyberNetworkProxy failed");
}
uint256 amountDai = address(_srcToken) == ETH_TOKEN_ADDRESS ? _kyberNetworkProxy.swapEtherToToken.value(srcQuantity)(dai, _minimumRate) : _kyberNetworkProxy.swapTokenToToken(_srcToken, srcQuantity, dai, _minimumRate);
require(amountDai >= srcQuantity.mul(_minimumRate).div(1e18), "_kyberNetworkProxy failed");
require(<FILL_ME>)
require(dai.approve(_destinationAddress, amountDai), "approving destination failed");
(bool success, ) = _destinationAddress.call(_encodedFunctionCall);
require(success, "destination call failed");
uint256 changeDai = dai.allowance(address(this), _destinationAddress);
if (changeDai > 0) {
dai.safeTransfer(msg.sender, changeDai);
require(dai.approve(_destinationAddress, 0), "un-approving destination failed");
}
emit PaymentForwarded(msg.sender, _destinationAddress, address(_srcToken), amountDai.sub(changeDai), srcQuantity, changeDai, _encodedFunctionCall);
}
}
| dai.allowance(address(this),_destinationAddress)==0,"non-zero initial destination allowance" | 289,366 | dai.allowance(address(this),_destinationAddress)==0 |
"approving destination failed" | /**
* Copyright (c) 2019 STX AG [email protected]
* No license
*/
pragma solidity 0.5.3;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
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) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
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 {
}
}
contract KyberNetworkProxyInterface {
function swapEtherToToken(IERC20 token, uint minConversionRate) public payable returns (uint);
function swapTokenToToken(IERC20 src, uint srcAmount, IERC20 dest, uint minConversionRate) public returns (uint);
}
contract PaymentsLayer {
using SafeERC20 for IERC20;
using SafeMath for uint256;
address public constant DAI_ADDRESS = 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359; // 0x9Ad61E35f8309aF944136283157FABCc5AD371E5;
IERC20 public dai = IERC20(DAI_ADDRESS);
address public constant ETH_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
event PaymentForwarded(address indexed from, address indexed to, address indexed srcToken, uint256 amountDai, uint256 amountSrc, uint256 changeDai, bytes encodedFunctionCall);
function forwardEth(KyberNetworkProxyInterface _kyberNetworkProxy, IERC20 _srcToken, uint256 _minimumRate, address _destinationAddress, bytes memory _encodedFunctionCall) public payable {
require(address(_srcToken) != address(0) && _minimumRate > 0 && _destinationAddress != address(0), "invalid parameter(s)");
uint256 srcQuantity = address(_srcToken) == ETH_TOKEN_ADDRESS ? msg.value : _srcToken.allowance(msg.sender, address(this));
if (address(_srcToken) != ETH_TOKEN_ADDRESS) {
_srcToken.safeTransferFrom(msg.sender, address(this), srcQuantity);
require(_srcToken.allowance(address(this), address(_kyberNetworkProxy)) == 0, "non-zero initial _kyberNetworkProxy allowance");
require(_srcToken.approve(address(_kyberNetworkProxy), srcQuantity), "approving _kyberNetworkProxy failed");
}
uint256 amountDai = address(_srcToken) == ETH_TOKEN_ADDRESS ? _kyberNetworkProxy.swapEtherToToken.value(srcQuantity)(dai, _minimumRate) : _kyberNetworkProxy.swapTokenToToken(_srcToken, srcQuantity, dai, _minimumRate);
require(amountDai >= srcQuantity.mul(_minimumRate).div(1e18), "_kyberNetworkProxy failed");
require(dai.allowance(address(this), _destinationAddress) == 0, "non-zero initial destination allowance");
require(<FILL_ME>)
(bool success, ) = _destinationAddress.call(_encodedFunctionCall);
require(success, "destination call failed");
uint256 changeDai = dai.allowance(address(this), _destinationAddress);
if (changeDai > 0) {
dai.safeTransfer(msg.sender, changeDai);
require(dai.approve(_destinationAddress, 0), "un-approving destination failed");
}
emit PaymentForwarded(msg.sender, _destinationAddress, address(_srcToken), amountDai.sub(changeDai), srcQuantity, changeDai, _encodedFunctionCall);
}
}
| dai.approve(_destinationAddress,amountDai),"approving destination failed" | 289,366 | dai.approve(_destinationAddress,amountDai) |
"un-approving destination failed" | /**
* Copyright (c) 2019 STX AG [email protected]
* No license
*/
pragma solidity 0.5.3;
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
interface IERC20 {
function transfer(address to, uint256 value) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function totalSupply() external view returns (uint256);
function balanceOf(address who) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title SafeMath
* @dev Unsigned math operations with safety checks that revert on error
*/
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) {
}
}
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
}
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 {
}
}
contract KyberNetworkProxyInterface {
function swapEtherToToken(IERC20 token, uint minConversionRate) public payable returns (uint);
function swapTokenToToken(IERC20 src, uint srcAmount, IERC20 dest, uint minConversionRate) public returns (uint);
}
contract PaymentsLayer {
using SafeERC20 for IERC20;
using SafeMath for uint256;
address public constant DAI_ADDRESS = 0x89d24A6b4CcB1B6fAA2625fE562bDD9a23260359; // 0x9Ad61E35f8309aF944136283157FABCc5AD371E5;
IERC20 public dai = IERC20(DAI_ADDRESS);
address public constant ETH_TOKEN_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
event PaymentForwarded(address indexed from, address indexed to, address indexed srcToken, uint256 amountDai, uint256 amountSrc, uint256 changeDai, bytes encodedFunctionCall);
function forwardEth(KyberNetworkProxyInterface _kyberNetworkProxy, IERC20 _srcToken, uint256 _minimumRate, address _destinationAddress, bytes memory _encodedFunctionCall) public payable {
require(address(_srcToken) != address(0) && _minimumRate > 0 && _destinationAddress != address(0), "invalid parameter(s)");
uint256 srcQuantity = address(_srcToken) == ETH_TOKEN_ADDRESS ? msg.value : _srcToken.allowance(msg.sender, address(this));
if (address(_srcToken) != ETH_TOKEN_ADDRESS) {
_srcToken.safeTransferFrom(msg.sender, address(this), srcQuantity);
require(_srcToken.allowance(address(this), address(_kyberNetworkProxy)) == 0, "non-zero initial _kyberNetworkProxy allowance");
require(_srcToken.approve(address(_kyberNetworkProxy), srcQuantity), "approving _kyberNetworkProxy failed");
}
uint256 amountDai = address(_srcToken) == ETH_TOKEN_ADDRESS ? _kyberNetworkProxy.swapEtherToToken.value(srcQuantity)(dai, _minimumRate) : _kyberNetworkProxy.swapTokenToToken(_srcToken, srcQuantity, dai, _minimumRate);
require(amountDai >= srcQuantity.mul(_minimumRate).div(1e18), "_kyberNetworkProxy failed");
require(dai.allowance(address(this), _destinationAddress) == 0, "non-zero initial destination allowance");
require(dai.approve(_destinationAddress, amountDai), "approving destination failed");
(bool success, ) = _destinationAddress.call(_encodedFunctionCall);
require(success, "destination call failed");
uint256 changeDai = dai.allowance(address(this), _destinationAddress);
if (changeDai > 0) {
dai.safeTransfer(msg.sender, changeDai);
require(<FILL_ME>)
}
emit PaymentForwarded(msg.sender, _destinationAddress, address(_srcToken), amountDai.sub(changeDai), srcQuantity, changeDai, _encodedFunctionCall);
}
}
| dai.approve(_destinationAddress,0),"un-approving destination failed" | 289,366 | dai.approve(_destinationAddress,0) |
"Insufficient funds sent" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./ERC721A.sol";
contract Avatar is ERC721A, Ownable, ReentrancyGuard, Pausable {
event AvatarClaimed(address from, address to, uint256 indexed attr, uint256 indexed id);
uint256 public constant MAX_SUPPLY = 1000;
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint256 private _price = 0.0025 ether;
uint256 private _maxPerMint = 5;
string private _contractBaseURI;
address payable private _paymentSplitter;
mapping(uint256 => uint256) private _attributes;
mapping(uint256 => bool) private _used;
mapping(address => bool) private _admins;
constructor(string memory name, string memory symbol, string memory baseURI) ERC721A(name, symbol) {
}
function adminMint(address to, uint256[] memory attributes) external nonReentrant adminOrOwner {
}
// Standard minting function. Can be paused.
function mint(uint256[] memory attributes) external payable nonReentrant whenNotPaused {
uint256 quantity = attributes.length;
require(<FILL_ME>)
_tokenMint(msg.sender, attributes);
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function withdraw() external onlyOwner {
}
function setPrice(uint256 price) external onlyOwner {
}
function getPrice() external view returns (uint256) {
}
function setMaxPerMint(uint256 max) external onlyOwner {
}
function getMaxPerMint() external view returns (uint256) {
}
function setPaymentSplitter(address payable paymentSplitter) external onlyOwner {
}
function addAdmin(address admin) external onlyOwner {
}
function removeAdmin(address admin) external onlyOwner {
}
function getUri() external onlyOwner view returns (string memory) {
}
function setUri(string memory uri) external onlyOwner {
}
// Required by ERC721A
function _baseURI() internal view override returns (string memory) {
}
function _tokenMint(address to, uint256[] memory attributes) internal {
}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal override {
}
function _hexString(uint256 value) internal pure returns (string memory) {
}
function _cleanAttribute(uint256 value) internal pure returns (uint256) {
}
modifier adminOrOwner() {
}
}
| _price*quantity<=msg.value,"Insufficient funds sent" | 289,404 | _price*quantity<=msg.value |
"Invalid token attribute" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./ERC721A.sol";
contract Avatar is ERC721A, Ownable, ReentrancyGuard, Pausable {
event AvatarClaimed(address from, address to, uint256 indexed attr, uint256 indexed id);
uint256 public constant MAX_SUPPLY = 1000;
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint256 private _price = 0.0025 ether;
uint256 private _maxPerMint = 5;
string private _contractBaseURI;
address payable private _paymentSplitter;
mapping(uint256 => uint256) private _attributes;
mapping(uint256 => bool) private _used;
mapping(address => bool) private _admins;
constructor(string memory name, string memory symbol, string memory baseURI) ERC721A(name, symbol) {
}
function adminMint(address to, uint256[] memory attributes) external nonReentrant adminOrOwner {
}
// Standard minting function. Can be paused.
function mint(uint256[] memory attributes) external payable nonReentrant whenNotPaused {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
require(_exists(tokenId), "ERC721Metadata: Nonexistent token");
require(<FILL_ME>)
string memory currentBaseURI = _contractBaseURI;
return
bytes(currentBaseURI).length > 0
? string(
abi.encodePacked(
currentBaseURI,
_hexString(_attributes[tokenId]),
".json" // By default no extension is used, this makes it a json type
)
)
: "";
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function withdraw() external onlyOwner {
}
function setPrice(uint256 price) external onlyOwner {
}
function getPrice() external view returns (uint256) {
}
function setMaxPerMint(uint256 max) external onlyOwner {
}
function getMaxPerMint() external view returns (uint256) {
}
function setPaymentSplitter(address payable paymentSplitter) external onlyOwner {
}
function addAdmin(address admin) external onlyOwner {
}
function removeAdmin(address admin) external onlyOwner {
}
function getUri() external onlyOwner view returns (string memory) {
}
function setUri(string memory uri) external onlyOwner {
}
// Required by ERC721A
function _baseURI() internal view override returns (string memory) {
}
function _tokenMint(address to, uint256[] memory attributes) internal {
}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal override {
}
function _hexString(uint256 value) internal pure returns (string memory) {
}
function _cleanAttribute(uint256 value) internal pure returns (uint256) {
}
modifier adminOrOwner() {
}
}
| _attributes[tokenId]>0,"Invalid token attribute" | 289,404 | _attributes[tokenId]>0 |
"Not enough tokens left to mint" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./ERC721A.sol";
contract Avatar is ERC721A, Ownable, ReentrancyGuard, Pausable {
event AvatarClaimed(address from, address to, uint256 indexed attr, uint256 indexed id);
uint256 public constant MAX_SUPPLY = 1000;
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint256 private _price = 0.0025 ether;
uint256 private _maxPerMint = 5;
string private _contractBaseURI;
address payable private _paymentSplitter;
mapping(uint256 => uint256) private _attributes;
mapping(uint256 => bool) private _used;
mapping(address => bool) private _admins;
constructor(string memory name, string memory symbol, string memory baseURI) ERC721A(name, symbol) {
}
function adminMint(address to, uint256[] memory attributes) external nonReentrant adminOrOwner {
}
// Standard minting function. Can be paused.
function mint(uint256[] memory attributes) external payable nonReentrant whenNotPaused {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function withdraw() external onlyOwner {
}
function setPrice(uint256 price) external onlyOwner {
}
function getPrice() external view returns (uint256) {
}
function setMaxPerMint(uint256 max) external onlyOwner {
}
function getMaxPerMint() external view returns (uint256) {
}
function setPaymentSplitter(address payable paymentSplitter) external onlyOwner {
}
function addAdmin(address admin) external onlyOwner {
}
function removeAdmin(address admin) external onlyOwner {
}
function getUri() external onlyOwner view returns (string memory) {
}
function setUri(string memory uri) external onlyOwner {
}
// Required by ERC721A
function _baseURI() internal view override returns (string memory) {
}
function _tokenMint(address to, uint256[] memory attributes) internal {
uint256 quantity = attributes.length;
require(quantity > 0, "Attributes cannot be empty");
require(quantity <= _maxPerMint, "Cannot mint that many at once");
uint256 totalMinted = totalSupply();
require(<FILL_ME>)
// Unlikely to overflow
unchecked {
for (uint256 i = 0; i < quantity; i++) {
uint256 attr = attributes[i];
uint256 lookup = _cleanAttribute(attr);
require(!_used[lookup], "Attribute has already been claimed");
_attributes[_currentIndex + i] = attr;
_used[lookup] = true;
}
}
_safeMint(to, quantity);
}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal override {
}
function _hexString(uint256 value) internal pure returns (string memory) {
}
function _cleanAttribute(uint256 value) internal pure returns (uint256) {
}
modifier adminOrOwner() {
}
}
| totalMinted+quantity<MAX_SUPPLY,"Not enough tokens left to mint" | 289,404 | totalMinted+quantity<MAX_SUPPLY |
"Attribute has already been claimed" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.12;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "./ERC721A.sol";
contract Avatar is ERC721A, Ownable, ReentrancyGuard, Pausable {
event AvatarClaimed(address from, address to, uint256 indexed attr, uint256 indexed id);
uint256 public constant MAX_SUPPLY = 1000;
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
uint256 private _price = 0.0025 ether;
uint256 private _maxPerMint = 5;
string private _contractBaseURI;
address payable private _paymentSplitter;
mapping(uint256 => uint256) private _attributes;
mapping(uint256 => bool) private _used;
mapping(address => bool) private _admins;
constructor(string memory name, string memory symbol, string memory baseURI) ERC721A(name, symbol) {
}
function adminMint(address to, uint256[] memory attributes) external nonReentrant adminOrOwner {
}
// Standard minting function. Can be paused.
function mint(uint256[] memory attributes) external payable nonReentrant whenNotPaused {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override
returns (string memory)
{
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function withdraw() external onlyOwner {
}
function setPrice(uint256 price) external onlyOwner {
}
function getPrice() external view returns (uint256) {
}
function setMaxPerMint(uint256 max) external onlyOwner {
}
function getMaxPerMint() external view returns (uint256) {
}
function setPaymentSplitter(address payable paymentSplitter) external onlyOwner {
}
function addAdmin(address admin) external onlyOwner {
}
function removeAdmin(address admin) external onlyOwner {
}
function getUri() external onlyOwner view returns (string memory) {
}
function setUri(string memory uri) external onlyOwner {
}
// Required by ERC721A
function _baseURI() internal view override returns (string memory) {
}
function _tokenMint(address to, uint256[] memory attributes) internal {
uint256 quantity = attributes.length;
require(quantity > 0, "Attributes cannot be empty");
require(quantity <= _maxPerMint, "Cannot mint that many at once");
uint256 totalMinted = totalSupply();
require(totalMinted + quantity < MAX_SUPPLY, "Not enough tokens left to mint");
// Unlikely to overflow
unchecked {
for (uint256 i = 0; i < quantity; i++) {
uint256 attr = attributes[i];
uint256 lookup = _cleanAttribute(attr);
require(<FILL_ME>)
_attributes[_currentIndex + i] = attr;
_used[lookup] = true;
}
}
_safeMint(to, quantity);
}
function _afterTokenTransfers(
address from,
address to,
uint256 startTokenId,
uint256 quantity
) internal override {
}
function _hexString(uint256 value) internal pure returns (string memory) {
}
function _cleanAttribute(uint256 value) internal pure returns (uint256) {
}
modifier adminOrOwner() {
}
}
| !_used[lookup],"Attribute has already been claimed" | 289,404 | !_used[lookup] |
"You're in blacklist" | pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() internal {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
contract ALPHAAPE is Context, IERC20, Ownable, ReentrancyGuard {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) public _isBlacklistWallet;
mapping (address => bool) private isinwl;
mapping (address => bool) public isExcludedFromMax;
mapping (address => bool) public isrouterother;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 69000000000 * 10**18;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tTotalDistributedToken;
uint256 private maxBuyLimit = 69000000 * (10**18);
uint256 public maxWallet = _tTotal.div(10000).mul(100);
string private _name = "ALPHA APE";
string private _symbol = "AAPE";
uint8 private _decimals = 18;
uint256 public _taxFee = 0;
uint256 private _previousTaxFee = _taxFee;
uint256 public _marketingFee = 60;
uint256 public _burnFee = 0;
uint256 public _liquidityFee = 10;
uint256 public _devFee = 30;
uint256 private _marketingDevLiquidNBurnFee = _marketingFee + _burnFee + _liquidityFee + _devFee;
uint256 private _previousMarketingDevLiquidNBurnFee = _marketingDevLiquidNBurnFee;
uint256 accumulatedForLiquid;
uint256 accumulatedForMarketing;
uint256 accumulatedForDev;
uint256 public stakeRewardSupply;
address public deadWallet = 0x000000000000000000000000000000000000dEaD;
address public marketingWallet;
address public devWallet;
address public promotionWallet;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
bool public CEX = false;
bool public trading = false;
bool public limitsEnabled = true;
bool public routerselllimit = true;
uint256 private numTokensSellToAddToLiquidity = 6900000 * 10**18;
uint256 private routerselllimittokens = 1725000000 * 10**18;
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
modifier lockTheSwap {
}
constructor () public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function totalDistributedFees() public view returns (uint256) {
}
function tokenFromReflection(uint256 rAmount) private view returns(uint256) {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) public onlyOwner {
}
function setMarketingWallet(address account) external onlyOwner() {
}
function setPromoWallet(address account) external onlyOwner() {
}
function setDevWallet(address account) external onlyOwner() {
}
function setBlacklistWallet(address account, bool blacklisted) external onlyOwner() {
}
function setFeesPercent(uint256 distributionFee, uint256 liquidityFee, uint256 marketingFee, uint256 burnFee,uint256 devFee ) external onlyOwner() {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setLimitsEnabled(bool _enabled) public onlyOwner() {
}
function setTradingEnabled(bool _enabled) public onlyOwner() {
}
function RouterSellLimitEnabled(bool _enabled) public onlyOwner() {
}
function setTransferDelay(bool _enabled) public onlyOwner() {
}
function setThresoldToSwap(uint256 amount) public onlyOwner() {
}
function setRouterSellLimitTokens(uint256 amount) public onlyOwner() {
}
function setMaxBuyLimit(uint256 percentage) public onlyOwner() {
}
function setMaxWallet(uint256 percentage) public onlyOwner() {
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tMarketingDevStakeLiquidBurnFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function _takeMarketingDevLiquidBurnFee(uint256 tMarketingDevLiquidBurnFee, address sender) private {
}
function _sendFee(address from, address to, uint256 amount) private{
}
function calculateTaxFee(uint256 _amount) private view returns (uint256) {
}
function calculateMarketingDevLiquidNBurnFee(uint256 _amount) private view returns (uint256) {
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function setWL(address wl) public onlyOwner() {
}
function delwl(address notwl) public onlyOwner() {
}
function manualswap() external lockTheSwap onlyOwner() {
}
function manualsend() external onlyOwner() {
}
function manualswapcustom(uint256 percentage) external lockTheSwap onlyOwner() {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
require(<FILL_ME>)
if(limitsEnabled){
if(!isExcludedFromMax[to] && !_isExcludedFromFee[to] && from != owner() && to != owner() && to != uniswapV2Pair ){
require(amount <= maxBuyLimit,"Over the Max buy");
require(amount.add(balanceOf(to)) <= maxWallet);
}
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!inSwapAndLiquify
){
if(!trading){
require(_isExcludedFromFee[from] || _isExcludedFromFee[to] || isinwl[to], "Trading is not active.");
}
if (transferDelayEnabled){
if (to != owner() && to != address(uniswapV2Router) && to != address(uniswapV2Pair)){
require(_holderLastTransferTimestamp[tx.origin] < block.number, "_transfer:: Transfer Delay enabled. Only one purchase per block allowed.");
_holderLastTransferTimestamp[tx.origin] = block.number;
}
}
}
}
uint256 swapAmount = accumulatedForLiquid.add(accumulatedForMarketing).add(accumulatedForDev);
bool overMinTokenBalance = swapAmount >= numTokensSellToAddToLiquidity;
if (
!inSwapAndLiquify &&
from != uniswapV2Pair &&
swapAndLiquifyEnabled &&
overMinTokenBalance
) {
//swap add liquid
swapAndLiquify();
}
//indicates if fee should be deducted from transfer
bool takeFee = true;
//if any account belongs to _isExcludedFromFee account then remove the fee
if(_isExcludedFromFee[from] || _isExcludedFromFee[to] || (from != uniswapV2Pair && to != uniswapV2Pair)){
takeFee = false;
}
//transfer amount, it will take tax, burn, liquidity fee
_tokenTransfer(from,to,amount,takeFee);
}
function swapAndLiquify() private lockTheSwap {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount) private {
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private {
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
}
}
| _isBlacklistWallet[from]==false,"You're in blacklist" | 289,412 | _isBlacklistWallet[from]==false |
"Trading is not active." | pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() internal {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and make it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
}
contract ALPHAAPE is Context, IERC20, Ownable, ReentrancyGuard {
using SafeMath for uint256;
mapping (address => uint256) private _rOwned;
mapping (address => uint256) private _tOwned;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
mapping (address => bool) public _isBlacklistWallet;
mapping (address => bool) private isinwl;
mapping (address => bool) public isExcludedFromMax;
mapping (address => bool) public isrouterother;
mapping (address => bool) private _isExcluded;
address[] private _excluded;
uint256 private constant MAX = ~uint256(0);
uint256 private _tTotal = 69000000000 * 10**18;
uint256 private _rTotal = (MAX - (MAX % _tTotal));
uint256 private _tTotalDistributedToken;
uint256 private maxBuyLimit = 69000000 * (10**18);
uint256 public maxWallet = _tTotal.div(10000).mul(100);
string private _name = "ALPHA APE";
string private _symbol = "AAPE";
uint8 private _decimals = 18;
uint256 public _taxFee = 0;
uint256 private _previousTaxFee = _taxFee;
uint256 public _marketingFee = 60;
uint256 public _burnFee = 0;
uint256 public _liquidityFee = 10;
uint256 public _devFee = 30;
uint256 private _marketingDevLiquidNBurnFee = _marketingFee + _burnFee + _liquidityFee + _devFee;
uint256 private _previousMarketingDevLiquidNBurnFee = _marketingDevLiquidNBurnFee;
uint256 accumulatedForLiquid;
uint256 accumulatedForMarketing;
uint256 accumulatedForDev;
uint256 public stakeRewardSupply;
address public deadWallet = 0x000000000000000000000000000000000000dEaD;
address public marketingWallet;
address public devWallet;
address public promotionWallet;
IUniswapV2Router02 public uniswapV2Router;
address public uniswapV2Pair;
bool inSwapAndLiquify;
bool public swapAndLiquifyEnabled = true;
bool public CEX = false;
bool public trading = false;
bool public limitsEnabled = true;
bool public routerselllimit = true;
uint256 private numTokensSellToAddToLiquidity = 6900000 * 10**18;
uint256 private routerselllimittokens = 1725000000 * 10**18;
event SwapAndLiquifyEnabledUpdated(bool enabled);
event SwapAndLiquify(
uint256 tokensSwapped,
uint256 ethReceived,
uint256 tokensIntoLiqudity
);
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
modifier lockTheSwap {
}
constructor () public {
}
function name() public view returns (string memory) {
}
function symbol() public view returns (string memory) {
}
function decimals() public view returns (uint8) {
}
function totalSupply() public view override returns (uint256) {
}
function balanceOf(address account) public view override returns (uint256) {
}
function transfer(address recipient, uint256 amount) public override returns (bool) {
}
function allowance(address owner, address spender) public view override returns (uint256) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
}
function isExcludedFromReward(address account) public view returns (bool) {
}
function totalDistributedFees() public view returns (uint256) {
}
function tokenFromReflection(uint256 rAmount) private view returns(uint256) {
}
function excludeFromReward(address account) public onlyOwner() {
}
function includeInReward(address account) external onlyOwner() {
}
function excludeFromFee(address account) public onlyOwner {
}
function includeInFee(address account) public onlyOwner {
}
function setMarketingWallet(address account) external onlyOwner() {
}
function setPromoWallet(address account) external onlyOwner() {
}
function setDevWallet(address account) external onlyOwner() {
}
function setBlacklistWallet(address account, bool blacklisted) external onlyOwner() {
}
function setFeesPercent(uint256 distributionFee, uint256 liquidityFee, uint256 marketingFee, uint256 burnFee,uint256 devFee ) external onlyOwner() {
}
function setSwapAndLiquifyEnabled(bool _enabled) public onlyOwner {
}
function setLimitsEnabled(bool _enabled) public onlyOwner() {
}
function setTradingEnabled(bool _enabled) public onlyOwner() {
}
function RouterSellLimitEnabled(bool _enabled) public onlyOwner() {
}
function setTransferDelay(bool _enabled) public onlyOwner() {
}
function setThresoldToSwap(uint256 amount) public onlyOwner() {
}
function setRouterSellLimitTokens(uint256 amount) public onlyOwner() {
}
function setMaxBuyLimit(uint256 percentage) public onlyOwner() {
}
function setMaxWallet(uint256 percentage) public onlyOwner() {
}
//to recieve ETH from uniswapV2Router when swaping
receive() external payable {}
function _reflectFee(uint256 rFee, uint256 tFee) private {
}
function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
}
function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256) {
}
function _getRValues(uint256 tAmount, uint256 tFee, uint256 tMarketingDevStakeLiquidBurnFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) {
}
function _getRate() private view returns(uint256) {
}
function _getCurrentSupply() private view returns(uint256, uint256) {
}
function _takeMarketingDevLiquidBurnFee(uint256 tMarketingDevLiquidBurnFee, address sender) private {
}
function _sendFee(address from, address to, uint256 amount) private{
}
function calculateTaxFee(uint256 _amount) private view returns (uint256) {
}
function calculateMarketingDevLiquidNBurnFee(uint256 _amount) private view returns (uint256) {
}
function removeAllFee() private {
}
function restoreAllFee() private {
}
function setWL(address wl) public onlyOwner() {
}
function delwl(address notwl) public onlyOwner() {
}
function manualswap() external lockTheSwap onlyOwner() {
}
function manualsend() external onlyOwner() {
}
function manualswapcustom(uint256 percentage) external lockTheSwap onlyOwner() {
}
function isExcludedFromFee(address account) public view returns(bool) {
}
function _approve(address owner, address spender, uint256 amount) private {
}
function _transfer(
address from,
address to,
uint256 amount
) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
require(_isBlacklistWallet[from] == false, "You're in blacklist");
if(limitsEnabled){
if(!isExcludedFromMax[to] && !_isExcludedFromFee[to] && from != owner() && to != owner() && to != uniswapV2Pair ){
require(amount <= maxBuyLimit,"Over the Max buy");
require(amount.add(balanceOf(to)) <= maxWallet);
}
if (
from != owner() &&
to != owner() &&
to != address(0) &&
to != address(0xdead) &&
!inSwapAndLiquify
){
if(!trading){
require(<FILL_ME>)
}
if (transferDelayEnabled){
if (to != owner() && to != address(uniswapV2Router) && to != address(uniswapV2Pair)){
require(_holderLastTransferTimestamp[tx.origin] < block.number, "_transfer:: Transfer Delay enabled. Only one purchase per block allowed.");
_holderLastTransferTimestamp[tx.origin] = block.number;
}
}
}
}
uint256 swapAmount = accumulatedForLiquid.add(accumulatedForMarketing).add(accumulatedForDev);
bool overMinTokenBalance = swapAmount >= numTokensSellToAddToLiquidity;
if (
!inSwapAndLiquify &&
from != uniswapV2Pair &&
swapAndLiquifyEnabled &&
overMinTokenBalance
) {
//swap add liquid
swapAndLiquify();
}
//indicates if fee should be deducted from transfer
bool takeFee = true;
//if any account belongs to _isExcludedFromFee account then remove the fee
if(_isExcludedFromFee[from] || _isExcludedFromFee[to] || (from != uniswapV2Pair && to != uniswapV2Pair)){
takeFee = false;
}
//transfer amount, it will take tax, burn, liquidity fee
_tokenTransfer(from,to,amount,takeFee);
}
function swapAndLiquify() private lockTheSwap {
}
function swapTokensForEth(uint256 tokenAmount) private {
}
function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private {
}
//this method is responsible for taking all fee, if takeFee is true
function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private {
}
function _transferStandard(address sender, address recipient, uint256 tAmount) private {
}
function _transferToExcluded(address sender, address recipient, uint256 tAmount) private {
}
function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private {
}
function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private {
}
}
| _isExcludedFromFee[from]||_isExcludedFromFee[to]||isinwl[to],"Trading is not active." | 289,412 | _isExcludedFromFee[from]||_isExcludedFromFee[to]||isinwl[to] |
"HoF: max common reserve supply exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeCast.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";
import "openzeppelin-solidity/contracts/utils/cryptography/ECDSA.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/
abstract contract ERC721Tradable is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using SafeMath for uint256;
using SafeCast for uint256;
event TokenPriceChanged(uint256 newTokenPrice);
event PresaleConfigChanged(
address whitelistSigner,
uint32 startTime,
uint32 endTime
);
event SaleConfigChanged(uint32 startTime, uint32 endTime);
event IsBurnEnabledChanged(bool newIsBurnEnabled);
event TreasuryChanged(address newTreasury);
event PresaleMint(address minter, uint256 count);
event SaleMint(address minter, uint256 count);
event BaseTokenURIChanged(string baseURI);
struct PresaleConfig {
address whitelistSigner;
uint32 startTime;
uint32 endTime;
}
struct SaleConfig {
uint32 startTime;
uint32 endTime;
}
// maxSupply = maxReserveSupply + maxPresaleSupply + maxSaleSupply + maxCommonReserveSupply +
uint256 public immutable maxSupply;
uint256 public immutable maxReserveSupply;
uint256 public immutable maxPresaleSupply;
uint256 public immutable maxSaleSupply;
uint256 public immutable maxCommonReserveSupply;
uint256 public immutable maxPresaleCountForSingleAccount;
uint256 public immutable maxPresaleCountForSingleCall;
uint256 public immutable maxSaleCountForSingleCall;
uint256 public currentTokensReserved;
uint256 public currentTokensPresold;
uint256 public currentTokensSold;
uint256 public currentTokensCommonReserved;
uint256 public currentTokensMinted;
address proxyRegistryAddress;
uint256 public nextTokenId;
bool public isBurnEnabled;
address payable public treasury;
uint256 public tokenPrice;
PresaleConfig public presaleConfig;
mapping(address => uint256) public presaleBoughtCounts;
SaleConfig public saleConfig;
bytes32 public DOMAIN_SEPARATOR;
bytes32 public constant PRESALE_TYPEHASH =
keccak256("Presale(address recipient)");
constructor(
string memory _name,
string memory _symbol,
uint256 _maxReserveSupply,
uint256 _maxPresaleSupply,
uint256 _maxSaleSupply,
uint256 _maxCommonReserveSupply,
uint256 _maxPresaleCountForSingleAccount,
uint256 _maxPresaleCountForSingleCall,
uint256 _maxSaleCountForSingleCall,
address _proxyRegistryAddress
) ERC721(_name, _symbol) {
}
function setTokenPrice(uint256 _tokenPrice) external onlyOwner {
}
function setupPresale(
address whitelistSigner,
uint256 startTime,
uint256 endTime
) external onlyOwner {
}
function setupSale(uint256 startTime, uint256 endTime) external onlyOwner {
}
function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner {
}
function setTreasury(address payable _treasury) external onlyOwner {
}
function commonReserveTokens(address recipient, uint256 count)
external
onlyOwner
{
require(recipient != address(0), "HoF: zero address");
uint256 _nextTokenId = nextTokenId;
require(count > 0, "HoF: invalid count");
require(_nextTokenId + count <= maxSupply, "HoF: max supply exceeded");
require(<FILL_ME>)
currentTokensCommonReserved += count;
currentTokensMinted += count;
for (uint256 ind = 0; ind < count; ind++) {
_safeMint(recipient, _nextTokenId + ind);
}
nextTokenId += count;
}
function reserveTokens(address recipient, uint256 count)
external
onlyOwner
{
}
function mintPresaleTokens(uint256 count) external payable {
}
function mintTokens(uint256 count) external payable {
}
function burn(uint256 tokenId) external {
}
function revertTransfer(address payable recipient, uint256 amount)
external
onlyOwner
{
}
function baseTokenURI() public view virtual returns (string memory);
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
}
| currentTokensCommonReserved+count<=maxCommonReserveSupply,"HoF: max common reserve supply exceeded" | 289,451 | currentTokensCommonReserved+count<=maxCommonReserveSupply |
"HoF: max common reserve supply exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeCast.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";
import "openzeppelin-solidity/contracts/utils/cryptography/ECDSA.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/
abstract contract ERC721Tradable is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using SafeMath for uint256;
using SafeCast for uint256;
event TokenPriceChanged(uint256 newTokenPrice);
event PresaleConfigChanged(
address whitelistSigner,
uint32 startTime,
uint32 endTime
);
event SaleConfigChanged(uint32 startTime, uint32 endTime);
event IsBurnEnabledChanged(bool newIsBurnEnabled);
event TreasuryChanged(address newTreasury);
event PresaleMint(address minter, uint256 count);
event SaleMint(address minter, uint256 count);
event BaseTokenURIChanged(string baseURI);
struct PresaleConfig {
address whitelistSigner;
uint32 startTime;
uint32 endTime;
}
struct SaleConfig {
uint32 startTime;
uint32 endTime;
}
// maxSupply = maxReserveSupply + maxPresaleSupply + maxSaleSupply + maxCommonReserveSupply +
uint256 public immutable maxSupply;
uint256 public immutable maxReserveSupply;
uint256 public immutable maxPresaleSupply;
uint256 public immutable maxSaleSupply;
uint256 public immutable maxCommonReserveSupply;
uint256 public immutable maxPresaleCountForSingleAccount;
uint256 public immutable maxPresaleCountForSingleCall;
uint256 public immutable maxSaleCountForSingleCall;
uint256 public currentTokensReserved;
uint256 public currentTokensPresold;
uint256 public currentTokensSold;
uint256 public currentTokensCommonReserved;
uint256 public currentTokensMinted;
address proxyRegistryAddress;
uint256 public nextTokenId;
bool public isBurnEnabled;
address payable public treasury;
uint256 public tokenPrice;
PresaleConfig public presaleConfig;
mapping(address => uint256) public presaleBoughtCounts;
SaleConfig public saleConfig;
bytes32 public DOMAIN_SEPARATOR;
bytes32 public constant PRESALE_TYPEHASH =
keccak256("Presale(address recipient)");
constructor(
string memory _name,
string memory _symbol,
uint256 _maxReserveSupply,
uint256 _maxPresaleSupply,
uint256 _maxSaleSupply,
uint256 _maxCommonReserveSupply,
uint256 _maxPresaleCountForSingleAccount,
uint256 _maxPresaleCountForSingleCall,
uint256 _maxSaleCountForSingleCall,
address _proxyRegistryAddress
) ERC721(_name, _symbol) {
}
function setTokenPrice(uint256 _tokenPrice) external onlyOwner {
}
function setupPresale(
address whitelistSigner,
uint256 startTime,
uint256 endTime
) external onlyOwner {
}
function setupSale(uint256 startTime, uint256 endTime) external onlyOwner {
}
function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner {
}
function setTreasury(address payable _treasury) external onlyOwner {
}
function commonReserveTokens(address recipient, uint256 count)
external
onlyOwner
{
}
function reserveTokens(address recipient, uint256 count)
external
onlyOwner
{
require(recipient != address(0), "HoF: zero address");
require(<FILL_ME>)
uint256 _currentTokensReserved = currentTokensReserved;
for (uint256 ind = 0; ind < count; ind++) {
_safeMint(recipient, _currentTokensReserved + ind);
}
currentTokensReserved += count;
currentTokensMinted += count;
}
function mintPresaleTokens(uint256 count) external payable {
}
function mintTokens(uint256 count) external payable {
}
function burn(uint256 tokenId) external {
}
function revertTransfer(address payable recipient, uint256 amount)
external
onlyOwner
{
}
function baseTokenURI() public view virtual returns (string memory);
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
}
| currentTokensReserved+count<=maxReserveSupply,"HoF: max common reserve supply exceeded" | 289,451 | currentTokensReserved+count<=maxReserveSupply |
"HoF: incorrect Ether value" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeCast.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";
import "openzeppelin-solidity/contracts/utils/cryptography/ECDSA.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/
abstract contract ERC721Tradable is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using SafeMath for uint256;
using SafeCast for uint256;
event TokenPriceChanged(uint256 newTokenPrice);
event PresaleConfigChanged(
address whitelistSigner,
uint32 startTime,
uint32 endTime
);
event SaleConfigChanged(uint32 startTime, uint32 endTime);
event IsBurnEnabledChanged(bool newIsBurnEnabled);
event TreasuryChanged(address newTreasury);
event PresaleMint(address minter, uint256 count);
event SaleMint(address minter, uint256 count);
event BaseTokenURIChanged(string baseURI);
struct PresaleConfig {
address whitelistSigner;
uint32 startTime;
uint32 endTime;
}
struct SaleConfig {
uint32 startTime;
uint32 endTime;
}
// maxSupply = maxReserveSupply + maxPresaleSupply + maxSaleSupply + maxCommonReserveSupply +
uint256 public immutable maxSupply;
uint256 public immutable maxReserveSupply;
uint256 public immutable maxPresaleSupply;
uint256 public immutable maxSaleSupply;
uint256 public immutable maxCommonReserveSupply;
uint256 public immutable maxPresaleCountForSingleAccount;
uint256 public immutable maxPresaleCountForSingleCall;
uint256 public immutable maxSaleCountForSingleCall;
uint256 public currentTokensReserved;
uint256 public currentTokensPresold;
uint256 public currentTokensSold;
uint256 public currentTokensCommonReserved;
uint256 public currentTokensMinted;
address proxyRegistryAddress;
uint256 public nextTokenId;
bool public isBurnEnabled;
address payable public treasury;
uint256 public tokenPrice;
PresaleConfig public presaleConfig;
mapping(address => uint256) public presaleBoughtCounts;
SaleConfig public saleConfig;
bytes32 public DOMAIN_SEPARATOR;
bytes32 public constant PRESALE_TYPEHASH =
keccak256("Presale(address recipient)");
constructor(
string memory _name,
string memory _symbol,
uint256 _maxReserveSupply,
uint256 _maxPresaleSupply,
uint256 _maxSaleSupply,
uint256 _maxCommonReserveSupply,
uint256 _maxPresaleCountForSingleAccount,
uint256 _maxPresaleCountForSingleCall,
uint256 _maxSaleCountForSingleCall,
address _proxyRegistryAddress
) ERC721(_name, _symbol) {
}
function setTokenPrice(uint256 _tokenPrice) external onlyOwner {
}
function setupPresale(
address whitelistSigner,
uint256 startTime,
uint256 endTime
) external onlyOwner {
}
function setupSale(uint256 startTime, uint256 endTime) external onlyOwner {
}
function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner {
}
function setTreasury(address payable _treasury) external onlyOwner {
}
function commonReserveTokens(address recipient, uint256 count)
external
onlyOwner
{
}
function reserveTokens(address recipient, uint256 count)
external
onlyOwner
{
}
function mintPresaleTokens(uint256 count) external payable {
// Gas optimization
uint256 _nextTokenId = nextTokenId;
// Make sure presale has been set up
PresaleConfig memory _presaleConfig = presaleConfig;
require(
_presaleConfig.whitelistSigner != address(0),
"HoF: presale not configured"
);
require(treasury != address(0), "HoF: treasury not set");
require(tokenPrice > 0, "HoF: token price not set");
require(count > 0, "HoF: invalid count");
require(
count <= maxPresaleCountForSingleCall,
"HoF: max count per tx exceeded"
);
require(
block.timestamp >= _presaleConfig.startTime,
"HoF: presale not started"
);
require(block.timestamp < _presaleConfig.endTime, "HoF: presale ended");
require(_nextTokenId + count <= maxSupply, "HoF: max supply exceeded");
require(<FILL_ME>)
require(
presaleBoughtCounts[msg.sender] + count <=
maxPresaleCountForSingleAccount,
"HoF: presale max presale count for single account exceeded"
);
presaleBoughtCounts[msg.sender] += count;
currentTokensPresold += count;
currentTokensMinted += count;
// The contract never holds any Ether. Everything gets redirected to treasury directly.
if (msg.value != 0) {
treasury.transfer(msg.value);
}
for (uint256 ind = 0; ind < count; ind++) {
_safeMint(msg.sender, _nextTokenId + ind);
}
nextTokenId += count;
emit PresaleMint(msg.sender, count);
}
function mintTokens(uint256 count) external payable {
}
function burn(uint256 tokenId) external {
}
function revertTransfer(address payable recipient, uint256 amount)
external
onlyOwner
{
}
function baseTokenURI() public view virtual returns (string memory);
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
}
| currentTokensPresold+count<=maxPresaleSupply,"HoF: incorrect Ether value" | 289,451 | currentTokensPresold+count<=maxPresaleSupply |
"HoF: presale max presale count for single account exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeCast.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";
import "openzeppelin-solidity/contracts/utils/cryptography/ECDSA.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/
abstract contract ERC721Tradable is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using SafeMath for uint256;
using SafeCast for uint256;
event TokenPriceChanged(uint256 newTokenPrice);
event PresaleConfigChanged(
address whitelistSigner,
uint32 startTime,
uint32 endTime
);
event SaleConfigChanged(uint32 startTime, uint32 endTime);
event IsBurnEnabledChanged(bool newIsBurnEnabled);
event TreasuryChanged(address newTreasury);
event PresaleMint(address minter, uint256 count);
event SaleMint(address minter, uint256 count);
event BaseTokenURIChanged(string baseURI);
struct PresaleConfig {
address whitelistSigner;
uint32 startTime;
uint32 endTime;
}
struct SaleConfig {
uint32 startTime;
uint32 endTime;
}
// maxSupply = maxReserveSupply + maxPresaleSupply + maxSaleSupply + maxCommonReserveSupply +
uint256 public immutable maxSupply;
uint256 public immutable maxReserveSupply;
uint256 public immutable maxPresaleSupply;
uint256 public immutable maxSaleSupply;
uint256 public immutable maxCommonReserveSupply;
uint256 public immutable maxPresaleCountForSingleAccount;
uint256 public immutable maxPresaleCountForSingleCall;
uint256 public immutable maxSaleCountForSingleCall;
uint256 public currentTokensReserved;
uint256 public currentTokensPresold;
uint256 public currentTokensSold;
uint256 public currentTokensCommonReserved;
uint256 public currentTokensMinted;
address proxyRegistryAddress;
uint256 public nextTokenId;
bool public isBurnEnabled;
address payable public treasury;
uint256 public tokenPrice;
PresaleConfig public presaleConfig;
mapping(address => uint256) public presaleBoughtCounts;
SaleConfig public saleConfig;
bytes32 public DOMAIN_SEPARATOR;
bytes32 public constant PRESALE_TYPEHASH =
keccak256("Presale(address recipient)");
constructor(
string memory _name,
string memory _symbol,
uint256 _maxReserveSupply,
uint256 _maxPresaleSupply,
uint256 _maxSaleSupply,
uint256 _maxCommonReserveSupply,
uint256 _maxPresaleCountForSingleAccount,
uint256 _maxPresaleCountForSingleCall,
uint256 _maxSaleCountForSingleCall,
address _proxyRegistryAddress
) ERC721(_name, _symbol) {
}
function setTokenPrice(uint256 _tokenPrice) external onlyOwner {
}
function setupPresale(
address whitelistSigner,
uint256 startTime,
uint256 endTime
) external onlyOwner {
}
function setupSale(uint256 startTime, uint256 endTime) external onlyOwner {
}
function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner {
}
function setTreasury(address payable _treasury) external onlyOwner {
}
function commonReserveTokens(address recipient, uint256 count)
external
onlyOwner
{
}
function reserveTokens(address recipient, uint256 count)
external
onlyOwner
{
}
function mintPresaleTokens(uint256 count) external payable {
// Gas optimization
uint256 _nextTokenId = nextTokenId;
// Make sure presale has been set up
PresaleConfig memory _presaleConfig = presaleConfig;
require(
_presaleConfig.whitelistSigner != address(0),
"HoF: presale not configured"
);
require(treasury != address(0), "HoF: treasury not set");
require(tokenPrice > 0, "HoF: token price not set");
require(count > 0, "HoF: invalid count");
require(
count <= maxPresaleCountForSingleCall,
"HoF: max count per tx exceeded"
);
require(
block.timestamp >= _presaleConfig.startTime,
"HoF: presale not started"
);
require(block.timestamp < _presaleConfig.endTime, "HoF: presale ended");
require(_nextTokenId + count <= maxSupply, "HoF: max supply exceeded");
require(
currentTokensPresold + count <= maxPresaleSupply,
"HoF: incorrect Ether value"
);
require(<FILL_ME>)
presaleBoughtCounts[msg.sender] += count;
currentTokensPresold += count;
currentTokensMinted += count;
// The contract never holds any Ether. Everything gets redirected to treasury directly.
if (msg.value != 0) {
treasury.transfer(msg.value);
}
for (uint256 ind = 0; ind < count; ind++) {
_safeMint(msg.sender, _nextTokenId + ind);
}
nextTokenId += count;
emit PresaleMint(msg.sender, count);
}
function mintTokens(uint256 count) external payable {
}
function burn(uint256 tokenId) external {
}
function revertTransfer(address payable recipient, uint256 amount)
external
onlyOwner
{
}
function baseTokenURI() public view virtual returns (string memory);
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
}
| presaleBoughtCounts[msg.sender]+count<=maxPresaleCountForSingleAccount,"HoF: presale max presale count for single account exceeded" | 289,451 | presaleBoughtCounts[msg.sender]+count<=maxPresaleCountForSingleAccount |
"HoF: max sale supply exceeded" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeCast.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";
import "openzeppelin-solidity/contracts/utils/cryptography/ECDSA.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/
abstract contract ERC721Tradable is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using SafeMath for uint256;
using SafeCast for uint256;
event TokenPriceChanged(uint256 newTokenPrice);
event PresaleConfigChanged(
address whitelistSigner,
uint32 startTime,
uint32 endTime
);
event SaleConfigChanged(uint32 startTime, uint32 endTime);
event IsBurnEnabledChanged(bool newIsBurnEnabled);
event TreasuryChanged(address newTreasury);
event PresaleMint(address minter, uint256 count);
event SaleMint(address minter, uint256 count);
event BaseTokenURIChanged(string baseURI);
struct PresaleConfig {
address whitelistSigner;
uint32 startTime;
uint32 endTime;
}
struct SaleConfig {
uint32 startTime;
uint32 endTime;
}
// maxSupply = maxReserveSupply + maxPresaleSupply + maxSaleSupply + maxCommonReserveSupply +
uint256 public immutable maxSupply;
uint256 public immutable maxReserveSupply;
uint256 public immutable maxPresaleSupply;
uint256 public immutable maxSaleSupply;
uint256 public immutable maxCommonReserveSupply;
uint256 public immutable maxPresaleCountForSingleAccount;
uint256 public immutable maxPresaleCountForSingleCall;
uint256 public immutable maxSaleCountForSingleCall;
uint256 public currentTokensReserved;
uint256 public currentTokensPresold;
uint256 public currentTokensSold;
uint256 public currentTokensCommonReserved;
uint256 public currentTokensMinted;
address proxyRegistryAddress;
uint256 public nextTokenId;
bool public isBurnEnabled;
address payable public treasury;
uint256 public tokenPrice;
PresaleConfig public presaleConfig;
mapping(address => uint256) public presaleBoughtCounts;
SaleConfig public saleConfig;
bytes32 public DOMAIN_SEPARATOR;
bytes32 public constant PRESALE_TYPEHASH =
keccak256("Presale(address recipient)");
constructor(
string memory _name,
string memory _symbol,
uint256 _maxReserveSupply,
uint256 _maxPresaleSupply,
uint256 _maxSaleSupply,
uint256 _maxCommonReserveSupply,
uint256 _maxPresaleCountForSingleAccount,
uint256 _maxPresaleCountForSingleCall,
uint256 _maxSaleCountForSingleCall,
address _proxyRegistryAddress
) ERC721(_name, _symbol) {
}
function setTokenPrice(uint256 _tokenPrice) external onlyOwner {
}
function setupPresale(
address whitelistSigner,
uint256 startTime,
uint256 endTime
) external onlyOwner {
}
function setupSale(uint256 startTime, uint256 endTime) external onlyOwner {
}
function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner {
}
function setTreasury(address payable _treasury) external onlyOwner {
}
function commonReserveTokens(address recipient, uint256 count)
external
onlyOwner
{
}
function reserveTokens(address recipient, uint256 count)
external
onlyOwner
{
}
function mintPresaleTokens(uint256 count) external payable {
}
function mintTokens(uint256 count) external payable {
// Gas optimization
uint256 _nextTokenId = nextTokenId;
// Make sure presale has been set up
SaleConfig memory _saleConfig = saleConfig;
require(_saleConfig.startTime > 0, "HoF: sale not configured");
require(treasury != address(0), "HoF: treasury not set");
require(tokenPrice > 0, "HoF: token price not set");
require(
count > 0 && count <= maxSaleCountForSingleCall,
"HoF: invalid count"
);
require(
block.timestamp >= _saleConfig.startTime,
"HoF: sale not started"
);
require(block.timestamp < _saleConfig.endTime, "HoF: sale ended");
require(
count <= maxSaleCountForSingleCall,
"HoF: max count per tx exceeded"
);
require(_nextTokenId + count <= maxSupply, "HoF: max supply exceeded");
require(<FILL_ME>)
require(tokenPrice * count <= msg.value, "HoF: incorrect Ether value");
// The contract never holds any Ether. Everything gets redirected to treasury directly.
treasury.transfer(msg.value);
currentTokensSold += count;
currentTokensMinted += count;
for (uint256 ind = 0; ind < count; ind++) {
_safeMint(msg.sender, _nextTokenId + ind);
}
nextTokenId += count;
emit SaleMint(msg.sender, count);
}
function burn(uint256 tokenId) external {
}
function revertTransfer(address payable recipient, uint256 amount)
external
onlyOwner
{
}
function baseTokenURI() public view virtual returns (string memory);
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
}
| currentTokensSold+count<=maxSaleSupply,"HoF: max sale supply exceeded" | 289,451 | currentTokensSold+count<=maxSaleSupply |
"HoF: incorrect Ether value" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/access/Ownable.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeCast.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";
import "openzeppelin-solidity/contracts/utils/cryptography/ECDSA.sol";
import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";
contract OwnableDelegateProxy {}
contract ProxyRegistry {
mapping(address => OwnableDelegateProxy) public proxies;
}
/**
* @title ERC721Tradable
* ERC721Tradable - ERC721 contract that whitelists a trading address, and has minting functionality.
*/
abstract contract ERC721Tradable is
ContextMixin,
ERC721Enumerable,
NativeMetaTransaction,
Ownable
{
using ECDSA for bytes32;
using SafeMath for uint256;
using SafeCast for uint256;
event TokenPriceChanged(uint256 newTokenPrice);
event PresaleConfigChanged(
address whitelistSigner,
uint32 startTime,
uint32 endTime
);
event SaleConfigChanged(uint32 startTime, uint32 endTime);
event IsBurnEnabledChanged(bool newIsBurnEnabled);
event TreasuryChanged(address newTreasury);
event PresaleMint(address minter, uint256 count);
event SaleMint(address minter, uint256 count);
event BaseTokenURIChanged(string baseURI);
struct PresaleConfig {
address whitelistSigner;
uint32 startTime;
uint32 endTime;
}
struct SaleConfig {
uint32 startTime;
uint32 endTime;
}
// maxSupply = maxReserveSupply + maxPresaleSupply + maxSaleSupply + maxCommonReserveSupply +
uint256 public immutable maxSupply;
uint256 public immutable maxReserveSupply;
uint256 public immutable maxPresaleSupply;
uint256 public immutable maxSaleSupply;
uint256 public immutable maxCommonReserveSupply;
uint256 public immutable maxPresaleCountForSingleAccount;
uint256 public immutable maxPresaleCountForSingleCall;
uint256 public immutable maxSaleCountForSingleCall;
uint256 public currentTokensReserved;
uint256 public currentTokensPresold;
uint256 public currentTokensSold;
uint256 public currentTokensCommonReserved;
uint256 public currentTokensMinted;
address proxyRegistryAddress;
uint256 public nextTokenId;
bool public isBurnEnabled;
address payable public treasury;
uint256 public tokenPrice;
PresaleConfig public presaleConfig;
mapping(address => uint256) public presaleBoughtCounts;
SaleConfig public saleConfig;
bytes32 public DOMAIN_SEPARATOR;
bytes32 public constant PRESALE_TYPEHASH =
keccak256("Presale(address recipient)");
constructor(
string memory _name,
string memory _symbol,
uint256 _maxReserveSupply,
uint256 _maxPresaleSupply,
uint256 _maxSaleSupply,
uint256 _maxCommonReserveSupply,
uint256 _maxPresaleCountForSingleAccount,
uint256 _maxPresaleCountForSingleCall,
uint256 _maxSaleCountForSingleCall,
address _proxyRegistryAddress
) ERC721(_name, _symbol) {
}
function setTokenPrice(uint256 _tokenPrice) external onlyOwner {
}
function setupPresale(
address whitelistSigner,
uint256 startTime,
uint256 endTime
) external onlyOwner {
}
function setupSale(uint256 startTime, uint256 endTime) external onlyOwner {
}
function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner {
}
function setTreasury(address payable _treasury) external onlyOwner {
}
function commonReserveTokens(address recipient, uint256 count)
external
onlyOwner
{
}
function reserveTokens(address recipient, uint256 count)
external
onlyOwner
{
}
function mintPresaleTokens(uint256 count) external payable {
}
function mintTokens(uint256 count) external payable {
// Gas optimization
uint256 _nextTokenId = nextTokenId;
// Make sure presale has been set up
SaleConfig memory _saleConfig = saleConfig;
require(_saleConfig.startTime > 0, "HoF: sale not configured");
require(treasury != address(0), "HoF: treasury not set");
require(tokenPrice > 0, "HoF: token price not set");
require(
count > 0 && count <= maxSaleCountForSingleCall,
"HoF: invalid count"
);
require(
block.timestamp >= _saleConfig.startTime,
"HoF: sale not started"
);
require(block.timestamp < _saleConfig.endTime, "HoF: sale ended");
require(
count <= maxSaleCountForSingleCall,
"HoF: max count per tx exceeded"
);
require(_nextTokenId + count <= maxSupply, "HoF: max supply exceeded");
require(
currentTokensSold + count <= maxSaleSupply,
"HoF: max sale supply exceeded"
);
require(<FILL_ME>)
// The contract never holds any Ether. Everything gets redirected to treasury directly.
treasury.transfer(msg.value);
currentTokensSold += count;
currentTokensMinted += count;
for (uint256 ind = 0; ind < count; ind++) {
_safeMint(msg.sender, _nextTokenId + ind);
}
nextTokenId += count;
emit SaleMint(msg.sender, count);
}
function burn(uint256 tokenId) external {
}
function revertTransfer(address payable recipient, uint256 amount)
external
onlyOwner
{
}
function baseTokenURI() public view virtual returns (string memory);
function tokenURI(uint256 _tokenId)
public
view
override
returns (string memory)
{
}
/**
* Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
*/
function isApprovedForAll(address owner, address operator)
public
view
override
returns (bool)
{
}
/**
* This is used instead of msg.sender as transactions won't be sent by the original token owner, but by OpenSea.
*/
function _msgSender() internal view override returns (address sender) {
}
}
| tokenPrice*count<=msg.value,"HoF: incorrect Ether value" | 289,451 | tokenPrice*count<=msg.value |
null | pragma solidity ^0.4.15;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner public returns (bool) {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) {
}
}
contract FSBToken is MintableToken, PausableToken {
string public constant name = "Forty Seven Bank Token";
string public constant symbol = "FSBT";
uint8 public constant decimals = 18;
string public constant version = "H0.1"; //human 0.1 standard. Just an arbitrary versioning scheme.
}
/**
* @title Crowdsale
* @dev Modified contract for managing a token crowdsale.
* FourtySevenTokenCrowdsale have pre-sale and main sale periods, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate and the system of bonuses.
* Funds collected are forwarded to a wallet as they arrive.
* pre-sale and main sale periods both have caps defined in tokens
*/
contract FourtySevenTokenCrowdsale is Ownable {
using SafeMath for uint256;
struct TimeBonus {
uint256 bonusPeriodEndTime;
uint percent;
bool isAmountDependent;
}
struct AmountBonus {
uint256 amount;
uint percent;
}
// true for finalised crowdsale
bool public isFinalised;
// The token being sold
MintableToken public token;
// start and end timestamps where pre-investments are allowed (both inclusive)
uint256 public preSaleStartTime;
uint256 public preSaleEndTime;
// start and end timestamps where main-investments are allowed (both inclusive)
uint256 public mainSaleStartTime;
uint256 public mainSaleEndTime;
// maximum amout of wei for pre-sale and main sale
uint256 public preSaleWeiCap;
uint256 public mainSaleWeiCap;
// address where funds are collected
address public wallet;
// address where final 10% of funds will be collected
address public tokenWallet;
// how many token units a buyer gets per wei
uint256 public rate;
// amount of raised money in wei
uint256 public weiRaised;
TimeBonus[] public timeBonuses;
AmountBonus[] public amountBonuses;
uint256 public preSaleBonus;
uint256 public preSaleMinimumWei;
uint256 public defaultPercent;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
event FinalisedCrowdsale(uint256 totalSupply, uint256 minterBenefit);
function FourtySevenTokenCrowdsale(uint256 _preSaleStartTime, uint256 _preSaleEndTime, uint256 _preSaleWeiCap, uint256 _mainSaleStartTime, uint256 _mainSaleEndTime, uint256 _mainSaleWeiCap, uint256 _rate, address _wallet, address _tokenWallet) public {
}
// creates the token to be sold.
// override this method to have crowdsale of a specific mintable token.
function createTokenContract() internal returns (MintableToken) {
}
// fallback function can be used to buy tokens
function () payable {
}
// low level token purchase function
function buyTokens(address beneficiary) public payable {
require(beneficiary != 0x0);
require(msg.value != 0);
require(<FILL_ME>)
uint256 weiAmount = msg.value;
validateWithinPeriods();
validateWithinCaps(weiAmount);
// calculate token amount to be created
uint256 tokens = weiAmount.mul(rate);
uint256 percent = getBonusPercent(tokens, now);
// add bonus to tokens depends on the period
uint256 bonusedTokens = applyBonus(tokens, percent);
// update state
weiRaised = weiRaised.add(weiAmount);
token.mint(beneficiary, bonusedTokens);
TokenPurchase(msg.sender, beneficiary, weiAmount, bonusedTokens);
forwardFunds();
}
// owner can mint tokens during crowdsale withing defined caps
function mintTokens(address beneficiary, uint256 weiAmount, uint256 forcePercent) external onlyOwner returns (bool) {
}
// finish crowdsale,
// take totalSupply as 90% and mint 10% more to specified owner's wallet
// then stop minting forever
function finaliseCrowdsale() external onlyOwner {
}
// set new dates for pre-salev (emergency case)
function setPreSaleParameters(uint256 _preSaleStartTime, uint256 _preSaleEndTime, uint256 _preSaleWeiCap, uint256 _preSaleBonus, uint256 _preSaleMinimumWei) public onlyOwner {
}
// set new dates for main-sale (emergency case)
function setMainSaleParameters(uint256 _mainSaleStartTime, uint256 _mainSaleEndTime, uint256 _mainSaleWeiCap) public onlyOwner {
}
// set new wallets (emergency case)
function setWallets(address _wallet, address _tokenWallet) public onlyOwner {
}
// set new rate (emergency case)
function setRate(uint256 _rate) public onlyOwner {
}
// set token on pause
function pauseToken() external onlyOwner {
}
// unset token's pause
function unpauseToken() external onlyOwner {
}
// set token Ownership
function transferTokenOwnership(address newOwner) external onlyOwner {
}
// @return true if main sale event has ended
function mainSaleHasEnded() external constant returns (bool) {
}
// @return true if pre sale event has ended
function preSaleHasEnded() external constant returns (bool) {
}
// send ether to the fund collection wallet
function forwardFunds() internal {
}
// we want to be able to check all bonuses in already deployed contract
// that's why we pass currentTime as a parameter instead of using "now"
function getBonusPercent(uint256 tokens, uint256 currentTime) public constant returns (uint256 percent) {
}
function applyBonus(uint256 tokens, uint256 percent) internal constant returns (uint256 bonusedTokens) {
}
function validateWithinPeriods() internal constant {
}
function validateWithinCaps(uint256 weiAmount) internal constant {
}
}
| !isFinalised | 289,571 | !isFinalised |
null | pragma solidity ^0.4.15;
/**
* @title SafeMath
* @dev Math operations with safety checks that throw on error
*/
library SafeMath {
function mul(uint256 a, uint256 b) internal constant returns (uint256) {
}
function div(uint256 a, uint256 b) internal constant returns (uint256) {
}
function sub(uint256 a, uint256 b) internal constant returns (uint256) {
}
function add(uint256 a, uint256 b) internal constant returns (uint256) {
}
}
/**
* @title ERC20Basic
* @dev Simpler version of ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/179
*/
contract ERC20Basic {
uint256 public totalSupply;
function balanceOf(address who) public constant returns (uint256);
function transfer(address to, uint256 value) public returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
}
/**
* @title ERC20 interface
* @dev see https://github.com/ethereum/EIPs/issues/20
*/
contract ERC20 is ERC20Basic {
function allowance(address owner, address spender) public constant returns (uint256);
function transferFrom(address from, address to, uint256 value) public returns (bool);
function approve(address spender, uint256 value) public returns (bool);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
/**
* @title Basic token
* @dev Basic version of StandardToken, with no allowances.
*/
contract BasicToken is ERC20Basic {
using SafeMath for uint256;
mapping(address => uint256) balances;
/**
* @dev transfer token for a specified address
* @param _to The address to transfer to.
* @param _value The amount to be transferred.
*/
function transfer(address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Gets the balance of the specified address.
* @param _owner The address to query the the balance of.
* @return An uint256 representing the amount owned by the passed address.
*/
function balanceOf(address _owner) public constant returns (uint256 balance) {
}
}
/**
* @title Ownable
* @dev The Ownable contract has an owner address, and provides basic authorization control
* functions, this simplifies the implementation of "user permissions".
*/
contract Ownable {
address public owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev The Ownable constructor sets the original `owner` of the contract to the sender
* account.
*/
function Ownable() {
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
}
/**
* @dev Allows the current owner to transfer control of the contract to a newOwner.
* @param newOwner The address to transfer ownership to.
*/
function transferOwnership(address newOwner) onlyOwner public {
}
}
/**
* @title Standard ERC20 token
*
* @dev Implementation of the basic standard token.
* @dev https://github.com/ethereum/EIPs/issues/20
* @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol
*/
contract StandardToken is ERC20, BasicToken {
mapping (address => mapping (address => uint256)) internal allowed;
/**
* @dev Transfer tokens from one address to another
* @param _from address The address which you want to send tokens from
* @param _to address The address which you want to transfer to
* @param _value uint256 the amount of tokens to be transferred
*/
function transferFrom(address _from, address _to, uint256 _value) public returns (bool) {
}
/**
* @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender.
*
* Beware that changing an allowance with this method brings the risk that someone may use both the old
* and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this
* race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
* @param _spender The address which will spend the funds.
* @param _value The amount of tokens to be spent.
*/
function approve(address _spender, uint256 _value) public returns (bool) {
}
/**
* @dev Function to check the amount of tokens that an owner allowed to a spender.
* @param _owner address The address which owns the funds.
* @param _spender address The address which will spend the funds.
* @return A uint256 specifying the amount of tokens still available for the spender.
*/
function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
}
/**
* approve should be called when allowed[_spender] == 0. To increment
* allowed value is better to use this function to avoid 2 calls (and wait until
* the first transaction is mined)
* From MonolithDAO Token.sol
*/
function increaseApproval (address _spender, uint _addedValue) public returns (bool success) {
}
function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) {
}
}
/**
* @title Mintable token
* @dev Simple ERC20 Token example, with mintable token creation
* @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120
* Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol
*/
contract MintableToken is StandardToken, Ownable {
event Mint(address indexed to, uint256 amount);
event MintFinished();
bool public mintingFinished = false;
modifier canMint() {
}
/**
* @dev Function to mint tokens
* @param _to The address that will receive the minted tokens.
* @param _amount The amount of tokens to mint.
* @return A boolean that indicates if the operation was successful.
*/
function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) {
}
/**
* @dev Function to stop minting new tokens.
* @return True if the operation was successful.
*/
function finishMinting() onlyOwner public returns (bool) {
}
}
/**
* @title Pausable
* @dev Base contract which allows children to implement an emergency stop mechanism.
*/
contract Pausable is Ownable {
event Pause();
event Unpause();
bool public paused = false;
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*/
modifier whenNotPaused() {
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*/
modifier whenPaused() {
}
/**
* @dev called by the owner to pause, triggers stopped state
*/
function pause() onlyOwner whenNotPaused public {
}
/**
* @dev called by the owner to unpause, returns to normal state
*/
function unpause() onlyOwner whenPaused public {
}
}
contract PausableToken is StandardToken, Pausable {
function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) {
}
function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) {
}
function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) {
}
function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) {
}
}
contract FSBToken is MintableToken, PausableToken {
string public constant name = "Forty Seven Bank Token";
string public constant symbol = "FSBT";
uint8 public constant decimals = 18;
string public constant version = "H0.1"; //human 0.1 standard. Just an arbitrary versioning scheme.
}
/**
* @title Crowdsale
* @dev Modified contract for managing a token crowdsale.
* FourtySevenTokenCrowdsale have pre-sale and main sale periods, where investors can make
* token purchases and the crowdsale will assign them tokens based
* on a token per ETH rate and the system of bonuses.
* Funds collected are forwarded to a wallet as they arrive.
* pre-sale and main sale periods both have caps defined in tokens
*/
contract FourtySevenTokenCrowdsale is Ownable {
using SafeMath for uint256;
struct TimeBonus {
uint256 bonusPeriodEndTime;
uint percent;
bool isAmountDependent;
}
struct AmountBonus {
uint256 amount;
uint percent;
}
// true for finalised crowdsale
bool public isFinalised;
// The token being sold
MintableToken public token;
// start and end timestamps where pre-investments are allowed (both inclusive)
uint256 public preSaleStartTime;
uint256 public preSaleEndTime;
// start and end timestamps where main-investments are allowed (both inclusive)
uint256 public mainSaleStartTime;
uint256 public mainSaleEndTime;
// maximum amout of wei for pre-sale and main sale
uint256 public preSaleWeiCap;
uint256 public mainSaleWeiCap;
// address where funds are collected
address public wallet;
// address where final 10% of funds will be collected
address public tokenWallet;
// how many token units a buyer gets per wei
uint256 public rate;
// amount of raised money in wei
uint256 public weiRaised;
TimeBonus[] public timeBonuses;
AmountBonus[] public amountBonuses;
uint256 public preSaleBonus;
uint256 public preSaleMinimumWei;
uint256 public defaultPercent;
/**
* event for token purchase logging
* @param purchaser who paid for the tokens
* @param beneficiary who got the tokens
* @param value weis paid for purchase
* @param amount amount of tokens purchased
*/
event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount);
event FinalisedCrowdsale(uint256 totalSupply, uint256 minterBenefit);
function FourtySevenTokenCrowdsale(uint256 _preSaleStartTime, uint256 _preSaleEndTime, uint256 _preSaleWeiCap, uint256 _mainSaleStartTime, uint256 _mainSaleEndTime, uint256 _mainSaleWeiCap, uint256 _rate, address _wallet, address _tokenWallet) public {
}
// creates the token to be sold.
// override this method to have crowdsale of a specific mintable token.
function createTokenContract() internal returns (MintableToken) {
}
// fallback function can be used to buy tokens
function () payable {
}
// low level token purchase function
function buyTokens(address beneficiary) public payable {
}
// owner can mint tokens during crowdsale withing defined caps
function mintTokens(address beneficiary, uint256 weiAmount, uint256 forcePercent) external onlyOwner returns (bool) {
}
// finish crowdsale,
// take totalSupply as 90% and mint 10% more to specified owner's wallet
// then stop minting forever
function finaliseCrowdsale() external onlyOwner {
}
// set new dates for pre-salev (emergency case)
function setPreSaleParameters(uint256 _preSaleStartTime, uint256 _preSaleEndTime, uint256 _preSaleWeiCap, uint256 _preSaleBonus, uint256 _preSaleMinimumWei) public onlyOwner {
}
// set new dates for main-sale (emergency case)
function setMainSaleParameters(uint256 _mainSaleStartTime, uint256 _mainSaleEndTime, uint256 _mainSaleWeiCap) public onlyOwner {
}
// set new wallets (emergency case)
function setWallets(address _wallet, address _tokenWallet) public onlyOwner {
}
// set new rate (emergency case)
function setRate(uint256 _rate) public onlyOwner {
}
// set token on pause
function pauseToken() external onlyOwner {
}
// unset token's pause
function unpauseToken() external onlyOwner {
}
// set token Ownership
function transferTokenOwnership(address newOwner) external onlyOwner {
}
// @return true if main sale event has ended
function mainSaleHasEnded() external constant returns (bool) {
}
// @return true if pre sale event has ended
function preSaleHasEnded() external constant returns (bool) {
}
// send ether to the fund collection wallet
function forwardFunds() internal {
}
// we want to be able to check all bonuses in already deployed contract
// that's why we pass currentTime as a parameter instead of using "now"
function getBonusPercent(uint256 tokens, uint256 currentTime) public constant returns (uint256 percent) {
}
function applyBonus(uint256 tokens, uint256 percent) internal constant returns (uint256 bonusedTokens) {
}
function validateWithinPeriods() internal constant {
// within pre-sale or main sale
require(<FILL_ME>)
}
function validateWithinCaps(uint256 weiAmount) internal constant {
}
}
| (now>=preSaleStartTime&&now<=preSaleEndTime)||(now>=mainSaleStartTime&&now<=mainSaleEndTime) | 289,571 | (now>=preSaleStartTime&&now<=preSaleEndTime)||(now>=mainSaleStartTime&&now<=mainSaleEndTime) |
"Claimer: 0% is not allowed" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract Claimer is Ownable {
using SafeERC20 for IERC20;
// Prevents stupid mistakes in provided timestamps
uint256 private constant UNLOCK_TIME_THRESHOLD = 1618877169;
string public id;
struct Claim {
uint256 unlockTime; // unix time
uint256 percent; // three decimals: 1.783% = 1783
}
Claim[] public claims;
bool public isPaused = false;
uint256 public totalTokens;
mapping(address => uint256) public allocation;
mapping(address => uint256) private claimedTotal;
mapping(address => mapping(uint256 => uint256)) public userClaimedPerClaim;
// Marks the indexes of claims already claimed by all participants, usually when it was airdropped
uint256[] public alreadyDistributedClaims;
uint256 private manuallyClaimedTotal;
IERC20 public token;
event Claimed(
address indexed account,
uint256 amount,
uint256 percent,
uint256 claimIdx
);
event ClaimedMultiple(address indexed account, uint256 amount);
event DuplicateAllocationSkipped(
address indexed account,
uint256 failedAllocation,
uint256 existingAllocation
);
event ClaimReleased(uint256 percent, uint256 newTime, uint256 claimIdx);
event ClaimTimeChanged(uint256 percent, uint256 newTime, uint256 claimIdx);
event ClaimingPaused(bool status);
constructor(
string memory _id,
address _token,
uint256[] memory times,
uint256[] memory percents
) {
token = IERC20(_token);
id = _id;
uint256 totalPercent;
for (uint256 i = 0; i < times.length; i++) {
require(<FILL_ME>)
claims.push(Claim(times[i], percents[i]));
totalPercent += percents[i];
}
require(
totalPercent == 100000,
"Claimer: Sum of all claimed must be 100%"
);
}
function setToken(address _token) external onlyOwner {
}
function setAlreadyDistributedClaims(uint256[] calldata claimedIdx)
external
onlyOwner
{
}
function getTotalRemainingAmount() external view returns (uint256) {
}
function getTotalClaimed() public view returns (uint256) {
}
function getClaims(address account)
external
view
returns (
uint256[] memory,
uint256[] memory,
uint256[] memory,
bool[] memory,
uint256[] memory
)
{
}
function getTotalAccountClaimable(address account)
external
view
returns (uint256)
{
}
function getTotalAccountClaimed(address account)
external
view
returns (uint256)
{
}
function getAccountClaimed(address account, uint256 claimIdx)
public
view
returns (uint256)
{
}
function getAlreadyDistributedAmount(uint256 total)
public
view
returns (uint256)
{
}
function claim(address account, uint256 idx) external {
}
function claimAll(address account) external {
}
function claimInternal(address account, uint256 idx)
internal
returns (uint256)
{
}
function setClaimTime(uint256 claimIdx, uint256 newUnlockTime)
external
onlyOwner
{
}
function releaseClaim(uint256 claimIdx) external onlyOwner {
}
function isClaimable(address account, uint256 claimIdx)
public
view
returns (bool)
{
}
function isClaimed(address account, uint256 claimIdx)
public
view
returns (bool)
{
}
function isAlreadyDistributed(uint256 claimIdx) public view returns (bool) {
}
function getClaimAmount(uint256 total, uint256 claimIdx)
internal
view
returns (uint256)
{
}
function pauseClaiming(bool status) external onlyOwner {
}
function setAllocation(address account, uint256 newTotal)
external
onlyOwner
{
}
function batchAddAllocation(
address[] calldata addresses,
uint256[] calldata allocations
) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function withdrawToken(address _token, uint256 amount) external onlyOwner {
}
}
| percents[i]>0,"Claimer: 0% is not allowed" | 289,681 | percents[i]>0 |
"Claimer: Index out of bounds" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract Claimer is Ownable {
using SafeERC20 for IERC20;
// Prevents stupid mistakes in provided timestamps
uint256 private constant UNLOCK_TIME_THRESHOLD = 1618877169;
string public id;
struct Claim {
uint256 unlockTime; // unix time
uint256 percent; // three decimals: 1.783% = 1783
}
Claim[] public claims;
bool public isPaused = false;
uint256 public totalTokens;
mapping(address => uint256) public allocation;
mapping(address => uint256) private claimedTotal;
mapping(address => mapping(uint256 => uint256)) public userClaimedPerClaim;
// Marks the indexes of claims already claimed by all participants, usually when it was airdropped
uint256[] public alreadyDistributedClaims;
uint256 private manuallyClaimedTotal;
IERC20 public token;
event Claimed(
address indexed account,
uint256 amount,
uint256 percent,
uint256 claimIdx
);
event ClaimedMultiple(address indexed account, uint256 amount);
event DuplicateAllocationSkipped(
address indexed account,
uint256 failedAllocation,
uint256 existingAllocation
);
event ClaimReleased(uint256 percent, uint256 newTime, uint256 claimIdx);
event ClaimTimeChanged(uint256 percent, uint256 newTime, uint256 claimIdx);
event ClaimingPaused(bool status);
constructor(
string memory _id,
address _token,
uint256[] memory times,
uint256[] memory percents
) {
}
function setToken(address _token) external onlyOwner {
}
function setAlreadyDistributedClaims(uint256[] calldata claimedIdx)
external
onlyOwner
{
for (uint256 i = 0; i < claimedIdx.length; i++) {
require(<FILL_ME>)
}
alreadyDistributedClaims = claimedIdx;
}
function getTotalRemainingAmount() external view returns (uint256) {
}
function getTotalClaimed() public view returns (uint256) {
}
function getClaims(address account)
external
view
returns (
uint256[] memory,
uint256[] memory,
uint256[] memory,
bool[] memory,
uint256[] memory
)
{
}
function getTotalAccountClaimable(address account)
external
view
returns (uint256)
{
}
function getTotalAccountClaimed(address account)
external
view
returns (uint256)
{
}
function getAccountClaimed(address account, uint256 claimIdx)
public
view
returns (uint256)
{
}
function getAlreadyDistributedAmount(uint256 total)
public
view
returns (uint256)
{
}
function claim(address account, uint256 idx) external {
}
function claimAll(address account) external {
}
function claimInternal(address account, uint256 idx)
internal
returns (uint256)
{
}
function setClaimTime(uint256 claimIdx, uint256 newUnlockTime)
external
onlyOwner
{
}
function releaseClaim(uint256 claimIdx) external onlyOwner {
}
function isClaimable(address account, uint256 claimIdx)
public
view
returns (bool)
{
}
function isClaimed(address account, uint256 claimIdx)
public
view
returns (bool)
{
}
function isAlreadyDistributed(uint256 claimIdx) public view returns (bool) {
}
function getClaimAmount(uint256 total, uint256 claimIdx)
internal
view
returns (uint256)
{
}
function pauseClaiming(bool status) external onlyOwner {
}
function setAllocation(address account, uint256 newTotal)
external
onlyOwner
{
}
function batchAddAllocation(
address[] calldata addresses,
uint256[] calldata allocations
) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function withdrawToken(address _token, uint256 amount) external onlyOwner {
}
}
| claimedIdx[i]<claims.length,"Claimer: Index out of bounds" | 289,681 | claimedIdx[i]<claims.length |
"Claimer: Account doesn't have allocation" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract Claimer is Ownable {
using SafeERC20 for IERC20;
// Prevents stupid mistakes in provided timestamps
uint256 private constant UNLOCK_TIME_THRESHOLD = 1618877169;
string public id;
struct Claim {
uint256 unlockTime; // unix time
uint256 percent; // three decimals: 1.783% = 1783
}
Claim[] public claims;
bool public isPaused = false;
uint256 public totalTokens;
mapping(address => uint256) public allocation;
mapping(address => uint256) private claimedTotal;
mapping(address => mapping(uint256 => uint256)) public userClaimedPerClaim;
// Marks the indexes of claims already claimed by all participants, usually when it was airdropped
uint256[] public alreadyDistributedClaims;
uint256 private manuallyClaimedTotal;
IERC20 public token;
event Claimed(
address indexed account,
uint256 amount,
uint256 percent,
uint256 claimIdx
);
event ClaimedMultiple(address indexed account, uint256 amount);
event DuplicateAllocationSkipped(
address indexed account,
uint256 failedAllocation,
uint256 existingAllocation
);
event ClaimReleased(uint256 percent, uint256 newTime, uint256 claimIdx);
event ClaimTimeChanged(uint256 percent, uint256 newTime, uint256 claimIdx);
event ClaimingPaused(bool status);
constructor(
string memory _id,
address _token,
uint256[] memory times,
uint256[] memory percents
) {
}
function setToken(address _token) external onlyOwner {
}
function setAlreadyDistributedClaims(uint256[] calldata claimedIdx)
external
onlyOwner
{
}
function getTotalRemainingAmount() external view returns (uint256) {
}
function getTotalClaimed() public view returns (uint256) {
}
function getClaims(address account)
external
view
returns (
uint256[] memory,
uint256[] memory,
uint256[] memory,
bool[] memory,
uint256[] memory
)
{
}
function getTotalAccountClaimable(address account)
external
view
returns (uint256)
{
}
function getTotalAccountClaimed(address account)
external
view
returns (uint256)
{
}
function getAccountClaimed(address account, uint256 claimIdx)
public
view
returns (uint256)
{
}
function getAlreadyDistributedAmount(uint256 total)
public
view
returns (uint256)
{
}
function claim(address account, uint256 idx) external {
require(idx < claims.length, "Claimer: Index out of bounds");
require(<FILL_ME>)
require(!isPaused, "Claimer: Claiming paused");
uint256 claimAmount = claimInternal(account, idx);
token.safeTransfer(account, claimAmount);
emit Claimed(account, claimAmount, claims[idx].percent, idx);
}
function claimAll(address account) external {
}
function claimInternal(address account, uint256 idx)
internal
returns (uint256)
{
}
function setClaimTime(uint256 claimIdx, uint256 newUnlockTime)
external
onlyOwner
{
}
function releaseClaim(uint256 claimIdx) external onlyOwner {
}
function isClaimable(address account, uint256 claimIdx)
public
view
returns (bool)
{
}
function isClaimed(address account, uint256 claimIdx)
public
view
returns (bool)
{
}
function isAlreadyDistributed(uint256 claimIdx) public view returns (bool) {
}
function getClaimAmount(uint256 total, uint256 claimIdx)
internal
view
returns (uint256)
{
}
function pauseClaiming(bool status) external onlyOwner {
}
function setAllocation(address account, uint256 newTotal)
external
onlyOwner
{
}
function batchAddAllocation(
address[] calldata addresses,
uint256[] calldata allocations
) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function withdrawToken(address _token, uint256 amount) external onlyOwner {
}
}
| allocation[account]>0,"Claimer: Account doesn't have allocation" | 289,681 | allocation[account]>0 |
"Claimer: Not claimable or already claimed" | // SPDX-License-Identifier: MIT
pragma solidity =0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract Claimer is Ownable {
using SafeERC20 for IERC20;
// Prevents stupid mistakes in provided timestamps
uint256 private constant UNLOCK_TIME_THRESHOLD = 1618877169;
string public id;
struct Claim {
uint256 unlockTime; // unix time
uint256 percent; // three decimals: 1.783% = 1783
}
Claim[] public claims;
bool public isPaused = false;
uint256 public totalTokens;
mapping(address => uint256) public allocation;
mapping(address => uint256) private claimedTotal;
mapping(address => mapping(uint256 => uint256)) public userClaimedPerClaim;
// Marks the indexes of claims already claimed by all participants, usually when it was airdropped
uint256[] public alreadyDistributedClaims;
uint256 private manuallyClaimedTotal;
IERC20 public token;
event Claimed(
address indexed account,
uint256 amount,
uint256 percent,
uint256 claimIdx
);
event ClaimedMultiple(address indexed account, uint256 amount);
event DuplicateAllocationSkipped(
address indexed account,
uint256 failedAllocation,
uint256 existingAllocation
);
event ClaimReleased(uint256 percent, uint256 newTime, uint256 claimIdx);
event ClaimTimeChanged(uint256 percent, uint256 newTime, uint256 claimIdx);
event ClaimingPaused(bool status);
constructor(
string memory _id,
address _token,
uint256[] memory times,
uint256[] memory percents
) {
}
function setToken(address _token) external onlyOwner {
}
function setAlreadyDistributedClaims(uint256[] calldata claimedIdx)
external
onlyOwner
{
}
function getTotalRemainingAmount() external view returns (uint256) {
}
function getTotalClaimed() public view returns (uint256) {
}
function getClaims(address account)
external
view
returns (
uint256[] memory,
uint256[] memory,
uint256[] memory,
bool[] memory,
uint256[] memory
)
{
}
function getTotalAccountClaimable(address account)
external
view
returns (uint256)
{
}
function getTotalAccountClaimed(address account)
external
view
returns (uint256)
{
}
function getAccountClaimed(address account, uint256 claimIdx)
public
view
returns (uint256)
{
}
function getAlreadyDistributedAmount(uint256 total)
public
view
returns (uint256)
{
}
function claim(address account, uint256 idx) external {
}
function claimAll(address account) external {
}
function claimInternal(address account, uint256 idx)
internal
returns (uint256)
{
require(<FILL_ME>)
uint256 claimAmount = getClaimAmount(allocation[account], idx);
require(claimAmount > 0, "Claimer: Amount is zero");
manuallyClaimedTotal += claimAmount;
claimedTotal[account] += claimAmount;
userClaimedPerClaim[account][idx] = claimAmount;
return claimAmount;
}
function setClaimTime(uint256 claimIdx, uint256 newUnlockTime)
external
onlyOwner
{
}
function releaseClaim(uint256 claimIdx) external onlyOwner {
}
function isClaimable(address account, uint256 claimIdx)
public
view
returns (bool)
{
}
function isClaimed(address account, uint256 claimIdx)
public
view
returns (bool)
{
}
function isAlreadyDistributed(uint256 claimIdx) public view returns (bool) {
}
function getClaimAmount(uint256 total, uint256 claimIdx)
internal
view
returns (uint256)
{
}
function pauseClaiming(bool status) external onlyOwner {
}
function setAllocation(address account, uint256 newTotal)
external
onlyOwner
{
}
function batchAddAllocation(
address[] calldata addresses,
uint256[] calldata allocations
) external onlyOwner {
}
function withdrawAll() external onlyOwner {
}
function withdrawToken(address _token, uint256 amount) external onlyOwner {
}
}
| isClaimable(account,idx),"Claimer: Not claimable or already claimed" | 289,681 | isClaimable(account,idx) |
"only a signer can call this" | pragma solidity >=0.4.21 <0.6.0;
contract MultiSig{
struct invoke_status{
uint propose_height;
bytes32 invoke_hash;
string func_name;
uint64 invoke_id;
bool called;
address[] invoke_signers;
bool processing;
bool exists;
}
uint public signer_number;
address[] public signers;
address public owner;
mapping (bytes32 => invoke_status) public invokes;
mapping (bytes32 => uint64) public used_invoke_ids;
mapping(address => uint) public signer_join_height;
event signers_reformed(address[] old_signers, address[] new_signers);
event valid_function_sign(string name, uint64 id, uint64 current_signed_number, uint propose_height);
event function_called(string name, uint64 id, uint propose_height);
modifier enough_signers(address[] memory s){
}
constructor(address[] memory s) public enough_signers(s){
}
modifier only_signer{
require(<FILL_ME>)
_;
}
function is_signer(address _addr) public view returns(bool){
}
function get_majority_number() private view returns(uint){
}
function array_exist (address[] memory accounts, address p) private pure returns (bool){
}
function is_all_minus_sig(uint number, uint64 id, string memory name, bytes32 hash, address sender) internal returns (bool){
}
function update_and_check_reach_majority(uint64 id, string memory name, bytes32 hash, address sender) public returns (bool){
}
modifier is_majority_sig(uint64 id, string memory name) {
}
modifier is_all_sig(uint64 id, string memory name) {
}
function set_called(bytes32 hash) internal {
}
function reform_signers(uint64 id, address[] calldata s)
external
only_signer
enough_signers(s)
is_majority_sig(id, "reform_signers"){
}
function get_unused_invoke_id(string memory name) public view returns(uint64){
}
function get_signers() public view returns(address[] memory){
}
}
contract MultiSigFactory{
event NewMultiSig(address addr, address[] signers);
function createMultiSig(address[] memory _signers) public returns(address){
}
}
| array_exist(signers,msg.sender),"only a signer can call this" | 289,764 | array_exist(signers,msg.sender) |
"you already called this method" | pragma solidity >=0.4.21 <0.6.0;
contract MultiSig{
struct invoke_status{
uint propose_height;
bytes32 invoke_hash;
string func_name;
uint64 invoke_id;
bool called;
address[] invoke_signers;
bool processing;
bool exists;
}
uint public signer_number;
address[] public signers;
address public owner;
mapping (bytes32 => invoke_status) public invokes;
mapping (bytes32 => uint64) public used_invoke_ids;
mapping(address => uint) public signer_join_height;
event signers_reformed(address[] old_signers, address[] new_signers);
event valid_function_sign(string name, uint64 id, uint64 current_signed_number, uint propose_height);
event function_called(string name, uint64 id, uint propose_height);
modifier enough_signers(address[] memory s){
}
constructor(address[] memory s) public enough_signers(s){
}
modifier only_signer{
}
function is_signer(address _addr) public view returns(bool){
}
function get_majority_number() private view returns(uint){
}
function array_exist (address[] memory accounts, address p) private pure returns (bool){
}
function is_all_minus_sig(uint number, uint64 id, string memory name, bytes32 hash, address sender) internal returns (bool){
bytes32 b = keccak256(abi.encodePacked(name));
require(id <= used_invoke_ids[b] + 1, "you're using a too big id.");
if(id > used_invoke_ids[b]){
used_invoke_ids[b] = id;
}
if(!invokes[hash].exists){
invokes[hash].propose_height = block.number;
invokes[hash].invoke_hash = hash;
invokes[hash].func_name= name;
invokes[hash].invoke_id= id;
invokes[hash].called= false;
invokes[hash].invoke_signers.push(sender);
invokes[hash].processing= false;
invokes[hash].exists= true;
emit valid_function_sign(name, id, 1, block.number);
return false;
}
invoke_status storage invoke = invokes[hash];
require(<FILL_ME>)
uint valid_invoke_num = 0;
uint join_height = signer_join_height[msg.sender];
for(uint i = 0; i < invoke.invoke_signers.length; i++){
require(join_height < invoke.propose_height, "this proposal is already exist before you become a signer");
if(array_exist(signers, invoke.invoke_signers[i])){
valid_invoke_num ++;
}
}
invoke.invoke_signers.push(msg.sender);
valid_invoke_num ++;
emit valid_function_sign(name, id, uint64(valid_invoke_num), invoke.propose_height);
if(invoke.called) return false;
if(valid_invoke_num < signer_number-number) return false;
invoke.processing = true;
return true;
}
function update_and_check_reach_majority(uint64 id, string memory name, bytes32 hash, address sender) public returns (bool){
}
modifier is_majority_sig(uint64 id, string memory name) {
}
modifier is_all_sig(uint64 id, string memory name) {
}
function set_called(bytes32 hash) internal {
}
function reform_signers(uint64 id, address[] calldata s)
external
only_signer
enough_signers(s)
is_majority_sig(id, "reform_signers"){
}
function get_unused_invoke_id(string memory name) public view returns(uint64){
}
function get_signers() public view returns(address[] memory){
}
}
contract MultiSigFactory{
event NewMultiSig(address addr, address[] signers);
function createMultiSig(address[] memory _signers) public returns(address){
}
}
| !array_exist(invoke.invoke_signers,sender),"you already called this method" | 289,764 | !array_exist(invoke.invoke_signers,sender) |
"no such function" | pragma solidity >=0.4.21 <0.6.0;
contract MultiSig{
struct invoke_status{
uint propose_height;
bytes32 invoke_hash;
string func_name;
uint64 invoke_id;
bool called;
address[] invoke_signers;
bool processing;
bool exists;
}
uint public signer_number;
address[] public signers;
address public owner;
mapping (bytes32 => invoke_status) public invokes;
mapping (bytes32 => uint64) public used_invoke_ids;
mapping(address => uint) public signer_join_height;
event signers_reformed(address[] old_signers, address[] new_signers);
event valid_function_sign(string name, uint64 id, uint64 current_signed_number, uint propose_height);
event function_called(string name, uint64 id, uint propose_height);
modifier enough_signers(address[] memory s){
}
constructor(address[] memory s) public enough_signers(s){
}
modifier only_signer{
}
function is_signer(address _addr) public view returns(bool){
}
function get_majority_number() private view returns(uint){
}
function array_exist (address[] memory accounts, address p) private pure returns (bool){
}
function is_all_minus_sig(uint number, uint64 id, string memory name, bytes32 hash, address sender) internal returns (bool){
}
function update_and_check_reach_majority(uint64 id, string memory name, bytes32 hash, address sender) public returns (bool){
}
modifier is_majority_sig(uint64 id, string memory name) {
}
modifier is_all_sig(uint64 id, string memory name) {
}
function set_called(bytes32 hash) internal {
invoke_status storage invoke = invokes[hash];
require(<FILL_ME>)
require(!invoke.called, "already called");
require(invoke.processing, "cannot call this separately");
invoke.called = true;
invoke.processing = false;
emit function_called(invoke.func_name, invoke.invoke_id, invoke.propose_height);
}
function reform_signers(uint64 id, address[] calldata s)
external
only_signer
enough_signers(s)
is_majority_sig(id, "reform_signers"){
}
function get_unused_invoke_id(string memory name) public view returns(uint64){
}
function get_signers() public view returns(address[] memory){
}
}
contract MultiSigFactory{
event NewMultiSig(address addr, address[] signers);
function createMultiSig(address[] memory _signers) public returns(address){
}
}
| invoke.exists,"no such function" | 289,764 | invoke.exists |
"already called" | pragma solidity >=0.4.21 <0.6.0;
contract MultiSig{
struct invoke_status{
uint propose_height;
bytes32 invoke_hash;
string func_name;
uint64 invoke_id;
bool called;
address[] invoke_signers;
bool processing;
bool exists;
}
uint public signer_number;
address[] public signers;
address public owner;
mapping (bytes32 => invoke_status) public invokes;
mapping (bytes32 => uint64) public used_invoke_ids;
mapping(address => uint) public signer_join_height;
event signers_reformed(address[] old_signers, address[] new_signers);
event valid_function_sign(string name, uint64 id, uint64 current_signed_number, uint propose_height);
event function_called(string name, uint64 id, uint propose_height);
modifier enough_signers(address[] memory s){
}
constructor(address[] memory s) public enough_signers(s){
}
modifier only_signer{
}
function is_signer(address _addr) public view returns(bool){
}
function get_majority_number() private view returns(uint){
}
function array_exist (address[] memory accounts, address p) private pure returns (bool){
}
function is_all_minus_sig(uint number, uint64 id, string memory name, bytes32 hash, address sender) internal returns (bool){
}
function update_and_check_reach_majority(uint64 id, string memory name, bytes32 hash, address sender) public returns (bool){
}
modifier is_majority_sig(uint64 id, string memory name) {
}
modifier is_all_sig(uint64 id, string memory name) {
}
function set_called(bytes32 hash) internal {
invoke_status storage invoke = invokes[hash];
require(invoke.exists, "no such function");
require(<FILL_ME>)
require(invoke.processing, "cannot call this separately");
invoke.called = true;
invoke.processing = false;
emit function_called(invoke.func_name, invoke.invoke_id, invoke.propose_height);
}
function reform_signers(uint64 id, address[] calldata s)
external
only_signer
enough_signers(s)
is_majority_sig(id, "reform_signers"){
}
function get_unused_invoke_id(string memory name) public view returns(uint64){
}
function get_signers() public view returns(address[] memory){
}
}
contract MultiSigFactory{
event NewMultiSig(address addr, address[] signers);
function createMultiSig(address[] memory _signers) public returns(address){
}
}
| !invoke.called,"already called" | 289,764 | !invoke.called |
"cannot call this separately" | pragma solidity >=0.4.21 <0.6.0;
contract MultiSig{
struct invoke_status{
uint propose_height;
bytes32 invoke_hash;
string func_name;
uint64 invoke_id;
bool called;
address[] invoke_signers;
bool processing;
bool exists;
}
uint public signer_number;
address[] public signers;
address public owner;
mapping (bytes32 => invoke_status) public invokes;
mapping (bytes32 => uint64) public used_invoke_ids;
mapping(address => uint) public signer_join_height;
event signers_reformed(address[] old_signers, address[] new_signers);
event valid_function_sign(string name, uint64 id, uint64 current_signed_number, uint propose_height);
event function_called(string name, uint64 id, uint propose_height);
modifier enough_signers(address[] memory s){
}
constructor(address[] memory s) public enough_signers(s){
}
modifier only_signer{
}
function is_signer(address _addr) public view returns(bool){
}
function get_majority_number() private view returns(uint){
}
function array_exist (address[] memory accounts, address p) private pure returns (bool){
}
function is_all_minus_sig(uint number, uint64 id, string memory name, bytes32 hash, address sender) internal returns (bool){
}
function update_and_check_reach_majority(uint64 id, string memory name, bytes32 hash, address sender) public returns (bool){
}
modifier is_majority_sig(uint64 id, string memory name) {
}
modifier is_all_sig(uint64 id, string memory name) {
}
function set_called(bytes32 hash) internal {
invoke_status storage invoke = invokes[hash];
require(invoke.exists, "no such function");
require(!invoke.called, "already called");
require(<FILL_ME>)
invoke.called = true;
invoke.processing = false;
emit function_called(invoke.func_name, invoke.invoke_id, invoke.propose_height);
}
function reform_signers(uint64 id, address[] calldata s)
external
only_signer
enough_signers(s)
is_majority_sig(id, "reform_signers"){
}
function get_unused_invoke_id(string memory name) public view returns(uint64){
}
function get_signers() public view returns(address[] memory){
}
}
contract MultiSigFactory{
event NewMultiSig(address addr, address[] signers);
function createMultiSig(address[] memory _signers) public returns(address){
}
}
| invoke.processing,"cannot call this separately" | 289,764 | invoke.processing |
"Sale not open" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// @author: miinded.com
//////////////////////////////////////////////////////////////////////////////////////////////
// //
// //
// //
// //
// //
// :-===-: //
// :++=:. .:=++: //
// -*- =*. //
// *= .#- //
// #: #: //
// ++ %. //
// %. =:-# //
// - .: @@.#: //
// =: *@= .- -# //
// .+%==- +: -++: @. //
// :*=. .. :# *- //
// :# .*+-. -+. =+ //
// %. %. -=+*. -# //
// %: =*: :#: :# //
// :#. .*: :*+=++. .% //
// =+++**= .* //
// %. . //
// :# . //
// #- == //
// .% *- //
// *= %: //
// .% @ //
// += @ //
// @ //
// #: @ //
// .+%=- @ //
// +*-. :+= %+++=. //
// -#. *= .*= //
// -# *= //
// .% % %. //
// :: #- -* //
// = -+ :# %: //
// . :: *: .% //
// == :- .. ++ //
// *= :* :% #- //
// *- % -# %: //
// *- *- :#. #- //
//////////////////////////////////////////////////////////////////////////////////////////////
import "./ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./WithdrawFairly.sol";
contract NeckVille is ERC721, Ownable, WithdrawFairly {
uint256 public constant MAX_SUPPLY = 5555;
uint256 public constant RESERVE_NFT = 150;
uint256 public constant START_AT = 1;
uint16 private constant HASH_SIGN = 33541;
struct Sale {
uint64 start;
uint64 end;
uint16 maxPerWallet;
uint8 maxPerTx;
uint256 price;
bool paused;
}
mapping(string => Sale) public sales;
mapping(string => mapping(address => uint16)) balanceSale;
mapping(uint256 => bool) private signatureIds;
address public signAddress;
string public baseTokenURI;
uint16 public mintTracked;
uint16 public burnedTracker;
event EventSaleChange(string _name, Sale sale);
event EventMint(address _to, uint256 _tokens);
constructor(string memory baseURI, address _signAddress) ERC721("NeckVille", "NV") WithdrawFairly() {
}
//******************************************************//
// Modifier //
//******************************************************//
modifier isOpen(string memory _name, uint16 _count){
require(<FILL_ME>)
require(_count <= sales[_name].maxPerTx, "Max per tx limit");
require(mintTracked + _count <= MAX_SUPPLY, "Sold out!");
require(msg.value >= price(_name, _count), "Value limit");
if (sales[_name].maxPerWallet > 0) {
require(balanceSale[_name][_msgSender()] + _count <= sales[_name].maxPerWallet, "Max per wallet limit");
balanceSale[_name][_msgSender()] += _count;
}
_;
}
//******************************************************//
// Sales logic //
//******************************************************//
function setSale(string memory _name, Sale memory _sale) public onlyOwner {
}
function pauseSale(string memory _name, bool _pause) public onlyOwner {
}
function saleIsOpen(string memory _name) public view returns (bool){
}
function saleCurrent() public view returns (string memory){
}
//******************************************************//
// Mint //
//******************************************************//
function preSalesMint(string memory _name, uint16 _count, uint256 _signatureId, bytes memory _signature) public payable isOpen(_name, _count) {
}
function publicSalesMint(uint16 _count) public payable isOpen("PUBLIC", _count) {
}
function checkSignature(address _wallet, string memory _name, uint256 _count, uint256 _signatureId, bytes memory _signature) public pure returns (address){
}
function _mintTokens(uint16 _count) private {
}
function reserve(uint16 _count) public onlyOwner {
}
//******************************************************//
// Base //
//******************************************************//
function totalSupply() public view returns (uint256) {
}
function price(string memory _name, uint256 _count) public view returns (uint256){
}
function _baseURI() internal view virtual override returns (string memory) {
}
function minted(string memory _name, address _wallet) public view returns (uint16){
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
//******************************************************//
// Setters //
//******************************************************//
function setSignAddress(address _signAddress) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
//******************************************************//
// Burn //
//******************************************************//
function burn(uint256 _tokenId) public virtual {
}
}
| saleIsOpen(_name),"Sale not open" | 289,788 | saleIsOpen(_name) |
"Sold out!" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// @author: miinded.com
//////////////////////////////////////////////////////////////////////////////////////////////
// //
// //
// //
// //
// //
// :-===-: //
// :++=:. .:=++: //
// -*- =*. //
// *= .#- //
// #: #: //
// ++ %. //
// %. =:-# //
// - .: @@.#: //
// =: *@= .- -# //
// .+%==- +: -++: @. //
// :*=. .. :# *- //
// :# .*+-. -+. =+ //
// %. %. -=+*. -# //
// %: =*: :#: :# //
// :#. .*: :*+=++. .% //
// =+++**= .* //
// %. . //
// :# . //
// #- == //
// .% *- //
// *= %: //
// .% @ //
// += @ //
// @ //
// #: @ //
// .+%=- @ //
// +*-. :+= %+++=. //
// -#. *= .*= //
// -# *= //
// .% % %. //
// :: #- -* //
// = -+ :# %: //
// . :: *: .% //
// == :- .. ++ //
// *= :* :% #- //
// *- % -# %: //
// *- *- :#. #- //
//////////////////////////////////////////////////////////////////////////////////////////////
import "./ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./WithdrawFairly.sol";
contract NeckVille is ERC721, Ownable, WithdrawFairly {
uint256 public constant MAX_SUPPLY = 5555;
uint256 public constant RESERVE_NFT = 150;
uint256 public constant START_AT = 1;
uint16 private constant HASH_SIGN = 33541;
struct Sale {
uint64 start;
uint64 end;
uint16 maxPerWallet;
uint8 maxPerTx;
uint256 price;
bool paused;
}
mapping(string => Sale) public sales;
mapping(string => mapping(address => uint16)) balanceSale;
mapping(uint256 => bool) private signatureIds;
address public signAddress;
string public baseTokenURI;
uint16 public mintTracked;
uint16 public burnedTracker;
event EventSaleChange(string _name, Sale sale);
event EventMint(address _to, uint256 _tokens);
constructor(string memory baseURI, address _signAddress) ERC721("NeckVille", "NV") WithdrawFairly() {
}
//******************************************************//
// Modifier //
//******************************************************//
modifier isOpen(string memory _name, uint16 _count){
require(saleIsOpen(_name), "Sale not open");
require(_count <= sales[_name].maxPerTx, "Max per tx limit");
require(<FILL_ME>)
require(msg.value >= price(_name, _count), "Value limit");
if (sales[_name].maxPerWallet > 0) {
require(balanceSale[_name][_msgSender()] + _count <= sales[_name].maxPerWallet, "Max per wallet limit");
balanceSale[_name][_msgSender()] += _count;
}
_;
}
//******************************************************//
// Sales logic //
//******************************************************//
function setSale(string memory _name, Sale memory _sale) public onlyOwner {
}
function pauseSale(string memory _name, bool _pause) public onlyOwner {
}
function saleIsOpen(string memory _name) public view returns (bool){
}
function saleCurrent() public view returns (string memory){
}
//******************************************************//
// Mint //
//******************************************************//
function preSalesMint(string memory _name, uint16 _count, uint256 _signatureId, bytes memory _signature) public payable isOpen(_name, _count) {
}
function publicSalesMint(uint16 _count) public payable isOpen("PUBLIC", _count) {
}
function checkSignature(address _wallet, string memory _name, uint256 _count, uint256 _signatureId, bytes memory _signature) public pure returns (address){
}
function _mintTokens(uint16 _count) private {
}
function reserve(uint16 _count) public onlyOwner {
}
//******************************************************//
// Base //
//******************************************************//
function totalSupply() public view returns (uint256) {
}
function price(string memory _name, uint256 _count) public view returns (uint256){
}
function _baseURI() internal view virtual override returns (string memory) {
}
function minted(string memory _name, address _wallet) public view returns (uint16){
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
//******************************************************//
// Setters //
//******************************************************//
function setSignAddress(address _signAddress) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
//******************************************************//
// Burn //
//******************************************************//
function burn(uint256 _tokenId) public virtual {
}
}
| mintTracked+_count<=MAX_SUPPLY,"Sold out!" | 289,788 | mintTracked+_count<=MAX_SUPPLY |
"Max per wallet limit" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// @author: miinded.com
//////////////////////////////////////////////////////////////////////////////////////////////
// //
// //
// //
// //
// //
// :-===-: //
// :++=:. .:=++: //
// -*- =*. //
// *= .#- //
// #: #: //
// ++ %. //
// %. =:-# //
// - .: @@.#: //
// =: *@= .- -# //
// .+%==- +: -++: @. //
// :*=. .. :# *- //
// :# .*+-. -+. =+ //
// %. %. -=+*. -# //
// %: =*: :#: :# //
// :#. .*: :*+=++. .% //
// =+++**= .* //
// %. . //
// :# . //
// #- == //
// .% *- //
// *= %: //
// .% @ //
// += @ //
// @ //
// #: @ //
// .+%=- @ //
// +*-. :+= %+++=. //
// -#. *= .*= //
// -# *= //
// .% % %. //
// :: #- -* //
// = -+ :# %: //
// . :: *: .% //
// == :- .. ++ //
// *= :* :% #- //
// *- % -# %: //
// *- *- :#. #- //
//////////////////////////////////////////////////////////////////////////////////////////////
import "./ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./WithdrawFairly.sol";
contract NeckVille is ERC721, Ownable, WithdrawFairly {
uint256 public constant MAX_SUPPLY = 5555;
uint256 public constant RESERVE_NFT = 150;
uint256 public constant START_AT = 1;
uint16 private constant HASH_SIGN = 33541;
struct Sale {
uint64 start;
uint64 end;
uint16 maxPerWallet;
uint8 maxPerTx;
uint256 price;
bool paused;
}
mapping(string => Sale) public sales;
mapping(string => mapping(address => uint16)) balanceSale;
mapping(uint256 => bool) private signatureIds;
address public signAddress;
string public baseTokenURI;
uint16 public mintTracked;
uint16 public burnedTracker;
event EventSaleChange(string _name, Sale sale);
event EventMint(address _to, uint256 _tokens);
constructor(string memory baseURI, address _signAddress) ERC721("NeckVille", "NV") WithdrawFairly() {
}
//******************************************************//
// Modifier //
//******************************************************//
modifier isOpen(string memory _name, uint16 _count){
require(saleIsOpen(_name), "Sale not open");
require(_count <= sales[_name].maxPerTx, "Max per tx limit");
require(mintTracked + _count <= MAX_SUPPLY, "Sold out!");
require(msg.value >= price(_name, _count), "Value limit");
if (sales[_name].maxPerWallet > 0) {
require(<FILL_ME>)
balanceSale[_name][_msgSender()] += _count;
}
_;
}
//******************************************************//
// Sales logic //
//******************************************************//
function setSale(string memory _name, Sale memory _sale) public onlyOwner {
}
function pauseSale(string memory _name, bool _pause) public onlyOwner {
}
function saleIsOpen(string memory _name) public view returns (bool){
}
function saleCurrent() public view returns (string memory){
}
//******************************************************//
// Mint //
//******************************************************//
function preSalesMint(string memory _name, uint16 _count, uint256 _signatureId, bytes memory _signature) public payable isOpen(_name, _count) {
}
function publicSalesMint(uint16 _count) public payable isOpen("PUBLIC", _count) {
}
function checkSignature(address _wallet, string memory _name, uint256 _count, uint256 _signatureId, bytes memory _signature) public pure returns (address){
}
function _mintTokens(uint16 _count) private {
}
function reserve(uint16 _count) public onlyOwner {
}
//******************************************************//
// Base //
//******************************************************//
function totalSupply() public view returns (uint256) {
}
function price(string memory _name, uint256 _count) public view returns (uint256){
}
function _baseURI() internal view virtual override returns (string memory) {
}
function minted(string memory _name, address _wallet) public view returns (uint16){
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
//******************************************************//
// Setters //
//******************************************************//
function setSignAddress(address _signAddress) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
//******************************************************//
// Burn //
//******************************************************//
function burn(uint256 _tokenId) public virtual {
}
}
| balanceSale[_name][_msgSender()]+_count<=sales[_name].maxPerWallet,"Max per wallet limit" | 289,788 | balanceSale[_name][_msgSender()]+_count<=sales[_name].maxPerWallet |
"Signature already used" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// @author: miinded.com
//////////////////////////////////////////////////////////////////////////////////////////////
// //
// //
// //
// //
// //
// :-===-: //
// :++=:. .:=++: //
// -*- =*. //
// *= .#- //
// #: #: //
// ++ %. //
// %. =:-# //
// - .: @@.#: //
// =: *@= .- -# //
// .+%==- +: -++: @. //
// :*=. .. :# *- //
// :# .*+-. -+. =+ //
// %. %. -=+*. -# //
// %: =*: :#: :# //
// :#. .*: :*+=++. .% //
// =+++**= .* //
// %. . //
// :# . //
// #- == //
// .% *- //
// *= %: //
// .% @ //
// += @ //
// @ //
// #: @ //
// .+%=- @ //
// +*-. :+= %+++=. //
// -#. *= .*= //
// -# *= //
// .% % %. //
// :: #- -* //
// = -+ :# %: //
// . :: *: .% //
// == :- .. ++ //
// *= :* :% #- //
// *- % -# %: //
// *- *- :#. #- //
//////////////////////////////////////////////////////////////////////////////////////////////
import "./ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./WithdrawFairly.sol";
contract NeckVille is ERC721, Ownable, WithdrawFairly {
uint256 public constant MAX_SUPPLY = 5555;
uint256 public constant RESERVE_NFT = 150;
uint256 public constant START_AT = 1;
uint16 private constant HASH_SIGN = 33541;
struct Sale {
uint64 start;
uint64 end;
uint16 maxPerWallet;
uint8 maxPerTx;
uint256 price;
bool paused;
}
mapping(string => Sale) public sales;
mapping(string => mapping(address => uint16)) balanceSale;
mapping(uint256 => bool) private signatureIds;
address public signAddress;
string public baseTokenURI;
uint16 public mintTracked;
uint16 public burnedTracker;
event EventSaleChange(string _name, Sale sale);
event EventMint(address _to, uint256 _tokens);
constructor(string memory baseURI, address _signAddress) ERC721("NeckVille", "NV") WithdrawFairly() {
}
//******************************************************//
// Modifier //
//******************************************************//
modifier isOpen(string memory _name, uint16 _count){
}
//******************************************************//
// Sales logic //
//******************************************************//
function setSale(string memory _name, Sale memory _sale) public onlyOwner {
}
function pauseSale(string memory _name, bool _pause) public onlyOwner {
}
function saleIsOpen(string memory _name) public view returns (bool){
}
function saleCurrent() public view returns (string memory){
}
//******************************************************//
// Mint //
//******************************************************//
function preSalesMint(string memory _name, uint16 _count, uint256 _signatureId, bytes memory _signature) public payable isOpen(_name, _count) {
require(<FILL_ME>)
signatureIds[_signatureId] = true;
require(checkSignature(_msgSender(), _name, _count, _signatureId, _signature) == signAddress, "Signature error : bad owner");
_mintTokens(_count);
}
function publicSalesMint(uint16 _count) public payable isOpen("PUBLIC", _count) {
}
function checkSignature(address _wallet, string memory _name, uint256 _count, uint256 _signatureId, bytes memory _signature) public pure returns (address){
}
function _mintTokens(uint16 _count) private {
}
function reserve(uint16 _count) public onlyOwner {
}
//******************************************************//
// Base //
//******************************************************//
function totalSupply() public view returns (uint256) {
}
function price(string memory _name, uint256 _count) public view returns (uint256){
}
function _baseURI() internal view virtual override returns (string memory) {
}
function minted(string memory _name, address _wallet) public view returns (uint16){
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
//******************************************************//
// Setters //
//******************************************************//
function setSignAddress(address _signAddress) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
//******************************************************//
// Burn //
//******************************************************//
function burn(uint256 _tokenId) public virtual {
}
}
| signatureIds[_signatureId]==false,"Signature already used" | 289,788 | signatureIds[_signatureId]==false |
"Signature error : bad owner" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// @author: miinded.com
//////////////////////////////////////////////////////////////////////////////////////////////
// //
// //
// //
// //
// //
// :-===-: //
// :++=:. .:=++: //
// -*- =*. //
// *= .#- //
// #: #: //
// ++ %. //
// %. =:-# //
// - .: @@.#: //
// =: *@= .- -# //
// .+%==- +: -++: @. //
// :*=. .. :# *- //
// :# .*+-. -+. =+ //
// %. %. -=+*. -# //
// %: =*: :#: :# //
// :#. .*: :*+=++. .% //
// =+++**= .* //
// %. . //
// :# . //
// #- == //
// .% *- //
// *= %: //
// .% @ //
// += @ //
// @ //
// #: @ //
// .+%=- @ //
// +*-. :+= %+++=. //
// -#. *= .*= //
// -# *= //
// .% % %. //
// :: #- -* //
// = -+ :# %: //
// . :: *: .% //
// == :- .. ++ //
// *= :* :% #- //
// *- % -# %: //
// *- *- :#. #- //
//////////////////////////////////////////////////////////////////////////////////////////////
import "./ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./WithdrawFairly.sol";
contract NeckVille is ERC721, Ownable, WithdrawFairly {
uint256 public constant MAX_SUPPLY = 5555;
uint256 public constant RESERVE_NFT = 150;
uint256 public constant START_AT = 1;
uint16 private constant HASH_SIGN = 33541;
struct Sale {
uint64 start;
uint64 end;
uint16 maxPerWallet;
uint8 maxPerTx;
uint256 price;
bool paused;
}
mapping(string => Sale) public sales;
mapping(string => mapping(address => uint16)) balanceSale;
mapping(uint256 => bool) private signatureIds;
address public signAddress;
string public baseTokenURI;
uint16 public mintTracked;
uint16 public burnedTracker;
event EventSaleChange(string _name, Sale sale);
event EventMint(address _to, uint256 _tokens);
constructor(string memory baseURI, address _signAddress) ERC721("NeckVille", "NV") WithdrawFairly() {
}
//******************************************************//
// Modifier //
//******************************************************//
modifier isOpen(string memory _name, uint16 _count){
}
//******************************************************//
// Sales logic //
//******************************************************//
function setSale(string memory _name, Sale memory _sale) public onlyOwner {
}
function pauseSale(string memory _name, bool _pause) public onlyOwner {
}
function saleIsOpen(string memory _name) public view returns (bool){
}
function saleCurrent() public view returns (string memory){
}
//******************************************************//
// Mint //
//******************************************************//
function preSalesMint(string memory _name, uint16 _count, uint256 _signatureId, bytes memory _signature) public payable isOpen(_name, _count) {
require(signatureIds[_signatureId] == false, "Signature already used");
signatureIds[_signatureId] = true;
require(<FILL_ME>)
_mintTokens(_count);
}
function publicSalesMint(uint16 _count) public payable isOpen("PUBLIC", _count) {
}
function checkSignature(address _wallet, string memory _name, uint256 _count, uint256 _signatureId, bytes memory _signature) public pure returns (address){
}
function _mintTokens(uint16 _count) private {
}
function reserve(uint16 _count) public onlyOwner {
}
//******************************************************//
// Base //
//******************************************************//
function totalSupply() public view returns (uint256) {
}
function price(string memory _name, uint256 _count) public view returns (uint256){
}
function _baseURI() internal view virtual override returns (string memory) {
}
function minted(string memory _name, address _wallet) public view returns (uint16){
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
//******************************************************//
// Setters //
//******************************************************//
function setSignAddress(address _signAddress) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
//******************************************************//
// Burn //
//******************************************************//
function burn(uint256 _tokenId) public virtual {
}
}
| checkSignature(_msgSender(),_name,_count,_signatureId,_signature)==signAddress,"Signature error : bad owner" | 289,788 | checkSignature(_msgSender(),_name,_count,_signatureId,_signature)==signAddress |
"Exceeded RESERVE_NFT" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
// @author: miinded.com
//////////////////////////////////////////////////////////////////////////////////////////////
// //
// //
// //
// //
// //
// :-===-: //
// :++=:. .:=++: //
// -*- =*. //
// *= .#- //
// #: #: //
// ++ %. //
// %. =:-# //
// - .: @@.#: //
// =: *@= .- -# //
// .+%==- +: -++: @. //
// :*=. .. :# *- //
// :# .*+-. -+. =+ //
// %. %. -=+*. -# //
// %: =*: :#: :# //
// :#. .*: :*+=++. .% //
// =+++**= .* //
// %. . //
// :# . //
// #- == //
// .% *- //
// *= %: //
// .% @ //
// += @ //
// @ //
// #: @ //
// .+%=- @ //
// +*-. :+= %+++=. //
// -#. *= .*= //
// -# *= //
// .% % %. //
// :: #- -* //
// = -+ :# %: //
// . :: *: .% //
// == :- .. ++ //
// *= :* :% #- //
// *- % -# %: //
// *- *- :#. #- //
//////////////////////////////////////////////////////////////////////////////////////////////
import "./ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./WithdrawFairly.sol";
contract NeckVille is ERC721, Ownable, WithdrawFairly {
uint256 public constant MAX_SUPPLY = 5555;
uint256 public constant RESERVE_NFT = 150;
uint256 public constant START_AT = 1;
uint16 private constant HASH_SIGN = 33541;
struct Sale {
uint64 start;
uint64 end;
uint16 maxPerWallet;
uint8 maxPerTx;
uint256 price;
bool paused;
}
mapping(string => Sale) public sales;
mapping(string => mapping(address => uint16)) balanceSale;
mapping(uint256 => bool) private signatureIds;
address public signAddress;
string public baseTokenURI;
uint16 public mintTracked;
uint16 public burnedTracker;
event EventSaleChange(string _name, Sale sale);
event EventMint(address _to, uint256 _tokens);
constructor(string memory baseURI, address _signAddress) ERC721("NeckVille", "NV") WithdrawFairly() {
}
//******************************************************//
// Modifier //
//******************************************************//
modifier isOpen(string memory _name, uint16 _count){
}
//******************************************************//
// Sales logic //
//******************************************************//
function setSale(string memory _name, Sale memory _sale) public onlyOwner {
}
function pauseSale(string memory _name, bool _pause) public onlyOwner {
}
function saleIsOpen(string memory _name) public view returns (bool){
}
function saleCurrent() public view returns (string memory){
}
//******************************************************//
// Mint //
//******************************************************//
function preSalesMint(string memory _name, uint16 _count, uint256 _signatureId, bytes memory _signature) public payable isOpen(_name, _count) {
}
function publicSalesMint(uint16 _count) public payable isOpen("PUBLIC", _count) {
}
function checkSignature(address _wallet, string memory _name, uint256 _count, uint256 _signatureId, bytes memory _signature) public pure returns (address){
}
function _mintTokens(uint16 _count) private {
}
function reserve(uint16 _count) public onlyOwner {
require(<FILL_ME>)
_mintTokens(_count);
}
//******************************************************//
// Base //
//******************************************************//
function totalSupply() public view returns (uint256) {
}
function price(string memory _name, uint256 _count) public view returns (uint256){
}
function _baseURI() internal view virtual override returns (string memory) {
}
function minted(string memory _name, address _wallet) public view returns (uint16){
}
function walletOfOwner(address _owner) external view returns (uint256[] memory) {
}
//******************************************************//
// Setters //
//******************************************************//
function setSignAddress(address _signAddress) public onlyOwner {
}
function setBaseURI(string memory baseURI) public onlyOwner {
}
//******************************************************//
// Burn //
//******************************************************//
function burn(uint256 _tokenId) public virtual {
}
}
| mintTracked+_count<=RESERVE_NFT,"Exceeded RESERVE_NFT" | 289,788 | mintTracked+_count<=RESERVE_NFT |
"invalid address" | pragma solidity 0.6.12;
contract SakeDrinker {
using SafeMath for uint;
ISakeSwapFactory public factory;
address public sake;
address public uni;
address public owner;
constructor(ISakeSwapFactory _factory, address _sake, address _uni) public {
require(<FILL_ME>)
factory = _factory;
sake = _sake;
uni = _uni;
owner = msg.sender;
}
function convert() public {
}
function _toSAKE(uint amountIn, address to) internal {
}
function setFactory(ISakeSwapFactory _factory) public {
}
}
| address(_factory)!=address(0)&&_sake!=address(0)&&_uni!=address(0),"invalid address" | 289,801 | address(_factory)!=address(0)&&_sake!=address(0)&&_uni!=address(0) |
"Purchase would exceed max supply" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./EnumerableMap.sol";
import "./ERC721Enumerable.sol";
contract FrankiesMansion is ERC721Enumerable, Ownable {
using SafeMath for uint256;
// Token detail
struct FrankieDetail {
uint256 creation;
}
// Events
event TokenMinted(uint256 tokenId, address owner, uint256 creation);
// Token Detail
mapping(uint256 => FrankieDetail) private _frankieDetails;
// Provenance number
string public PROVENANCE = "";
// Max amount of token to purchase per account each time
uint public MAX_PURCHASE = 20;
// Maximum amount of tokens to supply.
uint256 public MAX_TOKENS = 8888;
// Current price.
uint256 public CURRENT_PRICE = 25000000000000000;
// Define if sale is active
bool public saleIsActive = true;
// Base URI
string private baseURI;
/**
* Contract constructor
*/
constructor(string memory name, string memory symbol, string memory _baseUri) ERC721(name, symbol) {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory _provenanceHash) public onlyOwner {
}
/*
* Set max tokens
*/
function setMaxTokens(uint256 _maxTokens) public onlyOwner {
}
/*
* Set max purchase
*/
function setMaxPurchase(uint256 _maxPurchase) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function setSaleState(bool _newState) public onlyOwner {
}
/**
* Set the current token price
*/
function setCurrentPrice(uint256 _currentPrice) public onlyOwner {
}
/**
* Get the token detail
*/
function getFrankieDetail(uint256 _tokenId) public view returns(FrankieDetail memory detail) {
}
/**
* @dev Changes the base URI if we want to move things in the future (Callable by owner only)
*/
function setBaseURI(string memory BaseURI) public onlyOwner {
}
/**
* @dev Base URI for computing {tokenURI}. Empty by default, can be overriden
* in child contracts.
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Withdraw
*/
function withdraw() public onlyOwner {
}
/**
* Reserve tokens
*/
function reserveTokens(uint256 qty) public onlyOwner {
}
/**
* Mint token for owners.
*/
function mintTokens(address[] memory _owners) public onlyOwner {
require(<FILL_ME>)
uint256 creation = block.timestamp;
uint256 tokenId;
for (uint i = 0; i < _owners.length; i++) {
tokenId = totalSupply().add(1);
if (tokenId <= MAX_TOKENS) {
_safeMint(_owners[i], tokenId);
_frankieDetails[tokenId] = FrankieDetail(creation);
emit TokenMinted(tokenId, _owners[i], creation);
}
}
}
/**
* Mint tokens
*/
function mint(uint qty) public payable {
}
/**
* Get tokens owner
*/
function tokensOfOwner(address _owner) external view returns(uint256[] memory) {
}
}
| totalSupply().add(_owners.length)<=MAX_TOKENS,"Purchase would exceed max supply" | 289,825 | totalSupply().add(_owners.length)<=MAX_TOKENS |
"Purchase would exceed max supply" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./EnumerableMap.sol";
import "./ERC721Enumerable.sol";
contract FrankiesMansion is ERC721Enumerable, Ownable {
using SafeMath for uint256;
// Token detail
struct FrankieDetail {
uint256 creation;
}
// Events
event TokenMinted(uint256 tokenId, address owner, uint256 creation);
// Token Detail
mapping(uint256 => FrankieDetail) private _frankieDetails;
// Provenance number
string public PROVENANCE = "";
// Max amount of token to purchase per account each time
uint public MAX_PURCHASE = 20;
// Maximum amount of tokens to supply.
uint256 public MAX_TOKENS = 8888;
// Current price.
uint256 public CURRENT_PRICE = 25000000000000000;
// Define if sale is active
bool public saleIsActive = true;
// Base URI
string private baseURI;
/**
* Contract constructor
*/
constructor(string memory name, string memory symbol, string memory _baseUri) ERC721(name, symbol) {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory _provenanceHash) public onlyOwner {
}
/*
* Set max tokens
*/
function setMaxTokens(uint256 _maxTokens) public onlyOwner {
}
/*
* Set max purchase
*/
function setMaxPurchase(uint256 _maxPurchase) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function setSaleState(bool _newState) public onlyOwner {
}
/**
* Set the current token price
*/
function setCurrentPrice(uint256 _currentPrice) public onlyOwner {
}
/**
* Get the token detail
*/
function getFrankieDetail(uint256 _tokenId) public view returns(FrankieDetail memory detail) {
}
/**
* @dev Changes the base URI if we want to move things in the future (Callable by owner only)
*/
function setBaseURI(string memory BaseURI) public onlyOwner {
}
/**
* @dev Base URI for computing {tokenURI}. Empty by default, can be overriden
* in child contracts.
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Withdraw
*/
function withdraw() public onlyOwner {
}
/**
* Reserve tokens
*/
function reserveTokens(uint256 qty) public onlyOwner {
}
/**
* Mint token for owners.
*/
function mintTokens(address[] memory _owners) public onlyOwner {
}
/**
* Mint tokens
*/
function mint(uint qty) public payable {
require(saleIsActive, "Mint is not available right now");
require(qty <= MAX_PURCHASE, "Can only mint 20 tokens at a time");
require(<FILL_ME>)
require(CURRENT_PRICE.mul(qty) <= msg.value, "Value sent is not correct");
uint256 creation = block.timestamp;
uint tokenId;
for(uint i = 1; i <= qty; i++) {
tokenId = totalSupply().add(1);
if (tokenId <= MAX_TOKENS) {
_safeMint(msg.sender, tokenId);
_frankieDetails[tokenId] = FrankieDetail(creation);
emit TokenMinted(tokenId, msg.sender, creation);
}
}
}
/**
* Get tokens owner
*/
function tokensOfOwner(address _owner) external view returns(uint256[] memory) {
}
}
| totalSupply().add(qty)<=MAX_TOKENS,"Purchase would exceed max supply" | 289,825 | totalSupply().add(qty)<=MAX_TOKENS |
"Value sent is not correct" | //Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./ERC721.sol";
import "./Ownable.sol";
import "./SafeMath.sol";
import "./EnumerableMap.sol";
import "./ERC721Enumerable.sol";
contract FrankiesMansion is ERC721Enumerable, Ownable {
using SafeMath for uint256;
// Token detail
struct FrankieDetail {
uint256 creation;
}
// Events
event TokenMinted(uint256 tokenId, address owner, uint256 creation);
// Token Detail
mapping(uint256 => FrankieDetail) private _frankieDetails;
// Provenance number
string public PROVENANCE = "";
// Max amount of token to purchase per account each time
uint public MAX_PURCHASE = 20;
// Maximum amount of tokens to supply.
uint256 public MAX_TOKENS = 8888;
// Current price.
uint256 public CURRENT_PRICE = 25000000000000000;
// Define if sale is active
bool public saleIsActive = true;
// Base URI
string private baseURI;
/**
* Contract constructor
*/
constructor(string memory name, string memory symbol, string memory _baseUri) ERC721(name, symbol) {
}
/*
* Set provenance once it's calculated
*/
function setProvenanceHash(string memory _provenanceHash) public onlyOwner {
}
/*
* Set max tokens
*/
function setMaxTokens(uint256 _maxTokens) public onlyOwner {
}
/*
* Set max purchase
*/
function setMaxPurchase(uint256 _maxPurchase) public onlyOwner {
}
/*
* Pause sale if active, make active if paused
*/
function setSaleState(bool _newState) public onlyOwner {
}
/**
* Set the current token price
*/
function setCurrentPrice(uint256 _currentPrice) public onlyOwner {
}
/**
* Get the token detail
*/
function getFrankieDetail(uint256 _tokenId) public view returns(FrankieDetail memory detail) {
}
/**
* @dev Changes the base URI if we want to move things in the future (Callable by owner only)
*/
function setBaseURI(string memory BaseURI) public onlyOwner {
}
/**
* @dev Base URI for computing {tokenURI}. Empty by default, can be overriden
* in child contracts.
*/
function _baseURI() internal view virtual override returns (string memory) {
}
/**
* Withdraw
*/
function withdraw() public onlyOwner {
}
/**
* Reserve tokens
*/
function reserveTokens(uint256 qty) public onlyOwner {
}
/**
* Mint token for owners.
*/
function mintTokens(address[] memory _owners) public onlyOwner {
}
/**
* Mint tokens
*/
function mint(uint qty) public payable {
require(saleIsActive, "Mint is not available right now");
require(qty <= MAX_PURCHASE, "Can only mint 20 tokens at a time");
require(totalSupply().add(qty) <= MAX_TOKENS, "Purchase would exceed max supply");
require(<FILL_ME>)
uint256 creation = block.timestamp;
uint tokenId;
for(uint i = 1; i <= qty; i++) {
tokenId = totalSupply().add(1);
if (tokenId <= MAX_TOKENS) {
_safeMint(msg.sender, tokenId);
_frankieDetails[tokenId] = FrankieDetail(creation);
emit TokenMinted(tokenId, msg.sender, creation);
}
}
}
/**
* Get tokens owner
*/
function tokensOfOwner(address _owner) external view returns(uint256[] memory) {
}
}
| CURRENT_PRICE.mul(qty)<=msg.value,"Value sent is not correct" | 289,825 | CURRENT_PRICE.mul(qty)<=msg.value |
"Not enough WEI sent" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
contract Mintify is ERC721, Ownable {
bool is_paused = false;
uint16 max_per_user = 50;
uint16 nextTokenId = 1;
uint16 max_supply = 2222;
uint256 mintPrice = 0;
bool public IS_PRESALE_ACTIVE = true;
string private baseURI = "https://ipfs.io/ipfs/QmUqSSZYxYG7YW6tUBQgbr4oXqTa4aeRD38h7W7vdUNoWK";
mapping(address => bool) public whitelisted;
// Constructor
constructor() ERC721("Mintify", "MNTFY") {
}
// Mint
function mint(address to, uint16 numberTokens) public payable {
if ( msg.sender != owner() ) {
require(<FILL_ME>)
if (IS_PRESALE_ACTIVE) {
require(whitelisted[to], "Address not whitelisted");
}
require((balanceOf(to) + numberTokens - 1) < max_per_user, "You've reached your mint limit");
}
require(!is_paused, "Minting is paused. Check back later.");
require((numberTokens + nextTokenId - 2) < max_supply, "Your request will exceed max supply. Please try a smaller number");
for (uint i=0; i < numberTokens; i++) {
_safeMint(to, nextTokenId);
nextTokenId++;
}
}
// Sets BaseURI
function setBaseURI(string calldata _baseURI ) public onlyOwner {
}
// Gets total supply
function totalSupply() public view returns(uint) {
}
// Withdraw Balance to Address
function withdraw(address payable _to) public onlyOwner {
}
// Sets mint price
function setMintPrice(uint256 _mintprice) public onlyOwner {
}
// Sets max supply
function setMaxSupply(uint16 _max_supply) public onlyOwner {
}
// Sets max per user
function setMaxPerUser(uint16 _max_per_user) public onlyOwner {
}
// Sets paused state
function setPaused(bool _is_paused) public onlyOwner {
}
// Sets presale state
function setPresale(bool _is_presale) public onlyOwner {
}
// Gets token URI
function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) {
}
// Whitelist address
function whitelistUser(address _user) external onlyOwner {
}
// Remove from whitelist
function removeWhitelistUser(address _user) external onlyOwner {
}
// Bulk whitelist addresses
function bulkWhitelist(address[] memory addresses) public onlyOwner {
}
}
| msg.value+1>(mintPrice*numberTokens),"Not enough WEI sent" | 289,888 | msg.value+1>(mintPrice*numberTokens) |
"Address not whitelisted" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
contract Mintify is ERC721, Ownable {
bool is_paused = false;
uint16 max_per_user = 50;
uint16 nextTokenId = 1;
uint16 max_supply = 2222;
uint256 mintPrice = 0;
bool public IS_PRESALE_ACTIVE = true;
string private baseURI = "https://ipfs.io/ipfs/QmUqSSZYxYG7YW6tUBQgbr4oXqTa4aeRD38h7W7vdUNoWK";
mapping(address => bool) public whitelisted;
// Constructor
constructor() ERC721("Mintify", "MNTFY") {
}
// Mint
function mint(address to, uint16 numberTokens) public payable {
if ( msg.sender != owner() ) {
require(msg.value + 1 > (mintPrice * numberTokens), "Not enough WEI sent");
if (IS_PRESALE_ACTIVE) {
require(<FILL_ME>)
}
require((balanceOf(to) + numberTokens - 1) < max_per_user, "You've reached your mint limit");
}
require(!is_paused, "Minting is paused. Check back later.");
require((numberTokens + nextTokenId - 2) < max_supply, "Your request will exceed max supply. Please try a smaller number");
for (uint i=0; i < numberTokens; i++) {
_safeMint(to, nextTokenId);
nextTokenId++;
}
}
// Sets BaseURI
function setBaseURI(string calldata _baseURI ) public onlyOwner {
}
// Gets total supply
function totalSupply() public view returns(uint) {
}
// Withdraw Balance to Address
function withdraw(address payable _to) public onlyOwner {
}
// Sets mint price
function setMintPrice(uint256 _mintprice) public onlyOwner {
}
// Sets max supply
function setMaxSupply(uint16 _max_supply) public onlyOwner {
}
// Sets max per user
function setMaxPerUser(uint16 _max_per_user) public onlyOwner {
}
// Sets paused state
function setPaused(bool _is_paused) public onlyOwner {
}
// Sets presale state
function setPresale(bool _is_presale) public onlyOwner {
}
// Gets token URI
function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) {
}
// Whitelist address
function whitelistUser(address _user) external onlyOwner {
}
// Remove from whitelist
function removeWhitelistUser(address _user) external onlyOwner {
}
// Bulk whitelist addresses
function bulkWhitelist(address[] memory addresses) public onlyOwner {
}
}
| whitelisted[to],"Address not whitelisted" | 289,888 | whitelisted[to] |
"You've reached your mint limit" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
contract Mintify is ERC721, Ownable {
bool is_paused = false;
uint16 max_per_user = 50;
uint16 nextTokenId = 1;
uint16 max_supply = 2222;
uint256 mintPrice = 0;
bool public IS_PRESALE_ACTIVE = true;
string private baseURI = "https://ipfs.io/ipfs/QmUqSSZYxYG7YW6tUBQgbr4oXqTa4aeRD38h7W7vdUNoWK";
mapping(address => bool) public whitelisted;
// Constructor
constructor() ERC721("Mintify", "MNTFY") {
}
// Mint
function mint(address to, uint16 numberTokens) public payable {
if ( msg.sender != owner() ) {
require(msg.value + 1 > (mintPrice * numberTokens), "Not enough WEI sent");
if (IS_PRESALE_ACTIVE) {
require(whitelisted[to], "Address not whitelisted");
}
require(<FILL_ME>)
}
require(!is_paused, "Minting is paused. Check back later.");
require((numberTokens + nextTokenId - 2) < max_supply, "Your request will exceed max supply. Please try a smaller number");
for (uint i=0; i < numberTokens; i++) {
_safeMint(to, nextTokenId);
nextTokenId++;
}
}
// Sets BaseURI
function setBaseURI(string calldata _baseURI ) public onlyOwner {
}
// Gets total supply
function totalSupply() public view returns(uint) {
}
// Withdraw Balance to Address
function withdraw(address payable _to) public onlyOwner {
}
// Sets mint price
function setMintPrice(uint256 _mintprice) public onlyOwner {
}
// Sets max supply
function setMaxSupply(uint16 _max_supply) public onlyOwner {
}
// Sets max per user
function setMaxPerUser(uint16 _max_per_user) public onlyOwner {
}
// Sets paused state
function setPaused(bool _is_paused) public onlyOwner {
}
// Sets presale state
function setPresale(bool _is_presale) public onlyOwner {
}
// Gets token URI
function tokenURI(uint256 tokenId) public view virtual override(ERC721) returns (string memory) {
}
// Whitelist address
function whitelistUser(address _user) external onlyOwner {
}
// Remove from whitelist
function removeWhitelistUser(address _user) external onlyOwner {
}
// Bulk whitelist addresses
function bulkWhitelist(address[] memory addresses) public onlyOwner {
}
}
| (balanceOf(to)+numberTokens-1)<max_per_user,"You've reached your mint limit" | 289,888 | (balanceOf(to)+numberTokens-1)<max_per_user |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.