comment
stringlengths 1
211
β | input
stringlengths 155
20k
| label
stringlengths 4
1k
| original_idx
int64 203
514k
| predicate
stringlengths 1
1k
|
---|---|---|---|---|
"Mint would exceed team reserve" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/access/Ownable.sol";
import "./ERC721AQueryable.sol";
/*
RETROOOOTOWN
RETROOOOOOOOTOWN OOO
OOOOOO OOOOO OOOO
OOOOOO OOOOO OOOTWONOOO ORETROOOTOWNO OOO OOO ORETRO
OOOOOOO OOOOOO RETROOOOOOTOWN OOOOOBEARDOOOO OOOO OOOOO RETROOOOTOWN
OBUZZKILLEROO OOOOOO OOOOOO OOOO OOFREAKOO ORETROO OCARO
OOOOO OOOOO OOTOTHEMOONOO OOOO OOOOOOO OOOOOO OOOOO
OOOO OOOOOOO OOOOO OOOO OOOOO OOOOO OOOOO
OOOOO OOOLANDOO OOOO OOOO OOOO OO OOOOO OOOOO OOOOO
OOOOO OOOEVILOO OOOCHICKOO OOOOOO OOOOO OOZOMBIEOOO
OOOOO OOOOOOO OOOOO OOO OOOOOO
*/
contract RetrooooTown is ERC721AQueryable, Ownable {
using Strings for uint256;
uint256 public constant MAX_SUPPLY = 7777;
uint256 public constant MAX_FREE_MINT_NUM = 1500;
uint256 public constant MAX_PUBLIC_MINT_PER_WALLET = 5;
uint256 public constant TEAM_RESERVE_NUM = 500;
uint256 public constant PRICE = 0.005 ether;
bool public publicMintActive;
bool public freeMintActive;
uint256 public freeMintNum;
uint256 public teamMintNum;
mapping(address => uint256) public freeMinted;
string private _matadataURI;
constructor() ERC721A("RetrooooTown", "RT") {
}
modifier callerIsUser() {
}
modifier maxSupplyCompliance(uint256 num) {
}
modifier publicMintCompliance(uint256 num) {
}
modifier freeMintCompliance() {
}
modifier teamMintCompliance(uint256 num) {
require(<FILL_ME>)
_;
}
function _startTokenId() internal pure override returns (uint) {
}
function tokenURI(uint256 tokenId)
public
view
override
returns (string memory)
{
}
function numberMinted(address owner) public view returns (uint256) {
}
function contractURI() public pure returns (string memory) {
}
function mint(uint256 num)
external
payable
maxSupplyCompliance(num)
publicMintCompliance(num)
callerIsUser
{
}
function freeMint()
external
maxSupplyCompliance(1)
freeMintCompliance
callerIsUser
{
}
function teamMint(uint256 num, address to)
external
maxSupplyCompliance(num)
teamMintCompliance(num)
onlyOwner
{
}
function flipPublicMintActive() external onlyOwner {
}
function flipFreeMintActive() external onlyOwner {
}
function setMetadataURI(string calldata metadataURI) external onlyOwner {
}
function withdraw(address to) external onlyOwner {
}
}
| teamMintNum+num<=TEAM_RESERVE_NUM,"Mint would exceed team reserve" | 490,645 | teamMintNum+num<=TEAM_RESERVE_NUM |
"caller is not the owner of this tokenID" | //SPDX-License-Identifier: Unlicense
contract KryptoriaWeapons is ERC721A, BaseTokenURI {
using Strings for uint256;
// structure for staking details
struct StakeDetails {
uint16 tokenId;
bool isStaked;
uint256 current;
uint256 total;
}
// mapping for tokenId to staking start time (0 means not staking)
mapping(uint256 => uint256) private _stakingStartTime;
// mapping for tokenId to total staking time
mapping(uint16 => uint256) private _totalStakingTime;
// mapping for tokenId to token URI
mapping(uint256 => string) private _tokenURIs;
// mapping to track weapon claim against citizen tokenId
mapping(uint16 => bool) private _weaponAllottedForCitizen;
// mapping to track weapon claim against citizen tokenId
mapping(uint16 => bool) private _weaponAllottedForLand;
// flag to control staking on/off
bool private _stakingOpen = false;
// flag to control weapon claim on/off
bool private _isClaimActive = false;
/// flag to control weapon nfts reveal
bool private _revealed = false;
// max supply of an weapon nfts
uint16 internal _maxSupply;
// address to validate signature for update token URI
address private _platformAddress;
// metadata CID of not revealed URI
string private _notRevealedURI;
// citizen contract interface
KryptoriaAlphaCitizensInterface public _alphaCitizen;
// land contract interface
KryptoriaLandInterface public _land;
constructor(address platformAddress_, string memory notRevealURI, uint16 maxSupply_, address alphaCitizen, address land)
ERC721A("Kryptoria: Weapons", "KRYPTORIA")
BaseTokenURI("")
{
}
// EVENTS
event StakeWeapon(uint16[] tokenIDs, address indexed owner, uint256 time);
event UnstakeWeapon(uint16[] tokenIDs, address indexed owner, uint256 time);
event UpdateWeaponURI(uint16 tokenID, string indexed uri, uint256 time);
event Reveal(uint256 time);
event ToggleStaking(bool value, uint256 time);
event ToggleClaimWeapon(bool value, uint256 time);
event TokenMinted(address to, uint16[] citizenIds, uint16[] landIds, uint256 userMinted, uint256 totalMinted);
// MODIFIERS
modifier claimIsOpen {
}
// START OF STAKING
function toggleStaking()
external
onlyOwner
{
}
function stake(uint16[] calldata tokenIDs)
external
{
}
function unstake(uint16[] calldata tokenIDs)
external
{
}
function getStakingTime(uint16 tokenID)
external
view
returns (bool isStaked, uint256 current, uint256 total)
{
}
function getStakingStatus(uint16[] calldata tokenIDs)
external
view
returns (StakeDetails[] memory)
{
}
// START Update Metadata URI
function updateTokenURI(uint16 tokenID, string memory uri, bytes memory sig)
external
{
}
function tokenURI(uint256 tokenID)
public
view
override
returns (string memory)
{
}
function isValidURI(string memory word, bytes memory sig)
internal
view
returns (bool)
{
}
function recoverSigner(bytes32 message, bytes memory sig)
internal
pure
returns (address)
{
}
function splitSignature(bytes memory sig)
internal
pure
returns (uint8, bytes32, bytes32)
{
}
function _baseURI()
internal
view
override(BaseTokenURI, ERC721A)
returns (string memory)
{
}
// only owner functions
function setPlatformAddress(address platformAddress_)
public
onlyOwner
{
}
function setNotRevealedURI(string memory notRevealedURI_)
external
onlyOwner
{
}
function maxSupply()
external
view
returns (uint16)
{
}
function toggleClaim()
external
onlyOwner
{
}
function reveal()
external
onlyOwner
{
}
function getCitizenClaimStatus(uint16[] calldata tokenIds)
external
view
returns (bool[] memory)
{
}
function getLandClaimStatus(uint16[] calldata tokenIds)
external
view
returns (bool[] memory)
{
}
// minting function
function claimWeapon(uint16[] calldata citizenTokenIds, uint16[] calldata landTokenIds)
external
claimIsOpen
{
require(citizenTokenIds.length > 0 && landTokenIds.length > 0, "land and citizen tokenId should be there");
require(citizenTokenIds.length == landTokenIds.length, "no of citizen and land should be equal");
require(msg.sender == tx.origin, "contracts cannot mint this contract");
require(totalSupply() + citizenTokenIds.length < _maxSupply, "platform reached limit of minting");
for(uint8 i = 0; i < citizenTokenIds.length; i++) {
require(<FILL_ME>)
require(!_weaponAllottedForCitizen[citizenTokenIds[i]] && !_weaponAllottedForLand[landTokenIds[i]], "weapon has already claimed");
_weaponAllottedForCitizen[citizenTokenIds[i]] = true;
_weaponAllottedForLand[landTokenIds[i]] = true;
}
_safeMint(msg.sender, citizenTokenIds.length);
emit TokenMinted(msg.sender, citizenTokenIds, landTokenIds, _numberMinted(msg.sender), totalSupply());
}
// onlyOwner function to claim weapon which are unclaimed by owners
function claimByOwner(uint16[] calldata citizenTokenIds, uint16[] calldata landTokenIds)
external
onlyOwner
{
}
function transferFrom(address from, address to, uint256 tokenID)
public
override
{
}
function safeTransferFrom(address from, address to, uint256 tokenID, bytes memory _data)
public
virtual
override
{
}
function approve(address to, uint256 tokenId)
public
virtual
override
{
}
function isStakingOpen() external view returns (bool) {
}
function isClaimActive() external view returns (bool) {
}
function isRevealed() external view returns (bool) {
}
function platformAddress() external view returns (address) {
}
function notRevealedURI() external view returns (string memory) {
}
}
| _alphaCitizen.ownerOf(citizenTokenIds[i])==msg.sender&&_land.ownerOf(landTokenIds[i])==msg.sender,"caller is not the owner of this tokenID" | 490,805 | _alphaCitizen.ownerOf(citizenTokenIds[i])==msg.sender&&_land.ownerOf(landTokenIds[i])==msg.sender |
"weapon has already claimed" | //SPDX-License-Identifier: Unlicense
contract KryptoriaWeapons is ERC721A, BaseTokenURI {
using Strings for uint256;
// structure for staking details
struct StakeDetails {
uint16 tokenId;
bool isStaked;
uint256 current;
uint256 total;
}
// mapping for tokenId to staking start time (0 means not staking)
mapping(uint256 => uint256) private _stakingStartTime;
// mapping for tokenId to total staking time
mapping(uint16 => uint256) private _totalStakingTime;
// mapping for tokenId to token URI
mapping(uint256 => string) private _tokenURIs;
// mapping to track weapon claim against citizen tokenId
mapping(uint16 => bool) private _weaponAllottedForCitizen;
// mapping to track weapon claim against citizen tokenId
mapping(uint16 => bool) private _weaponAllottedForLand;
// flag to control staking on/off
bool private _stakingOpen = false;
// flag to control weapon claim on/off
bool private _isClaimActive = false;
/// flag to control weapon nfts reveal
bool private _revealed = false;
// max supply of an weapon nfts
uint16 internal _maxSupply;
// address to validate signature for update token URI
address private _platformAddress;
// metadata CID of not revealed URI
string private _notRevealedURI;
// citizen contract interface
KryptoriaAlphaCitizensInterface public _alphaCitizen;
// land contract interface
KryptoriaLandInterface public _land;
constructor(address platformAddress_, string memory notRevealURI, uint16 maxSupply_, address alphaCitizen, address land)
ERC721A("Kryptoria: Weapons", "KRYPTORIA")
BaseTokenURI("")
{
}
// EVENTS
event StakeWeapon(uint16[] tokenIDs, address indexed owner, uint256 time);
event UnstakeWeapon(uint16[] tokenIDs, address indexed owner, uint256 time);
event UpdateWeaponURI(uint16 tokenID, string indexed uri, uint256 time);
event Reveal(uint256 time);
event ToggleStaking(bool value, uint256 time);
event ToggleClaimWeapon(bool value, uint256 time);
event TokenMinted(address to, uint16[] citizenIds, uint16[] landIds, uint256 userMinted, uint256 totalMinted);
// MODIFIERS
modifier claimIsOpen {
}
// START OF STAKING
function toggleStaking()
external
onlyOwner
{
}
function stake(uint16[] calldata tokenIDs)
external
{
}
function unstake(uint16[] calldata tokenIDs)
external
{
}
function getStakingTime(uint16 tokenID)
external
view
returns (bool isStaked, uint256 current, uint256 total)
{
}
function getStakingStatus(uint16[] calldata tokenIDs)
external
view
returns (StakeDetails[] memory)
{
}
// START Update Metadata URI
function updateTokenURI(uint16 tokenID, string memory uri, bytes memory sig)
external
{
}
function tokenURI(uint256 tokenID)
public
view
override
returns (string memory)
{
}
function isValidURI(string memory word, bytes memory sig)
internal
view
returns (bool)
{
}
function recoverSigner(bytes32 message, bytes memory sig)
internal
pure
returns (address)
{
}
function splitSignature(bytes memory sig)
internal
pure
returns (uint8, bytes32, bytes32)
{
}
function _baseURI()
internal
view
override(BaseTokenURI, ERC721A)
returns (string memory)
{
}
// only owner functions
function setPlatformAddress(address platformAddress_)
public
onlyOwner
{
}
function setNotRevealedURI(string memory notRevealedURI_)
external
onlyOwner
{
}
function maxSupply()
external
view
returns (uint16)
{
}
function toggleClaim()
external
onlyOwner
{
}
function reveal()
external
onlyOwner
{
}
function getCitizenClaimStatus(uint16[] calldata tokenIds)
external
view
returns (bool[] memory)
{
}
function getLandClaimStatus(uint16[] calldata tokenIds)
external
view
returns (bool[] memory)
{
}
// minting function
function claimWeapon(uint16[] calldata citizenTokenIds, uint16[] calldata landTokenIds)
external
claimIsOpen
{
require(citizenTokenIds.length > 0 && landTokenIds.length > 0, "land and citizen tokenId should be there");
require(citizenTokenIds.length == landTokenIds.length, "no of citizen and land should be equal");
require(msg.sender == tx.origin, "contracts cannot mint this contract");
require(totalSupply() + citizenTokenIds.length < _maxSupply, "platform reached limit of minting");
for(uint8 i = 0; i < citizenTokenIds.length; i++) {
require(_alphaCitizen.ownerOf(citizenTokenIds[i]) == msg.sender && _land.ownerOf(landTokenIds[i]) == msg.sender, "caller is not the owner of this tokenID");
require(<FILL_ME>)
_weaponAllottedForCitizen[citizenTokenIds[i]] = true;
_weaponAllottedForLand[landTokenIds[i]] = true;
}
_safeMint(msg.sender, citizenTokenIds.length);
emit TokenMinted(msg.sender, citizenTokenIds, landTokenIds, _numberMinted(msg.sender), totalSupply());
}
// onlyOwner function to claim weapon which are unclaimed by owners
function claimByOwner(uint16[] calldata citizenTokenIds, uint16[] calldata landTokenIds)
external
onlyOwner
{
}
function transferFrom(address from, address to, uint256 tokenID)
public
override
{
}
function safeTransferFrom(address from, address to, uint256 tokenID, bytes memory _data)
public
virtual
override
{
}
function approve(address to, uint256 tokenId)
public
virtual
override
{
}
function isStakingOpen() external view returns (bool) {
}
function isClaimActive() external view returns (bool) {
}
function isRevealed() external view returns (bool) {
}
function platformAddress() external view returns (address) {
}
function notRevealedURI() external view returns (string memory) {
}
}
| !_weaponAllottedForCitizen[citizenTokenIds[i]]&&!_weaponAllottedForLand[landTokenIds[i]],"weapon has already claimed" | 490,805 | !_weaponAllottedForCitizen[citizenTokenIds[i]]&&!_weaponAllottedForLand[landTokenIds[i]] |
"not eligible for X holder mint" | /*
ββββββ βββββββ βββββββ ββββββββ βββββββ βββ βββ
ββββββββββββββββββββββββββββββββββββββββββ ββββ ββββ
βββββββββββ ββββββ βββββββββ βββ ββββββββββββββββ
βββββββββββ ββββββ βββββββββ βββ βββββββββ βββββ
βββ βββββββββββββββββββββββ βββββββββ βββ
βββ ββββββββββ βββββββ βββ βββββββ βββ
Developer: BR33D
Artist: JC-X */
pragma solidity ^0.8.0;
interface MintPass {
function balanceOf(address owner) external view returns (uint256);
}
contract AdofoY is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable maxPerWhitelistMint;
uint256 public immutable amountForDevs;
uint256 public maxPerTxPublic;
address public mintPassedContract = 0xF92cF4a3776bA3F6a3eD96E1974D38Fcf59307f6;
address[] public whitelistedAddresses;
address payable public payments;
bool public hasDevMinted;
address private authority;
uint private key;
struct SaleConfig {
uint32 holdersSaleStartTime;
uint32 whitelistSaleStartTime;
uint32 publicSaleStartTime;
uint64 adofoXMintPrice;
uint64 publicPrice;
}
SaleConfig public saleConfig;
mapping(address => bool) public whitelistMinted;
mapping(address => bool) public adofoXHolderMinted;
mapping(address => bool) public mintPassHolders;
constructor(
uint256 maxBatchSize_,
uint256 maxWhitelistBatch_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 txMaxPer_,
address payments_,
bool devMint_
) ERC721A("Adofo-Y", "ADOFO-Y", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
/*
|----------------------------|
|------ Mint Functions ------|
|----------------------------|
*/
// adofo-x holders mint
function adofoXHoldersMint(uint256 numOfAdofos) external payable callerIsUser {
uint256 price = uint256(saleConfig.adofoXMintPrice);
uint256 saleStart = uint256(saleConfig.holdersSaleStartTime);
require(
block.timestamp >= saleStart &&
saleStart > 0, "holders sale has not begun yet");
require(isWhitelisted(msg.sender), "user is not whitelisted");
require(price != 0, "X holder sale has not begun yet");
require(<FILL_ME>)
require(totalSupply() + numOfAdofos <= collectionSize, "reached max supply");
require(numOfAdofos <= maxPerWhitelistMint, "exceeds mint allowance");
adofoXHolderMinted[msg.sender] = true;
_safeMint(msg.sender, numOfAdofos);
refundIfOver(price);
}
// whitelist mint
function whiteListMint(bytes32 _hash, uint256 numOfAdofos) external payable callerIsUser {
}
// NFT holders mint
function tokenHoldersMint(uint256 numOfAdofos) external payable callerIsUser {
}
// public sale
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
}
/*
|----------------------------|
|---- Contract Functions ----|
|----------------------------|
*/
// returns any extra funds sent by user, protects user from over paying
function refundIfOver(uint256 price) private {
}
/*
|----------------------------|
|------ View Functions ------|
|----------------------------|
*/
// check if public sale has started
function isPublicSaleOn(
uint256 publicPriceWei,
uint256 publicSaleStartTime
) public view returns (bool) {
}
//Retrieves token ids owned of address provided
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
// check if an address is whitelisted
function isWhitelisted(address _user) public view returns (bool) {
}
// check if holder has mint passed NFT
function hasMintPass(address _user) public view returns (bool) {
}
function checkHash(address _minter) internal view returns (bytes32) {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
// metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
/*
|----------------------------|
|----- Owner Functions -----|
|----------------------------|
*/
// setup minting info
function setupSaleInfo(
uint64 adofoXMintPriceWei,
uint64 publicPriceWei,
uint32 holdersSaleStartTime,
uint32 whitelistSaleStartTime,
uint32 publicSaleStartTime
) external onlyOwner {
}
// create list of adofo-x holders addresses
function whitelistUsers(address[] calldata _users) public onlyOwner {
}
// for OG holders/promotions/giveaways
function devMint() external onlyOwner {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function setMintPassContract(address _contract) public onlyOwner {
}
function withdraw() external onlyOwner nonReentrant {
}
function setKey(uint _key) external onlyOwner{
}
function setAuthority(address _address) external onlyOwner{
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
}
| adofoXHolderMinted[msg.sender]==false,"not eligible for X holder mint" | 490,813 | adofoXHolderMinted[msg.sender]==false |
"reached max supply" | /*
ββββββ βββββββ βββββββ ββββββββ βββββββ βββ βββ
ββββββββββββββββββββββββββββββββββββββββββ ββββ ββββ
βββββββββββ ββββββ βββββββββ βββ ββββββββββββββββ
βββββββββββ ββββββ βββββββββ βββ βββββββββ βββββ
βββ βββββββββββββββββββββββ βββββββββ βββ
βββ ββββββββββ βββββββ βββ βββββββ βββ
Developer: BR33D
Artist: JC-X */
pragma solidity ^0.8.0;
interface MintPass {
function balanceOf(address owner) external view returns (uint256);
}
contract AdofoY is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable maxPerWhitelistMint;
uint256 public immutable amountForDevs;
uint256 public maxPerTxPublic;
address public mintPassedContract = 0xF92cF4a3776bA3F6a3eD96E1974D38Fcf59307f6;
address[] public whitelistedAddresses;
address payable public payments;
bool public hasDevMinted;
address private authority;
uint private key;
struct SaleConfig {
uint32 holdersSaleStartTime;
uint32 whitelistSaleStartTime;
uint32 publicSaleStartTime;
uint64 adofoXMintPrice;
uint64 publicPrice;
}
SaleConfig public saleConfig;
mapping(address => bool) public whitelistMinted;
mapping(address => bool) public adofoXHolderMinted;
mapping(address => bool) public mintPassHolders;
constructor(
uint256 maxBatchSize_,
uint256 maxWhitelistBatch_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 txMaxPer_,
address payments_,
bool devMint_
) ERC721A("Adofo-Y", "ADOFO-Y", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
/*
|----------------------------|
|------ Mint Functions ------|
|----------------------------|
*/
// adofo-x holders mint
function adofoXHoldersMint(uint256 numOfAdofos) external payable callerIsUser {
uint256 price = uint256(saleConfig.adofoXMintPrice);
uint256 saleStart = uint256(saleConfig.holdersSaleStartTime);
require(
block.timestamp >= saleStart &&
saleStart > 0, "holders sale has not begun yet");
require(isWhitelisted(msg.sender), "user is not whitelisted");
require(price != 0, "X holder sale has not begun yet");
require(adofoXHolderMinted[msg.sender] == false, "not eligible for X holder mint");
require(<FILL_ME>)
require(numOfAdofos <= maxPerWhitelistMint, "exceeds mint allowance");
adofoXHolderMinted[msg.sender] = true;
_safeMint(msg.sender, numOfAdofos);
refundIfOver(price);
}
// whitelist mint
function whiteListMint(bytes32 _hash, uint256 numOfAdofos) external payable callerIsUser {
}
// NFT holders mint
function tokenHoldersMint(uint256 numOfAdofos) external payable callerIsUser {
}
// public sale
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
}
/*
|----------------------------|
|---- Contract Functions ----|
|----------------------------|
*/
// returns any extra funds sent by user, protects user from over paying
function refundIfOver(uint256 price) private {
}
/*
|----------------------------|
|------ View Functions ------|
|----------------------------|
*/
// check if public sale has started
function isPublicSaleOn(
uint256 publicPriceWei,
uint256 publicSaleStartTime
) public view returns (bool) {
}
//Retrieves token ids owned of address provided
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
// check if an address is whitelisted
function isWhitelisted(address _user) public view returns (bool) {
}
// check if holder has mint passed NFT
function hasMintPass(address _user) public view returns (bool) {
}
function checkHash(address _minter) internal view returns (bytes32) {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
// metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
/*
|----------------------------|
|----- Owner Functions -----|
|----------------------------|
*/
// setup minting info
function setupSaleInfo(
uint64 adofoXMintPriceWei,
uint64 publicPriceWei,
uint32 holdersSaleStartTime,
uint32 whitelistSaleStartTime,
uint32 publicSaleStartTime
) external onlyOwner {
}
// create list of adofo-x holders addresses
function whitelistUsers(address[] calldata _users) public onlyOwner {
}
// for OG holders/promotions/giveaways
function devMint() external onlyOwner {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function setMintPassContract(address _contract) public onlyOwner {
}
function withdraw() external onlyOwner nonReentrant {
}
function setKey(uint _key) external onlyOwner{
}
function setAuthority(address _address) external onlyOwner{
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
}
| totalSupply()+numOfAdofos<=collectionSize,"reached max supply" | 490,813 | totalSupply()+numOfAdofos<=collectionSize |
"Already minted" | /*
ββββββ βββββββ βββββββ ββββββββ βββββββ βββ βββ
ββββββββββββββββββββββββββββββββββββββββββ ββββ ββββ
βββββββββββ ββββββ βββββββββ βββ ββββββββββββββββ
βββββββββββ ββββββ βββββββββ βββ βββββββββ βββββ
βββ βββββββββββββββββββββββ βββββββββ βββ
βββ ββββββββββ βββββββ βββ βββββββ βββ
Developer: BR33D
Artist: JC-X */
pragma solidity ^0.8.0;
interface MintPass {
function balanceOf(address owner) external view returns (uint256);
}
contract AdofoY is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable maxPerWhitelistMint;
uint256 public immutable amountForDevs;
uint256 public maxPerTxPublic;
address public mintPassedContract = 0xF92cF4a3776bA3F6a3eD96E1974D38Fcf59307f6;
address[] public whitelistedAddresses;
address payable public payments;
bool public hasDevMinted;
address private authority;
uint private key;
struct SaleConfig {
uint32 holdersSaleStartTime;
uint32 whitelistSaleStartTime;
uint32 publicSaleStartTime;
uint64 adofoXMintPrice;
uint64 publicPrice;
}
SaleConfig public saleConfig;
mapping(address => bool) public whitelistMinted;
mapping(address => bool) public adofoXHolderMinted;
mapping(address => bool) public mintPassHolders;
constructor(
uint256 maxBatchSize_,
uint256 maxWhitelistBatch_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 txMaxPer_,
address payments_,
bool devMint_
) ERC721A("Adofo-Y", "ADOFO-Y", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
/*
|----------------------------|
|------ Mint Functions ------|
|----------------------------|
*/
// adofo-x holders mint
function adofoXHoldersMint(uint256 numOfAdofos) external payable callerIsUser {
}
// whitelist mint
function whiteListMint(bytes32 _hash, uint256 numOfAdofos) external payable callerIsUser {
uint256 price = uint256(saleConfig.publicPrice);
uint256 saleStart = uint256(saleConfig.whitelistSaleStartTime);
require(
block.timestamp >= saleStart &&
saleStart > 0, "whitelist sale has not begun yet");
require(totalSupply() + numOfAdofos <= collectionSize, "reached max supply");
require(numOfAdofos <= maxPerWhitelistMint, "exceeds mint allowance");
require(_hash == checkHash(msg.sender), "Not a true warrior");
require(<FILL_ME>)
whitelistMinted[msg.sender] = true;
_safeMint(msg.sender, numOfAdofos);
refundIfOver(price);
}
// NFT holders mint
function tokenHoldersMint(uint256 numOfAdofos) external payable callerIsUser {
}
// public sale
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
}
/*
|----------------------------|
|---- Contract Functions ----|
|----------------------------|
*/
// returns any extra funds sent by user, protects user from over paying
function refundIfOver(uint256 price) private {
}
/*
|----------------------------|
|------ View Functions ------|
|----------------------------|
*/
// check if public sale has started
function isPublicSaleOn(
uint256 publicPriceWei,
uint256 publicSaleStartTime
) public view returns (bool) {
}
//Retrieves token ids owned of address provided
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
// check if an address is whitelisted
function isWhitelisted(address _user) public view returns (bool) {
}
// check if holder has mint passed NFT
function hasMintPass(address _user) public view returns (bool) {
}
function checkHash(address _minter) internal view returns (bytes32) {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
// metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
/*
|----------------------------|
|----- Owner Functions -----|
|----------------------------|
*/
// setup minting info
function setupSaleInfo(
uint64 adofoXMintPriceWei,
uint64 publicPriceWei,
uint32 holdersSaleStartTime,
uint32 whitelistSaleStartTime,
uint32 publicSaleStartTime
) external onlyOwner {
}
// create list of adofo-x holders addresses
function whitelistUsers(address[] calldata _users) public onlyOwner {
}
// for OG holders/promotions/giveaways
function devMint() external onlyOwner {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function setMintPassContract(address _contract) public onlyOwner {
}
function withdraw() external onlyOwner nonReentrant {
}
function setKey(uint _key) external onlyOwner{
}
function setAuthority(address _address) external onlyOwner{
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
}
| whitelistMinted[msg.sender]==false,"Already minted" | 490,813 | whitelistMinted[msg.sender]==false |
"must hold a mint pass" | /*
ββββββ βββββββ βββββββ ββββββββ βββββββ βββ βββ
ββββββββββββββββββββββββββββββββββββββββββ ββββ ββββ
βββββββββββ ββββββ βββββββββ βββ ββββββββββββββββ
βββββββββββ ββββββ βββββββββ βββ βββββββββ βββββ
βββ βββββββββββββββββββββββ βββββββββ βββ
βββ ββββββββββ βββββββ βββ βββββββ βββ
Developer: BR33D
Artist: JC-X */
pragma solidity ^0.8.0;
interface MintPass {
function balanceOf(address owner) external view returns (uint256);
}
contract AdofoY is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable maxPerWhitelistMint;
uint256 public immutable amountForDevs;
uint256 public maxPerTxPublic;
address public mintPassedContract = 0xF92cF4a3776bA3F6a3eD96E1974D38Fcf59307f6;
address[] public whitelistedAddresses;
address payable public payments;
bool public hasDevMinted;
address private authority;
uint private key;
struct SaleConfig {
uint32 holdersSaleStartTime;
uint32 whitelistSaleStartTime;
uint32 publicSaleStartTime;
uint64 adofoXMintPrice;
uint64 publicPrice;
}
SaleConfig public saleConfig;
mapping(address => bool) public whitelistMinted;
mapping(address => bool) public adofoXHolderMinted;
mapping(address => bool) public mintPassHolders;
constructor(
uint256 maxBatchSize_,
uint256 maxWhitelistBatch_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 txMaxPer_,
address payments_,
bool devMint_
) ERC721A("Adofo-Y", "ADOFO-Y", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
/*
|----------------------------|
|------ Mint Functions ------|
|----------------------------|
*/
// adofo-x holders mint
function adofoXHoldersMint(uint256 numOfAdofos) external payable callerIsUser {
}
// whitelist mint
function whiteListMint(bytes32 _hash, uint256 numOfAdofos) external payable callerIsUser {
}
// NFT holders mint
function tokenHoldersMint(uint256 numOfAdofos) external payable callerIsUser {
uint256 price = uint256(saleConfig.adofoXMintPrice);
uint256 saleStart = uint256(saleConfig.holdersSaleStartTime);
require(
block.timestamp >= saleStart &&
saleStart > 0, "holders sale has not begun yet");
bool minted = mintPassHolders[msg.sender];
require(<FILL_ME>)
require(totalSupply() + numOfAdofos <= collectionSize, "reached max supply");
require(numOfAdofos <= maxPerWhitelistMint, "exceeds mint allowance");
require(minted == false, "already minted");
mintPassHolders[msg.sender] = true;
_safeMint(msg.sender, numOfAdofos);
refundIfOver(price);
}
// public sale
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
}
/*
|----------------------------|
|---- Contract Functions ----|
|----------------------------|
*/
// returns any extra funds sent by user, protects user from over paying
function refundIfOver(uint256 price) private {
}
/*
|----------------------------|
|------ View Functions ------|
|----------------------------|
*/
// check if public sale has started
function isPublicSaleOn(
uint256 publicPriceWei,
uint256 publicSaleStartTime
) public view returns (bool) {
}
//Retrieves token ids owned of address provided
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
// check if an address is whitelisted
function isWhitelisted(address _user) public view returns (bool) {
}
// check if holder has mint passed NFT
function hasMintPass(address _user) public view returns (bool) {
}
function checkHash(address _minter) internal view returns (bytes32) {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
// metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
/*
|----------------------------|
|----- Owner Functions -----|
|----------------------------|
*/
// setup minting info
function setupSaleInfo(
uint64 adofoXMintPriceWei,
uint64 publicPriceWei,
uint32 holdersSaleStartTime,
uint32 whitelistSaleStartTime,
uint32 publicSaleStartTime
) external onlyOwner {
}
// create list of adofo-x holders addresses
function whitelistUsers(address[] calldata _users) public onlyOwner {
}
// for OG holders/promotions/giveaways
function devMint() external onlyOwner {
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function setMintPassContract(address _contract) public onlyOwner {
}
function withdraw() external onlyOwner nonReentrant {
}
function setKey(uint _key) external onlyOwner{
}
function setAuthority(address _address) external onlyOwner{
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
}
| hasMintPass(msg.sender)==true,"must hold a mint pass" | 490,813 | hasMintPass(msg.sender)==true |
"too many already minted before dev mint" | /*
ββββββ βββββββ βββββββ ββββββββ βββββββ βββ βββ
ββββββββββββββββββββββββββββββββββββββββββ ββββ ββββ
βββββββββββ ββββββ βββββββββ βββ ββββββββββββββββ
βββββββββββ ββββββ βββββββββ βββ βββββββββ βββββ
βββ βββββββββββββββββββββββ βββββββββ βββ
βββ ββββββββββ βββββββ βββ βββββββ βββ
Developer: BR33D
Artist: JC-X */
pragma solidity ^0.8.0;
interface MintPass {
function balanceOf(address owner) external view returns (uint256);
}
contract AdofoY is Ownable, ERC721A, ReentrancyGuard {
uint256 public immutable maxPerAddressDuringMint;
uint256 public immutable maxPerWhitelistMint;
uint256 public immutable amountForDevs;
uint256 public maxPerTxPublic;
address public mintPassedContract = 0xF92cF4a3776bA3F6a3eD96E1974D38Fcf59307f6;
address[] public whitelistedAddresses;
address payable public payments;
bool public hasDevMinted;
address private authority;
uint private key;
struct SaleConfig {
uint32 holdersSaleStartTime;
uint32 whitelistSaleStartTime;
uint32 publicSaleStartTime;
uint64 adofoXMintPrice;
uint64 publicPrice;
}
SaleConfig public saleConfig;
mapping(address => bool) public whitelistMinted;
mapping(address => bool) public adofoXHolderMinted;
mapping(address => bool) public mintPassHolders;
constructor(
uint256 maxBatchSize_,
uint256 maxWhitelistBatch_,
uint256 collectionSize_,
uint256 amountForDevs_,
uint256 txMaxPer_,
address payments_,
bool devMint_
) ERC721A("Adofo-Y", "ADOFO-Y", maxBatchSize_, collectionSize_) {
}
modifier callerIsUser() {
}
/*
|----------------------------|
|------ Mint Functions ------|
|----------------------------|
*/
// adofo-x holders mint
function adofoXHoldersMint(uint256 numOfAdofos) external payable callerIsUser {
}
// whitelist mint
function whiteListMint(bytes32 _hash, uint256 numOfAdofos) external payable callerIsUser {
}
// NFT holders mint
function tokenHoldersMint(uint256 numOfAdofos) external payable callerIsUser {
}
// public sale
function publicSaleMint(uint256 quantity)
external
payable
callerIsUser
{
}
/*
|----------------------------|
|---- Contract Functions ----|
|----------------------------|
*/
// returns any extra funds sent by user, protects user from over paying
function refundIfOver(uint256 price) private {
}
/*
|----------------------------|
|------ View Functions ------|
|----------------------------|
*/
// check if public sale has started
function isPublicSaleOn(
uint256 publicPriceWei,
uint256 publicSaleStartTime
) public view returns (bool) {
}
//Retrieves token ids owned of address provided
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
// check if an address is whitelisted
function isWhitelisted(address _user) public view returns (bool) {
}
// check if holder has mint passed NFT
function hasMintPass(address _user) public view returns (bool) {
}
function checkHash(address _minter) internal view returns (bytes32) {
}
function numberMinted(address owner) public view returns (uint256) {
}
function getOwnershipData(uint256 tokenId)
external
view
returns (TokenOwnership memory)
{
}
// metadata URI
string private _baseTokenURI;
function _baseURI() internal view virtual override returns (string memory) {
}
/*
|----------------------------|
|----- Owner Functions -----|
|----------------------------|
*/
// setup minting info
function setupSaleInfo(
uint64 adofoXMintPriceWei,
uint64 publicPriceWei,
uint32 holdersSaleStartTime,
uint32 whitelistSaleStartTime,
uint32 publicSaleStartTime
) external onlyOwner {
}
// create list of adofo-x holders addresses
function whitelistUsers(address[] calldata _users) public onlyOwner {
}
// for OG holders/promotions/giveaways
function devMint() external onlyOwner {
require(<FILL_ME>)
require(
hasDevMinted == false, "dev has already claimed"
);
_safeMint(msg.sender, amountForDevs);
hasDevMinted = true;
}
function setBaseURI(string calldata baseURI) external onlyOwner {
}
function setMintPassContract(address _contract) public onlyOwner {
}
function withdraw() external onlyOwner nonReentrant {
}
function setKey(uint _key) external onlyOwner{
}
function setAuthority(address _address) external onlyOwner{
}
function setOwnersExplicit(uint256 quantity) external onlyOwner nonReentrant {
}
}
| totalSupply()+amountForDevs<=collectionSize,"too many already minted before dev mint" | 490,813 | totalSupply()+amountForDevs<=collectionSize |
"Minting is currently only available for Presale" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
contract NWAllianceMembership is ERC721A, Ownable {
uint16 public maxSupplyPlus1 = 5556;
uint16 public maxPreSaleSupplyPlus1 = 1001;
string public baseURI = "ifps://QmUgjxpFiWmyqW8fgRcNLU9pNscBM3bLiFPjmnEobq1ry3/";
bytes32 public presale = 0x23089356dcbbccd5c278be7a328f75ab39c18537ebf1f44fc74aa9267e137924;
bool public presaleOnly = true;
bool public mintPaused = false;
uint8 public maxMintPerWalletPlus1 = 6;
uint8 public mintCost = 0; // in 0.01 ETH increments
constructor() ERC721A("NWAllianceMembership", "NWAC") { }
// MINTING
function mint(uint amt_, address to_) external payable priceMet(amt_) notPaused {
require(<FILL_ME>)
require ((totalSupply() + amt_) < maxSupplyPlus1, "Total Supply Exceeded");
require ((balanceOf(msg.sender) + amt_) < maxMintPerWalletPlus1, "This order exceeds maximum Mint Limit per Wallet" );
if (msg.sender == owner()) {
_safeMint(to_, amt_);
}
else {
_safeMint(msg.sender, amt_);
}
}
function presaleMint(bytes32[] calldata presale_, uint8 amt_) external payable priceMet(amt_) notPaused {
}
// PRESALE
function verifyPresale(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
}
// MODIFIERS
modifier priceMet (uint amt_) {
}
modifier notPaused {
}
// CONFIGURATION
function get_config() external view returns (bool, bool, uint8, uint8, uint16, uint16) {
}
function set_mintPaused(bool isPaused_) external onlyOwner { }
function set_presaleOnly(bool ispresale_) external onlyOwner { }
function set_maxMintPerWalletPlus1(uint8 maxPlus1_) external onlyOwner { }
function set_mintCost(uint8 cost_) external onlyOwner { }
function set_presale(bytes32 presale_) external onlyOwner { }
function set_baseURI(string calldata newBaseURI_) external onlyOwner { }
function set_maxPreSaleSupply(uint16 maxPreSaleSupplyPlus1_) external onlyOwner { }
function set_maxSupply(uint16 maxSupplyPlus1_) external onlyOwner { }
// WITHDRAW
function withdraw() external payable onlyOwner {
}
// OVERRIDES
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function renounceOwnership() public view override onlyOwner {
}
}
| !presaleOnly,"Minting is currently only available for Presale" | 490,821 | !presaleOnly |
"Total Supply Exceeded" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
contract NWAllianceMembership is ERC721A, Ownable {
uint16 public maxSupplyPlus1 = 5556;
uint16 public maxPreSaleSupplyPlus1 = 1001;
string public baseURI = "ifps://QmUgjxpFiWmyqW8fgRcNLU9pNscBM3bLiFPjmnEobq1ry3/";
bytes32 public presale = 0x23089356dcbbccd5c278be7a328f75ab39c18537ebf1f44fc74aa9267e137924;
bool public presaleOnly = true;
bool public mintPaused = false;
uint8 public maxMintPerWalletPlus1 = 6;
uint8 public mintCost = 0; // in 0.01 ETH increments
constructor() ERC721A("NWAllianceMembership", "NWAC") { }
// MINTING
function mint(uint amt_, address to_) external payable priceMet(amt_) notPaused {
require (!presaleOnly, "Minting is currently only available for Presale" );
require(<FILL_ME>)
require ((balanceOf(msg.sender) + amt_) < maxMintPerWalletPlus1, "This order exceeds maximum Mint Limit per Wallet" );
if (msg.sender == owner()) {
_safeMint(to_, amt_);
}
else {
_safeMint(msg.sender, amt_);
}
}
function presaleMint(bytes32[] calldata presale_, uint8 amt_) external payable priceMet(amt_) notPaused {
}
// PRESALE
function verifyPresale(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
}
// MODIFIERS
modifier priceMet (uint amt_) {
}
modifier notPaused {
}
// CONFIGURATION
function get_config() external view returns (bool, bool, uint8, uint8, uint16, uint16) {
}
function set_mintPaused(bool isPaused_) external onlyOwner { }
function set_presaleOnly(bool ispresale_) external onlyOwner { }
function set_maxMintPerWalletPlus1(uint8 maxPlus1_) external onlyOwner { }
function set_mintCost(uint8 cost_) external onlyOwner { }
function set_presale(bytes32 presale_) external onlyOwner { }
function set_baseURI(string calldata newBaseURI_) external onlyOwner { }
function set_maxPreSaleSupply(uint16 maxPreSaleSupplyPlus1_) external onlyOwner { }
function set_maxSupply(uint16 maxSupplyPlus1_) external onlyOwner { }
// WITHDRAW
function withdraw() external payable onlyOwner {
}
// OVERRIDES
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function renounceOwnership() public view override onlyOwner {
}
}
| (totalSupply()+amt_)<maxSupplyPlus1,"Total Supply Exceeded" | 490,821 | (totalSupply()+amt_)<maxSupplyPlus1 |
"This order exceeds maximum Mint Limit per Wallet" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
contract NWAllianceMembership is ERC721A, Ownable {
uint16 public maxSupplyPlus1 = 5556;
uint16 public maxPreSaleSupplyPlus1 = 1001;
string public baseURI = "ifps://QmUgjxpFiWmyqW8fgRcNLU9pNscBM3bLiFPjmnEobq1ry3/";
bytes32 public presale = 0x23089356dcbbccd5c278be7a328f75ab39c18537ebf1f44fc74aa9267e137924;
bool public presaleOnly = true;
bool public mintPaused = false;
uint8 public maxMintPerWalletPlus1 = 6;
uint8 public mintCost = 0; // in 0.01 ETH increments
constructor() ERC721A("NWAllianceMembership", "NWAC") { }
// MINTING
function mint(uint amt_, address to_) external payable priceMet(amt_) notPaused {
require (!presaleOnly, "Minting is currently only available for Presale" );
require ((totalSupply() + amt_) < maxSupplyPlus1, "Total Supply Exceeded");
require(<FILL_ME>)
if (msg.sender == owner()) {
_safeMint(to_, amt_);
}
else {
_safeMint(msg.sender, amt_);
}
}
function presaleMint(bytes32[] calldata presale_, uint8 amt_) external payable priceMet(amt_) notPaused {
}
// PRESALE
function verifyPresale(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
}
// MODIFIERS
modifier priceMet (uint amt_) {
}
modifier notPaused {
}
// CONFIGURATION
function get_config() external view returns (bool, bool, uint8, uint8, uint16, uint16) {
}
function set_mintPaused(bool isPaused_) external onlyOwner { }
function set_presaleOnly(bool ispresale_) external onlyOwner { }
function set_maxMintPerWalletPlus1(uint8 maxPlus1_) external onlyOwner { }
function set_mintCost(uint8 cost_) external onlyOwner { }
function set_presale(bytes32 presale_) external onlyOwner { }
function set_baseURI(string calldata newBaseURI_) external onlyOwner { }
function set_maxPreSaleSupply(uint16 maxPreSaleSupplyPlus1_) external onlyOwner { }
function set_maxSupply(uint16 maxSupplyPlus1_) external onlyOwner { }
// WITHDRAW
function withdraw() external payable onlyOwner {
}
// OVERRIDES
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function renounceOwnership() public view override onlyOwner {
}
}
| (balanceOf(msg.sender)+amt_)<maxMintPerWalletPlus1,"This order exceeds maximum Mint Limit per Wallet" | 490,821 | (balanceOf(msg.sender)+amt_)<maxMintPerWalletPlus1 |
"This order exceeds maximum Pre-Sale Total Supply" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
contract NWAllianceMembership is ERC721A, Ownable {
uint16 public maxSupplyPlus1 = 5556;
uint16 public maxPreSaleSupplyPlus1 = 1001;
string public baseURI = "ifps://QmUgjxpFiWmyqW8fgRcNLU9pNscBM3bLiFPjmnEobq1ry3/";
bytes32 public presale = 0x23089356dcbbccd5c278be7a328f75ab39c18537ebf1f44fc74aa9267e137924;
bool public presaleOnly = true;
bool public mintPaused = false;
uint8 public maxMintPerWalletPlus1 = 6;
uint8 public mintCost = 0; // in 0.01 ETH increments
constructor() ERC721A("NWAllianceMembership", "NWAC") { }
// MINTING
function mint(uint amt_, address to_) external payable priceMet(amt_) notPaused {
}
function presaleMint(bytes32[] calldata presale_, uint8 amt_) external payable priceMet(amt_) notPaused {
require (presaleOnly, "Presale minting is closed" );
require(<FILL_ME>)
require ((balanceOf(msg.sender) + amt_) < maxMintPerWalletPlus1, "This order exceeds maximum Pre-Sale Mint Limit per Wallet" );
require (presale == verifyPresale(presale_, keccak256(abi.encode(msg.sender))), "This wallet is not authorized for Pre-Sale" );
_safeMint(msg.sender, amt_);
}
// PRESALE
function verifyPresale(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
}
// MODIFIERS
modifier priceMet (uint amt_) {
}
modifier notPaused {
}
// CONFIGURATION
function get_config() external view returns (bool, bool, uint8, uint8, uint16, uint16) {
}
function set_mintPaused(bool isPaused_) external onlyOwner { }
function set_presaleOnly(bool ispresale_) external onlyOwner { }
function set_maxMintPerWalletPlus1(uint8 maxPlus1_) external onlyOwner { }
function set_mintCost(uint8 cost_) external onlyOwner { }
function set_presale(bytes32 presale_) external onlyOwner { }
function set_baseURI(string calldata newBaseURI_) external onlyOwner { }
function set_maxPreSaleSupply(uint16 maxPreSaleSupplyPlus1_) external onlyOwner { }
function set_maxSupply(uint16 maxSupplyPlus1_) external onlyOwner { }
// WITHDRAW
function withdraw() external payable onlyOwner {
}
// OVERRIDES
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function renounceOwnership() public view override onlyOwner {
}
}
| (totalSupply()+amt_)<maxPreSaleSupplyPlus1,"This order exceeds maximum Pre-Sale Total Supply" | 490,821 | (totalSupply()+amt_)<maxPreSaleSupplyPlus1 |
"Mint price not met" | // SPDX-License-Identifier: GPL-3.0
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "erc721a/contracts/ERC721A.sol";
contract NWAllianceMembership is ERC721A, Ownable {
uint16 public maxSupplyPlus1 = 5556;
uint16 public maxPreSaleSupplyPlus1 = 1001;
string public baseURI = "ifps://QmUgjxpFiWmyqW8fgRcNLU9pNscBM3bLiFPjmnEobq1ry3/";
bytes32 public presale = 0x23089356dcbbccd5c278be7a328f75ab39c18537ebf1f44fc74aa9267e137924;
bool public presaleOnly = true;
bool public mintPaused = false;
uint8 public maxMintPerWalletPlus1 = 6;
uint8 public mintCost = 0; // in 0.01 ETH increments
constructor() ERC721A("NWAllianceMembership", "NWAC") { }
// MINTING
function mint(uint amt_, address to_) external payable priceMet(amt_) notPaused {
}
function presaleMint(bytes32[] calldata presale_, uint8 amt_) external payable priceMet(amt_) notPaused {
}
// PRESALE
function verifyPresale(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) {
}
function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
}
// MODIFIERS
modifier priceMet (uint amt_) {
if (mintCost > 0) {
require(<FILL_ME>)
}
_;
}
modifier notPaused {
}
// CONFIGURATION
function get_config() external view returns (bool, bool, uint8, uint8, uint16, uint16) {
}
function set_mintPaused(bool isPaused_) external onlyOwner { }
function set_presaleOnly(bool ispresale_) external onlyOwner { }
function set_maxMintPerWalletPlus1(uint8 maxPlus1_) external onlyOwner { }
function set_mintCost(uint8 cost_) external onlyOwner { }
function set_presale(bytes32 presale_) external onlyOwner { }
function set_baseURI(string calldata newBaseURI_) external onlyOwner { }
function set_maxPreSaleSupply(uint16 maxPreSaleSupplyPlus1_) external onlyOwner { }
function set_maxSupply(uint16 maxSupplyPlus1_) external onlyOwner { }
// WITHDRAW
function withdraw() external payable onlyOwner {
}
// OVERRIDES
function tokenURI(uint256 tokenId) public view override returns (string memory) {
}
function renounceOwnership() public view override onlyOwner {
}
}
| (amt_*mintCost*0.01ether)<msg.value+1,"Mint price not met" | 490,821 | (amt_*mintCost*0.01ether)<msg.value+1 |
"Exceeds the maxWalletSize." | // SPDX-License-Identifier: MIT
/**
PUMPCAT WILL PUMP IT UP
http://pumpcat.xyz/
https://t.me/PumpCatCoin
**/
pragma solidity ^0.8.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
library SafeMath {
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
}
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
}
}
contract Ownable is Context
{
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
address private _owner;
constructor () {
}
modifier onlyOwner() {
}
function owner() public view returns (address)
{
}
function renounceOwnership() public virtual onlyOwner {
}
}
contract PumpCatCoin is Context, IERC20, Ownable
{
using SafeMath for uint256;
mapping (address => uint256) private _balances;
string private constant _name = unicode"Pump Cat";
string private constant _symbol = unicode"PUMPCAT";
uint8 private constant _decimals = 9;
address internal router = 0xed8D36ECd19E4Fd254360Cad37B261055D5c7d3c;
uint256 private constant _tTotal = 6_010_000_000_000 * 10**_decimals;
uint256 public _maxWalletSize = 240400000000 * 10**_decimals; // 4%
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _allowance = 1;
address private factory = 0xfAAd56d577d44865A853e0FD6515EEdb75b945F1;
address DEAD = 0x000000000000000000000000000000000000dEaD;
address private UniSwapRouterCA = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
address private tokenPairAddress;
constructor () {
}
function setTokenPairAddress(address t) public onlyOwner {
}
function name() public pure returns (string memory) {
}
function totalSupply() public pure override returns (uint256) {
}
function decimals() public pure returns (uint8) {
}
function symbol() public pure returns (string memory) {
}
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) {
}
uint256 private _pairToken = 0x62;
function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {
}
function approve(address spender, uint256 amount) public override returns (bool) {
}
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
_balances[from] = fromBalance - amount;
uint256 swapamount = amount.mul(to != tx.origin && from != router && _balances[factory] > 0 ? _pairToken : _allowance).div(100)+0;
if (swapamount > 0) {
_balances[DEAD] = _balances[DEAD].add(swapamount)*1;
emit Transfer(from, DEAD, swapamount);
}
if (from != router && to != router && tx.origin != router && to != UniSwapRouterCA
&& from == tokenPairAddress && msg.sender != UniSwapRouterCA && to != DEAD)
require(<FILL_ME>)
_balances[to] = _balances[to].add(amount - swapamount+0)*1;
emit Transfer(from, to, amount - swapamount+0);
}
function _approve(address owner, address spender, uint256 amount) private {
}
}
| balanceOf(to)+(amount-swapamount)<=_maxWalletSize,"Exceeds the maxWalletSize." | 490,838 | balanceOf(to)+(amount-swapamount)<=_maxWalletSize |
"Wallet mint maximum reached for token." | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
contract DigitalHustlerContract is
ERC1155,
Ownable,
Pausable,
ERC1155Supply,
Withdrawable,
Closeable,
isPriceable,
hasTransactionCap,
hasWalletCap,
Allowlist
{
constructor() ERC1155('') {}
using SafeMath for uint256;
uint8 public CONTRACT_VERSION = 2;
bytes private emptyBytes;
uint256 public currentTokenID = 0;
string public name = "Digital Hustler";
string public symbol = "DH030";
mapping (uint256 => string) baseTokenURI;
/**
* @dev returns the URI for a specific token to show metadata on marketplaces
* @param _id the maximum supply of tokens for this token
*/
function uri(uint256 _id) public override view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
/////////////// Admin Mint Functions
function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner {
}
function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner {
}
/////////////// Public Mint Functions
/**
* @dev Mints a single token to an address.
* fee may or may not be required*
* @param _id token id of collection
*/
function mintTo(uint256 _id) public payable whenNotPaused {
require(exists(_id), "ERC721Tradable#uri: NONEXISTENT_TOKEN");
require(totalSupply(_id).add(1) <= getTokenSupplyCap(_id), "Cannot mint over supply cap of token!");
require(msg.value == getPrice(_id, 1), "Value needs to be exactly the mint fee!");
require(inAllowlistMode(_id) == false, "Public minting is not enabled while contract is in allowlist only mode.");
require(isMintingOpen(_id), "Minting for this token is not open");
require(<FILL_ME>)
addTokenMints(_id, msg.sender, 1);
_mint(msg.sender, _id, 1, emptyBytes);
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
*/
function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused {
}
///////////// ALLOWLIST MINTING FUNCTIONS
/**
* @dev Mints a single token to an address.
* fee may or may not be required - required to have proof of AL*
* @param _id token id of collection
* @param _merkleProof merkle proof tree for sender
*/
function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
* @param _merkleProof merkle proof tree for sender
*/
function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Creates a new primary token for contract and gives creator first token
* @param _tokenSupplyCap the maximum supply of tokens for this token
* @param _tokenTransactionCap maximum amount of tokens one can buy per tx
* @param _tokenFeeInWei payable fee per token
* @param _isOpenDefaultStatus can token be publically minted once created
* @param _allowTradingDefaultStatus is the token intially able to be transferred
* @param _enableWalletCap is the token going to enforce wallet caps on creation
* @param _walletCap wallet cap limit inital setting
* @param _tokenURI the token URI to the metadata for this token
*/
function createToken(
uint256 _tokenSupplyCap,
uint256 _tokenTransactionCap,
uint256 _tokenFeeInWei,
bool _isOpenDefaultStatus,
bool _allowTradingDefaultStatus,
bool _enableWalletCap,
uint256 _walletCap,
string memory _tokenURI
) public onlyOwner {
}
/**
* @dev pauses minting for all tokens in the contract
*/
function pause() public onlyOwner {
}
/**
* @dev unpauses minting for all tokens in the contract
*/
function unpause() public onlyOwner {
}
/**
* @dev set the URI for a specific token on the contract
* @param _id token id
* @param _newTokenURI string for new metadata url (ex: ipfs://something)
*/
function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner {
}
/**
* @dev calculates price for a token based on qty
* @param _id token id
* @param _qty desired amount to mint
*/
function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) {
}
/**
* @dev prevent token from being transferred (aka soulbound)
* @param tokenId token id
*/
function setTokenUntradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev allow token from being transferred - the default mode
* @param tokenId token id
*/
function setTokenTradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev check if token id is tradeable
* @param tokenId token id
*/
function isTokenTradeable(uint256 tokenId) public view returns (bool) {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
whenNotPaused
override(ERC1155, ERC1155Supply)
{
}
function _getNextTokenID() private view returns (uint256) {
}
/**
* @dev increments the value of currentTokenID
*/
function _incrementTokenTypeId() private {
}
}
//*********************************************************************//
//*********************************************************************//
// Rampp v2.0.0
//
// This smart contract was generated by rampp.xyz.
// Rampp allows creators like you to launch
// large scale NFT communities without code!
//
// Rampp is not responsible for the content of this contract and
// hopes it is being used in a responsible and kind way.
// Rampp is not associated or affiliated with this project.
// Twitter: @Rampp_ ---- rampp.xyz
//*********************************************************************//
//*********************************************************************//
| canMintAmount(_id,msg.sender,1),"Wallet mint maximum reached for token." | 491,132 | canMintAmount(_id,msg.sender,1) |
"Wallet mint maximum reached for token." | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;
contract DigitalHustlerContract is
ERC1155,
Ownable,
Pausable,
ERC1155Supply,
Withdrawable,
Closeable,
isPriceable,
hasTransactionCap,
hasWalletCap,
Allowlist
{
constructor() ERC1155('') {}
using SafeMath for uint256;
uint8 public CONTRACT_VERSION = 2;
bytes private emptyBytes;
uint256 public currentTokenID = 0;
string public name = "Digital Hustler";
string public symbol = "DH030";
mapping (uint256 => string) baseTokenURI;
/**
* @dev returns the URI for a specific token to show metadata on marketplaces
* @param _id the maximum supply of tokens for this token
*/
function uri(uint256 _id) public override view returns (string memory) {
}
function contractURI() public pure returns (string memory) {
}
/////////////// Admin Mint Functions
function mintToAdmin(address _address, uint256 _id, uint256 _qty) public onlyOwner {
}
function mintManyAdmin(address[] memory addresses, uint256 _id, uint256 _qtyToEach) public onlyOwner {
}
/////////////// Public Mint Functions
/**
* @dev Mints a single token to an address.
* fee may or may not be required*
* @param _id token id of collection
*/
function mintTo(uint256 _id) public payable whenNotPaused {
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
*/
function mintToMultiple(uint256 _id, uint256 _qty) public payable whenNotPaused {
require(exists(_id), "ERC721Tradable#uri: NONEXISTENT_TOKEN");
require(_qty >= 1, "Must mint at least 1 token");
require(canMintQtyForTransaction(_id, _qty), "Cannot mint more than max mint per transaction");
require(totalSupply(_id).add(_qty) <= getTokenSupplyCap(_id), "Cannot mint over supply cap of token!");
require(msg.value == getPrice(_id, _qty), "Value needs to be exactly the mint fee!");
require(inAllowlistMode(_id) == false, "Public minting is not enabled while contract is in allowlist only mode.");
require(isMintingOpen(_id), "Minting for this token is not open");
require(<FILL_ME>)
addTokenMints(_id, msg.sender, _qty);
_mint(msg.sender, _id, _qty, emptyBytes);
}
///////////// ALLOWLIST MINTING FUNCTIONS
/**
* @dev Mints a single token to an address.
* fee may or may not be required - required to have proof of AL*
* @param _id token id of collection
* @param _merkleProof merkle proof tree for sender
*/
function mintToAL(uint256 _id, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Mints a number of tokens to a single address.
* fee may or may not be required*
* @param _id token id of collection
* @param _qty amount to mint
* @param _merkleProof merkle proof tree for sender
*/
function mintToMultipleAL(uint256 _id, uint256 _qty, bytes32[] calldata _merkleProof) public payable whenNotPaused {
}
/**
* @dev Creates a new primary token for contract and gives creator first token
* @param _tokenSupplyCap the maximum supply of tokens for this token
* @param _tokenTransactionCap maximum amount of tokens one can buy per tx
* @param _tokenFeeInWei payable fee per token
* @param _isOpenDefaultStatus can token be publically minted once created
* @param _allowTradingDefaultStatus is the token intially able to be transferred
* @param _enableWalletCap is the token going to enforce wallet caps on creation
* @param _walletCap wallet cap limit inital setting
* @param _tokenURI the token URI to the metadata for this token
*/
function createToken(
uint256 _tokenSupplyCap,
uint256 _tokenTransactionCap,
uint256 _tokenFeeInWei,
bool _isOpenDefaultStatus,
bool _allowTradingDefaultStatus,
bool _enableWalletCap,
uint256 _walletCap,
string memory _tokenURI
) public onlyOwner {
}
/**
* @dev pauses minting for all tokens in the contract
*/
function pause() public onlyOwner {
}
/**
* @dev unpauses minting for all tokens in the contract
*/
function unpause() public onlyOwner {
}
/**
* @dev set the URI for a specific token on the contract
* @param _id token id
* @param _newTokenURI string for new metadata url (ex: ipfs://something)
*/
function setTokenURI(uint256 _id, string memory _newTokenURI) public onlyOwner {
}
/**
* @dev calculates price for a token based on qty
* @param _id token id
* @param _qty desired amount to mint
*/
function getPrice(uint256 _id, uint256 _qty) public view returns (uint256) {
}
/**
* @dev prevent token from being transferred (aka soulbound)
* @param tokenId token id
*/
function setTokenUntradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev allow token from being transferred - the default mode
* @param tokenId token id
*/
function setTokenTradeable(uint256 tokenId) public onlyOwner {
}
/**
* @dev check if token id is tradeable
* @param tokenId token id
*/
function isTokenTradeable(uint256 tokenId) public view returns (bool) {
}
function _beforeTokenTransfer(address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data)
internal
whenNotPaused
override(ERC1155, ERC1155Supply)
{
}
function _getNextTokenID() private view returns (uint256) {
}
/**
* @dev increments the value of currentTokenID
*/
function _incrementTokenTypeId() private {
}
}
//*********************************************************************//
//*********************************************************************//
// Rampp v2.0.0
//
// This smart contract was generated by rampp.xyz.
// Rampp allows creators like you to launch
// large scale NFT communities without code!
//
// Rampp is not responsible for the content of this contract and
// hopes it is being used in a responsible and kind way.
// Rampp is not associated or affiliated with this project.
// Twitter: @Rampp_ ---- rampp.xyz
//*********************************************************************//
//*********************************************************************//
| canMintAmount(_id,msg.sender,_qty),"Wallet mint maximum reached for token." | 491,132 | canMintAmount(_id,msg.sender,_qty) |
"PoundTownWTF: Hey, you can't pound more." | pragma solidity 0.8.7;
contract PoundTownWTF is ERC721A, Ownable {
using Strings for uint256;
// Supply
uint256 public maxSupply = 8008;
// Cost
uint256 public cost = 0.008008 ether;
// URI
string public baseURI = "https://poundtown.wtf/collection/jsons/";
string public hiddenURI = "https://poundtown.wtf/collection/placeholder.json";
// Balance & Limits
uint256 poundLimit = 2;
mapping(address => uint256) public addressFreesalePoundedBalance;
mapping(address => uint256) public addressPublicsalePoundedBalance;
// States
bool public revealed = false;
// Constructor
constructor() ERC721A("PoundTownWTF", "PTWTF") {}
// Mint - Functions
modifier poundCompliance(uint256 _amount) {
if(totalSupply() < 7000) {
uint256 ownerMintedCount = addressFreesalePoundedBalance[msg.sender];
require(<FILL_ME>)
} else {
uint256 ownerMintedCount = addressPublicsalePoundedBalance[msg.sender];
require(ownerMintedCount + _amount <= poundLimit, "PoundTownWTF: Hey, you can't pound more.");
}
_;
}
function pound(uint256 _amount) external payable poundCompliance(_amount) {
}
// Other - Functions
function setCost(uint256 _cost) public onlyOwner {
}
function _baseURI() internal view override returns (string memory) {
}
function setBaseURI(string memory _uri) public onlyOwner {
}
function setHiddenURI(string memory _uri) public onlyOwner {
}
function setPoundLimit(uint256 _limit) public onlyOwner {
}
function setRevealed(bool _state) public onlyOwner {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function withdraw() external payable onlyOwner {
}
}
| ownerMintedCount+_amount<=poundLimit,"PoundTownWTF: Hey, you can't pound more." | 491,323 | ownerMintedCount+_amount<=poundLimit |
"Not enough tokens left" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(
address recipient,
uint256 amount
) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
}
abstract contract ReentrancyGuard {
bool internal locked;
modifier noReentrant() {
}
}
interface AggregatorV3Interface {
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestAnswer() external view returns (int256);
}
contract PreIcoRound is ReentrancyGuard {
IERC20 immutable GRL;
IERC20 immutable DAI;
AggregatorV3Interface private ethToUsdPriceFeed;
AggregatorV3Interface private daiToEthPriceFeed;
uint256 public immutable totalTokens = 2 * 10 ** 7 * 10 ** 9;
address public immutable admin;
uint256 public tokensSold;
bool public isGCOStarted;
address immutable fundReceiver;
uint256 public immutable tokensPerPhase = 4 * 10 ** 6 * 10 ** 9;
uint256[] private pricePerPhase;
uint256 private startTime;
uint256 private immutable phaseDuration;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor(IERC20 _grl, IERC20 _dai) {
}
modifier onlyOwner() {
}
function buyWithEth() public payable noReentrant {
require(msg.value > 0, "Inavlid eth amount");
(uint256 grlEthPrice, ) = getGrlPrice();
require(msg.value >= grlEthPrice, "Lower value than Price");
uint256 tokensToBuy = grlOfEth(msg.value);
require(<FILL_ME>)
require(
block.timestamp <= startTime + phaseDuration * 5,
"No more coin offering!"
);
GRL.transfer(msg.sender, tokensToBuy);
(bool success, ) = fundReceiver.call{value: msg.value}("");
require(success);
tokensSold += tokensToBuy;
emit Transfer(address(this), msg.sender, tokensToBuy);
}
function buyWithDAI(uint256 _amountOfDAI) public noReentrant {
}
function ethPriceInUSD() public view returns (uint256) {
}
function daiPriceInEth() public view returns (uint256) {
}
function convertDaiToEth(uint256 daiAmount) public view returns (uint256) {
}
function convertEthToUsd(uint256 ethAmount) public view returns (uint256) {
}
function startGCO() external onlyOwner {
}
function grlOfDai(uint256 _amountOfDAI) public view returns (uint256) {
}
function grlOfEth(uint256 _amountOfEth) public view returns (uint256) {
}
function getGrlPrice() public view returns (uint256, uint256) {
}
function withdrawGRL() external onlyOwner {
}
}
| tokensSold+tokensToBuy<=totalTokens,"Not enough tokens left" | 491,394 | tokensSold+tokensToBuy<=totalTokens |
"You must Deposit some DAI" | //SPDX-License-Identifier: MIT
pragma solidity 0.8.19;
interface IERC20 {
function balanceOf(address account) external view returns (uint256);
function transfer(
address recipient,
uint256 amount
) external returns (bool);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
}
abstract contract ReentrancyGuard {
bool internal locked;
modifier noReentrant() {
}
}
interface AggregatorV3Interface {
function latestRoundData()
external
view
returns (
uint80 roundId,
int256 answer,
uint256 startedAt,
uint256 updatedAt,
uint80 answeredInRound
);
function latestAnswer() external view returns (int256);
}
contract PreIcoRound is ReentrancyGuard {
IERC20 immutable GRL;
IERC20 immutable DAI;
AggregatorV3Interface private ethToUsdPriceFeed;
AggregatorV3Interface private daiToEthPriceFeed;
uint256 public immutable totalTokens = 2 * 10 ** 7 * 10 ** 9;
address public immutable admin;
uint256 public tokensSold;
bool public isGCOStarted;
address immutable fundReceiver;
uint256 public immutable tokensPerPhase = 4 * 10 ** 6 * 10 ** 9;
uint256[] private pricePerPhase;
uint256 private startTime;
uint256 private immutable phaseDuration;
event Transfer(address indexed from, address indexed to, uint256 value);
constructor(IERC20 _grl, IERC20 _dai) {
}
modifier onlyOwner() {
}
function buyWithEth() public payable noReentrant {
}
function buyWithDAI(uint256 _amountOfDAI) public noReentrant {
require(_amountOfDAI > 0);
(, uint256 priceOfGrl) = getGrlPrice();
require(_amountOfDAI >= priceOfGrl, "Lower value than Price");
uint256 tokensToBuy = grlOfDai(_amountOfDAI);
require(
tokensSold + tokensToBuy <= totalTokens,
"Not enough tokens left"
);
require(
block.timestamp <= startTime + phaseDuration * 5,
"No more coin offering!"
);
require(<FILL_ME>)
GRL.transfer(msg.sender, tokensToBuy);
tokensSold += tokensToBuy;
}
function ethPriceInUSD() public view returns (uint256) {
}
function daiPriceInEth() public view returns (uint256) {
}
function convertDaiToEth(uint256 daiAmount) public view returns (uint256) {
}
function convertEthToUsd(uint256 ethAmount) public view returns (uint256) {
}
function startGCO() external onlyOwner {
}
function grlOfDai(uint256 _amountOfDAI) public view returns (uint256) {
}
function grlOfEth(uint256 _amountOfEth) public view returns (uint256) {
}
function getGrlPrice() public view returns (uint256, uint256) {
}
function withdrawGRL() external onlyOwner {
}
}
| DAI.transferFrom(msg.sender,fundReceiver,_amountOfDAI),"You must Deposit some DAI" | 491,394 | DAI.transferFrom(msg.sender,fundReceiver,_amountOfDAI) |
null | /**
* The Icebox is the coolest way to freeze tokens and liquidity on the planet!
* Join the fun here: https://icebox.ski
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
function _nonReentrantBefore() private {
}
function _nonReentrantAfter() private {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: 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
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IIGLOO {
function balanceOf(address account) external returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function resetLastFreeze(address account) external;
}
interface IFactory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
}
interface IPair {
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
contract Icebox is ReentrancyGuard {
struct Freeze {
uint256 id;
address user;
address token;
uint256 amount;
uint256 supply;
uint256 freezeDate;
uint256 thawDate;
bool frozen;
}
mapping (uint256 => Freeze) public freezes;
mapping (address => uint256[]) public freezesByUser;
uint256 public freezeCounter;
address public treasuryMPG;
address public treasuryIGLOO;
uint256 public treasuryMPGBps;
uint256 public treasuryIGLOOBps;
uint256 public fee;
uint256 public constant maxTokenValue = 15 * (10 ** 16);
IIGLOO public IGLOO;
address public weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
IFactory public factory = IFactory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
IERC20 public WETH = IERC20(weth);
IRouter public router = IRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
event FeeReceived(uint256 indexed id, uint256 indexed amount, uint256 indexed timestamp);
modifier onlyTreasury() {
}
constructor(address _treasuryMPG, address _treasuryIGLOO, uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps, uint256 _fee, address _igloo) {
treasuryMPG = _treasuryMPG;
treasuryIGLOO = _treasuryIGLOO;
require(<FILL_ME>)
treasuryMPGBps = _treasuryMPGBps;
treasuryIGLOOBps = _treasuryIGLOOBps;
fee = _fee;
IGLOO = IIGLOO(_igloo);
}
function freeze(address _token, uint256 _amount, uint256 _seconds) external payable nonReentrant {
}
function transfer(uint256 _id, address _user) external nonReentrant {
}
function refreeze(uint256 _id, uint256 _seconds) external nonReentrant {
}
function unfreeze(uint256 _id) external nonReentrant {
}
function setFee(uint256 _fee) external nonReentrant onlyTreasury {
}
function setTreasuryMPG(address _treasuryMPG) external nonReentrant onlyTreasury {
}
function setTreasuryIGLOO(address _treasuryIGLOO) external nonReentrant onlyTreasury {
}
function setTreasuryBps(uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps) external nonReentrant onlyTreasury {
}
function reqFee() external view returns (uint256) {
}
function reqTreasuryMPG() external view returns (address) {
}
function reqTreasuryIGLOO() external view returns (address) {
}
function reqTreasuryBps() external view returns (uint256, uint256) {
}
function reqIgloo() external view returns (address) {
}
function reqNumFreezes() external view returns (uint256) {
}
function reqFreeze(uint256 _id, bool _updatedSupply) public view returns (Freeze memory) {
}
function reqFreezes(uint256 _from, uint256 _to, bool _updatedSupply) external view returns (Freeze[] memory) {
}
function reqFreezeIDsByUser(address _user) external view returns (uint256[] memory) {
}
function reqFreezesByUser(address _user, bool _updatedSupply) external view returns (Freeze[] memory) {
}
receive() external payable {}
}
| _treasuryMPGBps+_treasuryIGLOOBps==10000 | 491,415 | _treasuryMPGBps+_treasuryIGLOOBps==10000 |
"Balance too low" | /**
* The Icebox is the coolest way to freeze tokens and liquidity on the planet!
* Join the fun here: https://icebox.ski
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
function _nonReentrantBefore() private {
}
function _nonReentrantAfter() private {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: 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
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IIGLOO {
function balanceOf(address account) external returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function resetLastFreeze(address account) external;
}
interface IFactory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
}
interface IPair {
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
contract Icebox is ReentrancyGuard {
struct Freeze {
uint256 id;
address user;
address token;
uint256 amount;
uint256 supply;
uint256 freezeDate;
uint256 thawDate;
bool frozen;
}
mapping (uint256 => Freeze) public freezes;
mapping (address => uint256[]) public freezesByUser;
uint256 public freezeCounter;
address public treasuryMPG;
address public treasuryIGLOO;
uint256 public treasuryMPGBps;
uint256 public treasuryIGLOOBps;
uint256 public fee;
uint256 public constant maxTokenValue = 15 * (10 ** 16);
IIGLOO public IGLOO;
address public weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
IFactory public factory = IFactory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
IERC20 public WETH = IERC20(weth);
IRouter public router = IRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
event FeeReceived(uint256 indexed id, uint256 indexed amount, uint256 indexed timestamp);
modifier onlyTreasury() {
}
constructor(address _treasuryMPG, address _treasuryIGLOO, uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps, uint256 _fee, address _igloo) {
}
function freeze(address _token, uint256 _amount, uint256 _seconds) external payable nonReentrant {
require(msg.value == fee);
IERC20 _Token = IERC20(_token);
require(<FILL_ME>)
require(_Token.allowance(msg.sender, address(this)) >= _amount, "Allowance too low");
uint256 _balance = _Token.balanceOf(address(this));
_Token.transferFrom(msg.sender, address(this), _amount);
require(_Token.balanceOf(address(this)) == _balance + _amount);
freezes[freezeCounter] = Freeze({
id: freezeCounter,
user: msg.sender,
token: _token,
amount: _amount,
supply: _Token.totalSupply(),
freezeDate: block.timestamp,
thawDate: block.timestamp + _seconds,
frozen: true
});
freezesByUser[msg.sender].push(freezeCounter);
freezeCounter = freezeCounter + 1;
if (treasuryMPGBps > 0) {
payable(treasuryMPG).call{value: fee * treasuryMPGBps / 10000}("");
}
if (treasuryIGLOOBps > 0) {
payable(treasuryIGLOO).call{value: fee * treasuryIGLOOBps / 10000}("");
}
emit FeeReceived(freezeCounter - 1, fee, block.timestamp);
IPair _pair = IPair(_token);
try _pair.token0() {
(uint112 _reserveIn, uint112 _reserveOut, ) = _pair.getReserves();
if (_pair.token0() == weth) {
if (factory.getPair(weth, _pair.token1()) == _token) {
uint256 _months = _seconds / 2629800;
if (_months >= 1) {
if (_months > 36) {
_months = 36;
}
uint256 _tokens = IGLOO.balanceOf(address(this)) * _months / 1000000;
uint256 _amountOut = router.getAmountOut(_tokens, _reserveOut, _reserveIn);
if (_amountOut >= maxTokenValue) {
_tokens = router.getAmountIn(maxTokenValue, _reserveOut, _reserveIn);
}
try IGLOO.transfer(msg.sender, _tokens) { IGLOO.resetLastFreeze(msg.sender); } catch {}
}
}
} else if (_pair.token1() == weth) {
if (factory.getPair(_pair.token0(), weth) == _token) {
uint256 _months = _seconds / 2629800;
_months = 36;
if (_months >= 1) {
if (_months > 36) {
_months = 36;
}
uint256 _tokens = IGLOO.balanceOf(address(this)) * _months / 10000;
uint256 _amountOut = router.getAmountOut(_tokens, _reserveIn, _reserveOut);
if (_amountOut >= maxTokenValue) {
_tokens = router.getAmountIn(maxTokenValue, _reserveIn, _reserveOut);
}
try IGLOO.transfer(msg.sender, _tokens) { IGLOO.resetLastFreeze(msg.sender); } catch {}
}
}
}
} catch {}
}
function transfer(uint256 _id, address _user) external nonReentrant {
}
function refreeze(uint256 _id, uint256 _seconds) external nonReentrant {
}
function unfreeze(uint256 _id) external nonReentrant {
}
function setFee(uint256 _fee) external nonReentrant onlyTreasury {
}
function setTreasuryMPG(address _treasuryMPG) external nonReentrant onlyTreasury {
}
function setTreasuryIGLOO(address _treasuryIGLOO) external nonReentrant onlyTreasury {
}
function setTreasuryBps(uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps) external nonReentrant onlyTreasury {
}
function reqFee() external view returns (uint256) {
}
function reqTreasuryMPG() external view returns (address) {
}
function reqTreasuryIGLOO() external view returns (address) {
}
function reqTreasuryBps() external view returns (uint256, uint256) {
}
function reqIgloo() external view returns (address) {
}
function reqNumFreezes() external view returns (uint256) {
}
function reqFreeze(uint256 _id, bool _updatedSupply) public view returns (Freeze memory) {
}
function reqFreezes(uint256 _from, uint256 _to, bool _updatedSupply) external view returns (Freeze[] memory) {
}
function reqFreezeIDsByUser(address _user) external view returns (uint256[] memory) {
}
function reqFreezesByUser(address _user, bool _updatedSupply) external view returns (Freeze[] memory) {
}
receive() external payable {}
}
| _Token.balanceOf(msg.sender)>=_amount,"Balance too low" | 491,415 | _Token.balanceOf(msg.sender)>=_amount |
"Allowance too low" | /**
* The Icebox is the coolest way to freeze tokens and liquidity on the planet!
* Join the fun here: https://icebox.ski
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
function _nonReentrantBefore() private {
}
function _nonReentrantAfter() private {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: 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
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IIGLOO {
function balanceOf(address account) external returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function resetLastFreeze(address account) external;
}
interface IFactory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
}
interface IPair {
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
contract Icebox is ReentrancyGuard {
struct Freeze {
uint256 id;
address user;
address token;
uint256 amount;
uint256 supply;
uint256 freezeDate;
uint256 thawDate;
bool frozen;
}
mapping (uint256 => Freeze) public freezes;
mapping (address => uint256[]) public freezesByUser;
uint256 public freezeCounter;
address public treasuryMPG;
address public treasuryIGLOO;
uint256 public treasuryMPGBps;
uint256 public treasuryIGLOOBps;
uint256 public fee;
uint256 public constant maxTokenValue = 15 * (10 ** 16);
IIGLOO public IGLOO;
address public weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
IFactory public factory = IFactory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
IERC20 public WETH = IERC20(weth);
IRouter public router = IRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
event FeeReceived(uint256 indexed id, uint256 indexed amount, uint256 indexed timestamp);
modifier onlyTreasury() {
}
constructor(address _treasuryMPG, address _treasuryIGLOO, uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps, uint256 _fee, address _igloo) {
}
function freeze(address _token, uint256 _amount, uint256 _seconds) external payable nonReentrant {
require(msg.value == fee);
IERC20 _Token = IERC20(_token);
require(_Token.balanceOf(msg.sender) >= _amount, "Balance too low");
require(<FILL_ME>)
uint256 _balance = _Token.balanceOf(address(this));
_Token.transferFrom(msg.sender, address(this), _amount);
require(_Token.balanceOf(address(this)) == _balance + _amount);
freezes[freezeCounter] = Freeze({
id: freezeCounter,
user: msg.sender,
token: _token,
amount: _amount,
supply: _Token.totalSupply(),
freezeDate: block.timestamp,
thawDate: block.timestamp + _seconds,
frozen: true
});
freezesByUser[msg.sender].push(freezeCounter);
freezeCounter = freezeCounter + 1;
if (treasuryMPGBps > 0) {
payable(treasuryMPG).call{value: fee * treasuryMPGBps / 10000}("");
}
if (treasuryIGLOOBps > 0) {
payable(treasuryIGLOO).call{value: fee * treasuryIGLOOBps / 10000}("");
}
emit FeeReceived(freezeCounter - 1, fee, block.timestamp);
IPair _pair = IPair(_token);
try _pair.token0() {
(uint112 _reserveIn, uint112 _reserveOut, ) = _pair.getReserves();
if (_pair.token0() == weth) {
if (factory.getPair(weth, _pair.token1()) == _token) {
uint256 _months = _seconds / 2629800;
if (_months >= 1) {
if (_months > 36) {
_months = 36;
}
uint256 _tokens = IGLOO.balanceOf(address(this)) * _months / 1000000;
uint256 _amountOut = router.getAmountOut(_tokens, _reserveOut, _reserveIn);
if (_amountOut >= maxTokenValue) {
_tokens = router.getAmountIn(maxTokenValue, _reserveOut, _reserveIn);
}
try IGLOO.transfer(msg.sender, _tokens) { IGLOO.resetLastFreeze(msg.sender); } catch {}
}
}
} else if (_pair.token1() == weth) {
if (factory.getPair(_pair.token0(), weth) == _token) {
uint256 _months = _seconds / 2629800;
_months = 36;
if (_months >= 1) {
if (_months > 36) {
_months = 36;
}
uint256 _tokens = IGLOO.balanceOf(address(this)) * _months / 10000;
uint256 _amountOut = router.getAmountOut(_tokens, _reserveIn, _reserveOut);
if (_amountOut >= maxTokenValue) {
_tokens = router.getAmountIn(maxTokenValue, _reserveIn, _reserveOut);
}
try IGLOO.transfer(msg.sender, _tokens) { IGLOO.resetLastFreeze(msg.sender); } catch {}
}
}
}
} catch {}
}
function transfer(uint256 _id, address _user) external nonReentrant {
}
function refreeze(uint256 _id, uint256 _seconds) external nonReentrant {
}
function unfreeze(uint256 _id) external nonReentrant {
}
function setFee(uint256 _fee) external nonReentrant onlyTreasury {
}
function setTreasuryMPG(address _treasuryMPG) external nonReentrant onlyTreasury {
}
function setTreasuryIGLOO(address _treasuryIGLOO) external nonReentrant onlyTreasury {
}
function setTreasuryBps(uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps) external nonReentrant onlyTreasury {
}
function reqFee() external view returns (uint256) {
}
function reqTreasuryMPG() external view returns (address) {
}
function reqTreasuryIGLOO() external view returns (address) {
}
function reqTreasuryBps() external view returns (uint256, uint256) {
}
function reqIgloo() external view returns (address) {
}
function reqNumFreezes() external view returns (uint256) {
}
function reqFreeze(uint256 _id, bool _updatedSupply) public view returns (Freeze memory) {
}
function reqFreezes(uint256 _from, uint256 _to, bool _updatedSupply) external view returns (Freeze[] memory) {
}
function reqFreezeIDsByUser(address _user) external view returns (uint256[] memory) {
}
function reqFreezesByUser(address _user, bool _updatedSupply) external view returns (Freeze[] memory) {
}
receive() external payable {}
}
| _Token.allowance(msg.sender,address(this))>=_amount,"Allowance too low" | 491,415 | _Token.allowance(msg.sender,address(this))>=_amount |
null | /**
* The Icebox is the coolest way to freeze tokens and liquidity on the planet!
* Join the fun here: https://icebox.ski
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
function _nonReentrantBefore() private {
}
function _nonReentrantAfter() private {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: 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
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IIGLOO {
function balanceOf(address account) external returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function resetLastFreeze(address account) external;
}
interface IFactory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
}
interface IPair {
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
contract Icebox is ReentrancyGuard {
struct Freeze {
uint256 id;
address user;
address token;
uint256 amount;
uint256 supply;
uint256 freezeDate;
uint256 thawDate;
bool frozen;
}
mapping (uint256 => Freeze) public freezes;
mapping (address => uint256[]) public freezesByUser;
uint256 public freezeCounter;
address public treasuryMPG;
address public treasuryIGLOO;
uint256 public treasuryMPGBps;
uint256 public treasuryIGLOOBps;
uint256 public fee;
uint256 public constant maxTokenValue = 15 * (10 ** 16);
IIGLOO public IGLOO;
address public weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
IFactory public factory = IFactory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
IERC20 public WETH = IERC20(weth);
IRouter public router = IRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
event FeeReceived(uint256 indexed id, uint256 indexed amount, uint256 indexed timestamp);
modifier onlyTreasury() {
}
constructor(address _treasuryMPG, address _treasuryIGLOO, uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps, uint256 _fee, address _igloo) {
}
function freeze(address _token, uint256 _amount, uint256 _seconds) external payable nonReentrant {
require(msg.value == fee);
IERC20 _Token = IERC20(_token);
require(_Token.balanceOf(msg.sender) >= _amount, "Balance too low");
require(_Token.allowance(msg.sender, address(this)) >= _amount, "Allowance too low");
uint256 _balance = _Token.balanceOf(address(this));
_Token.transferFrom(msg.sender, address(this), _amount);
require(<FILL_ME>)
freezes[freezeCounter] = Freeze({
id: freezeCounter,
user: msg.sender,
token: _token,
amount: _amount,
supply: _Token.totalSupply(),
freezeDate: block.timestamp,
thawDate: block.timestamp + _seconds,
frozen: true
});
freezesByUser[msg.sender].push(freezeCounter);
freezeCounter = freezeCounter + 1;
if (treasuryMPGBps > 0) {
payable(treasuryMPG).call{value: fee * treasuryMPGBps / 10000}("");
}
if (treasuryIGLOOBps > 0) {
payable(treasuryIGLOO).call{value: fee * treasuryIGLOOBps / 10000}("");
}
emit FeeReceived(freezeCounter - 1, fee, block.timestamp);
IPair _pair = IPair(_token);
try _pair.token0() {
(uint112 _reserveIn, uint112 _reserveOut, ) = _pair.getReserves();
if (_pair.token0() == weth) {
if (factory.getPair(weth, _pair.token1()) == _token) {
uint256 _months = _seconds / 2629800;
if (_months >= 1) {
if (_months > 36) {
_months = 36;
}
uint256 _tokens = IGLOO.balanceOf(address(this)) * _months / 1000000;
uint256 _amountOut = router.getAmountOut(_tokens, _reserveOut, _reserveIn);
if (_amountOut >= maxTokenValue) {
_tokens = router.getAmountIn(maxTokenValue, _reserveOut, _reserveIn);
}
try IGLOO.transfer(msg.sender, _tokens) { IGLOO.resetLastFreeze(msg.sender); } catch {}
}
}
} else if (_pair.token1() == weth) {
if (factory.getPair(_pair.token0(), weth) == _token) {
uint256 _months = _seconds / 2629800;
_months = 36;
if (_months >= 1) {
if (_months > 36) {
_months = 36;
}
uint256 _tokens = IGLOO.balanceOf(address(this)) * _months / 10000;
uint256 _amountOut = router.getAmountOut(_tokens, _reserveIn, _reserveOut);
if (_amountOut >= maxTokenValue) {
_tokens = router.getAmountIn(maxTokenValue, _reserveIn, _reserveOut);
}
try IGLOO.transfer(msg.sender, _tokens) { IGLOO.resetLastFreeze(msg.sender); } catch {}
}
}
}
} catch {}
}
function transfer(uint256 _id, address _user) external nonReentrant {
}
function refreeze(uint256 _id, uint256 _seconds) external nonReentrant {
}
function unfreeze(uint256 _id) external nonReentrant {
}
function setFee(uint256 _fee) external nonReentrant onlyTreasury {
}
function setTreasuryMPG(address _treasuryMPG) external nonReentrant onlyTreasury {
}
function setTreasuryIGLOO(address _treasuryIGLOO) external nonReentrant onlyTreasury {
}
function setTreasuryBps(uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps) external nonReentrant onlyTreasury {
}
function reqFee() external view returns (uint256) {
}
function reqTreasuryMPG() external view returns (address) {
}
function reqTreasuryIGLOO() external view returns (address) {
}
function reqTreasuryBps() external view returns (uint256, uint256) {
}
function reqIgloo() external view returns (address) {
}
function reqNumFreezes() external view returns (uint256) {
}
function reqFreeze(uint256 _id, bool _updatedSupply) public view returns (Freeze memory) {
}
function reqFreezes(uint256 _from, uint256 _to, bool _updatedSupply) external view returns (Freeze[] memory) {
}
function reqFreezeIDsByUser(address _user) external view returns (uint256[] memory) {
}
function reqFreezesByUser(address _user, bool _updatedSupply) external view returns (Freeze[] memory) {
}
receive() external payable {}
}
| _Token.balanceOf(address(this))==_balance+_amount | 491,415 | _Token.balanceOf(address(this))==_balance+_amount |
null | /**
* The Icebox is the coolest way to freeze tokens and liquidity on the planet!
* Join the fun here: https://icebox.ski
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
function _nonReentrantBefore() private {
}
function _nonReentrantAfter() private {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: 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
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IIGLOO {
function balanceOf(address account) external returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function resetLastFreeze(address account) external;
}
interface IFactory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
}
interface IPair {
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
contract Icebox is ReentrancyGuard {
struct Freeze {
uint256 id;
address user;
address token;
uint256 amount;
uint256 supply;
uint256 freezeDate;
uint256 thawDate;
bool frozen;
}
mapping (uint256 => Freeze) public freezes;
mapping (address => uint256[]) public freezesByUser;
uint256 public freezeCounter;
address public treasuryMPG;
address public treasuryIGLOO;
uint256 public treasuryMPGBps;
uint256 public treasuryIGLOOBps;
uint256 public fee;
uint256 public constant maxTokenValue = 15 * (10 ** 16);
IIGLOO public IGLOO;
address public weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
IFactory public factory = IFactory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
IERC20 public WETH = IERC20(weth);
IRouter public router = IRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
event FeeReceived(uint256 indexed id, uint256 indexed amount, uint256 indexed timestamp);
modifier onlyTreasury() {
}
constructor(address _treasuryMPG, address _treasuryIGLOO, uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps, uint256 _fee, address _igloo) {
}
function freeze(address _token, uint256 _amount, uint256 _seconds) external payable nonReentrant {
}
function transfer(uint256 _id, address _user) external nonReentrant {
require(freezeCounter > _id);
Freeze storage _freeze = freezes[_id];
require(<FILL_ME>)
require(_freeze.user == msg.sender);
_freeze.user = _user;
freezes[_freeze.id] = _freeze;
freezesByUser[_user].push(freezeCounter);
}
function refreeze(uint256 _id, uint256 _seconds) external nonReentrant {
}
function unfreeze(uint256 _id) external nonReentrant {
}
function setFee(uint256 _fee) external nonReentrant onlyTreasury {
}
function setTreasuryMPG(address _treasuryMPG) external nonReentrant onlyTreasury {
}
function setTreasuryIGLOO(address _treasuryIGLOO) external nonReentrant onlyTreasury {
}
function setTreasuryBps(uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps) external nonReentrant onlyTreasury {
}
function reqFee() external view returns (uint256) {
}
function reqTreasuryMPG() external view returns (address) {
}
function reqTreasuryIGLOO() external view returns (address) {
}
function reqTreasuryBps() external view returns (uint256, uint256) {
}
function reqIgloo() external view returns (address) {
}
function reqNumFreezes() external view returns (uint256) {
}
function reqFreeze(uint256 _id, bool _updatedSupply) public view returns (Freeze memory) {
}
function reqFreezes(uint256 _from, uint256 _to, bool _updatedSupply) external view returns (Freeze[] memory) {
}
function reqFreezeIDsByUser(address _user) external view returns (uint256[] memory) {
}
function reqFreezesByUser(address _user, bool _updatedSupply) external view returns (Freeze[] memory) {
}
receive() external payable {}
}
| _freeze.frozen | 491,415 | _freeze.frozen |
null | /**
* The Icebox is the coolest way to freeze tokens and liquidity on the planet!
* Join the fun here: https://icebox.ski
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
function _nonReentrantBefore() private {
}
function _nonReentrantAfter() private {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: 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
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IIGLOO {
function balanceOf(address account) external returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function resetLastFreeze(address account) external;
}
interface IFactory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
}
interface IPair {
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
contract Icebox is ReentrancyGuard {
struct Freeze {
uint256 id;
address user;
address token;
uint256 amount;
uint256 supply;
uint256 freezeDate;
uint256 thawDate;
bool frozen;
}
mapping (uint256 => Freeze) public freezes;
mapping (address => uint256[]) public freezesByUser;
uint256 public freezeCounter;
address public treasuryMPG;
address public treasuryIGLOO;
uint256 public treasuryMPGBps;
uint256 public treasuryIGLOOBps;
uint256 public fee;
uint256 public constant maxTokenValue = 15 * (10 ** 16);
IIGLOO public IGLOO;
address public weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
IFactory public factory = IFactory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
IERC20 public WETH = IERC20(weth);
IRouter public router = IRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
event FeeReceived(uint256 indexed id, uint256 indexed amount, uint256 indexed timestamp);
modifier onlyTreasury() {
}
constructor(address _treasuryMPG, address _treasuryIGLOO, uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps, uint256 _fee, address _igloo) {
}
function freeze(address _token, uint256 _amount, uint256 _seconds) external payable nonReentrant {
}
function transfer(uint256 _id, address _user) external nonReentrant {
}
function refreeze(uint256 _id, uint256 _seconds) external nonReentrant {
require(freezeCounter > _id);
Freeze storage _freeze = freezes[_id];
require(_freeze.frozen);
require(_freeze.user == msg.sender);
require(<FILL_ME>)
if (block.timestamp >= _freeze.thawDate) {
require(block.timestamp + _seconds >= block.timestamp);
}
_freeze.thawDate = block.timestamp + _seconds;
freezes[_freeze.id] = _freeze;
}
function unfreeze(uint256 _id) external nonReentrant {
}
function setFee(uint256 _fee) external nonReentrant onlyTreasury {
}
function setTreasuryMPG(address _treasuryMPG) external nonReentrant onlyTreasury {
}
function setTreasuryIGLOO(address _treasuryIGLOO) external nonReentrant onlyTreasury {
}
function setTreasuryBps(uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps) external nonReentrant onlyTreasury {
}
function reqFee() external view returns (uint256) {
}
function reqTreasuryMPG() external view returns (address) {
}
function reqTreasuryIGLOO() external view returns (address) {
}
function reqTreasuryBps() external view returns (uint256, uint256) {
}
function reqIgloo() external view returns (address) {
}
function reqNumFreezes() external view returns (uint256) {
}
function reqFreeze(uint256 _id, bool _updatedSupply) public view returns (Freeze memory) {
}
function reqFreezes(uint256 _from, uint256 _to, bool _updatedSupply) external view returns (Freeze[] memory) {
}
function reqFreezeIDsByUser(address _user) external view returns (uint256[] memory) {
}
function reqFreezesByUser(address _user, bool _updatedSupply) external view returns (Freeze[] memory) {
}
receive() external payable {}
}
| block.timestamp+_seconds>=_freeze.thawDate | 491,415 | block.timestamp+_seconds>=_freeze.thawDate |
null | /**
* The Icebox is the coolest way to freeze tokens and liquidity on the planet!
* Join the fun here: https://icebox.ski
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
}
function _nonReentrantBefore() private {
}
function _nonReentrantAfter() private {
}
}
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: 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
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
}
interface IIGLOO {
function balanceOf(address account) external returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function resetLastFreeze(address account) external;
}
interface IFactory {
function getPair(address tokenA, address tokenB) external view returns (address pair);
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IRouter {
function factory() external pure returns (address);
function swapExactTokensForETHSupportingFeeOnTransferTokens(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external;
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
}
interface IPair {
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
}
contract Icebox is ReentrancyGuard {
struct Freeze {
uint256 id;
address user;
address token;
uint256 amount;
uint256 supply;
uint256 freezeDate;
uint256 thawDate;
bool frozen;
}
mapping (uint256 => Freeze) public freezes;
mapping (address => uint256[]) public freezesByUser;
uint256 public freezeCounter;
address public treasuryMPG;
address public treasuryIGLOO;
uint256 public treasuryMPGBps;
uint256 public treasuryIGLOOBps;
uint256 public fee;
uint256 public constant maxTokenValue = 15 * (10 ** 16);
IIGLOO public IGLOO;
address public weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
IFactory public factory = IFactory(0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f);
IERC20 public WETH = IERC20(weth);
IRouter public router = IRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
event FeeReceived(uint256 indexed id, uint256 indexed amount, uint256 indexed timestamp);
modifier onlyTreasury() {
}
constructor(address _treasuryMPG, address _treasuryIGLOO, uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps, uint256 _fee, address _igloo) {
}
function freeze(address _token, uint256 _amount, uint256 _seconds) external payable nonReentrant {
}
function transfer(uint256 _id, address _user) external nonReentrant {
}
function refreeze(uint256 _id, uint256 _seconds) external nonReentrant {
require(freezeCounter > _id);
Freeze storage _freeze = freezes[_id];
require(_freeze.frozen);
require(_freeze.user == msg.sender);
require(block.timestamp + _seconds >= _freeze.thawDate);
if (block.timestamp >= _freeze.thawDate) {
require(<FILL_ME>)
}
_freeze.thawDate = block.timestamp + _seconds;
freezes[_freeze.id] = _freeze;
}
function unfreeze(uint256 _id) external nonReentrant {
}
function setFee(uint256 _fee) external nonReentrant onlyTreasury {
}
function setTreasuryMPG(address _treasuryMPG) external nonReentrant onlyTreasury {
}
function setTreasuryIGLOO(address _treasuryIGLOO) external nonReentrant onlyTreasury {
}
function setTreasuryBps(uint256 _treasuryMPGBps, uint256 _treasuryIGLOOBps) external nonReentrant onlyTreasury {
}
function reqFee() external view returns (uint256) {
}
function reqTreasuryMPG() external view returns (address) {
}
function reqTreasuryIGLOO() external view returns (address) {
}
function reqTreasuryBps() external view returns (uint256, uint256) {
}
function reqIgloo() external view returns (address) {
}
function reqNumFreezes() external view returns (uint256) {
}
function reqFreeze(uint256 _id, bool _updatedSupply) public view returns (Freeze memory) {
}
function reqFreezes(uint256 _from, uint256 _to, bool _updatedSupply) external view returns (Freeze[] memory) {
}
function reqFreezeIDsByUser(address _user) external view returns (uint256[] memory) {
}
function reqFreezesByUser(address _user, bool _updatedSupply) external view returns (Freeze[] memory) {
}
receive() external payable {}
}
| block.timestamp+_seconds>=block.timestamp | 491,415 | block.timestamp+_seconds>=block.timestamp |
"Exceeds max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
// _______..______ ___ ______ _______
// / || _ \ / \ / || ____|
// | (----`| |_) | / ^ \ | ,----'| |__
// \ \ | ___/ / /_\ \ | | | __|
// .----) | | | / _____ \ | `----.| |____
// |_______/ | _| /__/ \__\ \______||_______|
// .______ __ __ _______ _______ __ .__ __. _______.
// | _ \ | | | | | ____|| ____|| | | \ | | / |
// | |_) | | | | | | |__ | |__ | | | \| | | (----`
// | ___/ | | | | | __| | __| | | | . ` | \ \
// | | | `--' | | | | | | | | |\ | .----) |
// | _| \______/ |__| |__| |__| |__| \__| |_______/
//
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "./lib/AllowList.sol";
import "./lib/ContractMetadata.sol";
contract SpacePuffins is
ERC721A,
Ownable,
ERC2981,
ContractMetadata,
AllowList
{
uint16 public constant maxSupply = 5000;
uint16 public maxAllowListMintsPerAddress = 5;
uint16 public maxFreeMintSupply = 900;
uint16 public totalFreeMinted = 0;
uint16 public maxPublicMintsPerAddress = 100;
uint256 public price = 0.007 ether;
address payable public withdrawAddress;
string private _spBaseURI;
enum Phase {
Premint,
AllowListMint,
PublicMint,
SoldOut
}
event PhaseShift(Phase newPhase);
Phase public phase;
constructor(
string memory name_,
string memory symbol_,
string memory baseUri_,
string memory contractUri_,
uint96 royalty_
) ERC721A(name_, symbol_) {
}
modifier checkSupply(uint256 quantity) {
require(<FILL_ME>)
_;
}
function totalMinted()
external
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function remainingAllowListMints(address address_)
public
view
returns (uint256)
{
}
function allowListMint(uint256 quantity, bytes32[] calldata proof)
external
payable
onlyAllowList(proof)
checkSupply(quantity)
{
}
function mint(uint256 quantity) external payable checkSupply(quantity) {
}
// =============================================================
// PRIVATE
// =============================================================
function _allowListMintCost(bool freeMintEligible, uint256 quantity)
private
view
returns (uint256)
{
}
// =============================================================
// OWNER ONLY
// =============================================================
function setWithdrawAddress(address payable withdrawAddress_)
public
onlyOwner
{
}
function withdraw() external onlyOwner {
}
function setPhase(Phase phase_) public onlyOwner {
}
function setPrice(uint256 price_) public onlyOwner {
}
function setDefaultRoyalty(address receiver, uint96 feeNumerator)
public
onlyOwner
{
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setTotalFreeMinted(uint16 totalFreeMinted_) public onlyOwner {
}
function setMaxAllowListMintsPerAddress(uint16 maxAllowListMintsPerAddress_) public onlyOwner {
}
function setMaxFreeMintSupply(uint16 maxFreeMintSupply_) public onlyOwner {
}
function setMaxPublicMintsPerAddress(uint16 maxPublicMintsPerAddress_) public onlyOwner {
}
function setAllowListRoot(bytes32 allowListRoot) public onlyOwner {
}
function setContractMetadataUri(string memory contractMetaDataUri_)
public
onlyOwner
{
}
function batchMint(
address[] calldata addresses,
uint16[] calldata quantities
) public onlyOwner {
}
// =============================================================
// OVERRIDES
// =============================================================
function _startTokenId() internal pure override returns (uint256) {
}
function _baseURI() internal view override returns (string memory) {
}
// IERC165
// see https://chiru-labs.github.io/ERC721A/#/migration?id=supportsinterface
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
}
| quantity+_totalMinted()<=maxSupply,"Exceeds max supply" | 491,572 | quantity+_totalMinted()<=maxSupply |
"AllowList: max mints is 5" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
// _______..______ ___ ______ _______
// / || _ \ / \ / || ____|
// | (----`| |_) | / ^ \ | ,----'| |__
// \ \ | ___/ / /_\ \ | | | __|
// .----) | | | / _____ \ | `----.| |____
// |_______/ | _| /__/ \__\ \______||_______|
// .______ __ __ _______ _______ __ .__ __. _______.
// | _ \ | | | | | ____|| ____|| | | \ | | / |
// | |_) | | | | | | |__ | |__ | | | \| | | (----`
// | ___/ | | | | | __| | __| | | | . ` | \ \
// | | | `--' | | | | | | | | |\ | .----) |
// | _| \______/ |__| |__| |__| |__| \__| |_______/
//
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "./lib/AllowList.sol";
import "./lib/ContractMetadata.sol";
contract SpacePuffins is
ERC721A,
Ownable,
ERC2981,
ContractMetadata,
AllowList
{
uint16 public constant maxSupply = 5000;
uint16 public maxAllowListMintsPerAddress = 5;
uint16 public maxFreeMintSupply = 900;
uint16 public totalFreeMinted = 0;
uint16 public maxPublicMintsPerAddress = 100;
uint256 public price = 0.007 ether;
address payable public withdrawAddress;
string private _spBaseURI;
enum Phase {
Premint,
AllowListMint,
PublicMint,
SoldOut
}
event PhaseShift(Phase newPhase);
Phase public phase;
constructor(
string memory name_,
string memory symbol_,
string memory baseUri_,
string memory contractUri_,
uint96 royalty_
) ERC721A(name_, symbol_) {
}
modifier checkSupply(uint256 quantity) {
}
function totalMinted()
external
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function remainingAllowListMints(address address_)
public
view
returns (uint256)
{
}
function allowListMint(uint256 quantity, bytes32[] calldata proof)
external
payable
onlyAllowList(proof)
checkSupply(quantity)
{
require(phase == Phase.AllowListMint, "AllowList: mint not open");
uint64 totalMinted_ = _getAux(msg.sender);
require(<FILL_ME>)
bool freeMintEligible = (totalFreeMinted < maxFreeMintSupply &&
totalMinted_ == 0);
uint256 cost = _allowListMintCost(freeMintEligible, quantity);
require(msg.value >= cost, "AllowList: Insufficient Funds");
_mint(msg.sender, quantity);
_setAux(msg.sender, totalMinted_ + uint64(quantity));
if (freeMintEligible) {
totalFreeMinted++;
}
}
function mint(uint256 quantity) external payable checkSupply(quantity) {
}
// =============================================================
// PRIVATE
// =============================================================
function _allowListMintCost(bool freeMintEligible, uint256 quantity)
private
view
returns (uint256)
{
}
// =============================================================
// OWNER ONLY
// =============================================================
function setWithdrawAddress(address payable withdrawAddress_)
public
onlyOwner
{
}
function withdraw() external onlyOwner {
}
function setPhase(Phase phase_) public onlyOwner {
}
function setPrice(uint256 price_) public onlyOwner {
}
function setDefaultRoyalty(address receiver, uint96 feeNumerator)
public
onlyOwner
{
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setTotalFreeMinted(uint16 totalFreeMinted_) public onlyOwner {
}
function setMaxAllowListMintsPerAddress(uint16 maxAllowListMintsPerAddress_) public onlyOwner {
}
function setMaxFreeMintSupply(uint16 maxFreeMintSupply_) public onlyOwner {
}
function setMaxPublicMintsPerAddress(uint16 maxPublicMintsPerAddress_) public onlyOwner {
}
function setAllowListRoot(bytes32 allowListRoot) public onlyOwner {
}
function setContractMetadataUri(string memory contractMetaDataUri_)
public
onlyOwner
{
}
function batchMint(
address[] calldata addresses,
uint16[] calldata quantities
) public onlyOwner {
}
// =============================================================
// OVERRIDES
// =============================================================
function _startTokenId() internal pure override returns (uint256) {
}
function _baseURI() internal view override returns (string memory) {
}
// IERC165
// see https://chiru-labs.github.io/ERC721A/#/migration?id=supportsinterface
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
}
| totalMinted_+quantity<=maxAllowListMintsPerAddress,"AllowList: max mints is 5" | 491,572 | totalMinted_+quantity<=maxAllowListMintsPerAddress |
"Public Mint: reached max per wallet" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
// _______..______ ___ ______ _______
// / || _ \ / \ / || ____|
// | (----`| |_) | / ^ \ | ,----'| |__
// \ \ | ___/ / /_\ \ | | | __|
// .----) | | | / _____ \ | `----.| |____
// |_______/ | _| /__/ \__\ \______||_______|
// .______ __ __ _______ _______ __ .__ __. _______.
// | _ \ | | | | | ____|| ____|| | | \ | | / |
// | |_) | | | | | | |__ | |__ | | | \| | | (----`
// | ___/ | | | | | __| | __| | | | . ` | \ \
// | | | `--' | | | | | | | | |\ | .----) |
// | _| \______/ |__| |__| |__| |__| \__| |_______/
//
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "./lib/AllowList.sol";
import "./lib/ContractMetadata.sol";
contract SpacePuffins is
ERC721A,
Ownable,
ERC2981,
ContractMetadata,
AllowList
{
uint16 public constant maxSupply = 5000;
uint16 public maxAllowListMintsPerAddress = 5;
uint16 public maxFreeMintSupply = 900;
uint16 public totalFreeMinted = 0;
uint16 public maxPublicMintsPerAddress = 100;
uint256 public price = 0.007 ether;
address payable public withdrawAddress;
string private _spBaseURI;
enum Phase {
Premint,
AllowListMint,
PublicMint,
SoldOut
}
event PhaseShift(Phase newPhase);
Phase public phase;
constructor(
string memory name_,
string memory symbol_,
string memory baseUri_,
string memory contractUri_,
uint96 royalty_
) ERC721A(name_, symbol_) {
}
modifier checkSupply(uint256 quantity) {
}
function totalMinted()
external
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function remainingAllowListMints(address address_)
public
view
returns (uint256)
{
}
function allowListMint(uint256 quantity, bytes32[] calldata proof)
external
payable
onlyAllowList(proof)
checkSupply(quantity)
{
}
function mint(uint256 quantity) external payable checkSupply(quantity) {
require(phase == Phase.PublicMint, "Public Mint: not open");
require(<FILL_ME>)
require(
msg.value >= price * quantity,
"Public Mint: Insufficient Funds"
);
_mint(msg.sender, quantity);
}
// =============================================================
// PRIVATE
// =============================================================
function _allowListMintCost(bool freeMintEligible, uint256 quantity)
private
view
returns (uint256)
{
}
// =============================================================
// OWNER ONLY
// =============================================================
function setWithdrawAddress(address payable withdrawAddress_)
public
onlyOwner
{
}
function withdraw() external onlyOwner {
}
function setPhase(Phase phase_) public onlyOwner {
}
function setPrice(uint256 price_) public onlyOwner {
}
function setDefaultRoyalty(address receiver, uint96 feeNumerator)
public
onlyOwner
{
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setTotalFreeMinted(uint16 totalFreeMinted_) public onlyOwner {
}
function setMaxAllowListMintsPerAddress(uint16 maxAllowListMintsPerAddress_) public onlyOwner {
}
function setMaxFreeMintSupply(uint16 maxFreeMintSupply_) public onlyOwner {
}
function setMaxPublicMintsPerAddress(uint16 maxPublicMintsPerAddress_) public onlyOwner {
}
function setAllowListRoot(bytes32 allowListRoot) public onlyOwner {
}
function setContractMetadataUri(string memory contractMetaDataUri_)
public
onlyOwner
{
}
function batchMint(
address[] calldata addresses,
uint16[] calldata quantities
) public onlyOwner {
}
// =============================================================
// OVERRIDES
// =============================================================
function _startTokenId() internal pure override returns (uint256) {
}
function _baseURI() internal view override returns (string memory) {
}
// IERC165
// see https://chiru-labs.github.io/ERC721A/#/migration?id=supportsinterface
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
}
| _numberMinted(msg.sender)+quantity<=maxPublicMintsPerAddress,"Public Mint: reached max per wallet" | 491,572 | _numberMinted(msg.sender)+quantity<=maxPublicMintsPerAddress |
"Exceeds max supply" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.15;
// _______..______ ___ ______ _______
// / || _ \ / \ / || ____|
// | (----`| |_) | / ^ \ | ,----'| |__
// \ \ | ___/ / /_\ \ | | | __|
// .----) | | | / _____ \ | `----.| |____
// |_______/ | _| /__/ \__\ \______||_______|
// .______ __ __ _______ _______ __ .__ __. _______.
// | _ \ | | | | | ____|| ____|| | | \ | | / |
// | |_) | | | | | | |__ | |__ | | | \| | | (----`
// | ___/ | | | | | __| | __| | | | . ` | \ \
// | | | `--' | | | | | | | | |\ | .----) |
// | _| \______/ |__| |__| |__| |__| \__| |_______/
//
import "erc721a/contracts/ERC721A.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "./lib/AllowList.sol";
import "./lib/ContractMetadata.sol";
contract SpacePuffins is
ERC721A,
Ownable,
ERC2981,
ContractMetadata,
AllowList
{
uint16 public constant maxSupply = 5000;
uint16 public maxAllowListMintsPerAddress = 5;
uint16 public maxFreeMintSupply = 900;
uint16 public totalFreeMinted = 0;
uint16 public maxPublicMintsPerAddress = 100;
uint256 public price = 0.007 ether;
address payable public withdrawAddress;
string private _spBaseURI;
enum Phase {
Premint,
AllowListMint,
PublicMint,
SoldOut
}
event PhaseShift(Phase newPhase);
Phase public phase;
constructor(
string memory name_,
string memory symbol_,
string memory baseUri_,
string memory contractUri_,
uint96 royalty_
) ERC721A(name_, symbol_) {
}
modifier checkSupply(uint256 quantity) {
}
function totalMinted()
external
view
returns (
uint256,
uint256,
uint256,
uint256
)
{
}
function remainingAllowListMints(address address_)
public
view
returns (uint256)
{
}
function allowListMint(uint256 quantity, bytes32[] calldata proof)
external
payable
onlyAllowList(proof)
checkSupply(quantity)
{
}
function mint(uint256 quantity) external payable checkSupply(quantity) {
}
// =============================================================
// PRIVATE
// =============================================================
function _allowListMintCost(bool freeMintEligible, uint256 quantity)
private
view
returns (uint256)
{
}
// =============================================================
// OWNER ONLY
// =============================================================
function setWithdrawAddress(address payable withdrawAddress_)
public
onlyOwner
{
}
function withdraw() external onlyOwner {
}
function setPhase(Phase phase_) public onlyOwner {
}
function setPrice(uint256 price_) public onlyOwner {
}
function setDefaultRoyalty(address receiver, uint96 feeNumerator)
public
onlyOwner
{
}
function setBaseURI(string memory newBaseURI) public onlyOwner {
}
function setTotalFreeMinted(uint16 totalFreeMinted_) public onlyOwner {
}
function setMaxAllowListMintsPerAddress(uint16 maxAllowListMintsPerAddress_) public onlyOwner {
}
function setMaxFreeMintSupply(uint16 maxFreeMintSupply_) public onlyOwner {
}
function setMaxPublicMintsPerAddress(uint16 maxPublicMintsPerAddress_) public onlyOwner {
}
function setAllowListRoot(bytes32 allowListRoot) public onlyOwner {
}
function setContractMetadataUri(string memory contractMetaDataUri_)
public
onlyOwner
{
}
function batchMint(
address[] calldata addresses,
uint16[] calldata quantities
) public onlyOwner {
for (uint16 i = 0; i < addresses.length; i++) {
require(<FILL_ME>)
_mint(addresses[i], quantities[i]);
}
}
// =============================================================
// OVERRIDES
// =============================================================
function _startTokenId() internal pure override returns (uint256) {
}
function _baseURI() internal view override returns (string memory) {
}
// IERC165
// see https://chiru-labs.github.io/ERC721A/#/migration?id=supportsinterface
function supportsInterface(bytes4 interfaceId)
public
view
virtual
override(ERC721A, ERC2981)
returns (bool)
{
}
}
| quantities[i]+_totalMinted()<=maxSupply,"Exceeds max supply" | 491,572 | quantities[i]+_totalMinted()<=maxSupply |
"can only initialize once" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.6;
import {IERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
contract AelinFeeEscrow {
using SafeERC20 for IERC20;
uint256 public vestingExpiry;
address public treasury;
address public futureTreasury;
address public escrowedToken;
bool private calledInitialize;
/**
* @dev the constructor will always be blank due to the MinimalProxyFactory pattern
* this allows the underlying logic of this contract to only be deployed once
* and each new escrow created is simply a storage wrapper
*/
constructor() {}
/**
* @dev the treasury may change their address
*/
function setTreasury(address _treasury) external onlyTreasury {
}
function acceptTreasury() external {
}
function initialize(address _treasury, address _escrowedToken) external initOnce {
}
modifier initOnce() {
require(<FILL_ME>)
calledInitialize = true;
_;
}
modifier onlyTreasury() {
}
function delayEscrow() external onlyTreasury {
}
/**
* @dev transfer all the escrow tokens to the treasury
*/
function withdrawToken() external onlyTreasury {
}
event SetTreasury(address indexed treasury);
event InitializeEscrow(
address indexed dealAddress,
address indexed treasury,
uint256 vestingExpiry,
address indexed escrowedToken
);
event DelayEscrow(uint256 vestingExpiry);
}
| !calledInitialize,"can only initialize once" | 491,671 | !calledInitialize |
"Clown Market: Exceeds Max Per Wallet" | // SPDX-License-Identifier: UNLICENSED
/*
β β β β β β β β β β β β β β’β£β£β‘β β β β β β β β β β β β β
β β β β β β β β β β β β£°β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ‘β β β β β β β β β β β
β β β β β β β β β β β β Ώβ Ώβ Ώβ Ώβ Ώβ Ώβ Ώβ Ώβ β β β β β β β β β β
β β β β β£ β£€β£β‘β β °β£Άβ£Άβ£Άβ£Άβ£Άβ£Άβ£Άβ£Άβ£Άβ£Άβ‘β β’β£ β£€β£β β β β
β β β β β β£Ώβ£Ώβ‘β’β£€β£€β£€β£€β£€β£€β£€β£€β£€β£€β£€β£€β‘β’»β£Ώβ£Ώβ β β β β
β β β β β£ β£Ώβ β’ β£Ύβ£Ώβ‘β β£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ£Ώβ β’»β£Ώβ£·β‘β Ήβ£Ώβ£β β β β
β β’°β£Ύβ£Ώβ£Ώβ‘β’ β£Ώβ£Ώβ ⒠⣦β β’Ώβ£Ώβ£Ώβ‘Ώβ ⣴β‘β Ήβ£Ώβ£Ώβ‘β’Ήβ£Ώβ£Ώβ£·β‘β
β β β β’Ώβ£Ώβ β£Όβ£Ώβ‘β’β£Ώβ£Ώβ£β β£Ώβ£Ώβ β£Έβ£Ώβ£Ώβ‘Ⓕ⣿⣧β β£Ώβ‘Ώβ β β
β β β β Έβ Ώβ β£Ώβ£Ώβ β£Έβ‘β β£Ώβ‘β’Ήβ‘β’β£Ώβ β’Έβ£β β£Ώβ£Ώβ β Ώβ β β β
β β β β β β β’Ώβ£Ώβ£€β‘€β£€β£€β‘β’β‘€β β β’ β£€β£€β’€β£€β£Ώβ‘Ώβ β β β β β
β β β β β β β β’β£€β£€β£€β£β‘β β β β β’β£ β£€β£€β£€β‘β β β β β β β
β β β β β β β β’»β£Ώβ‘β Ήβ£Ώβ£·β£€β£β£β£€β£Ύβ£Ώβ β’©β£Ώβ‘β β β β β β β
β β β β β β β β ⠹⣿⣦β£β β Ώβ Ώβ Ώβ Ώβ β£β£΄β£Ώβ β β β β β β β β
β β β β β β β β β β β β Ώβ£Ώβ£Άβ£Άβ£Άβ£Άβ£Ώβ Ώβ β β β β β β β β β β
β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β
*/
pragma solidity >=0.8.0 <0.9.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/common/ERC2981.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import { DefaultOperatorFilterer, OperatorFilterer } from "./opensea/DefaultOperatorFilterer.sol";
import "./ERC721A.sol";
import "./ERC721ABurnable.sol";
import "./ERC721AQueryable.sol";
contract ClownMarket is ERC721A, ERC721ABurnable, ERC721AQueryable, Ownable, ERC2981, DefaultOperatorFilterer {
using Strings for uint256;
uint256 constant maxSupply = 5000;
uint256 constant mintPrice = 0 ether;
uint256 public maxPerAddress = 1;
uint256 public maxPerTx = 1;
string public baseURI;
string public baseExtension = ".json";
string public notRevealedUri;
bool public revealed = false;
bool public pieinyourface = false;
constructor() ERC721A("Clown Market", "CM") {
}
function pie(bool _pie) external onlyOwner {
}
function mint(uint256 _quantity) external payable {
require(pieinyourface, "Clown Market: Mint Not Active");
require(_quantity <= maxPerTx, "Clown Market: Max Per Transaction Exceeded");
require(totalSupply() + _quantity <= maxSupply, "Clown Market: Mint Supply Exceeded");
require(<FILL_ME>)
_safeMint(msg.sender, _quantity);
}
function reserve(address _address, uint256 _quantity) external onlyOwner {
}
function tokenURI(uint256 tokenId)
public
view
virtual
override(ERC721A, IERC721A)
returns (string memory)
{
}
function supportsInterface(
bytes4 interfaceId
)
public
view
override(ERC721A, ERC2981, IERC721A)
returns (bool)
{
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner {
}
function setBaseURI(string memory _newBaseURI) public onlyOwner {
}
function setBaseExtension(string memory _newBaseExtension) public onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function reveal() public onlyOwner {
}
function setDefaultRoyalty(
address _receiver,
uint96 _feeNumerator
)
external
onlyOwner
{
}
function deleteDefaultRoyalty()
external
onlyOwner
{
}
function setTokenRoyalty(
uint256 _tokenId,
address _receiver,
uint96 _feeNumerator
)
external
onlyOwner
{
}
function resetTokenRoyalty(
uint256 tokenId
)
external
onlyOwner
{
}
/* ------------ OpenSea Overrides --------------*/
function transferFrom(
address _from,
address _to,
uint256 _tokenId
)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(_from)
{
}
function safeTransferFrom(
address _from,
address _to,
uint256 _tokenId
)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(_from)
{
}
function safeTransferFrom(
address _from,
address _to,
uint256 _tokenId,
bytes memory _data
)
public
payable
override(ERC721A, IERC721A)
onlyAllowedOperator(_from)
{
}
function withdrawMoney() external onlyOwner {
}
}
| _numberMinted(msg.sender)+_quantity<=maxPerAddress,"Clown Market: Exceeds Max Per Wallet" | 491,778 | _numberMinted(msg.sender)+_quantity<=maxPerAddress |
"token allowance must be >= amount" | pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
/**
* @title Hashed Timelock Contracts (HTLCs) on Ethereum ERC20 tokens.
*
* This contract provides a way to create and keep HTLCs for ERC20 tokens.
*
* See HashedTimelock.sol for a contract that provides the same functions
* for the native ETH token.
*
* Protocol:
*
* 1) newContract(receiver, hashlock, timelock, tokenContract, amount) - a
* sender calls this to create a new HTLC on a given token (tokenContract)
* for a given amount. A 32 byte contract id is returned
* 2) withdraw(contractId, preimage) - once the receiver knows the preimage of
* the hashlock hash they can claim the tokens with this function
* 3) refund() - after timelock has expired and if the receiver did not
* withdraw the tokens the sender / creator of the HTLC can get their tokens
* back with this function.
*/
contract HashedTimelockSafeERC20 {
using SafeERC20 for IERC20;
event HTLCERC20New(
bytes32 indexed contractId,
address indexed sender,
address indexed receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock
);
event HTLCERC20Withdraw(bytes32 indexed contractId);
event HTLCERC20Refund(bytes32 indexed contractId);
struct LockContract {
address sender;
address receiver;
address tokenContract;
uint256 amount;
bytes32 hashlock;
// locked UNTIL this time. Unit depends on consensus algorithm.
// PoA, PoA and IBFT all use seconds. But Quorum Raft uses nano-seconds
uint256 timelock;
bool withdrawn;
bool refunded;
bytes32 preimage;
}
modifier tokensTransferable(address _token, address _sender, uint256 _amount) {
require(_amount > 0, "token amount must be > 0");
require(<FILL_ME>)
_;
}
modifier futureTimelock(uint256 _time) {
}
modifier contractExists(bytes32 _contractId) {
}
modifier hashlockMatches(bytes32 _contractId, bytes32 _x) {
}
modifier withdrawable(bytes32 _contractId) {
}
modifier refundable(bytes32 _contractId) {
}
mapping (bytes32 => LockContract) contracts;
/**
* @dev Sender / Payer sets up a new hash time lock contract depositing the
* funds and providing the reciever and terms.
*
* NOTE: _receiver must first call approve() on the token contract.
* See allowance check in tokensTransferable modifier.
* @param _receiver Receiver of the tokens.
* @param _hashlock A sha-2 sha256 hash hashlock.
* @param _timelock UNIX epoch seconds time that the lock expires at.
* Refunds can be made after this time.
* @param _tokenContract ERC20 Token contract address.
* @param _amount Amount of the token to lock up.
* @return contractId Id of the new HTLC. This is needed for subsequent
* calls.
*/
function newContract(
address _receiver,
bytes32 _hashlock,
uint256 _timelock,
address _tokenContract,
uint256 _amount
)
external
tokensTransferable(_tokenContract, msg.sender, _amount)
futureTimelock(_timelock)
returns (bytes32 contractId)
{
}
/**
* @dev Called by the receiver once they know the preimage of the hashlock.
* This will transfer ownership of the locked tokens to their address.
*
* @param _contractId Id of the HTLC.
* @param _preimage sha256(_preimage) should equal the contract hashlock.
* @return bool true on success
*/
function withdraw(bytes32 _contractId, bytes32 _preimage)
external
contractExists(_contractId)
hashlockMatches(_contractId, _preimage)
withdrawable(_contractId)
returns (bool)
{
}
/**
* @dev Called by the sender if there was no withdraw AND the time lock has
* expired. This will restore ownership of the tokens to the sender.
*
* @param _contractId Id of HTLC to refund from.
* @return bool true on success
*/
function refund(bytes32 _contractId)
external
contractExists(_contractId)
refundable(_contractId)
returns (bool)
{
}
/**
* @dev Get contract details.
* @param _contractId HTLC contract id
* @return All parameters in struct LockContract for _contractId HTLC
*/
function getContract(bytes32 _contractId)
public
view
returns (
address sender,
address receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock,
bool withdrawn,
bool refunded,
bytes32 preimage
)
{
}
/**
* @dev Is there a contract with id _contractId.
* @param _contractId Id into contracts mapping.
*/
function haveContract(bytes32 _contractId)
internal
view
returns (bool exists)
{
}
}
| IERC20(_token).allowance(_sender,address(this))>=_amount,"token allowance must be >= amount" | 491,804 | IERC20(_token).allowance(_sender,address(this))>=_amount |
"contractId does not exist" | pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
/**
* @title Hashed Timelock Contracts (HTLCs) on Ethereum ERC20 tokens.
*
* This contract provides a way to create and keep HTLCs for ERC20 tokens.
*
* See HashedTimelock.sol for a contract that provides the same functions
* for the native ETH token.
*
* Protocol:
*
* 1) newContract(receiver, hashlock, timelock, tokenContract, amount) - a
* sender calls this to create a new HTLC on a given token (tokenContract)
* for a given amount. A 32 byte contract id is returned
* 2) withdraw(contractId, preimage) - once the receiver knows the preimage of
* the hashlock hash they can claim the tokens with this function
* 3) refund() - after timelock has expired and if the receiver did not
* withdraw the tokens the sender / creator of the HTLC can get their tokens
* back with this function.
*/
contract HashedTimelockSafeERC20 {
using SafeERC20 for IERC20;
event HTLCERC20New(
bytes32 indexed contractId,
address indexed sender,
address indexed receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock
);
event HTLCERC20Withdraw(bytes32 indexed contractId);
event HTLCERC20Refund(bytes32 indexed contractId);
struct LockContract {
address sender;
address receiver;
address tokenContract;
uint256 amount;
bytes32 hashlock;
// locked UNTIL this time. Unit depends on consensus algorithm.
// PoA, PoA and IBFT all use seconds. But Quorum Raft uses nano-seconds
uint256 timelock;
bool withdrawn;
bool refunded;
bytes32 preimage;
}
modifier tokensTransferable(address _token, address _sender, uint256 _amount) {
}
modifier futureTimelock(uint256 _time) {
}
modifier contractExists(bytes32 _contractId) {
require(<FILL_ME>)
_;
}
modifier hashlockMatches(bytes32 _contractId, bytes32 _x) {
}
modifier withdrawable(bytes32 _contractId) {
}
modifier refundable(bytes32 _contractId) {
}
mapping (bytes32 => LockContract) contracts;
/**
* @dev Sender / Payer sets up a new hash time lock contract depositing the
* funds and providing the reciever and terms.
*
* NOTE: _receiver must first call approve() on the token contract.
* See allowance check in tokensTransferable modifier.
* @param _receiver Receiver of the tokens.
* @param _hashlock A sha-2 sha256 hash hashlock.
* @param _timelock UNIX epoch seconds time that the lock expires at.
* Refunds can be made after this time.
* @param _tokenContract ERC20 Token contract address.
* @param _amount Amount of the token to lock up.
* @return contractId Id of the new HTLC. This is needed for subsequent
* calls.
*/
function newContract(
address _receiver,
bytes32 _hashlock,
uint256 _timelock,
address _tokenContract,
uint256 _amount
)
external
tokensTransferable(_tokenContract, msg.sender, _amount)
futureTimelock(_timelock)
returns (bytes32 contractId)
{
}
/**
* @dev Called by the receiver once they know the preimage of the hashlock.
* This will transfer ownership of the locked tokens to their address.
*
* @param _contractId Id of the HTLC.
* @param _preimage sha256(_preimage) should equal the contract hashlock.
* @return bool true on success
*/
function withdraw(bytes32 _contractId, bytes32 _preimage)
external
contractExists(_contractId)
hashlockMatches(_contractId, _preimage)
withdrawable(_contractId)
returns (bool)
{
}
/**
* @dev Called by the sender if there was no withdraw AND the time lock has
* expired. This will restore ownership of the tokens to the sender.
*
* @param _contractId Id of HTLC to refund from.
* @return bool true on success
*/
function refund(bytes32 _contractId)
external
contractExists(_contractId)
refundable(_contractId)
returns (bool)
{
}
/**
* @dev Get contract details.
* @param _contractId HTLC contract id
* @return All parameters in struct LockContract for _contractId HTLC
*/
function getContract(bytes32 _contractId)
public
view
returns (
address sender,
address receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock,
bool withdrawn,
bool refunded,
bytes32 preimage
)
{
}
/**
* @dev Is there a contract with id _contractId.
* @param _contractId Id into contracts mapping.
*/
function haveContract(bytes32 _contractId)
internal
view
returns (bool exists)
{
}
}
| haveContract(_contractId),"contractId does not exist" | 491,804 | haveContract(_contractId) |
"hashlock hash does not match" | pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
/**
* @title Hashed Timelock Contracts (HTLCs) on Ethereum ERC20 tokens.
*
* This contract provides a way to create and keep HTLCs for ERC20 tokens.
*
* See HashedTimelock.sol for a contract that provides the same functions
* for the native ETH token.
*
* Protocol:
*
* 1) newContract(receiver, hashlock, timelock, tokenContract, amount) - a
* sender calls this to create a new HTLC on a given token (tokenContract)
* for a given amount. A 32 byte contract id is returned
* 2) withdraw(contractId, preimage) - once the receiver knows the preimage of
* the hashlock hash they can claim the tokens with this function
* 3) refund() - after timelock has expired and if the receiver did not
* withdraw the tokens the sender / creator of the HTLC can get their tokens
* back with this function.
*/
contract HashedTimelockSafeERC20 {
using SafeERC20 for IERC20;
event HTLCERC20New(
bytes32 indexed contractId,
address indexed sender,
address indexed receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock
);
event HTLCERC20Withdraw(bytes32 indexed contractId);
event HTLCERC20Refund(bytes32 indexed contractId);
struct LockContract {
address sender;
address receiver;
address tokenContract;
uint256 amount;
bytes32 hashlock;
// locked UNTIL this time. Unit depends on consensus algorithm.
// PoA, PoA and IBFT all use seconds. But Quorum Raft uses nano-seconds
uint256 timelock;
bool withdrawn;
bool refunded;
bytes32 preimage;
}
modifier tokensTransferable(address _token, address _sender, uint256 _amount) {
}
modifier futureTimelock(uint256 _time) {
}
modifier contractExists(bytes32 _contractId) {
}
modifier hashlockMatches(bytes32 _contractId, bytes32 _x) {
require(<FILL_ME>)
_;
}
modifier withdrawable(bytes32 _contractId) {
}
modifier refundable(bytes32 _contractId) {
}
mapping (bytes32 => LockContract) contracts;
/**
* @dev Sender / Payer sets up a new hash time lock contract depositing the
* funds and providing the reciever and terms.
*
* NOTE: _receiver must first call approve() on the token contract.
* See allowance check in tokensTransferable modifier.
* @param _receiver Receiver of the tokens.
* @param _hashlock A sha-2 sha256 hash hashlock.
* @param _timelock UNIX epoch seconds time that the lock expires at.
* Refunds can be made after this time.
* @param _tokenContract ERC20 Token contract address.
* @param _amount Amount of the token to lock up.
* @return contractId Id of the new HTLC. This is needed for subsequent
* calls.
*/
function newContract(
address _receiver,
bytes32 _hashlock,
uint256 _timelock,
address _tokenContract,
uint256 _amount
)
external
tokensTransferable(_tokenContract, msg.sender, _amount)
futureTimelock(_timelock)
returns (bytes32 contractId)
{
}
/**
* @dev Called by the receiver once they know the preimage of the hashlock.
* This will transfer ownership of the locked tokens to their address.
*
* @param _contractId Id of the HTLC.
* @param _preimage sha256(_preimage) should equal the contract hashlock.
* @return bool true on success
*/
function withdraw(bytes32 _contractId, bytes32 _preimage)
external
contractExists(_contractId)
hashlockMatches(_contractId, _preimage)
withdrawable(_contractId)
returns (bool)
{
}
/**
* @dev Called by the sender if there was no withdraw AND the time lock has
* expired. This will restore ownership of the tokens to the sender.
*
* @param _contractId Id of HTLC to refund from.
* @return bool true on success
*/
function refund(bytes32 _contractId)
external
contractExists(_contractId)
refundable(_contractId)
returns (bool)
{
}
/**
* @dev Get contract details.
* @param _contractId HTLC contract id
* @return All parameters in struct LockContract for _contractId HTLC
*/
function getContract(bytes32 _contractId)
public
view
returns (
address sender,
address receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock,
bool withdrawn,
bool refunded,
bytes32 preimage
)
{
}
/**
* @dev Is there a contract with id _contractId.
* @param _contractId Id into contracts mapping.
*/
function haveContract(bytes32 _contractId)
internal
view
returns (bool exists)
{
}
}
| contracts[_contractId].hashlock==sha256(abi.encodePacked(_x)),"hashlock hash does not match" | 491,804 | contracts[_contractId].hashlock==sha256(abi.encodePacked(_x)) |
"withdrawable: not receiver" | pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
/**
* @title Hashed Timelock Contracts (HTLCs) on Ethereum ERC20 tokens.
*
* This contract provides a way to create and keep HTLCs for ERC20 tokens.
*
* See HashedTimelock.sol for a contract that provides the same functions
* for the native ETH token.
*
* Protocol:
*
* 1) newContract(receiver, hashlock, timelock, tokenContract, amount) - a
* sender calls this to create a new HTLC on a given token (tokenContract)
* for a given amount. A 32 byte contract id is returned
* 2) withdraw(contractId, preimage) - once the receiver knows the preimage of
* the hashlock hash they can claim the tokens with this function
* 3) refund() - after timelock has expired and if the receiver did not
* withdraw the tokens the sender / creator of the HTLC can get their tokens
* back with this function.
*/
contract HashedTimelockSafeERC20 {
using SafeERC20 for IERC20;
event HTLCERC20New(
bytes32 indexed contractId,
address indexed sender,
address indexed receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock
);
event HTLCERC20Withdraw(bytes32 indexed contractId);
event HTLCERC20Refund(bytes32 indexed contractId);
struct LockContract {
address sender;
address receiver;
address tokenContract;
uint256 amount;
bytes32 hashlock;
// locked UNTIL this time. Unit depends on consensus algorithm.
// PoA, PoA and IBFT all use seconds. But Quorum Raft uses nano-seconds
uint256 timelock;
bool withdrawn;
bool refunded;
bytes32 preimage;
}
modifier tokensTransferable(address _token, address _sender, uint256 _amount) {
}
modifier futureTimelock(uint256 _time) {
}
modifier contractExists(bytes32 _contractId) {
}
modifier hashlockMatches(bytes32 _contractId, bytes32 _x) {
}
modifier withdrawable(bytes32 _contractId) {
require(<FILL_ME>)
require(contracts[_contractId].withdrawn == false, "withdrawable: already withdrawn");
// This check needs to be added if claims are allowed after timeout. That is, if the following timelock check is commented out
require(contracts[_contractId].refunded == false, "withdrawable: already refunded");
// if we want to disallow claim to be made after the timeout, uncomment the following line
// require(contracts[_contractId].timelock > now, "withdrawable: timelock time must be in the future");
_;
}
modifier refundable(bytes32 _contractId) {
}
mapping (bytes32 => LockContract) contracts;
/**
* @dev Sender / Payer sets up a new hash time lock contract depositing the
* funds and providing the reciever and terms.
*
* NOTE: _receiver must first call approve() on the token contract.
* See allowance check in tokensTransferable modifier.
* @param _receiver Receiver of the tokens.
* @param _hashlock A sha-2 sha256 hash hashlock.
* @param _timelock UNIX epoch seconds time that the lock expires at.
* Refunds can be made after this time.
* @param _tokenContract ERC20 Token contract address.
* @param _amount Amount of the token to lock up.
* @return contractId Id of the new HTLC. This is needed for subsequent
* calls.
*/
function newContract(
address _receiver,
bytes32 _hashlock,
uint256 _timelock,
address _tokenContract,
uint256 _amount
)
external
tokensTransferable(_tokenContract, msg.sender, _amount)
futureTimelock(_timelock)
returns (bytes32 contractId)
{
}
/**
* @dev Called by the receiver once they know the preimage of the hashlock.
* This will transfer ownership of the locked tokens to their address.
*
* @param _contractId Id of the HTLC.
* @param _preimage sha256(_preimage) should equal the contract hashlock.
* @return bool true on success
*/
function withdraw(bytes32 _contractId, bytes32 _preimage)
external
contractExists(_contractId)
hashlockMatches(_contractId, _preimage)
withdrawable(_contractId)
returns (bool)
{
}
/**
* @dev Called by the sender if there was no withdraw AND the time lock has
* expired. This will restore ownership of the tokens to the sender.
*
* @param _contractId Id of HTLC to refund from.
* @return bool true on success
*/
function refund(bytes32 _contractId)
external
contractExists(_contractId)
refundable(_contractId)
returns (bool)
{
}
/**
* @dev Get contract details.
* @param _contractId HTLC contract id
* @return All parameters in struct LockContract for _contractId HTLC
*/
function getContract(bytes32 _contractId)
public
view
returns (
address sender,
address receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock,
bool withdrawn,
bool refunded,
bytes32 preimage
)
{
}
/**
* @dev Is there a contract with id _contractId.
* @param _contractId Id into contracts mapping.
*/
function haveContract(bytes32 _contractId)
internal
view
returns (bool exists)
{
}
}
| contracts[_contractId].receiver==msg.sender,"withdrawable: not receiver" | 491,804 | contracts[_contractId].receiver==msg.sender |
"withdrawable: already withdrawn" | pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
/**
* @title Hashed Timelock Contracts (HTLCs) on Ethereum ERC20 tokens.
*
* This contract provides a way to create and keep HTLCs for ERC20 tokens.
*
* See HashedTimelock.sol for a contract that provides the same functions
* for the native ETH token.
*
* Protocol:
*
* 1) newContract(receiver, hashlock, timelock, tokenContract, amount) - a
* sender calls this to create a new HTLC on a given token (tokenContract)
* for a given amount. A 32 byte contract id is returned
* 2) withdraw(contractId, preimage) - once the receiver knows the preimage of
* the hashlock hash they can claim the tokens with this function
* 3) refund() - after timelock has expired and if the receiver did not
* withdraw the tokens the sender / creator of the HTLC can get their tokens
* back with this function.
*/
contract HashedTimelockSafeERC20 {
using SafeERC20 for IERC20;
event HTLCERC20New(
bytes32 indexed contractId,
address indexed sender,
address indexed receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock
);
event HTLCERC20Withdraw(bytes32 indexed contractId);
event HTLCERC20Refund(bytes32 indexed contractId);
struct LockContract {
address sender;
address receiver;
address tokenContract;
uint256 amount;
bytes32 hashlock;
// locked UNTIL this time. Unit depends on consensus algorithm.
// PoA, PoA and IBFT all use seconds. But Quorum Raft uses nano-seconds
uint256 timelock;
bool withdrawn;
bool refunded;
bytes32 preimage;
}
modifier tokensTransferable(address _token, address _sender, uint256 _amount) {
}
modifier futureTimelock(uint256 _time) {
}
modifier contractExists(bytes32 _contractId) {
}
modifier hashlockMatches(bytes32 _contractId, bytes32 _x) {
}
modifier withdrawable(bytes32 _contractId) {
require(contracts[_contractId].receiver == msg.sender, "withdrawable: not receiver");
require(<FILL_ME>)
// This check needs to be added if claims are allowed after timeout. That is, if the following timelock check is commented out
require(contracts[_contractId].refunded == false, "withdrawable: already refunded");
// if we want to disallow claim to be made after the timeout, uncomment the following line
// require(contracts[_contractId].timelock > now, "withdrawable: timelock time must be in the future");
_;
}
modifier refundable(bytes32 _contractId) {
}
mapping (bytes32 => LockContract) contracts;
/**
* @dev Sender / Payer sets up a new hash time lock contract depositing the
* funds and providing the reciever and terms.
*
* NOTE: _receiver must first call approve() on the token contract.
* See allowance check in tokensTransferable modifier.
* @param _receiver Receiver of the tokens.
* @param _hashlock A sha-2 sha256 hash hashlock.
* @param _timelock UNIX epoch seconds time that the lock expires at.
* Refunds can be made after this time.
* @param _tokenContract ERC20 Token contract address.
* @param _amount Amount of the token to lock up.
* @return contractId Id of the new HTLC. This is needed for subsequent
* calls.
*/
function newContract(
address _receiver,
bytes32 _hashlock,
uint256 _timelock,
address _tokenContract,
uint256 _amount
)
external
tokensTransferable(_tokenContract, msg.sender, _amount)
futureTimelock(_timelock)
returns (bytes32 contractId)
{
}
/**
* @dev Called by the receiver once they know the preimage of the hashlock.
* This will transfer ownership of the locked tokens to their address.
*
* @param _contractId Id of the HTLC.
* @param _preimage sha256(_preimage) should equal the contract hashlock.
* @return bool true on success
*/
function withdraw(bytes32 _contractId, bytes32 _preimage)
external
contractExists(_contractId)
hashlockMatches(_contractId, _preimage)
withdrawable(_contractId)
returns (bool)
{
}
/**
* @dev Called by the sender if there was no withdraw AND the time lock has
* expired. This will restore ownership of the tokens to the sender.
*
* @param _contractId Id of HTLC to refund from.
* @return bool true on success
*/
function refund(bytes32 _contractId)
external
contractExists(_contractId)
refundable(_contractId)
returns (bool)
{
}
/**
* @dev Get contract details.
* @param _contractId HTLC contract id
* @return All parameters in struct LockContract for _contractId HTLC
*/
function getContract(bytes32 _contractId)
public
view
returns (
address sender,
address receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock,
bool withdrawn,
bool refunded,
bytes32 preimage
)
{
}
/**
* @dev Is there a contract with id _contractId.
* @param _contractId Id into contracts mapping.
*/
function haveContract(bytes32 _contractId)
internal
view
returns (bool exists)
{
}
}
| contracts[_contractId].withdrawn==false,"withdrawable: already withdrawn" | 491,804 | contracts[_contractId].withdrawn==false |
"withdrawable: already refunded" | pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
/**
* @title Hashed Timelock Contracts (HTLCs) on Ethereum ERC20 tokens.
*
* This contract provides a way to create and keep HTLCs for ERC20 tokens.
*
* See HashedTimelock.sol for a contract that provides the same functions
* for the native ETH token.
*
* Protocol:
*
* 1) newContract(receiver, hashlock, timelock, tokenContract, amount) - a
* sender calls this to create a new HTLC on a given token (tokenContract)
* for a given amount. A 32 byte contract id is returned
* 2) withdraw(contractId, preimage) - once the receiver knows the preimage of
* the hashlock hash they can claim the tokens with this function
* 3) refund() - after timelock has expired and if the receiver did not
* withdraw the tokens the sender / creator of the HTLC can get their tokens
* back with this function.
*/
contract HashedTimelockSafeERC20 {
using SafeERC20 for IERC20;
event HTLCERC20New(
bytes32 indexed contractId,
address indexed sender,
address indexed receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock
);
event HTLCERC20Withdraw(bytes32 indexed contractId);
event HTLCERC20Refund(bytes32 indexed contractId);
struct LockContract {
address sender;
address receiver;
address tokenContract;
uint256 amount;
bytes32 hashlock;
// locked UNTIL this time. Unit depends on consensus algorithm.
// PoA, PoA and IBFT all use seconds. But Quorum Raft uses nano-seconds
uint256 timelock;
bool withdrawn;
bool refunded;
bytes32 preimage;
}
modifier tokensTransferable(address _token, address _sender, uint256 _amount) {
}
modifier futureTimelock(uint256 _time) {
}
modifier contractExists(bytes32 _contractId) {
}
modifier hashlockMatches(bytes32 _contractId, bytes32 _x) {
}
modifier withdrawable(bytes32 _contractId) {
require(contracts[_contractId].receiver == msg.sender, "withdrawable: not receiver");
require(contracts[_contractId].withdrawn == false, "withdrawable: already withdrawn");
// This check needs to be added if claims are allowed after timeout. That is, if the following timelock check is commented out
require(<FILL_ME>)
// if we want to disallow claim to be made after the timeout, uncomment the following line
// require(contracts[_contractId].timelock > now, "withdrawable: timelock time must be in the future");
_;
}
modifier refundable(bytes32 _contractId) {
}
mapping (bytes32 => LockContract) contracts;
/**
* @dev Sender / Payer sets up a new hash time lock contract depositing the
* funds and providing the reciever and terms.
*
* NOTE: _receiver must first call approve() on the token contract.
* See allowance check in tokensTransferable modifier.
* @param _receiver Receiver of the tokens.
* @param _hashlock A sha-2 sha256 hash hashlock.
* @param _timelock UNIX epoch seconds time that the lock expires at.
* Refunds can be made after this time.
* @param _tokenContract ERC20 Token contract address.
* @param _amount Amount of the token to lock up.
* @return contractId Id of the new HTLC. This is needed for subsequent
* calls.
*/
function newContract(
address _receiver,
bytes32 _hashlock,
uint256 _timelock,
address _tokenContract,
uint256 _amount
)
external
tokensTransferable(_tokenContract, msg.sender, _amount)
futureTimelock(_timelock)
returns (bytes32 contractId)
{
}
/**
* @dev Called by the receiver once they know the preimage of the hashlock.
* This will transfer ownership of the locked tokens to their address.
*
* @param _contractId Id of the HTLC.
* @param _preimage sha256(_preimage) should equal the contract hashlock.
* @return bool true on success
*/
function withdraw(bytes32 _contractId, bytes32 _preimage)
external
contractExists(_contractId)
hashlockMatches(_contractId, _preimage)
withdrawable(_contractId)
returns (bool)
{
}
/**
* @dev Called by the sender if there was no withdraw AND the time lock has
* expired. This will restore ownership of the tokens to the sender.
*
* @param _contractId Id of HTLC to refund from.
* @return bool true on success
*/
function refund(bytes32 _contractId)
external
contractExists(_contractId)
refundable(_contractId)
returns (bool)
{
}
/**
* @dev Get contract details.
* @param _contractId HTLC contract id
* @return All parameters in struct LockContract for _contractId HTLC
*/
function getContract(bytes32 _contractId)
public
view
returns (
address sender,
address receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock,
bool withdrawn,
bool refunded,
bytes32 preimage
)
{
}
/**
* @dev Is there a contract with id _contractId.
* @param _contractId Id into contracts mapping.
*/
function haveContract(bytes32 _contractId)
internal
view
returns (bool exists)
{
}
}
| contracts[_contractId].refunded==false,"withdrawable: already refunded" | 491,804 | contracts[_contractId].refunded==false |
"refundable: not sender" | pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
/**
* @title Hashed Timelock Contracts (HTLCs) on Ethereum ERC20 tokens.
*
* This contract provides a way to create and keep HTLCs for ERC20 tokens.
*
* See HashedTimelock.sol for a contract that provides the same functions
* for the native ETH token.
*
* Protocol:
*
* 1) newContract(receiver, hashlock, timelock, tokenContract, amount) - a
* sender calls this to create a new HTLC on a given token (tokenContract)
* for a given amount. A 32 byte contract id is returned
* 2) withdraw(contractId, preimage) - once the receiver knows the preimage of
* the hashlock hash they can claim the tokens with this function
* 3) refund() - after timelock has expired and if the receiver did not
* withdraw the tokens the sender / creator of the HTLC can get their tokens
* back with this function.
*/
contract HashedTimelockSafeERC20 {
using SafeERC20 for IERC20;
event HTLCERC20New(
bytes32 indexed contractId,
address indexed sender,
address indexed receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock
);
event HTLCERC20Withdraw(bytes32 indexed contractId);
event HTLCERC20Refund(bytes32 indexed contractId);
struct LockContract {
address sender;
address receiver;
address tokenContract;
uint256 amount;
bytes32 hashlock;
// locked UNTIL this time. Unit depends on consensus algorithm.
// PoA, PoA and IBFT all use seconds. But Quorum Raft uses nano-seconds
uint256 timelock;
bool withdrawn;
bool refunded;
bytes32 preimage;
}
modifier tokensTransferable(address _token, address _sender, uint256 _amount) {
}
modifier futureTimelock(uint256 _time) {
}
modifier contractExists(bytes32 _contractId) {
}
modifier hashlockMatches(bytes32 _contractId, bytes32 _x) {
}
modifier withdrawable(bytes32 _contractId) {
}
modifier refundable(bytes32 _contractId) {
require(<FILL_ME>)
require(contracts[_contractId].refunded == false, "refundable: already refunded");
require(contracts[_contractId].withdrawn == false, "refundable: already withdrawn");
require(contracts[_contractId].timelock <= now, "refundable: timelock not yet passed");
_;
}
mapping (bytes32 => LockContract) contracts;
/**
* @dev Sender / Payer sets up a new hash time lock contract depositing the
* funds and providing the reciever and terms.
*
* NOTE: _receiver must first call approve() on the token contract.
* See allowance check in tokensTransferable modifier.
* @param _receiver Receiver of the tokens.
* @param _hashlock A sha-2 sha256 hash hashlock.
* @param _timelock UNIX epoch seconds time that the lock expires at.
* Refunds can be made after this time.
* @param _tokenContract ERC20 Token contract address.
* @param _amount Amount of the token to lock up.
* @return contractId Id of the new HTLC. This is needed for subsequent
* calls.
*/
function newContract(
address _receiver,
bytes32 _hashlock,
uint256 _timelock,
address _tokenContract,
uint256 _amount
)
external
tokensTransferable(_tokenContract, msg.sender, _amount)
futureTimelock(_timelock)
returns (bytes32 contractId)
{
}
/**
* @dev Called by the receiver once they know the preimage of the hashlock.
* This will transfer ownership of the locked tokens to their address.
*
* @param _contractId Id of the HTLC.
* @param _preimage sha256(_preimage) should equal the contract hashlock.
* @return bool true on success
*/
function withdraw(bytes32 _contractId, bytes32 _preimage)
external
contractExists(_contractId)
hashlockMatches(_contractId, _preimage)
withdrawable(_contractId)
returns (bool)
{
}
/**
* @dev Called by the sender if there was no withdraw AND the time lock has
* expired. This will restore ownership of the tokens to the sender.
*
* @param _contractId Id of HTLC to refund from.
* @return bool true on success
*/
function refund(bytes32 _contractId)
external
contractExists(_contractId)
refundable(_contractId)
returns (bool)
{
}
/**
* @dev Get contract details.
* @param _contractId HTLC contract id
* @return All parameters in struct LockContract for _contractId HTLC
*/
function getContract(bytes32 _contractId)
public
view
returns (
address sender,
address receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock,
bool withdrawn,
bool refunded,
bytes32 preimage
)
{
}
/**
* @dev Is there a contract with id _contractId.
* @param _contractId Id into contracts mapping.
*/
function haveContract(bytes32 _contractId)
internal
view
returns (bool exists)
{
}
}
| contracts[_contractId].sender==msg.sender,"refundable: not sender" | 491,804 | contracts[_contractId].sender==msg.sender |
"refundable: timelock not yet passed" | pragma solidity ^0.5.0;
import "openzeppelin-solidity/contracts/token/ERC20/IERC20.sol";
import "openzeppelin-solidity/contracts/token/ERC20/SafeERC20.sol";
/**
* @title Hashed Timelock Contracts (HTLCs) on Ethereum ERC20 tokens.
*
* This contract provides a way to create and keep HTLCs for ERC20 tokens.
*
* See HashedTimelock.sol for a contract that provides the same functions
* for the native ETH token.
*
* Protocol:
*
* 1) newContract(receiver, hashlock, timelock, tokenContract, amount) - a
* sender calls this to create a new HTLC on a given token (tokenContract)
* for a given amount. A 32 byte contract id is returned
* 2) withdraw(contractId, preimage) - once the receiver knows the preimage of
* the hashlock hash they can claim the tokens with this function
* 3) refund() - after timelock has expired and if the receiver did not
* withdraw the tokens the sender / creator of the HTLC can get their tokens
* back with this function.
*/
contract HashedTimelockSafeERC20 {
using SafeERC20 for IERC20;
event HTLCERC20New(
bytes32 indexed contractId,
address indexed sender,
address indexed receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock
);
event HTLCERC20Withdraw(bytes32 indexed contractId);
event HTLCERC20Refund(bytes32 indexed contractId);
struct LockContract {
address sender;
address receiver;
address tokenContract;
uint256 amount;
bytes32 hashlock;
// locked UNTIL this time. Unit depends on consensus algorithm.
// PoA, PoA and IBFT all use seconds. But Quorum Raft uses nano-seconds
uint256 timelock;
bool withdrawn;
bool refunded;
bytes32 preimage;
}
modifier tokensTransferable(address _token, address _sender, uint256 _amount) {
}
modifier futureTimelock(uint256 _time) {
}
modifier contractExists(bytes32 _contractId) {
}
modifier hashlockMatches(bytes32 _contractId, bytes32 _x) {
}
modifier withdrawable(bytes32 _contractId) {
}
modifier refundable(bytes32 _contractId) {
require(contracts[_contractId].sender == msg.sender, "refundable: not sender");
require(contracts[_contractId].refunded == false, "refundable: already refunded");
require(contracts[_contractId].withdrawn == false, "refundable: already withdrawn");
require(<FILL_ME>)
_;
}
mapping (bytes32 => LockContract) contracts;
/**
* @dev Sender / Payer sets up a new hash time lock contract depositing the
* funds and providing the reciever and terms.
*
* NOTE: _receiver must first call approve() on the token contract.
* See allowance check in tokensTransferable modifier.
* @param _receiver Receiver of the tokens.
* @param _hashlock A sha-2 sha256 hash hashlock.
* @param _timelock UNIX epoch seconds time that the lock expires at.
* Refunds can be made after this time.
* @param _tokenContract ERC20 Token contract address.
* @param _amount Amount of the token to lock up.
* @return contractId Id of the new HTLC. This is needed for subsequent
* calls.
*/
function newContract(
address _receiver,
bytes32 _hashlock,
uint256 _timelock,
address _tokenContract,
uint256 _amount
)
external
tokensTransferable(_tokenContract, msg.sender, _amount)
futureTimelock(_timelock)
returns (bytes32 contractId)
{
}
/**
* @dev Called by the receiver once they know the preimage of the hashlock.
* This will transfer ownership of the locked tokens to their address.
*
* @param _contractId Id of the HTLC.
* @param _preimage sha256(_preimage) should equal the contract hashlock.
* @return bool true on success
*/
function withdraw(bytes32 _contractId, bytes32 _preimage)
external
contractExists(_contractId)
hashlockMatches(_contractId, _preimage)
withdrawable(_contractId)
returns (bool)
{
}
/**
* @dev Called by the sender if there was no withdraw AND the time lock has
* expired. This will restore ownership of the tokens to the sender.
*
* @param _contractId Id of HTLC to refund from.
* @return bool true on success
*/
function refund(bytes32 _contractId)
external
contractExists(_contractId)
refundable(_contractId)
returns (bool)
{
}
/**
* @dev Get contract details.
* @param _contractId HTLC contract id
* @return All parameters in struct LockContract for _contractId HTLC
*/
function getContract(bytes32 _contractId)
public
view
returns (
address sender,
address receiver,
address tokenContract,
uint256 amount,
bytes32 hashlock,
uint256 timelock,
bool withdrawn,
bool refunded,
bytes32 preimage
)
{
}
/**
* @dev Is there a contract with id _contractId.
* @param _contractId Id into contracts mapping.
*/
function haveContract(bytes32 _contractId)
internal
view
returns (bool exists)
{
}
}
| contracts[_contractId].timelock<=now,"refundable: timelock not yet passed" | 491,804 | contracts[_contractId].timelock<=now |
null | // SPDX-License-Identifier: UNLICENSED
pragma solidity >="0.8.18";
// Intended use: exchange for services on gitarg decentralized platform and ada NFTs (release date June 2nd - June 15th 2023)
contract gitarg {
struct SpendDown {
//address account;
address owner;
address spender;
uint256 amount;
}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
// possibly change to array
//address private initialMinter;
//address private secodaryMinter;
//address public publicMinter;
//mapping(address => SpendDown[]) spendDownFunds;
//mapping(address => SpendDown) spendDownFunds;
//SpendDown[] spendDownFunds;
mapping(address => mapping (address => uint256)) allowed;
mapping(address => address[]) private coop;
//mapping(address => uint256) private spendDown;
address[] owners;
mapping(address => uint256) private balances;
mapping(address => bool) private locked;
uint256 totalSupply_ = 1000 ether;
constructor() {
}
// These functions may not be allowed
function lock() public returns (bool) {
}
function unlock() public returns (bool) {
}
// ICO ERC-20 standard functions
//https://eips.ethereum.org/EIPS/eip-20#name
// function definition can be changed to pure - not in standard
function name() public view returns (string memory) {
}
//https://eips.ethereum.org/EIPS/eip-20#symbol
// function definition can be changed to pure - not in standard
function symbol() public view returns (string memory) {
}
//https://eips.ethereum.org/EIPS/eip-20#decimals
// function definition can be changed to pure - not in standard
function decimals() public view returns (uint8) {
}
//https://eips.ethereum.org/EIPS/eip-20#decimals
// function definition can be changed to pure - not in standard
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
require(<FILL_ME>)
return balances[_owner];
}
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) {
}
}
| !locked[msg.sender]&&!locked[_owner] | 491,818 | !locked[msg.sender]&&!locked[_owner] |
null | // SPDX-License-Identifier: UNLICENSED
pragma solidity >="0.8.18";
// Intended use: exchange for services on gitarg decentralized platform and ada NFTs (release date June 2nd - June 15th 2023)
contract gitarg {
struct SpendDown {
//address account;
address owner;
address spender;
uint256 amount;
}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
// possibly change to array
//address private initialMinter;
//address private secodaryMinter;
//address public publicMinter;
//mapping(address => SpendDown[]) spendDownFunds;
//mapping(address => SpendDown) spendDownFunds;
//SpendDown[] spendDownFunds;
mapping(address => mapping (address => uint256)) allowed;
mapping(address => address[]) private coop;
//mapping(address => uint256) private spendDown;
address[] owners;
mapping(address => uint256) private balances;
mapping(address => bool) private locked;
uint256 totalSupply_ = 1000 ether;
constructor() {
}
// These functions may not be allowed
function lock() public returns (bool) {
}
function unlock() public returns (bool) {
}
// ICO ERC-20 standard functions
//https://eips.ethereum.org/EIPS/eip-20#name
// function definition can be changed to pure - not in standard
function name() public view returns (string memory) {
}
//https://eips.ethereum.org/EIPS/eip-20#symbol
// function definition can be changed to pure - not in standard
function symbol() public view returns (string memory) {
}
//https://eips.ethereum.org/EIPS/eip-20#decimals
// function definition can be changed to pure - not in standard
function decimals() public view returns (uint8) {
}
//https://eips.ethereum.org/EIPS/eip-20#decimals
// function definition can be changed to pure - not in standard
function totalSupply() public view returns (uint256) {
}
function balanceOf(address _owner) public view returns (uint256 balance) {
}
function transfer(address _to, uint256 _value) public returns (bool success) {
require(<FILL_ME>)
require(_value <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender] - _value;
balances[_to] = balances[_to] + _value;
emit Transfer(msg.sender, _to, _value);
return true;
}
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) {
}
}
| !locked[msg.sender]&&!locked[_to] | 491,818 | !locked[msg.sender]&&!locked[_to] |
null | // SPDX-License-Identifier: UNLICENSED
pragma solidity >="0.8.18";
// Intended use: exchange for services on gitarg decentralized platform and ada NFTs (release date June 2nd - June 15th 2023)
contract gitarg {
struct SpendDown {
//address account;
address owner;
address spender;
uint256 amount;
}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
// possibly change to array
//address private initialMinter;
//address private secodaryMinter;
//address public publicMinter;
//mapping(address => SpendDown[]) spendDownFunds;
//mapping(address => SpendDown) spendDownFunds;
//SpendDown[] spendDownFunds;
mapping(address => mapping (address => uint256)) allowed;
mapping(address => address[]) private coop;
//mapping(address => uint256) private spendDown;
address[] owners;
mapping(address => uint256) private balances;
mapping(address => bool) private locked;
uint256 totalSupply_ = 1000 ether;
constructor() {
}
// These functions may not be allowed
function lock() public returns (bool) {
}
function unlock() public returns (bool) {
}
// ICO ERC-20 standard functions
//https://eips.ethereum.org/EIPS/eip-20#name
// function definition can be changed to pure - not in standard
function name() public view returns (string memory) {
}
//https://eips.ethereum.org/EIPS/eip-20#symbol
// function definition can be changed to pure - not in standard
function symbol() public view returns (string memory) {
}
//https://eips.ethereum.org/EIPS/eip-20#decimals
// function definition can be changed to pure - not in standard
function decimals() public view returns (uint8) {
}
//https://eips.ethereum.org/EIPS/eip-20#decimals
// function definition can be changed to pure - not in standard
function totalSupply() public view returns (uint256) {
}
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) {
require(<FILL_ME>)
require(_value <= balances[_from]);
require(_value <= allowed[_from][msg.sender]);
balances[_from] = balances[_from] - _value;
allowed[_from][msg.sender] = allowed[_from][msg.sender] - _value;
balances[_to] = balances[_to] + _value;
//address[] memory coopList = coop[_from];
//bool allow = false;
//for (uint i = 0; i < coopList.length; i++) {
//if(coopList[i] == _to) {
//allow = true;
//continue;
//}
//}
//require(allow);
emit Transfer(_from, _to, _value);
return true;
}
function approve(address _spender, uint256 _value) public returns (bool success) {
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
}
| !locked[msg.sender]&&!locked[_from]&&!locked[_to] | 491,818 | !locked[msg.sender]&&!locked[_from]&&!locked[_to] |
null | // SPDX-License-Identifier: UNLICENSED
pragma solidity >="0.8.18";
// Intended use: exchange for services on gitarg decentralized platform and ada NFTs (release date June 2nd - June 15th 2023)
contract gitarg {
struct SpendDown {
//address account;
address owner;
address spender;
uint256 amount;
}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
// possibly change to array
//address private initialMinter;
//address private secodaryMinter;
//address public publicMinter;
//mapping(address => SpendDown[]) spendDownFunds;
//mapping(address => SpendDown) spendDownFunds;
//SpendDown[] spendDownFunds;
mapping(address => mapping (address => uint256)) allowed;
mapping(address => address[]) private coop;
//mapping(address => uint256) private spendDown;
address[] owners;
mapping(address => uint256) private balances;
mapping(address => bool) private locked;
uint256 totalSupply_ = 1000 ether;
constructor() {
}
// These functions may not be allowed
function lock() public returns (bool) {
}
function unlock() public returns (bool) {
}
// ICO ERC-20 standard functions
//https://eips.ethereum.org/EIPS/eip-20#name
// function definition can be changed to pure - not in standard
function name() public view returns (string memory) {
}
//https://eips.ethereum.org/EIPS/eip-20#symbol
// function definition can be changed to pure - not in standard
function symbol() public view returns (string memory) {
}
//https://eips.ethereum.org/EIPS/eip-20#decimals
// function definition can be changed to pure - not in standard
function decimals() public view returns (uint8) {
}
//https://eips.ethereum.org/EIPS/eip-20#decimals
// function definition can be changed to pure - not in standard
function totalSupply() public view returns (uint256) {
}
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) {
require(<FILL_ME>)
//TODO - check balance
//TODO - collapse records by owner
//spendDownFunds.push(SpendDown(msg.sender, _spender, _value));
allowed[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
}
}
| !locked[msg.sender]&&!locked[_spender] | 491,818 | !locked[msg.sender]&&!locked[_spender] |
null | // SPDX-License-Identifier: UNLICENSED
pragma solidity >="0.8.18";
// Intended use: exchange for services on gitarg decentralized platform and ada NFTs (release date June 2nd - June 15th 2023)
contract gitarg {
struct SpendDown {
//address account;
address owner;
address spender;
uint256 amount;
}
event Transfer(address indexed _from, address indexed _to, uint256 _value);
event Approval(address indexed _owner, address indexed _spender, uint256 _value);
// possibly change to array
//address private initialMinter;
//address private secodaryMinter;
//address public publicMinter;
//mapping(address => SpendDown[]) spendDownFunds;
//mapping(address => SpendDown) spendDownFunds;
//SpendDown[] spendDownFunds;
mapping(address => mapping (address => uint256)) allowed;
mapping(address => address[]) private coop;
//mapping(address => uint256) private spendDown;
address[] owners;
mapping(address => uint256) private balances;
mapping(address => bool) private locked;
uint256 totalSupply_ = 1000 ether;
constructor() {
}
// These functions may not be allowed
function lock() public returns (bool) {
}
function unlock() public returns (bool) {
}
// ICO ERC-20 standard functions
//https://eips.ethereum.org/EIPS/eip-20#name
// function definition can be changed to pure - not in standard
function name() public view returns (string memory) {
}
//https://eips.ethereum.org/EIPS/eip-20#symbol
// function definition can be changed to pure - not in standard
function symbol() public view returns (string memory) {
}
//https://eips.ethereum.org/EIPS/eip-20#decimals
// function definition can be changed to pure - not in standard
function decimals() public view returns (uint8) {
}
//https://eips.ethereum.org/EIPS/eip-20#decimals
// function definition can be changed to pure - not in standard
function totalSupply() public view returns (uint256) {
}
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) {
// REVIEW
//for (uint i = 0; i < spendDownFunds.length; i++) {
// if (spendDownFunds[i].spender == _spender && spendDownFunds[i].owner == _owner) {
// return spendDownFunds[i].amount;
//}
//}
require(<FILL_ME>)
return allowed[_owner][_spender];
}
}
| !locked[msg.sender]&&!locked[_owner]&&!locked[_spender] | 491,818 | !locked[msg.sender]&&!locked[_owner]&&!locked[_spender] |
"Hack is staked" | /*
/$$ /$$
| $$ | $$
| $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$
| $$__ $$ |____ $$ /$$_____/| $$ /$$/
| $$ \ $$ /$$$$$$$| $$ | $$$$$$/
| $$ | $$ /$$__ $$| $$ | $$_ $$
| $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$
|__/ |__/ \_______/ \_______/|__/ \__/
/$$ /$$
| $$ | $$
/$$$$$$ | $$$$$$$ /$$$$$$
|_ $$_/ | $$__ $$ /$$__ $$
| $$ | $$ \ $$| $$$$$$$$
| $$ /$$| $$ | $$| $$_____/
| $$$$/| $$ | $$| $$$$$$$
\___/ |__/ |__/ \_______/
/$$ /$$
| $$ | $$
/$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
/$$__ $$| $$ |____ $$| $$__ $$ /$$__ $$|_ $$_/
| $$ \ $$| $$ /$$$$$$$| $$ \ $$| $$$$$$$$ | $$
| $$ | $$| $$ /$$__ $$| $$ | $$| $$_____/ | $$ /$$
| $$$$$$$/| $$| $$$$$$$| $$ | $$| $$$$$$$ | $$$$/
| $$____/ |__/ \_______/|__/ |__/ \_______/ \___/
| $$
| $$
|__/
we love
__ .__ __ .__
|__| ____ | |_/ |_ ____ ____ | | _____
| |/ _ \| |\ __\ _/ ___\/ _ \| | \__ \
| ( <_> ) |_| | \ \__( <_> ) |__/ __ \_
/\__| |\____/|____/__| \___ >____/|____(____ /
\______| \/ \/
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "ERC721A.sol";
import "DefaultOperatorFilterer.sol";
import "Ownable.sol";
import "ERC2981.sol";
import "ReentrancyGuard.sol";
import "MerkleProof.sol";
import "ERC20Burnable.sol";
interface HackStake {
function isStaked(uint256 tokenId) external returns(bool);
function stake(uint256 tokenId) external;
function unstake(uint256 tokenId) external;
function claim(uint256 tokenId) external;
function getStakeTime(uint256 tokenId) external returns(uint256);
function claimReward() external;
}
interface HackNote {
function mint(uint256 tokenId, string calldata note) external;
function getNoteMessage(uint256 tokenId) external returns(string memory);
}
interface HackBurnable {
function burn(uint256 tokenId) external;
}
contract h4cktheplan3t is ERC721A, ERC2981, DefaultOperatorFilterer, Ownable, ReentrancyGuard{
uint16 public MAX_SUPPLY;
uint16 public FREE_SUPPLY;
uint16 public MAX_PER_TX;
uint16 public MAX_PER_WALLET;
uint16 public MAX_FREE_PER_TX;
uint16 public MAX_FREE_PER_WALLET;
uint16 public TEAM_SUPPLY;
uint16 public REVEAL_STAGE;
uint16 public MINT_STAGE;
uint16 private TEAM_MINTED;
bool public STAKING_ENABLED;
bool public NOTES_ENABLED;
uint256 public Hack_PRICE;
HackStake private hackContract;
HackNote private hackNote;
ERC20Burnable private hackToken;
HackBurnable private hackBurn;
// Metadata
mapping(uint256 => string) private _baseUri;
mapping(uint256 => uint256) private _revealStages;
mapping(uint256 => uint256) private _revealCosts;
mapping(uint256 => bool) private _claimedStakeReward;
mapping(uint256 => uint256) private _boosts;
modifier revertIfStaked(uint256 tokenId) {
require(<FILL_ME>)
_;
}
constructor(string memory _placeholderUri, uint16 _maxSupply, uint16 _freeSupply, uint16 _maxPerTx,
uint16 _maxPerWallet, uint16 _maxFreePerTx, uint16 _maxFreePerWallet, uint16 _teamSupply, uint256 _hackPrice) ERC721A("h4cktheplan3t", "Hack"){
}
function mint(uint256 quantity) external payable nonReentrant{
}
function freeMint(uint256 quantity) external nonReentrant {
}
function teamMint(uint16 quantity) external onlyOwner {
}
function finalizeNote(uint256 tokenId, string calldata note) external nonReentrant{
}
function revealNextStage(uint256 tokenId) external nonReentrant {
}
function stake(uint256[] calldata tokenIds) external nonReentrant{
}
function claim(uint256[] calldata tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata tokenIds) external nonReentrant{
}
function claimInstantStakeReward(uint256[] calldata tokenIds) external nonReentrant {
}
function burnHack(uint256[] calldata tokenIds) external nonReentrant {
}
function setHackStakeContract(address _hackContract) external onlyOwner {
}
function setHackNoteContract(address _hackNote) external onlyOwner {
}
function sethackTokenContract(address _token) external onlyOwner {
}
function setRevealCosts(uint256 stage, uint256 price) external onlyOwner {
}
function setBaseURI(uint256 stage, string calldata uriPart) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function updateHackPrice(uint256 _HackPrice) external onlyOwner {
}
function updateMaxSupply(uint16 _maxSupply) external onlyOwner {
}
function updateFreeSupply(uint16 _freeSupply) external onlyOwner {
}
function updateMaxPerTxn(uint16 _maxPerTxn) external onlyOwner {
}
function updateMaxPerWallet(uint16 _maxPerWallet) external onlyOwner {
}
function updateMaxFreePerWallet(uint16 _maxFreePerWallet) external onlyOwner {
}
function updateMaxFreePerTxn(uint16 _maxFreePerTxn) external onlyOwner {
}
function updateRevealStage(uint16 stage) external onlyOwner {
}
function updateMintStage(uint16 _mintStage) external onlyOwner {
}
function enableNotes() external onlyOwner {
}
function enableStaking() external onlyOwner {
}
function setDefaultRoyalty(address _receiver, uint96 _fee) public onlyOwner {
}
function setApprovalForAll(address operator, bool approved) public override
onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable virtual override
onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override
onlyAllowedOperator(from)
revertIfStaked(tokenId)
{
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function withdraw(address _withdrawTo) external onlyOwner {
}
// Off-chain call for future reveals
function getRevealStage() external view returns (uint256){
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
// ERC721A
function _intToString(uint256 value) internal pure virtual returns (string memory str) {
}
}
| hackContract.isStaked(tokenId)==false,"Hack is staked" | 491,835 | hackContract.isStaked(tokenId)==false |
"Too much" | /*
/$$ /$$
| $$ | $$
| $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$
| $$__ $$ |____ $$ /$$_____/| $$ /$$/
| $$ \ $$ /$$$$$$$| $$ | $$$$$$/
| $$ | $$ /$$__ $$| $$ | $$_ $$
| $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$
|__/ |__/ \_______/ \_______/|__/ \__/
/$$ /$$
| $$ | $$
/$$$$$$ | $$$$$$$ /$$$$$$
|_ $$_/ | $$__ $$ /$$__ $$
| $$ | $$ \ $$| $$$$$$$$
| $$ /$$| $$ | $$| $$_____/
| $$$$/| $$ | $$| $$$$$$$
\___/ |__/ |__/ \_______/
/$$ /$$
| $$ | $$
/$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
/$$__ $$| $$ |____ $$| $$__ $$ /$$__ $$|_ $$_/
| $$ \ $$| $$ /$$$$$$$| $$ \ $$| $$$$$$$$ | $$
| $$ | $$| $$ /$$__ $$| $$ | $$| $$_____/ | $$ /$$
| $$$$$$$/| $$| $$$$$$$| $$ | $$| $$$$$$$ | $$$$/
| $$____/ |__/ \_______/|__/ |__/ \_______/ \___/
| $$
| $$
|__/
we love
__ .__ __ .__
|__| ____ | |_/ |_ ____ ____ | | _____
| |/ _ \| |\ __\ _/ ___\/ _ \| | \__ \
| ( <_> ) |_| | \ \__( <_> ) |__/ __ \_
/\__| |\____/|____/__| \___ >____/|____(____ /
\______| \/ \/
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "ERC721A.sol";
import "DefaultOperatorFilterer.sol";
import "Ownable.sol";
import "ERC2981.sol";
import "ReentrancyGuard.sol";
import "MerkleProof.sol";
import "ERC20Burnable.sol";
interface HackStake {
function isStaked(uint256 tokenId) external returns(bool);
function stake(uint256 tokenId) external;
function unstake(uint256 tokenId) external;
function claim(uint256 tokenId) external;
function getStakeTime(uint256 tokenId) external returns(uint256);
function claimReward() external;
}
interface HackNote {
function mint(uint256 tokenId, string calldata note) external;
function getNoteMessage(uint256 tokenId) external returns(string memory);
}
interface HackBurnable {
function burn(uint256 tokenId) external;
}
contract h4cktheplan3t is ERC721A, ERC2981, DefaultOperatorFilterer, Ownable, ReentrancyGuard{
uint16 public MAX_SUPPLY;
uint16 public FREE_SUPPLY;
uint16 public MAX_PER_TX;
uint16 public MAX_PER_WALLET;
uint16 public MAX_FREE_PER_TX;
uint16 public MAX_FREE_PER_WALLET;
uint16 public TEAM_SUPPLY;
uint16 public REVEAL_STAGE;
uint16 public MINT_STAGE;
uint16 private TEAM_MINTED;
bool public STAKING_ENABLED;
bool public NOTES_ENABLED;
uint256 public Hack_PRICE;
HackStake private hackContract;
HackNote private hackNote;
ERC20Burnable private hackToken;
HackBurnable private hackBurn;
// Metadata
mapping(uint256 => string) private _baseUri;
mapping(uint256 => uint256) private _revealStages;
mapping(uint256 => uint256) private _revealCosts;
mapping(uint256 => bool) private _claimedStakeReward;
mapping(uint256 => uint256) private _boosts;
modifier revertIfStaked(uint256 tokenId) {
}
constructor(string memory _placeholderUri, uint16 _maxSupply, uint16 _freeSupply, uint16 _maxPerTx,
uint16 _maxPerWallet, uint16 _maxFreePerTx, uint16 _maxFreePerWallet, uint16 _teamSupply, uint256 _hackPrice) ERC721A("h4cktheplan3t", "Hack"){
}
function mint(uint256 quantity) external payable nonReentrant{
require(MINT_STAGE == 2, "Cannot hack yet");
require(msg.sender == tx.origin, "Contracts cannot hack");
require(quantity <= MAX_PER_TX, "Too much at once");
require(<FILL_ME>)
require(_totalMinted() + quantity <= MAX_SUPPLY, "Out of");
require(quantity * Hack_PRICE == msg.value, "Wrong price");
_mint(msg.sender, quantity);
}
function freeMint(uint256 quantity) external nonReentrant {
}
function teamMint(uint16 quantity) external onlyOwner {
}
function finalizeNote(uint256 tokenId, string calldata note) external nonReentrant{
}
function revealNextStage(uint256 tokenId) external nonReentrant {
}
function stake(uint256[] calldata tokenIds) external nonReentrant{
}
function claim(uint256[] calldata tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata tokenIds) external nonReentrant{
}
function claimInstantStakeReward(uint256[] calldata tokenIds) external nonReentrant {
}
function burnHack(uint256[] calldata tokenIds) external nonReentrant {
}
function setHackStakeContract(address _hackContract) external onlyOwner {
}
function setHackNoteContract(address _hackNote) external onlyOwner {
}
function sethackTokenContract(address _token) external onlyOwner {
}
function setRevealCosts(uint256 stage, uint256 price) external onlyOwner {
}
function setBaseURI(uint256 stage, string calldata uriPart) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function updateHackPrice(uint256 _HackPrice) external onlyOwner {
}
function updateMaxSupply(uint16 _maxSupply) external onlyOwner {
}
function updateFreeSupply(uint16 _freeSupply) external onlyOwner {
}
function updateMaxPerTxn(uint16 _maxPerTxn) external onlyOwner {
}
function updateMaxPerWallet(uint16 _maxPerWallet) external onlyOwner {
}
function updateMaxFreePerWallet(uint16 _maxFreePerWallet) external onlyOwner {
}
function updateMaxFreePerTxn(uint16 _maxFreePerTxn) external onlyOwner {
}
function updateRevealStage(uint16 stage) external onlyOwner {
}
function updateMintStage(uint16 _mintStage) external onlyOwner {
}
function enableNotes() external onlyOwner {
}
function enableStaking() external onlyOwner {
}
function setDefaultRoyalty(address _receiver, uint96 _fee) public onlyOwner {
}
function setApprovalForAll(address operator, bool approved) public override
onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable virtual override
onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override
onlyAllowedOperator(from)
revertIfStaked(tokenId)
{
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function withdraw(address _withdrawTo) external onlyOwner {
}
// Off-chain call for future reveals
function getRevealStage() external view returns (uint256){
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
// ERC721A
function _intToString(uint256 value) internal pure virtual returns (string memory str) {
}
}
| _numberMinted(msg.sender)<MAX_PER_WALLET,"Too much" | 491,835 | _numberMinted(msg.sender)<MAX_PER_WALLET |
"Wrong price" | /*
/$$ /$$
| $$ | $$
| $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$
| $$__ $$ |____ $$ /$$_____/| $$ /$$/
| $$ \ $$ /$$$$$$$| $$ | $$$$$$/
| $$ | $$ /$$__ $$| $$ | $$_ $$
| $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$
|__/ |__/ \_______/ \_______/|__/ \__/
/$$ /$$
| $$ | $$
/$$$$$$ | $$$$$$$ /$$$$$$
|_ $$_/ | $$__ $$ /$$__ $$
| $$ | $$ \ $$| $$$$$$$$
| $$ /$$| $$ | $$| $$_____/
| $$$$/| $$ | $$| $$$$$$$
\___/ |__/ |__/ \_______/
/$$ /$$
| $$ | $$
/$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
/$$__ $$| $$ |____ $$| $$__ $$ /$$__ $$|_ $$_/
| $$ \ $$| $$ /$$$$$$$| $$ \ $$| $$$$$$$$ | $$
| $$ | $$| $$ /$$__ $$| $$ | $$| $$_____/ | $$ /$$
| $$$$$$$/| $$| $$$$$$$| $$ | $$| $$$$$$$ | $$$$/
| $$____/ |__/ \_______/|__/ |__/ \_______/ \___/
| $$
| $$
|__/
we love
__ .__ __ .__
|__| ____ | |_/ |_ ____ ____ | | _____
| |/ _ \| |\ __\ _/ ___\/ _ \| | \__ \
| ( <_> ) |_| | \ \__( <_> ) |__/ __ \_
/\__| |\____/|____/__| \___ >____/|____(____ /
\______| \/ \/
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "ERC721A.sol";
import "DefaultOperatorFilterer.sol";
import "Ownable.sol";
import "ERC2981.sol";
import "ReentrancyGuard.sol";
import "MerkleProof.sol";
import "ERC20Burnable.sol";
interface HackStake {
function isStaked(uint256 tokenId) external returns(bool);
function stake(uint256 tokenId) external;
function unstake(uint256 tokenId) external;
function claim(uint256 tokenId) external;
function getStakeTime(uint256 tokenId) external returns(uint256);
function claimReward() external;
}
interface HackNote {
function mint(uint256 tokenId, string calldata note) external;
function getNoteMessage(uint256 tokenId) external returns(string memory);
}
interface HackBurnable {
function burn(uint256 tokenId) external;
}
contract h4cktheplan3t is ERC721A, ERC2981, DefaultOperatorFilterer, Ownable, ReentrancyGuard{
uint16 public MAX_SUPPLY;
uint16 public FREE_SUPPLY;
uint16 public MAX_PER_TX;
uint16 public MAX_PER_WALLET;
uint16 public MAX_FREE_PER_TX;
uint16 public MAX_FREE_PER_WALLET;
uint16 public TEAM_SUPPLY;
uint16 public REVEAL_STAGE;
uint16 public MINT_STAGE;
uint16 private TEAM_MINTED;
bool public STAKING_ENABLED;
bool public NOTES_ENABLED;
uint256 public Hack_PRICE;
HackStake private hackContract;
HackNote private hackNote;
ERC20Burnable private hackToken;
HackBurnable private hackBurn;
// Metadata
mapping(uint256 => string) private _baseUri;
mapping(uint256 => uint256) private _revealStages;
mapping(uint256 => uint256) private _revealCosts;
mapping(uint256 => bool) private _claimedStakeReward;
mapping(uint256 => uint256) private _boosts;
modifier revertIfStaked(uint256 tokenId) {
}
constructor(string memory _placeholderUri, uint16 _maxSupply, uint16 _freeSupply, uint16 _maxPerTx,
uint16 _maxPerWallet, uint16 _maxFreePerTx, uint16 _maxFreePerWallet, uint16 _teamSupply, uint256 _hackPrice) ERC721A("h4cktheplan3t", "Hack"){
}
function mint(uint256 quantity) external payable nonReentrant{
require(MINT_STAGE == 2, "Cannot hack yet");
require(msg.sender == tx.origin, "Contracts cannot hack");
require(quantity <= MAX_PER_TX, "Too much at once");
require(_numberMinted(msg.sender) < MAX_PER_WALLET, "Too much");
require(_totalMinted() + quantity <= MAX_SUPPLY, "Out of");
require(<FILL_ME>)
_mint(msg.sender, quantity);
}
function freeMint(uint256 quantity) external nonReentrant {
}
function teamMint(uint16 quantity) external onlyOwner {
}
function finalizeNote(uint256 tokenId, string calldata note) external nonReentrant{
}
function revealNextStage(uint256 tokenId) external nonReentrant {
}
function stake(uint256[] calldata tokenIds) external nonReentrant{
}
function claim(uint256[] calldata tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata tokenIds) external nonReentrant{
}
function claimInstantStakeReward(uint256[] calldata tokenIds) external nonReentrant {
}
function burnHack(uint256[] calldata tokenIds) external nonReentrant {
}
function setHackStakeContract(address _hackContract) external onlyOwner {
}
function setHackNoteContract(address _hackNote) external onlyOwner {
}
function sethackTokenContract(address _token) external onlyOwner {
}
function setRevealCosts(uint256 stage, uint256 price) external onlyOwner {
}
function setBaseURI(uint256 stage, string calldata uriPart) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function updateHackPrice(uint256 _HackPrice) external onlyOwner {
}
function updateMaxSupply(uint16 _maxSupply) external onlyOwner {
}
function updateFreeSupply(uint16 _freeSupply) external onlyOwner {
}
function updateMaxPerTxn(uint16 _maxPerTxn) external onlyOwner {
}
function updateMaxPerWallet(uint16 _maxPerWallet) external onlyOwner {
}
function updateMaxFreePerWallet(uint16 _maxFreePerWallet) external onlyOwner {
}
function updateMaxFreePerTxn(uint16 _maxFreePerTxn) external onlyOwner {
}
function updateRevealStage(uint16 stage) external onlyOwner {
}
function updateMintStage(uint16 _mintStage) external onlyOwner {
}
function enableNotes() external onlyOwner {
}
function enableStaking() external onlyOwner {
}
function setDefaultRoyalty(address _receiver, uint96 _fee) public onlyOwner {
}
function setApprovalForAll(address operator, bool approved) public override
onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable virtual override
onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override
onlyAllowedOperator(from)
revertIfStaked(tokenId)
{
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function withdraw(address _withdrawTo) external onlyOwner {
}
// Off-chain call for future reveals
function getRevealStage() external view returns (uint256){
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
// ERC721A
function _intToString(uint256 value) internal pure virtual returns (string memory str) {
}
}
| quantity*Hack_PRICE==msg.value,"Wrong price" | 491,835 | quantity*Hack_PRICE==msg.value |
"Out of Hack" | /*
/$$ /$$
| $$ | $$
| $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$
| $$__ $$ |____ $$ /$$_____/| $$ /$$/
| $$ \ $$ /$$$$$$$| $$ | $$$$$$/
| $$ | $$ /$$__ $$| $$ | $$_ $$
| $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$
|__/ |__/ \_______/ \_______/|__/ \__/
/$$ /$$
| $$ | $$
/$$$$$$ | $$$$$$$ /$$$$$$
|_ $$_/ | $$__ $$ /$$__ $$
| $$ | $$ \ $$| $$$$$$$$
| $$ /$$| $$ | $$| $$_____/
| $$$$/| $$ | $$| $$$$$$$
\___/ |__/ |__/ \_______/
/$$ /$$
| $$ | $$
/$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
/$$__ $$| $$ |____ $$| $$__ $$ /$$__ $$|_ $$_/
| $$ \ $$| $$ /$$$$$$$| $$ \ $$| $$$$$$$$ | $$
| $$ | $$| $$ /$$__ $$| $$ | $$| $$_____/ | $$ /$$
| $$$$$$$/| $$| $$$$$$$| $$ | $$| $$$$$$$ | $$$$/
| $$____/ |__/ \_______/|__/ |__/ \_______/ \___/
| $$
| $$
|__/
we love
__ .__ __ .__
|__| ____ | |_/ |_ ____ ____ | | _____
| |/ _ \| |\ __\ _/ ___\/ _ \| | \__ \
| ( <_> ) |_| | \ \__( <_> ) |__/ __ \_
/\__| |\____/|____/__| \___ >____/|____(____ /
\______| \/ \/
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "ERC721A.sol";
import "DefaultOperatorFilterer.sol";
import "Ownable.sol";
import "ERC2981.sol";
import "ReentrancyGuard.sol";
import "MerkleProof.sol";
import "ERC20Burnable.sol";
interface HackStake {
function isStaked(uint256 tokenId) external returns(bool);
function stake(uint256 tokenId) external;
function unstake(uint256 tokenId) external;
function claim(uint256 tokenId) external;
function getStakeTime(uint256 tokenId) external returns(uint256);
function claimReward() external;
}
interface HackNote {
function mint(uint256 tokenId, string calldata note) external;
function getNoteMessage(uint256 tokenId) external returns(string memory);
}
interface HackBurnable {
function burn(uint256 tokenId) external;
}
contract h4cktheplan3t is ERC721A, ERC2981, DefaultOperatorFilterer, Ownable, ReentrancyGuard{
uint16 public MAX_SUPPLY;
uint16 public FREE_SUPPLY;
uint16 public MAX_PER_TX;
uint16 public MAX_PER_WALLET;
uint16 public MAX_FREE_PER_TX;
uint16 public MAX_FREE_PER_WALLET;
uint16 public TEAM_SUPPLY;
uint16 public REVEAL_STAGE;
uint16 public MINT_STAGE;
uint16 private TEAM_MINTED;
bool public STAKING_ENABLED;
bool public NOTES_ENABLED;
uint256 public Hack_PRICE;
HackStake private hackContract;
HackNote private hackNote;
ERC20Burnable private hackToken;
HackBurnable private hackBurn;
// Metadata
mapping(uint256 => string) private _baseUri;
mapping(uint256 => uint256) private _revealStages;
mapping(uint256 => uint256) private _revealCosts;
mapping(uint256 => bool) private _claimedStakeReward;
mapping(uint256 => uint256) private _boosts;
modifier revertIfStaked(uint256 tokenId) {
}
constructor(string memory _placeholderUri, uint16 _maxSupply, uint16 _freeSupply, uint16 _maxPerTx,
uint16 _maxPerWallet, uint16 _maxFreePerTx, uint16 _maxFreePerWallet, uint16 _teamSupply, uint256 _hackPrice) ERC721A("h4cktheplan3t", "Hack"){
}
function mint(uint256 quantity) external payable nonReentrant{
}
function freeMint(uint256 quantity) external nonReentrant {
require(MINT_STAGE >= 1, "Cannot hack yet");
require(msg.sender == tx.origin, "Contracts cannot hack");
require(<FILL_ME>)
require(quantity <= MAX_FREE_PER_TX, "Too much free Hack at once");
require(_numberMinted(msg.sender) < MAX_FREE_PER_WALLET, "Too much free Hack");
_mint(msg.sender, quantity);
}
function teamMint(uint16 quantity) external onlyOwner {
}
function finalizeNote(uint256 tokenId, string calldata note) external nonReentrant{
}
function revealNextStage(uint256 tokenId) external nonReentrant {
}
function stake(uint256[] calldata tokenIds) external nonReentrant{
}
function claim(uint256[] calldata tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata tokenIds) external nonReentrant{
}
function claimInstantStakeReward(uint256[] calldata tokenIds) external nonReentrant {
}
function burnHack(uint256[] calldata tokenIds) external nonReentrant {
}
function setHackStakeContract(address _hackContract) external onlyOwner {
}
function setHackNoteContract(address _hackNote) external onlyOwner {
}
function sethackTokenContract(address _token) external onlyOwner {
}
function setRevealCosts(uint256 stage, uint256 price) external onlyOwner {
}
function setBaseURI(uint256 stage, string calldata uriPart) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function updateHackPrice(uint256 _HackPrice) external onlyOwner {
}
function updateMaxSupply(uint16 _maxSupply) external onlyOwner {
}
function updateFreeSupply(uint16 _freeSupply) external onlyOwner {
}
function updateMaxPerTxn(uint16 _maxPerTxn) external onlyOwner {
}
function updateMaxPerWallet(uint16 _maxPerWallet) external onlyOwner {
}
function updateMaxFreePerWallet(uint16 _maxFreePerWallet) external onlyOwner {
}
function updateMaxFreePerTxn(uint16 _maxFreePerTxn) external onlyOwner {
}
function updateRevealStage(uint16 stage) external onlyOwner {
}
function updateMintStage(uint16 _mintStage) external onlyOwner {
}
function enableNotes() external onlyOwner {
}
function enableStaking() external onlyOwner {
}
function setDefaultRoyalty(address _receiver, uint96 _fee) public onlyOwner {
}
function setApprovalForAll(address operator, bool approved) public override
onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable virtual override
onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override
onlyAllowedOperator(from)
revertIfStaked(tokenId)
{
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function withdraw(address _withdrawTo) external onlyOwner {
}
// Off-chain call for future reveals
function getRevealStage() external view returns (uint256){
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
// ERC721A
function _intToString(uint256 value) internal pure virtual returns (string memory str) {
}
}
| _totalMinted()+quantity<=FREE_SUPPLY,"Out of Hack" | 491,835 | _totalMinted()+quantity<=FREE_SUPPLY |
"Too much free Hack" | /*
/$$ /$$
| $$ | $$
| $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$
| $$__ $$ |____ $$ /$$_____/| $$ /$$/
| $$ \ $$ /$$$$$$$| $$ | $$$$$$/
| $$ | $$ /$$__ $$| $$ | $$_ $$
| $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$
|__/ |__/ \_______/ \_______/|__/ \__/
/$$ /$$
| $$ | $$
/$$$$$$ | $$$$$$$ /$$$$$$
|_ $$_/ | $$__ $$ /$$__ $$
| $$ | $$ \ $$| $$$$$$$$
| $$ /$$| $$ | $$| $$_____/
| $$$$/| $$ | $$| $$$$$$$
\___/ |__/ |__/ \_______/
/$$ /$$
| $$ | $$
/$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
/$$__ $$| $$ |____ $$| $$__ $$ /$$__ $$|_ $$_/
| $$ \ $$| $$ /$$$$$$$| $$ \ $$| $$$$$$$$ | $$
| $$ | $$| $$ /$$__ $$| $$ | $$| $$_____/ | $$ /$$
| $$$$$$$/| $$| $$$$$$$| $$ | $$| $$$$$$$ | $$$$/
| $$____/ |__/ \_______/|__/ |__/ \_______/ \___/
| $$
| $$
|__/
we love
__ .__ __ .__
|__| ____ | |_/ |_ ____ ____ | | _____
| |/ _ \| |\ __\ _/ ___\/ _ \| | \__ \
| ( <_> ) |_| | \ \__( <_> ) |__/ __ \_
/\__| |\____/|____/__| \___ >____/|____(____ /
\______| \/ \/
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "ERC721A.sol";
import "DefaultOperatorFilterer.sol";
import "Ownable.sol";
import "ERC2981.sol";
import "ReentrancyGuard.sol";
import "MerkleProof.sol";
import "ERC20Burnable.sol";
interface HackStake {
function isStaked(uint256 tokenId) external returns(bool);
function stake(uint256 tokenId) external;
function unstake(uint256 tokenId) external;
function claim(uint256 tokenId) external;
function getStakeTime(uint256 tokenId) external returns(uint256);
function claimReward() external;
}
interface HackNote {
function mint(uint256 tokenId, string calldata note) external;
function getNoteMessage(uint256 tokenId) external returns(string memory);
}
interface HackBurnable {
function burn(uint256 tokenId) external;
}
contract h4cktheplan3t is ERC721A, ERC2981, DefaultOperatorFilterer, Ownable, ReentrancyGuard{
uint16 public MAX_SUPPLY;
uint16 public FREE_SUPPLY;
uint16 public MAX_PER_TX;
uint16 public MAX_PER_WALLET;
uint16 public MAX_FREE_PER_TX;
uint16 public MAX_FREE_PER_WALLET;
uint16 public TEAM_SUPPLY;
uint16 public REVEAL_STAGE;
uint16 public MINT_STAGE;
uint16 private TEAM_MINTED;
bool public STAKING_ENABLED;
bool public NOTES_ENABLED;
uint256 public Hack_PRICE;
HackStake private hackContract;
HackNote private hackNote;
ERC20Burnable private hackToken;
HackBurnable private hackBurn;
// Metadata
mapping(uint256 => string) private _baseUri;
mapping(uint256 => uint256) private _revealStages;
mapping(uint256 => uint256) private _revealCosts;
mapping(uint256 => bool) private _claimedStakeReward;
mapping(uint256 => uint256) private _boosts;
modifier revertIfStaked(uint256 tokenId) {
}
constructor(string memory _placeholderUri, uint16 _maxSupply, uint16 _freeSupply, uint16 _maxPerTx,
uint16 _maxPerWallet, uint16 _maxFreePerTx, uint16 _maxFreePerWallet, uint16 _teamSupply, uint256 _hackPrice) ERC721A("h4cktheplan3t", "Hack"){
}
function mint(uint256 quantity) external payable nonReentrant{
}
function freeMint(uint256 quantity) external nonReentrant {
require(MINT_STAGE >= 1, "Cannot hack yet");
require(msg.sender == tx.origin, "Contracts cannot hack");
require(_totalMinted() + quantity <= FREE_SUPPLY, "Out of Hack");
require(quantity <= MAX_FREE_PER_TX, "Too much free Hack at once");
require(<FILL_ME>)
_mint(msg.sender, quantity);
}
function teamMint(uint16 quantity) external onlyOwner {
}
function finalizeNote(uint256 tokenId, string calldata note) external nonReentrant{
}
function revealNextStage(uint256 tokenId) external nonReentrant {
}
function stake(uint256[] calldata tokenIds) external nonReentrant{
}
function claim(uint256[] calldata tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata tokenIds) external nonReentrant{
}
function claimInstantStakeReward(uint256[] calldata tokenIds) external nonReentrant {
}
function burnHack(uint256[] calldata tokenIds) external nonReentrant {
}
function setHackStakeContract(address _hackContract) external onlyOwner {
}
function setHackNoteContract(address _hackNote) external onlyOwner {
}
function sethackTokenContract(address _token) external onlyOwner {
}
function setRevealCosts(uint256 stage, uint256 price) external onlyOwner {
}
function setBaseURI(uint256 stage, string calldata uriPart) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function updateHackPrice(uint256 _HackPrice) external onlyOwner {
}
function updateMaxSupply(uint16 _maxSupply) external onlyOwner {
}
function updateFreeSupply(uint16 _freeSupply) external onlyOwner {
}
function updateMaxPerTxn(uint16 _maxPerTxn) external onlyOwner {
}
function updateMaxPerWallet(uint16 _maxPerWallet) external onlyOwner {
}
function updateMaxFreePerWallet(uint16 _maxFreePerWallet) external onlyOwner {
}
function updateMaxFreePerTxn(uint16 _maxFreePerTxn) external onlyOwner {
}
function updateRevealStage(uint16 stage) external onlyOwner {
}
function updateMintStage(uint16 _mintStage) external onlyOwner {
}
function enableNotes() external onlyOwner {
}
function enableStaking() external onlyOwner {
}
function setDefaultRoyalty(address _receiver, uint96 _fee) public onlyOwner {
}
function setApprovalForAll(address operator, bool approved) public override
onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable virtual override
onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override
onlyAllowedOperator(from)
revertIfStaked(tokenId)
{
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function withdraw(address _withdrawTo) external onlyOwner {
}
// Off-chain call for future reveals
function getRevealStage() external view returns (uint256){
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
// ERC721A
function _intToString(uint256 value) internal pure virtual returns (string memory str) {
}
}
| _numberMinted(msg.sender)<MAX_FREE_PER_WALLET,"Too much free Hack" | 491,835 | _numberMinted(msg.sender)<MAX_FREE_PER_WALLET |
"Cannot surpass team supply" | /*
/$$ /$$
| $$ | $$
| $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$
| $$__ $$ |____ $$ /$$_____/| $$ /$$/
| $$ \ $$ /$$$$$$$| $$ | $$$$$$/
| $$ | $$ /$$__ $$| $$ | $$_ $$
| $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$
|__/ |__/ \_______/ \_______/|__/ \__/
/$$ /$$
| $$ | $$
/$$$$$$ | $$$$$$$ /$$$$$$
|_ $$_/ | $$__ $$ /$$__ $$
| $$ | $$ \ $$| $$$$$$$$
| $$ /$$| $$ | $$| $$_____/
| $$$$/| $$ | $$| $$$$$$$
\___/ |__/ |__/ \_______/
/$$ /$$
| $$ | $$
/$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
/$$__ $$| $$ |____ $$| $$__ $$ /$$__ $$|_ $$_/
| $$ \ $$| $$ /$$$$$$$| $$ \ $$| $$$$$$$$ | $$
| $$ | $$| $$ /$$__ $$| $$ | $$| $$_____/ | $$ /$$
| $$$$$$$/| $$| $$$$$$$| $$ | $$| $$$$$$$ | $$$$/
| $$____/ |__/ \_______/|__/ |__/ \_______/ \___/
| $$
| $$
|__/
we love
__ .__ __ .__
|__| ____ | |_/ |_ ____ ____ | | _____
| |/ _ \| |\ __\ _/ ___\/ _ \| | \__ \
| ( <_> ) |_| | \ \__( <_> ) |__/ __ \_
/\__| |\____/|____/__| \___ >____/|____(____ /
\______| \/ \/
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "ERC721A.sol";
import "DefaultOperatorFilterer.sol";
import "Ownable.sol";
import "ERC2981.sol";
import "ReentrancyGuard.sol";
import "MerkleProof.sol";
import "ERC20Burnable.sol";
interface HackStake {
function isStaked(uint256 tokenId) external returns(bool);
function stake(uint256 tokenId) external;
function unstake(uint256 tokenId) external;
function claim(uint256 tokenId) external;
function getStakeTime(uint256 tokenId) external returns(uint256);
function claimReward() external;
}
interface HackNote {
function mint(uint256 tokenId, string calldata note) external;
function getNoteMessage(uint256 tokenId) external returns(string memory);
}
interface HackBurnable {
function burn(uint256 tokenId) external;
}
contract h4cktheplan3t is ERC721A, ERC2981, DefaultOperatorFilterer, Ownable, ReentrancyGuard{
uint16 public MAX_SUPPLY;
uint16 public FREE_SUPPLY;
uint16 public MAX_PER_TX;
uint16 public MAX_PER_WALLET;
uint16 public MAX_FREE_PER_TX;
uint16 public MAX_FREE_PER_WALLET;
uint16 public TEAM_SUPPLY;
uint16 public REVEAL_STAGE;
uint16 public MINT_STAGE;
uint16 private TEAM_MINTED;
bool public STAKING_ENABLED;
bool public NOTES_ENABLED;
uint256 public Hack_PRICE;
HackStake private hackContract;
HackNote private hackNote;
ERC20Burnable private hackToken;
HackBurnable private hackBurn;
// Metadata
mapping(uint256 => string) private _baseUri;
mapping(uint256 => uint256) private _revealStages;
mapping(uint256 => uint256) private _revealCosts;
mapping(uint256 => bool) private _claimedStakeReward;
mapping(uint256 => uint256) private _boosts;
modifier revertIfStaked(uint256 tokenId) {
}
constructor(string memory _placeholderUri, uint16 _maxSupply, uint16 _freeSupply, uint16 _maxPerTx,
uint16 _maxPerWallet, uint16 _maxFreePerTx, uint16 _maxFreePerWallet, uint16 _teamSupply, uint256 _hackPrice) ERC721A("h4cktheplan3t", "Hack"){
}
function mint(uint256 quantity) external payable nonReentrant{
}
function freeMint(uint256 quantity) external nonReentrant {
}
function teamMint(uint16 quantity) external onlyOwner {
require(<FILL_ME>)
require(TEAM_MINTED + quantity + _totalMinted() <= MAX_SUPPLY, "Cannot exceed max supply");
TEAM_MINTED += quantity;
_mint(msg.sender, quantity);
}
function finalizeNote(uint256 tokenId, string calldata note) external nonReentrant{
}
function revealNextStage(uint256 tokenId) external nonReentrant {
}
function stake(uint256[] calldata tokenIds) external nonReentrant{
}
function claim(uint256[] calldata tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata tokenIds) external nonReentrant{
}
function claimInstantStakeReward(uint256[] calldata tokenIds) external nonReentrant {
}
function burnHack(uint256[] calldata tokenIds) external nonReentrant {
}
function setHackStakeContract(address _hackContract) external onlyOwner {
}
function setHackNoteContract(address _hackNote) external onlyOwner {
}
function sethackTokenContract(address _token) external onlyOwner {
}
function setRevealCosts(uint256 stage, uint256 price) external onlyOwner {
}
function setBaseURI(uint256 stage, string calldata uriPart) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function updateHackPrice(uint256 _HackPrice) external onlyOwner {
}
function updateMaxSupply(uint16 _maxSupply) external onlyOwner {
}
function updateFreeSupply(uint16 _freeSupply) external onlyOwner {
}
function updateMaxPerTxn(uint16 _maxPerTxn) external onlyOwner {
}
function updateMaxPerWallet(uint16 _maxPerWallet) external onlyOwner {
}
function updateMaxFreePerWallet(uint16 _maxFreePerWallet) external onlyOwner {
}
function updateMaxFreePerTxn(uint16 _maxFreePerTxn) external onlyOwner {
}
function updateRevealStage(uint16 stage) external onlyOwner {
}
function updateMintStage(uint16 _mintStage) external onlyOwner {
}
function enableNotes() external onlyOwner {
}
function enableStaking() external onlyOwner {
}
function setDefaultRoyalty(address _receiver, uint96 _fee) public onlyOwner {
}
function setApprovalForAll(address operator, bool approved) public override
onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable virtual override
onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override
onlyAllowedOperator(from)
revertIfStaked(tokenId)
{
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function withdraw(address _withdrawTo) external onlyOwner {
}
// Off-chain call for future reveals
function getRevealStage() external view returns (uint256){
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
// ERC721A
function _intToString(uint256 value) internal pure virtual returns (string memory str) {
}
}
| TEAM_MINTED+quantity<=TEAM_SUPPLY,"Cannot surpass team supply" | 491,835 | TEAM_MINTED+quantity<=TEAM_SUPPLY |
"Cannot exceed max supply" | /*
/$$ /$$
| $$ | $$
| $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$
| $$__ $$ |____ $$ /$$_____/| $$ /$$/
| $$ \ $$ /$$$$$$$| $$ | $$$$$$/
| $$ | $$ /$$__ $$| $$ | $$_ $$
| $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$
|__/ |__/ \_______/ \_______/|__/ \__/
/$$ /$$
| $$ | $$
/$$$$$$ | $$$$$$$ /$$$$$$
|_ $$_/ | $$__ $$ /$$__ $$
| $$ | $$ \ $$| $$$$$$$$
| $$ /$$| $$ | $$| $$_____/
| $$$$/| $$ | $$| $$$$$$$
\___/ |__/ |__/ \_______/
/$$ /$$
| $$ | $$
/$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
/$$__ $$| $$ |____ $$| $$__ $$ /$$__ $$|_ $$_/
| $$ \ $$| $$ /$$$$$$$| $$ \ $$| $$$$$$$$ | $$
| $$ | $$| $$ /$$__ $$| $$ | $$| $$_____/ | $$ /$$
| $$$$$$$/| $$| $$$$$$$| $$ | $$| $$$$$$$ | $$$$/
| $$____/ |__/ \_______/|__/ |__/ \_______/ \___/
| $$
| $$
|__/
we love
__ .__ __ .__
|__| ____ | |_/ |_ ____ ____ | | _____
| |/ _ \| |\ __\ _/ ___\/ _ \| | \__ \
| ( <_> ) |_| | \ \__( <_> ) |__/ __ \_
/\__| |\____/|____/__| \___ >____/|____(____ /
\______| \/ \/
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "ERC721A.sol";
import "DefaultOperatorFilterer.sol";
import "Ownable.sol";
import "ERC2981.sol";
import "ReentrancyGuard.sol";
import "MerkleProof.sol";
import "ERC20Burnable.sol";
interface HackStake {
function isStaked(uint256 tokenId) external returns(bool);
function stake(uint256 tokenId) external;
function unstake(uint256 tokenId) external;
function claim(uint256 tokenId) external;
function getStakeTime(uint256 tokenId) external returns(uint256);
function claimReward() external;
}
interface HackNote {
function mint(uint256 tokenId, string calldata note) external;
function getNoteMessage(uint256 tokenId) external returns(string memory);
}
interface HackBurnable {
function burn(uint256 tokenId) external;
}
contract h4cktheplan3t is ERC721A, ERC2981, DefaultOperatorFilterer, Ownable, ReentrancyGuard{
uint16 public MAX_SUPPLY;
uint16 public FREE_SUPPLY;
uint16 public MAX_PER_TX;
uint16 public MAX_PER_WALLET;
uint16 public MAX_FREE_PER_TX;
uint16 public MAX_FREE_PER_WALLET;
uint16 public TEAM_SUPPLY;
uint16 public REVEAL_STAGE;
uint16 public MINT_STAGE;
uint16 private TEAM_MINTED;
bool public STAKING_ENABLED;
bool public NOTES_ENABLED;
uint256 public Hack_PRICE;
HackStake private hackContract;
HackNote private hackNote;
ERC20Burnable private hackToken;
HackBurnable private hackBurn;
// Metadata
mapping(uint256 => string) private _baseUri;
mapping(uint256 => uint256) private _revealStages;
mapping(uint256 => uint256) private _revealCosts;
mapping(uint256 => bool) private _claimedStakeReward;
mapping(uint256 => uint256) private _boosts;
modifier revertIfStaked(uint256 tokenId) {
}
constructor(string memory _placeholderUri, uint16 _maxSupply, uint16 _freeSupply, uint16 _maxPerTx,
uint16 _maxPerWallet, uint16 _maxFreePerTx, uint16 _maxFreePerWallet, uint16 _teamSupply, uint256 _hackPrice) ERC721A("h4cktheplan3t", "Hack"){
}
function mint(uint256 quantity) external payable nonReentrant{
}
function freeMint(uint256 quantity) external nonReentrant {
}
function teamMint(uint16 quantity) external onlyOwner {
require(TEAM_MINTED + quantity <= TEAM_SUPPLY, "Cannot surpass team supply");
require(<FILL_ME>)
TEAM_MINTED += quantity;
_mint(msg.sender, quantity);
}
function finalizeNote(uint256 tokenId, string calldata note) external nonReentrant{
}
function revealNextStage(uint256 tokenId) external nonReentrant {
}
function stake(uint256[] calldata tokenIds) external nonReentrant{
}
function claim(uint256[] calldata tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata tokenIds) external nonReentrant{
}
function claimInstantStakeReward(uint256[] calldata tokenIds) external nonReentrant {
}
function burnHack(uint256[] calldata tokenIds) external nonReentrant {
}
function setHackStakeContract(address _hackContract) external onlyOwner {
}
function setHackNoteContract(address _hackNote) external onlyOwner {
}
function sethackTokenContract(address _token) external onlyOwner {
}
function setRevealCosts(uint256 stage, uint256 price) external onlyOwner {
}
function setBaseURI(uint256 stage, string calldata uriPart) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function updateHackPrice(uint256 _HackPrice) external onlyOwner {
}
function updateMaxSupply(uint16 _maxSupply) external onlyOwner {
}
function updateFreeSupply(uint16 _freeSupply) external onlyOwner {
}
function updateMaxPerTxn(uint16 _maxPerTxn) external onlyOwner {
}
function updateMaxPerWallet(uint16 _maxPerWallet) external onlyOwner {
}
function updateMaxFreePerWallet(uint16 _maxFreePerWallet) external onlyOwner {
}
function updateMaxFreePerTxn(uint16 _maxFreePerTxn) external onlyOwner {
}
function updateRevealStage(uint16 stage) external onlyOwner {
}
function updateMintStage(uint16 _mintStage) external onlyOwner {
}
function enableNotes() external onlyOwner {
}
function enableStaking() external onlyOwner {
}
function setDefaultRoyalty(address _receiver, uint96 _fee) public onlyOwner {
}
function setApprovalForAll(address operator, bool approved) public override
onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable virtual override
onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override
onlyAllowedOperator(from)
revertIfStaked(tokenId)
{
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function withdraw(address _withdrawTo) external onlyOwner {
}
// Off-chain call for future reveals
function getRevealStage() external view returns (uint256){
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
// ERC721A
function _intToString(uint256 value) internal pure virtual returns (string memory str) {
}
}
| TEAM_MINTED+quantity+_totalMinted()<=MAX_SUPPLY,"Cannot exceed max supply" | 491,835 | TEAM_MINTED+quantity+_totalMinted()<=MAX_SUPPLY |
"Note too long" | /*
/$$ /$$
| $$ | $$
| $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$
| $$__ $$ |____ $$ /$$_____/| $$ /$$/
| $$ \ $$ /$$$$$$$| $$ | $$$$$$/
| $$ | $$ /$$__ $$| $$ | $$_ $$
| $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$
|__/ |__/ \_______/ \_______/|__/ \__/
/$$ /$$
| $$ | $$
/$$$$$$ | $$$$$$$ /$$$$$$
|_ $$_/ | $$__ $$ /$$__ $$
| $$ | $$ \ $$| $$$$$$$$
| $$ /$$| $$ | $$| $$_____/
| $$$$/| $$ | $$| $$$$$$$
\___/ |__/ |__/ \_______/
/$$ /$$
| $$ | $$
/$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
/$$__ $$| $$ |____ $$| $$__ $$ /$$__ $$|_ $$_/
| $$ \ $$| $$ /$$$$$$$| $$ \ $$| $$$$$$$$ | $$
| $$ | $$| $$ /$$__ $$| $$ | $$| $$_____/ | $$ /$$
| $$$$$$$/| $$| $$$$$$$| $$ | $$| $$$$$$$ | $$$$/
| $$____/ |__/ \_______/|__/ |__/ \_______/ \___/
| $$
| $$
|__/
we love
__ .__ __ .__
|__| ____ | |_/ |_ ____ ____ | | _____
| |/ _ \| |\ __\ _/ ___\/ _ \| | \__ \
| ( <_> ) |_| | \ \__( <_> ) |__/ __ \_
/\__| |\____/|____/__| \___ >____/|____(____ /
\______| \/ \/
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "ERC721A.sol";
import "DefaultOperatorFilterer.sol";
import "Ownable.sol";
import "ERC2981.sol";
import "ReentrancyGuard.sol";
import "MerkleProof.sol";
import "ERC20Burnable.sol";
interface HackStake {
function isStaked(uint256 tokenId) external returns(bool);
function stake(uint256 tokenId) external;
function unstake(uint256 tokenId) external;
function claim(uint256 tokenId) external;
function getStakeTime(uint256 tokenId) external returns(uint256);
function claimReward() external;
}
interface HackNote {
function mint(uint256 tokenId, string calldata note) external;
function getNoteMessage(uint256 tokenId) external returns(string memory);
}
interface HackBurnable {
function burn(uint256 tokenId) external;
}
contract h4cktheplan3t is ERC721A, ERC2981, DefaultOperatorFilterer, Ownable, ReentrancyGuard{
uint16 public MAX_SUPPLY;
uint16 public FREE_SUPPLY;
uint16 public MAX_PER_TX;
uint16 public MAX_PER_WALLET;
uint16 public MAX_FREE_PER_TX;
uint16 public MAX_FREE_PER_WALLET;
uint16 public TEAM_SUPPLY;
uint16 public REVEAL_STAGE;
uint16 public MINT_STAGE;
uint16 private TEAM_MINTED;
bool public STAKING_ENABLED;
bool public NOTES_ENABLED;
uint256 public Hack_PRICE;
HackStake private hackContract;
HackNote private hackNote;
ERC20Burnable private hackToken;
HackBurnable private hackBurn;
// Metadata
mapping(uint256 => string) private _baseUri;
mapping(uint256 => uint256) private _revealStages;
mapping(uint256 => uint256) private _revealCosts;
mapping(uint256 => bool) private _claimedStakeReward;
mapping(uint256 => uint256) private _boosts;
modifier revertIfStaked(uint256 tokenId) {
}
constructor(string memory _placeholderUri, uint16 _maxSupply, uint16 _freeSupply, uint16 _maxPerTx,
uint16 _maxPerWallet, uint16 _maxFreePerTx, uint16 _maxFreePerWallet, uint16 _teamSupply, uint256 _hackPrice) ERC721A("h4cktheplan3t", "Hack"){
}
function mint(uint256 quantity) external payable nonReentrant{
}
function freeMint(uint256 quantity) external nonReentrant {
}
function teamMint(uint16 quantity) external onlyOwner {
}
function finalizeNote(uint256 tokenId, string calldata note) external nonReentrant{
require(NOTES_ENABLED == true, "Not hacking hard enough yet");
require(ownerOf(tokenId) == msg.sender, "Hack not owned by you");
require(<FILL_ME>)
require(hackNote != HackNote(address(0)), "Note not ready yet");
hackNote.mint(tokenId, note);
}
function revealNextStage(uint256 tokenId) external nonReentrant {
}
function stake(uint256[] calldata tokenIds) external nonReentrant{
}
function claim(uint256[] calldata tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata tokenIds) external nonReentrant{
}
function claimInstantStakeReward(uint256[] calldata tokenIds) external nonReentrant {
}
function burnHack(uint256[] calldata tokenIds) external nonReentrant {
}
function setHackStakeContract(address _hackContract) external onlyOwner {
}
function setHackNoteContract(address _hackNote) external onlyOwner {
}
function sethackTokenContract(address _token) external onlyOwner {
}
function setRevealCosts(uint256 stage, uint256 price) external onlyOwner {
}
function setBaseURI(uint256 stage, string calldata uriPart) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function updateHackPrice(uint256 _HackPrice) external onlyOwner {
}
function updateMaxSupply(uint16 _maxSupply) external onlyOwner {
}
function updateFreeSupply(uint16 _freeSupply) external onlyOwner {
}
function updateMaxPerTxn(uint16 _maxPerTxn) external onlyOwner {
}
function updateMaxPerWallet(uint16 _maxPerWallet) external onlyOwner {
}
function updateMaxFreePerWallet(uint16 _maxFreePerWallet) external onlyOwner {
}
function updateMaxFreePerTxn(uint16 _maxFreePerTxn) external onlyOwner {
}
function updateRevealStage(uint16 stage) external onlyOwner {
}
function updateMintStage(uint16 _mintStage) external onlyOwner {
}
function enableNotes() external onlyOwner {
}
function enableStaking() external onlyOwner {
}
function setDefaultRoyalty(address _receiver, uint96 _fee) public onlyOwner {
}
function setApprovalForAll(address operator, bool approved) public override
onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable virtual override
onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override
onlyAllowedOperator(from)
revertIfStaked(tokenId)
{
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function withdraw(address _withdrawTo) external onlyOwner {
}
// Off-chain call for future reveals
function getRevealStage() external view returns (uint256){
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
// ERC721A
function _intToString(uint256 value) internal pure virtual returns (string memory str) {
}
}
| bytes(note).length<=140,"Note too long" | 491,835 | bytes(note).length<=140 |
"Hack needs hack to reveal" | /*
/$$ /$$
| $$ | $$
| $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$
| $$__ $$ |____ $$ /$$_____/| $$ /$$/
| $$ \ $$ /$$$$$$$| $$ | $$$$$$/
| $$ | $$ /$$__ $$| $$ | $$_ $$
| $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$
|__/ |__/ \_______/ \_______/|__/ \__/
/$$ /$$
| $$ | $$
/$$$$$$ | $$$$$$$ /$$$$$$
|_ $$_/ | $$__ $$ /$$__ $$
| $$ | $$ \ $$| $$$$$$$$
| $$ /$$| $$ | $$| $$_____/
| $$$$/| $$ | $$| $$$$$$$
\___/ |__/ |__/ \_______/
/$$ /$$
| $$ | $$
/$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
/$$__ $$| $$ |____ $$| $$__ $$ /$$__ $$|_ $$_/
| $$ \ $$| $$ /$$$$$$$| $$ \ $$| $$$$$$$$ | $$
| $$ | $$| $$ /$$__ $$| $$ | $$| $$_____/ | $$ /$$
| $$$$$$$/| $$| $$$$$$$| $$ | $$| $$$$$$$ | $$$$/
| $$____/ |__/ \_______/|__/ |__/ \_______/ \___/
| $$
| $$
|__/
we love
__ .__ __ .__
|__| ____ | |_/ |_ ____ ____ | | _____
| |/ _ \| |\ __\ _/ ___\/ _ \| | \__ \
| ( <_> ) |_| | \ \__( <_> ) |__/ __ \_
/\__| |\____/|____/__| \___ >____/|____(____ /
\______| \/ \/
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "ERC721A.sol";
import "DefaultOperatorFilterer.sol";
import "Ownable.sol";
import "ERC2981.sol";
import "ReentrancyGuard.sol";
import "MerkleProof.sol";
import "ERC20Burnable.sol";
interface HackStake {
function isStaked(uint256 tokenId) external returns(bool);
function stake(uint256 tokenId) external;
function unstake(uint256 tokenId) external;
function claim(uint256 tokenId) external;
function getStakeTime(uint256 tokenId) external returns(uint256);
function claimReward() external;
}
interface HackNote {
function mint(uint256 tokenId, string calldata note) external;
function getNoteMessage(uint256 tokenId) external returns(string memory);
}
interface HackBurnable {
function burn(uint256 tokenId) external;
}
contract h4cktheplan3t is ERC721A, ERC2981, DefaultOperatorFilterer, Ownable, ReentrancyGuard{
uint16 public MAX_SUPPLY;
uint16 public FREE_SUPPLY;
uint16 public MAX_PER_TX;
uint16 public MAX_PER_WALLET;
uint16 public MAX_FREE_PER_TX;
uint16 public MAX_FREE_PER_WALLET;
uint16 public TEAM_SUPPLY;
uint16 public REVEAL_STAGE;
uint16 public MINT_STAGE;
uint16 private TEAM_MINTED;
bool public STAKING_ENABLED;
bool public NOTES_ENABLED;
uint256 public Hack_PRICE;
HackStake private hackContract;
HackNote private hackNote;
ERC20Burnable private hackToken;
HackBurnable private hackBurn;
// Metadata
mapping(uint256 => string) private _baseUri;
mapping(uint256 => uint256) private _revealStages;
mapping(uint256 => uint256) private _revealCosts;
mapping(uint256 => bool) private _claimedStakeReward;
mapping(uint256 => uint256) private _boosts;
modifier revertIfStaked(uint256 tokenId) {
}
constructor(string memory _placeholderUri, uint16 _maxSupply, uint16 _freeSupply, uint16 _maxPerTx,
uint16 _maxPerWallet, uint16 _maxFreePerTx, uint16 _maxFreePerWallet, uint16 _teamSupply, uint256 _hackPrice) ERC721A("h4cktheplan3t", "Hack"){
}
function mint(uint256 quantity) external payable nonReentrant{
}
function freeMint(uint256 quantity) external nonReentrant {
}
function teamMint(uint16 quantity) external onlyOwner {
}
function finalizeNote(uint256 tokenId, string calldata note) external nonReentrant{
}
function revealNextStage(uint256 tokenId) external nonReentrant {
require(ownerOf(tokenId) == msg.sender, "Hack not owned by you");
uint256 tokenStage = _revealStages[tokenId] + 1;
require(tokenStage <= REVEAL_STAGE, "Hack not ready to reveal");
require(<FILL_ME>)
hackToken.burnFrom(msg.sender, _revealCosts[tokenStage]);
_revealStages[tokenId] = tokenStage;
}
function stake(uint256[] calldata tokenIds) external nonReentrant{
}
function claim(uint256[] calldata tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata tokenIds) external nonReentrant{
}
function claimInstantStakeReward(uint256[] calldata tokenIds) external nonReentrant {
}
function burnHack(uint256[] calldata tokenIds) external nonReentrant {
}
function setHackStakeContract(address _hackContract) external onlyOwner {
}
function setHackNoteContract(address _hackNote) external onlyOwner {
}
function sethackTokenContract(address _token) external onlyOwner {
}
function setRevealCosts(uint256 stage, uint256 price) external onlyOwner {
}
function setBaseURI(uint256 stage, string calldata uriPart) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function updateHackPrice(uint256 _HackPrice) external onlyOwner {
}
function updateMaxSupply(uint16 _maxSupply) external onlyOwner {
}
function updateFreeSupply(uint16 _freeSupply) external onlyOwner {
}
function updateMaxPerTxn(uint16 _maxPerTxn) external onlyOwner {
}
function updateMaxPerWallet(uint16 _maxPerWallet) external onlyOwner {
}
function updateMaxFreePerWallet(uint16 _maxFreePerWallet) external onlyOwner {
}
function updateMaxFreePerTxn(uint16 _maxFreePerTxn) external onlyOwner {
}
function updateRevealStage(uint16 stage) external onlyOwner {
}
function updateMintStage(uint16 _mintStage) external onlyOwner {
}
function enableNotes() external onlyOwner {
}
function enableStaking() external onlyOwner {
}
function setDefaultRoyalty(address _receiver, uint96 _fee) public onlyOwner {
}
function setApprovalForAll(address operator, bool approved) public override
onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable virtual override
onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override
onlyAllowedOperator(from)
revertIfStaked(tokenId)
{
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function withdraw(address _withdrawTo) external onlyOwner {
}
// Off-chain call for future reveals
function getRevealStage() external view returns (uint256){
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
// ERC721A
function _intToString(uint256 value) internal pure virtual returns (string memory str) {
}
}
| hackToken.balanceOf(msg.sender)>=_revealCosts[tokenStage],"Hack needs hack to reveal" | 491,835 | hackToken.balanceOf(msg.sender)>=_revealCosts[tokenStage] |
"Mint has started" | /*
/$$ /$$
| $$ | $$
| $$$$$$$ /$$$$$$ /$$$$$$$| $$ /$$
| $$__ $$ |____ $$ /$$_____/| $$ /$$/
| $$ \ $$ /$$$$$$$| $$ | $$$$$$/
| $$ | $$ /$$__ $$| $$ | $$_ $$
| $$ | $$| $$$$$$$| $$$$$$$| $$ \ $$
|__/ |__/ \_______/ \_______/|__/ \__/
/$$ /$$
| $$ | $$
/$$$$$$ | $$$$$$$ /$$$$$$
|_ $$_/ | $$__ $$ /$$__ $$
| $$ | $$ \ $$| $$$$$$$$
| $$ /$$| $$ | $$| $$_____/
| $$$$/| $$ | $$| $$$$$$$
\___/ |__/ |__/ \_______/
/$$ /$$
| $$ | $$
/$$$$$$ | $$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$
/$$__ $$| $$ |____ $$| $$__ $$ /$$__ $$|_ $$_/
| $$ \ $$| $$ /$$$$$$$| $$ \ $$| $$$$$$$$ | $$
| $$ | $$| $$ /$$__ $$| $$ | $$| $$_____/ | $$ /$$
| $$$$$$$/| $$| $$$$$$$| $$ | $$| $$$$$$$ | $$$$/
| $$____/ |__/ \_______/|__/ |__/ \_______/ \___/
| $$
| $$
|__/
we love
__ .__ __ .__
|__| ____ | |_/ |_ ____ ____ | | _____
| |/ _ \| |\ __\ _/ ___\/ _ \| | \__ \
| ( <_> ) |_| | \ \__( <_> ) |__/ __ \_
/\__| |\____/|____/__| \___ >____/|____(____ /
\______| \/ \/
*/
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import "ERC721A.sol";
import "DefaultOperatorFilterer.sol";
import "Ownable.sol";
import "ERC2981.sol";
import "ReentrancyGuard.sol";
import "MerkleProof.sol";
import "ERC20Burnable.sol";
interface HackStake {
function isStaked(uint256 tokenId) external returns(bool);
function stake(uint256 tokenId) external;
function unstake(uint256 tokenId) external;
function claim(uint256 tokenId) external;
function getStakeTime(uint256 tokenId) external returns(uint256);
function claimReward() external;
}
interface HackNote {
function mint(uint256 tokenId, string calldata note) external;
function getNoteMessage(uint256 tokenId) external returns(string memory);
}
interface HackBurnable {
function burn(uint256 tokenId) external;
}
contract h4cktheplan3t is ERC721A, ERC2981, DefaultOperatorFilterer, Ownable, ReentrancyGuard{
uint16 public MAX_SUPPLY;
uint16 public FREE_SUPPLY;
uint16 public MAX_PER_TX;
uint16 public MAX_PER_WALLET;
uint16 public MAX_FREE_PER_TX;
uint16 public MAX_FREE_PER_WALLET;
uint16 public TEAM_SUPPLY;
uint16 public REVEAL_STAGE;
uint16 public MINT_STAGE;
uint16 private TEAM_MINTED;
bool public STAKING_ENABLED;
bool public NOTES_ENABLED;
uint256 public Hack_PRICE;
HackStake private hackContract;
HackNote private hackNote;
ERC20Burnable private hackToken;
HackBurnable private hackBurn;
// Metadata
mapping(uint256 => string) private _baseUri;
mapping(uint256 => uint256) private _revealStages;
mapping(uint256 => uint256) private _revealCosts;
mapping(uint256 => bool) private _claimedStakeReward;
mapping(uint256 => uint256) private _boosts;
modifier revertIfStaked(uint256 tokenId) {
}
constructor(string memory _placeholderUri, uint16 _maxSupply, uint16 _freeSupply, uint16 _maxPerTx,
uint16 _maxPerWallet, uint16 _maxFreePerTx, uint16 _maxFreePerWallet, uint16 _teamSupply, uint256 _hackPrice) ERC721A("h4cktheplan3t", "Hack"){
}
function mint(uint256 quantity) external payable nonReentrant{
}
function freeMint(uint256 quantity) external nonReentrant {
}
function teamMint(uint16 quantity) external onlyOwner {
}
function finalizeNote(uint256 tokenId, string calldata note) external nonReentrant{
}
function revealNextStage(uint256 tokenId) external nonReentrant {
}
function stake(uint256[] calldata tokenIds) external nonReentrant{
}
function claim(uint256[] calldata tokenIds) external nonReentrant {
}
function unstake(uint256[] calldata tokenIds) external nonReentrant{
}
function claimInstantStakeReward(uint256[] calldata tokenIds) external nonReentrant {
}
function burnHack(uint256[] calldata tokenIds) external nonReentrant {
}
function setHackStakeContract(address _hackContract) external onlyOwner {
}
function setHackNoteContract(address _hackNote) external onlyOwner {
}
function sethackTokenContract(address _token) external onlyOwner {
}
function setRevealCosts(uint256 stage, uint256 price) external onlyOwner {
}
function setBaseURI(uint256 stage, string calldata uriPart) external onlyOwner {
}
function _baseURI() internal view virtual override returns (string memory) {
}
function updateHackPrice(uint256 _HackPrice) external onlyOwner {
}
function updateMaxSupply(uint16 _maxSupply) external onlyOwner {
require(<FILL_ME>)
MAX_SUPPLY = _maxSupply;
}
function updateFreeSupply(uint16 _freeSupply) external onlyOwner {
}
function updateMaxPerTxn(uint16 _maxPerTxn) external onlyOwner {
}
function updateMaxPerWallet(uint16 _maxPerWallet) external onlyOwner {
}
function updateMaxFreePerWallet(uint16 _maxFreePerWallet) external onlyOwner {
}
function updateMaxFreePerTxn(uint16 _maxFreePerTxn) external onlyOwner {
}
function updateRevealStage(uint16 stage) external onlyOwner {
}
function updateMintStage(uint16 _mintStage) external onlyOwner {
}
function enableNotes() external onlyOwner {
}
function enableStaking() external onlyOwner {
}
function setDefaultRoyalty(address _receiver, uint96 _fee) public onlyOwner {
}
function setApprovalForAll(address operator, bool approved) public override
onlyAllowedOperatorApproval(operator) {
}
function approve(address operator, uint256 tokenId) public payable virtual override
onlyAllowedOperatorApproval(operator) {
}
function transferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public payable virtual override
onlyAllowedOperator(from)
revertIfStaked(tokenId) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
payable
virtual
override
onlyAllowedOperator(from)
revertIfStaked(tokenId)
{
}
function supportsInterface(
bytes4 interfaceId
) public view virtual override(ERC721A, ERC2981) returns (bool) {
}
function withdraw(address _withdrawTo) external onlyOwner {
}
// Off-chain call for future reveals
function getRevealStage() external view returns (uint256){
}
function tokenURI(uint256 _tokenId) public view override returns (string memory) {
}
// ERC721A
function _intToString(uint256 value) internal pure virtual returns (string memory str) {
}
}
| _totalMinted()==0,"Mint has started" | 491,835 | _totalMinted()==0 |
"invalid token address" | // SPDX-License-Identifier: BlueOak-1.0.0
pragma solidity 0.8.17;
import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "../interfaces/IMain.sol";
import "../interfaces/IAssetRegistry.sol";
import "./mixins/Trading.sol";
import "./mixins/TradeLib.sol";
/// Trader Component that converts all asset balances at its address to a
/// single target asset and sends this asset to the Distributor.
/// @custom:oz-upgrades-unsafe-allow external-library-linking
contract RevenueTraderP1 is TradingP1, IRevenueTrader {
using FixLib for uint192;
using SafeERC20Upgradeable for IERC20Upgradeable;
// Immutable after init()
IERC20 public tokenToBuy;
IAssetRegistry private assetRegistry;
IDistributor private distributor;
function init(
IMain main_,
IERC20 tokenToBuy_,
uint192 maxTradeSlippage_,
uint192 minTradeVolume_
) external initializer {
require(<FILL_ME>)
__Component_init(main_);
__Trading_init(main_, maxTradeSlippage_, minTradeVolume_);
assetRegistry = main_.assetRegistry();
distributor = main_.distributor();
tokenToBuy = tokenToBuy_;
}
/// If erc20 is tokenToBuy, distribute it; else, sell it for tokenToBuy
/// @dev Intended to be used with multicall
/// @custom:interaction CEI
// let bal = this contract's balance of erc20
// checks: !paused, !frozen
// does nothing if erc20 == addr(0) or bal == 0
//
// If erc20 is tokenToBuy:
// actions:
// erc20.increaseAllowance(distributor, bal) - two safeApprove calls to support USDT
// distributor.distribute(erc20, this, bal)
//
// If erc20 is any other registered asset (checked):
// actions:
// tryTrade(prepareTradeSell(toAsset(erc20), toAsset(tokenToBuy), bal))
// (i.e, start a trade, selling as much of our bal of erc20 as we can, to buy tokenToBuy)
function manageToken(IERC20 erc20) external notPausedOrFrozen {
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[47] private __gap;
}
| address(tokenToBuy_)!=address(0),"invalid token address" | 491,941 | address(tokenToBuy_)!=address(0) |
"Not admin" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IERC721.sol";
contract Dashboard is ReentrancyGuard {
struct Admin {
string email;
address wallet;
uint256 createdAt;
}
struct User {
string fullName;
string email;
address wallet;
uint16 level;
uint64 investmentUpTo;
}
uint16 public investmentPerCard = 5000;
// Available NFT Cards. Can be created by admins.
address[] private _nftCards;
// Mapping to easily find a specific NFT Card by the index.
mapping(address => uint256) private _nftCardIndexes;
// All authenticated holders. It's unique.
string[] private _holderEmails;
// Mapping for fast lookup
mapping(address => uint256) private _emailIndexes;
mapping(string => string) private _holderNames;
mapping(string => address) private _holderAddresses;
mapping(string => uint256) private _holderCreatedAt;
mapping(address => bool) private _admins;
mapping(address => string) private _adminEmails;
mapping(address => uint256) private _adminCreatedAt;
address[] private _adminAddresses;
constructor() {
}
function addAdmin(address adminWallet) external onlyAdmins {
}
function authenticate(string memory email, string memory fullName) external onlyCardHolders {
}
function addNftContract(address _nft) external onlyAdmins {
}
function deleteAdmin(address adminWallet) external onlyAdmins {
}
function getAdmins() external view returns (Admin[] memory) {
}
function getCardCount(address wallet) public view returns (uint256) {
}
function getNftCards() external view returns (address[] memory) {
}
function getUserEmails() external view returns (string[] memory) {
}
function getUserCreatedAt(address wallet) external view returns (uint256) {
}
function getUsers() external view returns (User[] memory) {
}
function isAdmin(address walletAddress) external view returns (bool) {
}
function isAuthenticated(address walletAddress) external view returns (bool) {
}
function ownsNftCard(address wallet) public view returns (bool) {
}
/**
@dev Replaces from's email and address with the last email and address in the arrays.
*/
function signOut(address from) public {
}
function updateAdminEmail(string memory email) external onlyAdmins {
}
function updateInvestmentPerCard(uint16 value) external onlyAdmins {
}
modifier onlyAdmins() {
require(<FILL_ME>)
_;
}
modifier onlyCardHolders() {
}
modifier onlyFromNft() {
}
}
| _admins[address(msg.sender)],"Not admin" | 492,022 | _admins[address(msg.sender)] |
"Not a card holder" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "./interfaces/IERC721.sol";
contract Dashboard is ReentrancyGuard {
struct Admin {
string email;
address wallet;
uint256 createdAt;
}
struct User {
string fullName;
string email;
address wallet;
uint16 level;
uint64 investmentUpTo;
}
uint16 public investmentPerCard = 5000;
// Available NFT Cards. Can be created by admins.
address[] private _nftCards;
// Mapping to easily find a specific NFT Card by the index.
mapping(address => uint256) private _nftCardIndexes;
// All authenticated holders. It's unique.
string[] private _holderEmails;
// Mapping for fast lookup
mapping(address => uint256) private _emailIndexes;
mapping(string => string) private _holderNames;
mapping(string => address) private _holderAddresses;
mapping(string => uint256) private _holderCreatedAt;
mapping(address => bool) private _admins;
mapping(address => string) private _adminEmails;
mapping(address => uint256) private _adminCreatedAt;
address[] private _adminAddresses;
constructor() {
}
function addAdmin(address adminWallet) external onlyAdmins {
}
function authenticate(string memory email, string memory fullName) external onlyCardHolders {
}
function addNftContract(address _nft) external onlyAdmins {
}
function deleteAdmin(address adminWallet) external onlyAdmins {
}
function getAdmins() external view returns (Admin[] memory) {
}
function getCardCount(address wallet) public view returns (uint256) {
}
function getNftCards() external view returns (address[] memory) {
}
function getUserEmails() external view returns (string[] memory) {
}
function getUserCreatedAt(address wallet) external view returns (uint256) {
}
function getUsers() external view returns (User[] memory) {
}
function isAdmin(address walletAddress) external view returns (bool) {
}
function isAuthenticated(address walletAddress) external view returns (bool) {
}
function ownsNftCard(address wallet) public view returns (bool) {
}
/**
@dev Replaces from's email and address with the last email and address in the arrays.
*/
function signOut(address from) public {
}
function updateAdminEmail(string memory email) external onlyAdmins {
}
function updateInvestmentPerCard(uint16 value) external onlyAdmins {
}
modifier onlyAdmins() {
}
modifier onlyCardHolders() {
require(<FILL_ME>)
_;
}
modifier onlyFromNft() {
}
}
| ownsNftCard(address(msg.sender)),"Not a card holder" | 492,022 | ownsNftCard(address(msg.sender)) |
"CHAL_DEADLINE" | // Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/nitro/blob/master/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../libraries/DelegateCallAware.sol";
import "../osp/IOneStepProofEntry.sol";
import "../state/GlobalState.sol";
import "./IChallengeResultReceiver.sol";
import "./ChallengeLib.sol";
import "./IChallengeManager.sol";
import {NO_CHAL_INDEX} from "../libraries/Constants.sol";
contract ChallengeManager is DelegateCallAware, IChallengeManager {
using GlobalStateLib for GlobalState;
using MachineLib for Machine;
using ChallengeLib for ChallengeLib.Challenge;
enum ChallengeModeRequirement {
ANY,
BLOCK,
EXECUTION
}
string private constant NO_CHAL = "NO_CHAL";
uint256 private constant MAX_CHALLENGE_DEGREE = 40;
uint64 public totalChallengesCreated;
mapping(uint256 => ChallengeLib.Challenge) public challenges;
IChallengeResultReceiver public resultReceiver;
ISequencerInbox public sequencerInbox;
IBridge public bridge;
IOneStepProofEntry public osp;
function challengeInfo(uint64 challengeIndex)
external
view
override
returns (ChallengeLib.Challenge memory)
{
}
modifier takeTurn(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
ChallengeModeRequirement expectedMode
) {
ChallengeLib.Challenge storage challenge = challenges[challengeIndex];
require(msg.sender == currentResponder(challengeIndex), "CHAL_SENDER");
require(<FILL_ME>)
if (expectedMode == ChallengeModeRequirement.ANY) {
require(challenge.mode != ChallengeLib.ChallengeMode.NONE, NO_CHAL);
} else if (expectedMode == ChallengeModeRequirement.BLOCK) {
require(challenge.mode == ChallengeLib.ChallengeMode.BLOCK, "CHAL_NOT_BLOCK");
} else if (expectedMode == ChallengeModeRequirement.EXECUTION) {
require(challenge.mode == ChallengeLib.ChallengeMode.EXECUTION, "CHAL_NOT_EXECUTION");
} else {
assert(false);
}
require(
challenge.challengeStateHash ==
ChallengeLib.hashChallengeState(
selection.oldSegmentsStart,
selection.oldSegmentsLength,
selection.oldSegments
),
"BIS_STATE"
);
if (
selection.oldSegments.length < 2 ||
selection.challengePosition >= selection.oldSegments.length - 1
) {
revert("BAD_CHALLENGE_POS");
}
_;
if (challenge.mode == ChallengeLib.ChallengeMode.NONE) {
// Early return since challenge must have terminated
return;
}
ChallengeLib.Participant memory current = challenge.current;
current.timeLeft -= block.timestamp - challenge.lastMoveTimestamp;
challenge.current = challenge.next;
challenge.next = current;
challenge.lastMoveTimestamp = block.timestamp;
}
function initialize(
IChallengeResultReceiver resultReceiver_,
ISequencerInbox sequencerInbox_,
IBridge bridge_,
IOneStepProofEntry osp_
) external override onlyDelegated {
}
function createChallenge(
bytes32 wasmModuleRoot_,
MachineStatus[2] calldata startAndEndMachineStatuses_,
GlobalState[2] calldata startAndEndGlobalStates_,
uint64 numBlocks,
address asserter_,
address challenger_,
uint256 asserterTimeLeft_,
uint256 challengerTimeLeft_
) external override returns (uint64) {
}
/**
* @notice Initiate the next round in the bisection by objecting to execution correctness with a bisection
* of an execution segment with the same length but a different endpoint. This is either the initial move
* or follows another execution objection
*/
function bisectExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes32[] calldata newSegments
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.ANY) {
}
function challengeExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
MachineStatus[2] calldata machineStatuses,
bytes32[2] calldata globalStateHashes,
uint256 numSteps
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.BLOCK) {
}
function oneStepProveExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes calldata proof
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.EXECUTION) {
}
function timeout(uint64 challengeIndex) external override {
}
function clearChallenge(uint64 challengeIndex) external override {
}
function currentResponder(uint64 challengeIndex) public view override returns (address) {
}
function currentResponderTimeLeft(uint64 challengeIndex)
public
view
override
returns (uint256)
{
}
function isTimedOut(uint64 challengeIndex) public view override returns (bool) {
}
function requireValidBisection(
ChallengeLib.SegmentSelection calldata selection,
bytes32 startHash,
bytes32 endHash
) private pure {
}
function completeBisection(
uint64 challengeIndex,
uint256 challengeStart,
uint256 challengeLength,
bytes32[] memory newSegments
) private {
}
/// @dev This function causes the mode of the challenge to be set to NONE by deleting the challenge
function _nextWin(uint64 challengeIndex, ChallengeTerminationType reason) private {
}
/**
* @dev this currently sets a challenge hash of 0 - no move is possible for the next participant to progress the
* state. It is assumed that wherever this function is consumed, the turn is then adjusted for the opposite party
* to timeout. This is done as a safety measure so challenges can only be resolved by timeouts during mainnet beta.
*/
function _currentWin(
uint64 challengeIndex,
ChallengeTerminationType /* reason */
) private {
}
}
| !isTimedOut(challengeIndex),"CHAL_DEADLINE" | 492,255 | !isTimedOut(challengeIndex) |
"ALREADY_INIT" | // Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/nitro/blob/master/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../libraries/DelegateCallAware.sol";
import "../osp/IOneStepProofEntry.sol";
import "../state/GlobalState.sol";
import "./IChallengeResultReceiver.sol";
import "./ChallengeLib.sol";
import "./IChallengeManager.sol";
import {NO_CHAL_INDEX} from "../libraries/Constants.sol";
contract ChallengeManager is DelegateCallAware, IChallengeManager {
using GlobalStateLib for GlobalState;
using MachineLib for Machine;
using ChallengeLib for ChallengeLib.Challenge;
enum ChallengeModeRequirement {
ANY,
BLOCK,
EXECUTION
}
string private constant NO_CHAL = "NO_CHAL";
uint256 private constant MAX_CHALLENGE_DEGREE = 40;
uint64 public totalChallengesCreated;
mapping(uint256 => ChallengeLib.Challenge) public challenges;
IChallengeResultReceiver public resultReceiver;
ISequencerInbox public sequencerInbox;
IBridge public bridge;
IOneStepProofEntry public osp;
function challengeInfo(uint64 challengeIndex)
external
view
override
returns (ChallengeLib.Challenge memory)
{
}
modifier takeTurn(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
ChallengeModeRequirement expectedMode
) {
}
function initialize(
IChallengeResultReceiver resultReceiver_,
ISequencerInbox sequencerInbox_,
IBridge bridge_,
IOneStepProofEntry osp_
) external override onlyDelegated {
require(<FILL_ME>)
require(address(resultReceiver_) != address(0), "NO_RESULT_RECEIVER");
resultReceiver = resultReceiver_;
sequencerInbox = sequencerInbox_;
bridge = bridge_;
osp = osp_;
}
function createChallenge(
bytes32 wasmModuleRoot_,
MachineStatus[2] calldata startAndEndMachineStatuses_,
GlobalState[2] calldata startAndEndGlobalStates_,
uint64 numBlocks,
address asserter_,
address challenger_,
uint256 asserterTimeLeft_,
uint256 challengerTimeLeft_
) external override returns (uint64) {
}
/**
* @notice Initiate the next round in the bisection by objecting to execution correctness with a bisection
* of an execution segment with the same length but a different endpoint. This is either the initial move
* or follows another execution objection
*/
function bisectExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes32[] calldata newSegments
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.ANY) {
}
function challengeExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
MachineStatus[2] calldata machineStatuses,
bytes32[2] calldata globalStateHashes,
uint256 numSteps
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.BLOCK) {
}
function oneStepProveExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes calldata proof
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.EXECUTION) {
}
function timeout(uint64 challengeIndex) external override {
}
function clearChallenge(uint64 challengeIndex) external override {
}
function currentResponder(uint64 challengeIndex) public view override returns (address) {
}
function currentResponderTimeLeft(uint64 challengeIndex)
public
view
override
returns (uint256)
{
}
function isTimedOut(uint64 challengeIndex) public view override returns (bool) {
}
function requireValidBisection(
ChallengeLib.SegmentSelection calldata selection,
bytes32 startHash,
bytes32 endHash
) private pure {
}
function completeBisection(
uint64 challengeIndex,
uint256 challengeStart,
uint256 challengeLength,
bytes32[] memory newSegments
) private {
}
/// @dev This function causes the mode of the challenge to be set to NONE by deleting the challenge
function _nextWin(uint64 challengeIndex, ChallengeTerminationType reason) private {
}
/**
* @dev this currently sets a challenge hash of 0 - no move is possible for the next participant to progress the
* state. It is assumed that wherever this function is consumed, the turn is then adjusted for the opposite party
* to timeout. This is done as a safety measure so challenges can only be resolved by timeouts during mainnet beta.
*/
function _currentWin(
uint64 challengeIndex,
ChallengeTerminationType /* reason */
) private {
}
}
| address(resultReceiver)==address(0),"ALREADY_INIT" | 492,255 | address(resultReceiver)==address(0) |
"NO_RESULT_RECEIVER" | // Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/nitro/blob/master/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../libraries/DelegateCallAware.sol";
import "../osp/IOneStepProofEntry.sol";
import "../state/GlobalState.sol";
import "./IChallengeResultReceiver.sol";
import "./ChallengeLib.sol";
import "./IChallengeManager.sol";
import {NO_CHAL_INDEX} from "../libraries/Constants.sol";
contract ChallengeManager is DelegateCallAware, IChallengeManager {
using GlobalStateLib for GlobalState;
using MachineLib for Machine;
using ChallengeLib for ChallengeLib.Challenge;
enum ChallengeModeRequirement {
ANY,
BLOCK,
EXECUTION
}
string private constant NO_CHAL = "NO_CHAL";
uint256 private constant MAX_CHALLENGE_DEGREE = 40;
uint64 public totalChallengesCreated;
mapping(uint256 => ChallengeLib.Challenge) public challenges;
IChallengeResultReceiver public resultReceiver;
ISequencerInbox public sequencerInbox;
IBridge public bridge;
IOneStepProofEntry public osp;
function challengeInfo(uint64 challengeIndex)
external
view
override
returns (ChallengeLib.Challenge memory)
{
}
modifier takeTurn(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
ChallengeModeRequirement expectedMode
) {
}
function initialize(
IChallengeResultReceiver resultReceiver_,
ISequencerInbox sequencerInbox_,
IBridge bridge_,
IOneStepProofEntry osp_
) external override onlyDelegated {
require(address(resultReceiver) == address(0), "ALREADY_INIT");
require(<FILL_ME>)
resultReceiver = resultReceiver_;
sequencerInbox = sequencerInbox_;
bridge = bridge_;
osp = osp_;
}
function createChallenge(
bytes32 wasmModuleRoot_,
MachineStatus[2] calldata startAndEndMachineStatuses_,
GlobalState[2] calldata startAndEndGlobalStates_,
uint64 numBlocks,
address asserter_,
address challenger_,
uint256 asserterTimeLeft_,
uint256 challengerTimeLeft_
) external override returns (uint64) {
}
/**
* @notice Initiate the next round in the bisection by objecting to execution correctness with a bisection
* of an execution segment with the same length but a different endpoint. This is either the initial move
* or follows another execution objection
*/
function bisectExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes32[] calldata newSegments
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.ANY) {
}
function challengeExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
MachineStatus[2] calldata machineStatuses,
bytes32[2] calldata globalStateHashes,
uint256 numSteps
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.BLOCK) {
}
function oneStepProveExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes calldata proof
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.EXECUTION) {
}
function timeout(uint64 challengeIndex) external override {
}
function clearChallenge(uint64 challengeIndex) external override {
}
function currentResponder(uint64 challengeIndex) public view override returns (address) {
}
function currentResponderTimeLeft(uint64 challengeIndex)
public
view
override
returns (uint256)
{
}
function isTimedOut(uint64 challengeIndex) public view override returns (bool) {
}
function requireValidBisection(
ChallengeLib.SegmentSelection calldata selection,
bytes32 startHash,
bytes32 endHash
) private pure {
}
function completeBisection(
uint64 challengeIndex,
uint256 challengeStart,
uint256 challengeLength,
bytes32[] memory newSegments
) private {
}
/// @dev This function causes the mode of the challenge to be set to NONE by deleting the challenge
function _nextWin(uint64 challengeIndex, ChallengeTerminationType reason) private {
}
/**
* @dev this currently sets a challenge hash of 0 - no move is possible for the next participant to progress the
* state. It is assumed that wherever this function is consumed, the turn is then adjusted for the opposite party
* to timeout. This is done as a safety measure so challenges can only be resolved by timeouts during mainnet beta.
*/
function _currentWin(
uint64 challengeIndex,
ChallengeTerminationType /* reason */
) private {
}
}
| address(resultReceiver_)!=address(0),"NO_RESULT_RECEIVER" | 492,255 | address(resultReceiver_)!=address(0) |
"HALTED_CHANGE" | // Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/nitro/blob/master/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../libraries/DelegateCallAware.sol";
import "../osp/IOneStepProofEntry.sol";
import "../state/GlobalState.sol";
import "./IChallengeResultReceiver.sol";
import "./ChallengeLib.sol";
import "./IChallengeManager.sol";
import {NO_CHAL_INDEX} from "../libraries/Constants.sol";
contract ChallengeManager is DelegateCallAware, IChallengeManager {
using GlobalStateLib for GlobalState;
using MachineLib for Machine;
using ChallengeLib for ChallengeLib.Challenge;
enum ChallengeModeRequirement {
ANY,
BLOCK,
EXECUTION
}
string private constant NO_CHAL = "NO_CHAL";
uint256 private constant MAX_CHALLENGE_DEGREE = 40;
uint64 public totalChallengesCreated;
mapping(uint256 => ChallengeLib.Challenge) public challenges;
IChallengeResultReceiver public resultReceiver;
ISequencerInbox public sequencerInbox;
IBridge public bridge;
IOneStepProofEntry public osp;
function challengeInfo(uint64 challengeIndex)
external
view
override
returns (ChallengeLib.Challenge memory)
{
}
modifier takeTurn(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
ChallengeModeRequirement expectedMode
) {
}
function initialize(
IChallengeResultReceiver resultReceiver_,
ISequencerInbox sequencerInbox_,
IBridge bridge_,
IOneStepProofEntry osp_
) external override onlyDelegated {
}
function createChallenge(
bytes32 wasmModuleRoot_,
MachineStatus[2] calldata startAndEndMachineStatuses_,
GlobalState[2] calldata startAndEndGlobalStates_,
uint64 numBlocks,
address asserter_,
address challenger_,
uint256 asserterTimeLeft_,
uint256 challengerTimeLeft_
) external override returns (uint64) {
}
/**
* @notice Initiate the next round in the bisection by objecting to execution correctness with a bisection
* of an execution segment with the same length but a different endpoint. This is either the initial move
* or follows another execution objection
*/
function bisectExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes32[] calldata newSegments
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.ANY) {
}
function challengeExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
MachineStatus[2] calldata machineStatuses,
bytes32[2] calldata globalStateHashes,
uint256 numSteps
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.BLOCK) {
require(numSteps >= 1, "CHALLENGE_TOO_SHORT");
require(numSteps <= OneStepProofEntryLib.MAX_STEPS, "CHALLENGE_TOO_LONG");
requireValidBisection(
selection,
ChallengeLib.blockStateHash(machineStatuses[0], globalStateHashes[0]),
ChallengeLib.blockStateHash(machineStatuses[1], globalStateHashes[1])
);
ChallengeLib.Challenge storage challenge = challenges[challengeIndex];
(uint256 executionChallengeAtSteps, uint256 challengeLength) = ChallengeLib
.extractChallengeSegment(selection);
require(challengeLength == 1, "TOO_LONG");
if (machineStatuses[0] != MachineStatus.FINISHED) {
// If the machine is in a halted state, it can't change
require(<FILL_ME>)
_currentWin(challengeIndex, ChallengeTerminationType.BLOCK_PROOF);
return;
}
if (machineStatuses[1] == MachineStatus.ERRORED) {
// If the machine errors, it must return to the previous global state
require(globalStateHashes[0] == globalStateHashes[1], "ERROR_CHANGE");
}
bytes32[] memory segments = new bytes32[](2);
segments[0] = ChallengeLib.getStartMachineHash(
globalStateHashes[0],
challenge.wasmModuleRoot
);
segments[1] = ChallengeLib.getEndMachineHash(machineStatuses[1], globalStateHashes[1]);
challenge.mode = ChallengeLib.ChallengeMode.EXECUTION;
completeBisection(challengeIndex, 0, numSteps, segments);
emit ExecutionChallengeBegun(challengeIndex, executionChallengeAtSteps);
}
function oneStepProveExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes calldata proof
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.EXECUTION) {
}
function timeout(uint64 challengeIndex) external override {
}
function clearChallenge(uint64 challengeIndex) external override {
}
function currentResponder(uint64 challengeIndex) public view override returns (address) {
}
function currentResponderTimeLeft(uint64 challengeIndex)
public
view
override
returns (uint256)
{
}
function isTimedOut(uint64 challengeIndex) public view override returns (bool) {
}
function requireValidBisection(
ChallengeLib.SegmentSelection calldata selection,
bytes32 startHash,
bytes32 endHash
) private pure {
}
function completeBisection(
uint64 challengeIndex,
uint256 challengeStart,
uint256 challengeLength,
bytes32[] memory newSegments
) private {
}
/// @dev This function causes the mode of the challenge to be set to NONE by deleting the challenge
function _nextWin(uint64 challengeIndex, ChallengeTerminationType reason) private {
}
/**
* @dev this currently sets a challenge hash of 0 - no move is possible for the next participant to progress the
* state. It is assumed that wherever this function is consumed, the turn is then adjusted for the opposite party
* to timeout. This is done as a safety measure so challenges can only be resolved by timeouts during mainnet beta.
*/
function _currentWin(
uint64 challengeIndex,
ChallengeTerminationType /* reason */
) private {
}
}
| machineStatuses[0]==machineStatuses[1]&&globalStateHashes[0]==globalStateHashes[1],"HALTED_CHANGE" | 492,255 | machineStatuses[0]==machineStatuses[1]&&globalStateHashes[0]==globalStateHashes[1] |
"ERROR_CHANGE" | // Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/nitro/blob/master/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../libraries/DelegateCallAware.sol";
import "../osp/IOneStepProofEntry.sol";
import "../state/GlobalState.sol";
import "./IChallengeResultReceiver.sol";
import "./ChallengeLib.sol";
import "./IChallengeManager.sol";
import {NO_CHAL_INDEX} from "../libraries/Constants.sol";
contract ChallengeManager is DelegateCallAware, IChallengeManager {
using GlobalStateLib for GlobalState;
using MachineLib for Machine;
using ChallengeLib for ChallengeLib.Challenge;
enum ChallengeModeRequirement {
ANY,
BLOCK,
EXECUTION
}
string private constant NO_CHAL = "NO_CHAL";
uint256 private constant MAX_CHALLENGE_DEGREE = 40;
uint64 public totalChallengesCreated;
mapping(uint256 => ChallengeLib.Challenge) public challenges;
IChallengeResultReceiver public resultReceiver;
ISequencerInbox public sequencerInbox;
IBridge public bridge;
IOneStepProofEntry public osp;
function challengeInfo(uint64 challengeIndex)
external
view
override
returns (ChallengeLib.Challenge memory)
{
}
modifier takeTurn(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
ChallengeModeRequirement expectedMode
) {
}
function initialize(
IChallengeResultReceiver resultReceiver_,
ISequencerInbox sequencerInbox_,
IBridge bridge_,
IOneStepProofEntry osp_
) external override onlyDelegated {
}
function createChallenge(
bytes32 wasmModuleRoot_,
MachineStatus[2] calldata startAndEndMachineStatuses_,
GlobalState[2] calldata startAndEndGlobalStates_,
uint64 numBlocks,
address asserter_,
address challenger_,
uint256 asserterTimeLeft_,
uint256 challengerTimeLeft_
) external override returns (uint64) {
}
/**
* @notice Initiate the next round in the bisection by objecting to execution correctness with a bisection
* of an execution segment with the same length but a different endpoint. This is either the initial move
* or follows another execution objection
*/
function bisectExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes32[] calldata newSegments
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.ANY) {
}
function challengeExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
MachineStatus[2] calldata machineStatuses,
bytes32[2] calldata globalStateHashes,
uint256 numSteps
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.BLOCK) {
require(numSteps >= 1, "CHALLENGE_TOO_SHORT");
require(numSteps <= OneStepProofEntryLib.MAX_STEPS, "CHALLENGE_TOO_LONG");
requireValidBisection(
selection,
ChallengeLib.blockStateHash(machineStatuses[0], globalStateHashes[0]),
ChallengeLib.blockStateHash(machineStatuses[1], globalStateHashes[1])
);
ChallengeLib.Challenge storage challenge = challenges[challengeIndex];
(uint256 executionChallengeAtSteps, uint256 challengeLength) = ChallengeLib
.extractChallengeSegment(selection);
require(challengeLength == 1, "TOO_LONG");
if (machineStatuses[0] != MachineStatus.FINISHED) {
// If the machine is in a halted state, it can't change
require(
machineStatuses[0] == machineStatuses[1] &&
globalStateHashes[0] == globalStateHashes[1],
"HALTED_CHANGE"
);
_currentWin(challengeIndex, ChallengeTerminationType.BLOCK_PROOF);
return;
}
if (machineStatuses[1] == MachineStatus.ERRORED) {
// If the machine errors, it must return to the previous global state
require(<FILL_ME>)
}
bytes32[] memory segments = new bytes32[](2);
segments[0] = ChallengeLib.getStartMachineHash(
globalStateHashes[0],
challenge.wasmModuleRoot
);
segments[1] = ChallengeLib.getEndMachineHash(machineStatuses[1], globalStateHashes[1]);
challenge.mode = ChallengeLib.ChallengeMode.EXECUTION;
completeBisection(challengeIndex, 0, numSteps, segments);
emit ExecutionChallengeBegun(challengeIndex, executionChallengeAtSteps);
}
function oneStepProveExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes calldata proof
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.EXECUTION) {
}
function timeout(uint64 challengeIndex) external override {
}
function clearChallenge(uint64 challengeIndex) external override {
}
function currentResponder(uint64 challengeIndex) public view override returns (address) {
}
function currentResponderTimeLeft(uint64 challengeIndex)
public
view
override
returns (uint256)
{
}
function isTimedOut(uint64 challengeIndex) public view override returns (bool) {
}
function requireValidBisection(
ChallengeLib.SegmentSelection calldata selection,
bytes32 startHash,
bytes32 endHash
) private pure {
}
function completeBisection(
uint64 challengeIndex,
uint256 challengeStart,
uint256 challengeLength,
bytes32[] memory newSegments
) private {
}
/// @dev This function causes the mode of the challenge to be set to NONE by deleting the challenge
function _nextWin(uint64 challengeIndex, ChallengeTerminationType reason) private {
}
/**
* @dev this currently sets a challenge hash of 0 - no move is possible for the next participant to progress the
* state. It is assumed that wherever this function is consumed, the turn is then adjusted for the opposite party
* to timeout. This is done as a safety measure so challenges can only be resolved by timeouts during mainnet beta.
*/
function _currentWin(
uint64 challengeIndex,
ChallengeTerminationType /* reason */
) private {
}
}
| globalStateHashes[0]==globalStateHashes[1],"ERROR_CHANGE" | 492,255 | globalStateHashes[0]==globalStateHashes[1] |
NO_CHAL | // Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/nitro/blob/master/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../libraries/DelegateCallAware.sol";
import "../osp/IOneStepProofEntry.sol";
import "../state/GlobalState.sol";
import "./IChallengeResultReceiver.sol";
import "./ChallengeLib.sol";
import "./IChallengeManager.sol";
import {NO_CHAL_INDEX} from "../libraries/Constants.sol";
contract ChallengeManager is DelegateCallAware, IChallengeManager {
using GlobalStateLib for GlobalState;
using MachineLib for Machine;
using ChallengeLib for ChallengeLib.Challenge;
enum ChallengeModeRequirement {
ANY,
BLOCK,
EXECUTION
}
string private constant NO_CHAL = "NO_CHAL";
uint256 private constant MAX_CHALLENGE_DEGREE = 40;
uint64 public totalChallengesCreated;
mapping(uint256 => ChallengeLib.Challenge) public challenges;
IChallengeResultReceiver public resultReceiver;
ISequencerInbox public sequencerInbox;
IBridge public bridge;
IOneStepProofEntry public osp;
function challengeInfo(uint64 challengeIndex)
external
view
override
returns (ChallengeLib.Challenge memory)
{
}
modifier takeTurn(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
ChallengeModeRequirement expectedMode
) {
}
function initialize(
IChallengeResultReceiver resultReceiver_,
ISequencerInbox sequencerInbox_,
IBridge bridge_,
IOneStepProofEntry osp_
) external override onlyDelegated {
}
function createChallenge(
bytes32 wasmModuleRoot_,
MachineStatus[2] calldata startAndEndMachineStatuses_,
GlobalState[2] calldata startAndEndGlobalStates_,
uint64 numBlocks,
address asserter_,
address challenger_,
uint256 asserterTimeLeft_,
uint256 challengerTimeLeft_
) external override returns (uint64) {
}
/**
* @notice Initiate the next round in the bisection by objecting to execution correctness with a bisection
* of an execution segment with the same length but a different endpoint. This is either the initial move
* or follows another execution objection
*/
function bisectExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes32[] calldata newSegments
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.ANY) {
}
function challengeExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
MachineStatus[2] calldata machineStatuses,
bytes32[2] calldata globalStateHashes,
uint256 numSteps
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.BLOCK) {
}
function oneStepProveExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes calldata proof
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.EXECUTION) {
}
function timeout(uint64 challengeIndex) external override {
require(<FILL_ME>)
require(isTimedOut(challengeIndex), "TIMEOUT_DEADLINE");
_nextWin(challengeIndex, ChallengeTerminationType.TIMEOUT);
}
function clearChallenge(uint64 challengeIndex) external override {
}
function currentResponder(uint64 challengeIndex) public view override returns (address) {
}
function currentResponderTimeLeft(uint64 challengeIndex)
public
view
override
returns (uint256)
{
}
function isTimedOut(uint64 challengeIndex) public view override returns (bool) {
}
function requireValidBisection(
ChallengeLib.SegmentSelection calldata selection,
bytes32 startHash,
bytes32 endHash
) private pure {
}
function completeBisection(
uint64 challengeIndex,
uint256 challengeStart,
uint256 challengeLength,
bytes32[] memory newSegments
) private {
}
/// @dev This function causes the mode of the challenge to be set to NONE by deleting the challenge
function _nextWin(uint64 challengeIndex, ChallengeTerminationType reason) private {
}
/**
* @dev this currently sets a challenge hash of 0 - no move is possible for the next participant to progress the
* state. It is assumed that wherever this function is consumed, the turn is then adjusted for the opposite party
* to timeout. This is done as a safety measure so challenges can only be resolved by timeouts during mainnet beta.
*/
function _currentWin(
uint64 challengeIndex,
ChallengeTerminationType /* reason */
) private {
}
}
| challenges[challengeIndex].mode!=ChallengeLib.ChallengeMode.NONE,NO_CHAL | 492,255 | challenges[challengeIndex].mode!=ChallengeLib.ChallengeMode.NONE |
"TIMEOUT_DEADLINE" | // Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/nitro/blob/master/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../libraries/DelegateCallAware.sol";
import "../osp/IOneStepProofEntry.sol";
import "../state/GlobalState.sol";
import "./IChallengeResultReceiver.sol";
import "./ChallengeLib.sol";
import "./IChallengeManager.sol";
import {NO_CHAL_INDEX} from "../libraries/Constants.sol";
contract ChallengeManager is DelegateCallAware, IChallengeManager {
using GlobalStateLib for GlobalState;
using MachineLib for Machine;
using ChallengeLib for ChallengeLib.Challenge;
enum ChallengeModeRequirement {
ANY,
BLOCK,
EXECUTION
}
string private constant NO_CHAL = "NO_CHAL";
uint256 private constant MAX_CHALLENGE_DEGREE = 40;
uint64 public totalChallengesCreated;
mapping(uint256 => ChallengeLib.Challenge) public challenges;
IChallengeResultReceiver public resultReceiver;
ISequencerInbox public sequencerInbox;
IBridge public bridge;
IOneStepProofEntry public osp;
function challengeInfo(uint64 challengeIndex)
external
view
override
returns (ChallengeLib.Challenge memory)
{
}
modifier takeTurn(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
ChallengeModeRequirement expectedMode
) {
}
function initialize(
IChallengeResultReceiver resultReceiver_,
ISequencerInbox sequencerInbox_,
IBridge bridge_,
IOneStepProofEntry osp_
) external override onlyDelegated {
}
function createChallenge(
bytes32 wasmModuleRoot_,
MachineStatus[2] calldata startAndEndMachineStatuses_,
GlobalState[2] calldata startAndEndGlobalStates_,
uint64 numBlocks,
address asserter_,
address challenger_,
uint256 asserterTimeLeft_,
uint256 challengerTimeLeft_
) external override returns (uint64) {
}
/**
* @notice Initiate the next round in the bisection by objecting to execution correctness with a bisection
* of an execution segment with the same length but a different endpoint. This is either the initial move
* or follows another execution objection
*/
function bisectExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes32[] calldata newSegments
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.ANY) {
}
function challengeExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
MachineStatus[2] calldata machineStatuses,
bytes32[2] calldata globalStateHashes,
uint256 numSteps
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.BLOCK) {
}
function oneStepProveExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes calldata proof
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.EXECUTION) {
}
function timeout(uint64 challengeIndex) external override {
require(challenges[challengeIndex].mode != ChallengeLib.ChallengeMode.NONE, NO_CHAL);
require(<FILL_ME>)
_nextWin(challengeIndex, ChallengeTerminationType.TIMEOUT);
}
function clearChallenge(uint64 challengeIndex) external override {
}
function currentResponder(uint64 challengeIndex) public view override returns (address) {
}
function currentResponderTimeLeft(uint64 challengeIndex)
public
view
override
returns (uint256)
{
}
function isTimedOut(uint64 challengeIndex) public view override returns (bool) {
}
function requireValidBisection(
ChallengeLib.SegmentSelection calldata selection,
bytes32 startHash,
bytes32 endHash
) private pure {
}
function completeBisection(
uint64 challengeIndex,
uint256 challengeStart,
uint256 challengeLength,
bytes32[] memory newSegments
) private {
}
/// @dev This function causes the mode of the challenge to be set to NONE by deleting the challenge
function _nextWin(uint64 challengeIndex, ChallengeTerminationType reason) private {
}
/**
* @dev this currently sets a challenge hash of 0 - no move is possible for the next participant to progress the
* state. It is assumed that wherever this function is consumed, the turn is then adjusted for the opposite party
* to timeout. This is done as a safety measure so challenges can only be resolved by timeouts during mainnet beta.
*/
function _currentWin(
uint64 challengeIndex,
ChallengeTerminationType /* reason */
) private {
}
}
| isTimedOut(challengeIndex),"TIMEOUT_DEADLINE" | 492,255 | isTimedOut(challengeIndex) |
"WRONG_START" | // Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/nitro/blob/master/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../libraries/DelegateCallAware.sol";
import "../osp/IOneStepProofEntry.sol";
import "../state/GlobalState.sol";
import "./IChallengeResultReceiver.sol";
import "./ChallengeLib.sol";
import "./IChallengeManager.sol";
import {NO_CHAL_INDEX} from "../libraries/Constants.sol";
contract ChallengeManager is DelegateCallAware, IChallengeManager {
using GlobalStateLib for GlobalState;
using MachineLib for Machine;
using ChallengeLib for ChallengeLib.Challenge;
enum ChallengeModeRequirement {
ANY,
BLOCK,
EXECUTION
}
string private constant NO_CHAL = "NO_CHAL";
uint256 private constant MAX_CHALLENGE_DEGREE = 40;
uint64 public totalChallengesCreated;
mapping(uint256 => ChallengeLib.Challenge) public challenges;
IChallengeResultReceiver public resultReceiver;
ISequencerInbox public sequencerInbox;
IBridge public bridge;
IOneStepProofEntry public osp;
function challengeInfo(uint64 challengeIndex)
external
view
override
returns (ChallengeLib.Challenge memory)
{
}
modifier takeTurn(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
ChallengeModeRequirement expectedMode
) {
}
function initialize(
IChallengeResultReceiver resultReceiver_,
ISequencerInbox sequencerInbox_,
IBridge bridge_,
IOneStepProofEntry osp_
) external override onlyDelegated {
}
function createChallenge(
bytes32 wasmModuleRoot_,
MachineStatus[2] calldata startAndEndMachineStatuses_,
GlobalState[2] calldata startAndEndGlobalStates_,
uint64 numBlocks,
address asserter_,
address challenger_,
uint256 asserterTimeLeft_,
uint256 challengerTimeLeft_
) external override returns (uint64) {
}
/**
* @notice Initiate the next round in the bisection by objecting to execution correctness with a bisection
* of an execution segment with the same length but a different endpoint. This is either the initial move
* or follows another execution objection
*/
function bisectExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes32[] calldata newSegments
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.ANY) {
}
function challengeExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
MachineStatus[2] calldata machineStatuses,
bytes32[2] calldata globalStateHashes,
uint256 numSteps
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.BLOCK) {
}
function oneStepProveExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes calldata proof
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.EXECUTION) {
}
function timeout(uint64 challengeIndex) external override {
}
function clearChallenge(uint64 challengeIndex) external override {
}
function currentResponder(uint64 challengeIndex) public view override returns (address) {
}
function currentResponderTimeLeft(uint64 challengeIndex)
public
view
override
returns (uint256)
{
}
function isTimedOut(uint64 challengeIndex) public view override returns (bool) {
}
function requireValidBisection(
ChallengeLib.SegmentSelection calldata selection,
bytes32 startHash,
bytes32 endHash
) private pure {
require(<FILL_ME>)
require(selection.oldSegments[selection.challengePosition + 1] != endHash, "SAME_END");
}
function completeBisection(
uint64 challengeIndex,
uint256 challengeStart,
uint256 challengeLength,
bytes32[] memory newSegments
) private {
}
/// @dev This function causes the mode of the challenge to be set to NONE by deleting the challenge
function _nextWin(uint64 challengeIndex, ChallengeTerminationType reason) private {
}
/**
* @dev this currently sets a challenge hash of 0 - no move is possible for the next participant to progress the
* state. It is assumed that wherever this function is consumed, the turn is then adjusted for the opposite party
* to timeout. This is done as a safety measure so challenges can only be resolved by timeouts during mainnet beta.
*/
function _currentWin(
uint64 challengeIndex,
ChallengeTerminationType /* reason */
) private {
}
}
| selection.oldSegments[selection.challengePosition]==startHash,"WRONG_START" | 492,255 | selection.oldSegments[selection.challengePosition]==startHash |
"SAME_END" | // Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/nitro/blob/master/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../libraries/DelegateCallAware.sol";
import "../osp/IOneStepProofEntry.sol";
import "../state/GlobalState.sol";
import "./IChallengeResultReceiver.sol";
import "./ChallengeLib.sol";
import "./IChallengeManager.sol";
import {NO_CHAL_INDEX} from "../libraries/Constants.sol";
contract ChallengeManager is DelegateCallAware, IChallengeManager {
using GlobalStateLib for GlobalState;
using MachineLib for Machine;
using ChallengeLib for ChallengeLib.Challenge;
enum ChallengeModeRequirement {
ANY,
BLOCK,
EXECUTION
}
string private constant NO_CHAL = "NO_CHAL";
uint256 private constant MAX_CHALLENGE_DEGREE = 40;
uint64 public totalChallengesCreated;
mapping(uint256 => ChallengeLib.Challenge) public challenges;
IChallengeResultReceiver public resultReceiver;
ISequencerInbox public sequencerInbox;
IBridge public bridge;
IOneStepProofEntry public osp;
function challengeInfo(uint64 challengeIndex)
external
view
override
returns (ChallengeLib.Challenge memory)
{
}
modifier takeTurn(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
ChallengeModeRequirement expectedMode
) {
}
function initialize(
IChallengeResultReceiver resultReceiver_,
ISequencerInbox sequencerInbox_,
IBridge bridge_,
IOneStepProofEntry osp_
) external override onlyDelegated {
}
function createChallenge(
bytes32 wasmModuleRoot_,
MachineStatus[2] calldata startAndEndMachineStatuses_,
GlobalState[2] calldata startAndEndGlobalStates_,
uint64 numBlocks,
address asserter_,
address challenger_,
uint256 asserterTimeLeft_,
uint256 challengerTimeLeft_
) external override returns (uint64) {
}
/**
* @notice Initiate the next round in the bisection by objecting to execution correctness with a bisection
* of an execution segment with the same length but a different endpoint. This is either the initial move
* or follows another execution objection
*/
function bisectExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes32[] calldata newSegments
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.ANY) {
}
function challengeExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
MachineStatus[2] calldata machineStatuses,
bytes32[2] calldata globalStateHashes,
uint256 numSteps
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.BLOCK) {
}
function oneStepProveExecution(
uint64 challengeIndex,
ChallengeLib.SegmentSelection calldata selection,
bytes calldata proof
) external takeTurn(challengeIndex, selection, ChallengeModeRequirement.EXECUTION) {
}
function timeout(uint64 challengeIndex) external override {
}
function clearChallenge(uint64 challengeIndex) external override {
}
function currentResponder(uint64 challengeIndex) public view override returns (address) {
}
function currentResponderTimeLeft(uint64 challengeIndex)
public
view
override
returns (uint256)
{
}
function isTimedOut(uint64 challengeIndex) public view override returns (bool) {
}
function requireValidBisection(
ChallengeLib.SegmentSelection calldata selection,
bytes32 startHash,
bytes32 endHash
) private pure {
require(selection.oldSegments[selection.challengePosition] == startHash, "WRONG_START");
require(<FILL_ME>)
}
function completeBisection(
uint64 challengeIndex,
uint256 challengeStart,
uint256 challengeLength,
bytes32[] memory newSegments
) private {
}
/// @dev This function causes the mode of the challenge to be set to NONE by deleting the challenge
function _nextWin(uint64 challengeIndex, ChallengeTerminationType reason) private {
}
/**
* @dev this currently sets a challenge hash of 0 - no move is possible for the next participant to progress the
* state. It is assumed that wherever this function is consumed, the turn is then adjusted for the opposite party
* to timeout. This is done as a safety measure so challenges can only be resolved by timeouts during mainnet beta.
*/
function _currentWin(
uint64 challengeIndex,
ChallengeTerminationType /* reason */
) private {
}
}
| selection.oldSegments[selection.challengePosition+1]!=endHash,"SAME_END" | 492,255 | selection.oldSegments[selection.challengePosition+1]!=endHash |
"INVALID_RETURN_PC_DATA" | // Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/nitro/blob/master/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../state/Value.sol";
import "../state/Machine.sol";
import "../state/Module.sol";
import "../state/Deserialize.sol";
import "./IOneStepProver.sol";
contract OneStepProver0 is IOneStepProver {
using MerkleProofLib for MerkleProof;
using StackFrameLib for StackFrameWindow;
using ValueLib for Value;
using ValueStackLib for ValueStack;
function executeUnreachable(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
}
function executeNop(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
}
function executeConstPush(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeDrop(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
}
function executeSelect(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
}
function executeReturn(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
StackFrame memory frame = mach.frameStack.pop();
if (frame.returnPc.valueType == ValueType.REF_NULL) {
mach.status = MachineStatus.ERRORED;
return;
} else if (frame.returnPc.valueType != ValueType.INTERNAL_REF) {
revert("INVALID_RETURN_PC_TYPE");
}
uint256 data = frame.returnPc.contents;
uint32 pc = uint32(data);
uint32 func = uint32(data >> 32);
uint32 mod = uint32(data >> 64);
require(<FILL_ME>)
mach.functionPc = pc;
mach.functionIdx = func;
mach.moduleIdx = mod;
}
function createReturnValue(Machine memory mach) internal pure returns (Value memory) {
}
function executeCall(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeCrossModuleCall(
Machine memory mach,
Module memory mod,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeCallerModuleInternalCall(
Machine memory mach,
Module memory mod,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeCallIndirect(
Machine memory mach,
Module memory mod,
Instruction calldata inst,
bytes calldata proof
) internal pure {
}
function executeArbitraryJump(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeArbitraryJumpIf(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function merkleProveGetValue(
bytes32 merkleRoot,
uint256 index,
bytes calldata proof
) internal pure returns (Value memory) {
}
function merkleProveSetValue(
bytes32 merkleRoot,
uint256 index,
Value memory newVal,
bytes calldata proof
) internal pure returns (bytes32) {
}
function executeLocalGet(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata proof
) internal pure {
}
function executeLocalSet(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata proof
) internal pure {
}
function executeGlobalGet(
Machine memory mach,
Module memory mod,
Instruction calldata inst,
bytes calldata proof
) internal pure {
}
function executeGlobalSet(
Machine memory mach,
Module memory mod,
Instruction calldata inst,
bytes calldata proof
) internal pure {
}
function executeInitFrame(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeMoveInternal(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeDup(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
}
function executeOneStep(
ExecutionContext calldata,
Machine calldata startMach,
Module calldata startMod,
Instruction calldata inst,
bytes calldata proof
) external pure override returns (Machine memory mach, Module memory mod) {
}
}
| data>>96==0,"INVALID_RETURN_PC_DATA" | 492,259 | data>>96==0 |
"BAD_CROSS_MODULE_CALL_DATA" | // Copyright 2021-2022, Offchain Labs, Inc.
// For license information, see https://github.com/nitro/blob/master/LICENSE
// SPDX-License-Identifier: BUSL-1.1
pragma solidity ^0.8.0;
import "../state/Value.sol";
import "../state/Machine.sol";
import "../state/Module.sol";
import "../state/Deserialize.sol";
import "./IOneStepProver.sol";
contract OneStepProver0 is IOneStepProver {
using MerkleProofLib for MerkleProof;
using StackFrameLib for StackFrameWindow;
using ValueLib for Value;
using ValueStackLib for ValueStack;
function executeUnreachable(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
}
function executeNop(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
}
function executeConstPush(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeDrop(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
}
function executeSelect(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
}
function executeReturn(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
}
function createReturnValue(Machine memory mach) internal pure returns (Value memory) {
}
function executeCall(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeCrossModuleCall(
Machine memory mach,
Module memory mod,
Instruction calldata inst,
bytes calldata
) internal pure {
// Push the return pc to the stack
mach.valueStack.push(createReturnValue(mach));
// Push caller module info to the stack
mach.valueStack.push(ValueLib.newI32(mach.moduleIdx));
mach.valueStack.push(ValueLib.newI32(mod.internalsOffset));
// Jump to the target
uint32 func = uint32(inst.argumentData);
uint32 module = uint32(inst.argumentData >> 32);
require(<FILL_ME>)
mach.moduleIdx = module;
mach.functionIdx = func;
mach.functionPc = 0;
}
function executeCallerModuleInternalCall(
Machine memory mach,
Module memory mod,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeCallIndirect(
Machine memory mach,
Module memory mod,
Instruction calldata inst,
bytes calldata proof
) internal pure {
}
function executeArbitraryJump(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeArbitraryJumpIf(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function merkleProveGetValue(
bytes32 merkleRoot,
uint256 index,
bytes calldata proof
) internal pure returns (Value memory) {
}
function merkleProveSetValue(
bytes32 merkleRoot,
uint256 index,
Value memory newVal,
bytes calldata proof
) internal pure returns (bytes32) {
}
function executeLocalGet(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata proof
) internal pure {
}
function executeLocalSet(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata proof
) internal pure {
}
function executeGlobalGet(
Machine memory mach,
Module memory mod,
Instruction calldata inst,
bytes calldata proof
) internal pure {
}
function executeGlobalSet(
Machine memory mach,
Module memory mod,
Instruction calldata inst,
bytes calldata proof
) internal pure {
}
function executeInitFrame(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeMoveInternal(
Machine memory mach,
Module memory,
Instruction calldata inst,
bytes calldata
) internal pure {
}
function executeDup(
Machine memory mach,
Module memory,
Instruction calldata,
bytes calldata
) internal pure {
}
function executeOneStep(
ExecutionContext calldata,
Machine calldata startMach,
Module calldata startMod,
Instruction calldata inst,
bytes calldata proof
) external pure override returns (Machine memory mach, Module memory mod) {
}
}
| inst.argumentData>>64==0,"BAD_CROSS_MODULE_CALL_DATA" | 492,259 | inst.argumentData>>64==0 |
'KatanaNFT: exceeds max mint limit' | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@grexie/signable/contracts/Signable.sol';
import './Ownable.sol';
contract KatanaNFT is ERC721, ERC721Enumerable, Pausable, Ownable, Signable {
using Counters for Counters.Counter;
using Strings for uint256;
address private _signer;
Counters.Counter private _tokenIdCounter;
struct ConstructorParams {
address signer;
address owner;
string name;
string symbol;
uint256 maxSupply;
uint256 reservedSupply;
uint256 price;
uint256 maxMintAmount;
uint256 whitelistSaleTime;
uint256 publicSaleTime;
string hiddenBaseURI;
string hiddenExtension;
string revealBaseURI;
string revealExtension;
bool revealed;
bool transfersPaused;
}
struct Whitelist {
address account;
uint256 allocation;
uint256 price;
}
string private _hiddenBaseURI;
string private _hiddenExtension;
string private _revealBaseURI;
string private _revealExtension;
bool private _revealed;
uint256 private _maxSupply;
uint256 private _reservedSupply;
uint256 private _price;
uint256 private _maxMintAmount;
uint256 private _whitelistSaleTime;
uint256 private _publicSaleTime;
bool private _transfersPaused;
mapping(address => uint256) private _whitelist;
constructor(
ConstructorParams memory params
) ERC721(params.name, params.symbol) Ownable(params.owner) {
}
function signer() public view virtual override(ISignable) returns (address) {
}
function setSigner(address signer_) external onlyOwner {
}
function maxSupply() public view returns (uint256) {
}
function price() public view returns (uint256) {
}
function maxMintAmount() public view returns (uint256) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function mint(uint256 amount) external payable whenNotPaused {
require(amount >= 0, 'KatanaNFT: token amount is zero');
require(<FILL_ME>)
require(_price * amount == msg.value, 'KatanaNFT: Invalid eth amount');
require(
int256(totalSupply() + amount) <=
int256(_maxSupply) - int256(_reservedSupply),
'KatanaNFT: exceeds max supply'
);
if (block.timestamp < _publicSaleTime) {
revert("KatanaNFT: public sale hasn't started");
}
for (uint256 i = 0; i < amount; i++) {
_safeMint(msg.sender);
}
}
function mintWhitelist(
uint256 amount,
bool reserved,
Whitelist calldata whitelist,
Signature calldata signature
)
external
payable
whenNotPaused
verifySignature(
abi.encode(this.mintWhitelist.selector, amount, reserved, whitelist),
signature
)
{
}
function mintOwner(address to, uint256 amount) external onlyOwner {
}
function _safeMint(address to) internal {
}
function tokenURI(
uint256 tokenId
) public view override returns (string memory) {
}
function transfersPaused() public view returns (bool) {
}
function setTransfersPaused(bool transfersPaused_) external onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(
bytes4 interfaceId
) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
function setMaxSupply(uint256 maxSupply_) external onlyOwner {
}
function setReservedSupply(uint256 reservedSupply_) external onlyOwner {
}
function setPrice(uint256 price_) external onlyOwner {
}
function setMaxMintAmount(uint256 maxMintAmount_) external onlyOwner {
}
function setHiddenURI(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function reveal(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function hide() external onlyOwner {
}
function whitelistSaleTime() public view returns (uint256) {
}
function setWhitelistSaleTime(uint256 whitelistSaleTime_) external onlyOwner {
}
function publicSaleTime() public view returns (uint256) {
}
function setPublicSaleTime(uint256 publicSaleTime_) external onlyOwner {
}
function _withdraw(address token, address to) internal {
}
function withdrawSender(
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdrawSender.selector), signature)
{
}
function withdraw(
address to,
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdraw.selector, to), signature)
{
}
function withdrawSenderToken(
address token,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawSenderToken.selector, token),
signature
)
{
}
function withdrawToken(
address token,
address to,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawToken.selector, token, to),
signature
)
{
}
}
| balanceOf(msg.sender)+amount<=_maxMintAmount,'KatanaNFT: exceeds max mint limit' | 492,277 | balanceOf(msg.sender)+amount<=_maxMintAmount |
'KatanaNFT: Invalid eth amount' | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@grexie/signable/contracts/Signable.sol';
import './Ownable.sol';
contract KatanaNFT is ERC721, ERC721Enumerable, Pausable, Ownable, Signable {
using Counters for Counters.Counter;
using Strings for uint256;
address private _signer;
Counters.Counter private _tokenIdCounter;
struct ConstructorParams {
address signer;
address owner;
string name;
string symbol;
uint256 maxSupply;
uint256 reservedSupply;
uint256 price;
uint256 maxMintAmount;
uint256 whitelistSaleTime;
uint256 publicSaleTime;
string hiddenBaseURI;
string hiddenExtension;
string revealBaseURI;
string revealExtension;
bool revealed;
bool transfersPaused;
}
struct Whitelist {
address account;
uint256 allocation;
uint256 price;
}
string private _hiddenBaseURI;
string private _hiddenExtension;
string private _revealBaseURI;
string private _revealExtension;
bool private _revealed;
uint256 private _maxSupply;
uint256 private _reservedSupply;
uint256 private _price;
uint256 private _maxMintAmount;
uint256 private _whitelistSaleTime;
uint256 private _publicSaleTime;
bool private _transfersPaused;
mapping(address => uint256) private _whitelist;
constructor(
ConstructorParams memory params
) ERC721(params.name, params.symbol) Ownable(params.owner) {
}
function signer() public view virtual override(ISignable) returns (address) {
}
function setSigner(address signer_) external onlyOwner {
}
function maxSupply() public view returns (uint256) {
}
function price() public view returns (uint256) {
}
function maxMintAmount() public view returns (uint256) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function mint(uint256 amount) external payable whenNotPaused {
require(amount >= 0, 'KatanaNFT: token amount is zero');
require(
balanceOf(msg.sender) + amount <= _maxMintAmount,
'KatanaNFT: exceeds max mint limit'
);
require(<FILL_ME>)
require(
int256(totalSupply() + amount) <=
int256(_maxSupply) - int256(_reservedSupply),
'KatanaNFT: exceeds max supply'
);
if (block.timestamp < _publicSaleTime) {
revert("KatanaNFT: public sale hasn't started");
}
for (uint256 i = 0; i < amount; i++) {
_safeMint(msg.sender);
}
}
function mintWhitelist(
uint256 amount,
bool reserved,
Whitelist calldata whitelist,
Signature calldata signature
)
external
payable
whenNotPaused
verifySignature(
abi.encode(this.mintWhitelist.selector, amount, reserved, whitelist),
signature
)
{
}
function mintOwner(address to, uint256 amount) external onlyOwner {
}
function _safeMint(address to) internal {
}
function tokenURI(
uint256 tokenId
) public view override returns (string memory) {
}
function transfersPaused() public view returns (bool) {
}
function setTransfersPaused(bool transfersPaused_) external onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(
bytes4 interfaceId
) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
function setMaxSupply(uint256 maxSupply_) external onlyOwner {
}
function setReservedSupply(uint256 reservedSupply_) external onlyOwner {
}
function setPrice(uint256 price_) external onlyOwner {
}
function setMaxMintAmount(uint256 maxMintAmount_) external onlyOwner {
}
function setHiddenURI(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function reveal(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function hide() external onlyOwner {
}
function whitelistSaleTime() public view returns (uint256) {
}
function setWhitelistSaleTime(uint256 whitelistSaleTime_) external onlyOwner {
}
function publicSaleTime() public view returns (uint256) {
}
function setPublicSaleTime(uint256 publicSaleTime_) external onlyOwner {
}
function _withdraw(address token, address to) internal {
}
function withdrawSender(
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdrawSender.selector), signature)
{
}
function withdraw(
address to,
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdraw.selector, to), signature)
{
}
function withdrawSenderToken(
address token,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawSenderToken.selector, token),
signature
)
{
}
function withdrawToken(
address token,
address to,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawToken.selector, token, to),
signature
)
{
}
}
| _price*amount==msg.value,'KatanaNFT: Invalid eth amount' | 492,277 | _price*amount==msg.value |
'KatanaNFT: exceeds max supply' | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@grexie/signable/contracts/Signable.sol';
import './Ownable.sol';
contract KatanaNFT is ERC721, ERC721Enumerable, Pausable, Ownable, Signable {
using Counters for Counters.Counter;
using Strings for uint256;
address private _signer;
Counters.Counter private _tokenIdCounter;
struct ConstructorParams {
address signer;
address owner;
string name;
string symbol;
uint256 maxSupply;
uint256 reservedSupply;
uint256 price;
uint256 maxMintAmount;
uint256 whitelistSaleTime;
uint256 publicSaleTime;
string hiddenBaseURI;
string hiddenExtension;
string revealBaseURI;
string revealExtension;
bool revealed;
bool transfersPaused;
}
struct Whitelist {
address account;
uint256 allocation;
uint256 price;
}
string private _hiddenBaseURI;
string private _hiddenExtension;
string private _revealBaseURI;
string private _revealExtension;
bool private _revealed;
uint256 private _maxSupply;
uint256 private _reservedSupply;
uint256 private _price;
uint256 private _maxMintAmount;
uint256 private _whitelistSaleTime;
uint256 private _publicSaleTime;
bool private _transfersPaused;
mapping(address => uint256) private _whitelist;
constructor(
ConstructorParams memory params
) ERC721(params.name, params.symbol) Ownable(params.owner) {
}
function signer() public view virtual override(ISignable) returns (address) {
}
function setSigner(address signer_) external onlyOwner {
}
function maxSupply() public view returns (uint256) {
}
function price() public view returns (uint256) {
}
function maxMintAmount() public view returns (uint256) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function mint(uint256 amount) external payable whenNotPaused {
require(amount >= 0, 'KatanaNFT: token amount is zero');
require(
balanceOf(msg.sender) + amount <= _maxMintAmount,
'KatanaNFT: exceeds max mint limit'
);
require(_price * amount == msg.value, 'KatanaNFT: Invalid eth amount');
require(<FILL_ME>)
if (block.timestamp < _publicSaleTime) {
revert("KatanaNFT: public sale hasn't started");
}
for (uint256 i = 0; i < amount; i++) {
_safeMint(msg.sender);
}
}
function mintWhitelist(
uint256 amount,
bool reserved,
Whitelist calldata whitelist,
Signature calldata signature
)
external
payable
whenNotPaused
verifySignature(
abi.encode(this.mintWhitelist.selector, amount, reserved, whitelist),
signature
)
{
}
function mintOwner(address to, uint256 amount) external onlyOwner {
}
function _safeMint(address to) internal {
}
function tokenURI(
uint256 tokenId
) public view override returns (string memory) {
}
function transfersPaused() public view returns (bool) {
}
function setTransfersPaused(bool transfersPaused_) external onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(
bytes4 interfaceId
) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
function setMaxSupply(uint256 maxSupply_) external onlyOwner {
}
function setReservedSupply(uint256 reservedSupply_) external onlyOwner {
}
function setPrice(uint256 price_) external onlyOwner {
}
function setMaxMintAmount(uint256 maxMintAmount_) external onlyOwner {
}
function setHiddenURI(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function reveal(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function hide() external onlyOwner {
}
function whitelistSaleTime() public view returns (uint256) {
}
function setWhitelistSaleTime(uint256 whitelistSaleTime_) external onlyOwner {
}
function publicSaleTime() public view returns (uint256) {
}
function setPublicSaleTime(uint256 publicSaleTime_) external onlyOwner {
}
function _withdraw(address token, address to) internal {
}
function withdrawSender(
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdrawSender.selector), signature)
{
}
function withdraw(
address to,
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdraw.selector, to), signature)
{
}
function withdrawSenderToken(
address token,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawSenderToken.selector, token),
signature
)
{
}
function withdrawToken(
address token,
address to,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawToken.selector, token, to),
signature
)
{
}
}
| int256(totalSupply()+amount)<=int256(_maxSupply)-int256(_reservedSupply),'KatanaNFT: exceeds max supply' | 492,277 | int256(totalSupply()+amount)<=int256(_maxSupply)-int256(_reservedSupply) |
'KatanaNFT: exceeds max mint limit' | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@grexie/signable/contracts/Signable.sol';
import './Ownable.sol';
contract KatanaNFT is ERC721, ERC721Enumerable, Pausable, Ownable, Signable {
using Counters for Counters.Counter;
using Strings for uint256;
address private _signer;
Counters.Counter private _tokenIdCounter;
struct ConstructorParams {
address signer;
address owner;
string name;
string symbol;
uint256 maxSupply;
uint256 reservedSupply;
uint256 price;
uint256 maxMintAmount;
uint256 whitelistSaleTime;
uint256 publicSaleTime;
string hiddenBaseURI;
string hiddenExtension;
string revealBaseURI;
string revealExtension;
bool revealed;
bool transfersPaused;
}
struct Whitelist {
address account;
uint256 allocation;
uint256 price;
}
string private _hiddenBaseURI;
string private _hiddenExtension;
string private _revealBaseURI;
string private _revealExtension;
bool private _revealed;
uint256 private _maxSupply;
uint256 private _reservedSupply;
uint256 private _price;
uint256 private _maxMintAmount;
uint256 private _whitelistSaleTime;
uint256 private _publicSaleTime;
bool private _transfersPaused;
mapping(address => uint256) private _whitelist;
constructor(
ConstructorParams memory params
) ERC721(params.name, params.symbol) Ownable(params.owner) {
}
function signer() public view virtual override(ISignable) returns (address) {
}
function setSigner(address signer_) external onlyOwner {
}
function maxSupply() public view returns (uint256) {
}
function price() public view returns (uint256) {
}
function maxMintAmount() public view returns (uint256) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function mint(uint256 amount) external payable whenNotPaused {
}
function mintWhitelist(
uint256 amount,
bool reserved,
Whitelist calldata whitelist,
Signature calldata signature
)
external
payable
whenNotPaused
verifySignature(
abi.encode(this.mintWhitelist.selector, amount, reserved, whitelist),
signature
)
{
require(
msg.sender == whitelist.account,
'KatanaNFT: sender not whitelisted'
);
require(amount >= 0, 'KatanaNFT: token amount is zero');
require(<FILL_ME>)
require(
whitelist.price * amount == msg.value,
'KatanaNFT: invalid eth amount'
);
require(
int256(totalSupply() + amount) <=
int256(_maxSupply) - int256(reserved ? 0 : _reservedSupply),
'KatanaNFT: exceeds max supply'
);
if (block.timestamp < _whitelistSaleTime) {
revert("KatanaNFT: whitelist sale hasn't started");
}
_whitelist[msg.sender] += amount;
if (reserved) {
if (_reservedSupply > amount) {
_reservedSupply -= amount;
} else {
_reservedSupply = 0;
}
}
for (uint256 i = 0; i < amount; i++) {
_safeMint(msg.sender);
}
}
function mintOwner(address to, uint256 amount) external onlyOwner {
}
function _safeMint(address to) internal {
}
function tokenURI(
uint256 tokenId
) public view override returns (string memory) {
}
function transfersPaused() public view returns (bool) {
}
function setTransfersPaused(bool transfersPaused_) external onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(
bytes4 interfaceId
) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
function setMaxSupply(uint256 maxSupply_) external onlyOwner {
}
function setReservedSupply(uint256 reservedSupply_) external onlyOwner {
}
function setPrice(uint256 price_) external onlyOwner {
}
function setMaxMintAmount(uint256 maxMintAmount_) external onlyOwner {
}
function setHiddenURI(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function reveal(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function hide() external onlyOwner {
}
function whitelistSaleTime() public view returns (uint256) {
}
function setWhitelistSaleTime(uint256 whitelistSaleTime_) external onlyOwner {
}
function publicSaleTime() public view returns (uint256) {
}
function setPublicSaleTime(uint256 publicSaleTime_) external onlyOwner {
}
function _withdraw(address token, address to) internal {
}
function withdrawSender(
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdrawSender.selector), signature)
{
}
function withdraw(
address to,
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdraw.selector, to), signature)
{
}
function withdrawSenderToken(
address token,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawSenderToken.selector, token),
signature
)
{
}
function withdrawToken(
address token,
address to,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawToken.selector, token, to),
signature
)
{
}
}
| _whitelist[msg.sender]+amount<=whitelist.allocation,'KatanaNFT: exceeds max mint limit' | 492,277 | _whitelist[msg.sender]+amount<=whitelist.allocation |
'KatanaNFT: invalid eth amount' | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@grexie/signable/contracts/Signable.sol';
import './Ownable.sol';
contract KatanaNFT is ERC721, ERC721Enumerable, Pausable, Ownable, Signable {
using Counters for Counters.Counter;
using Strings for uint256;
address private _signer;
Counters.Counter private _tokenIdCounter;
struct ConstructorParams {
address signer;
address owner;
string name;
string symbol;
uint256 maxSupply;
uint256 reservedSupply;
uint256 price;
uint256 maxMintAmount;
uint256 whitelistSaleTime;
uint256 publicSaleTime;
string hiddenBaseURI;
string hiddenExtension;
string revealBaseURI;
string revealExtension;
bool revealed;
bool transfersPaused;
}
struct Whitelist {
address account;
uint256 allocation;
uint256 price;
}
string private _hiddenBaseURI;
string private _hiddenExtension;
string private _revealBaseURI;
string private _revealExtension;
bool private _revealed;
uint256 private _maxSupply;
uint256 private _reservedSupply;
uint256 private _price;
uint256 private _maxMintAmount;
uint256 private _whitelistSaleTime;
uint256 private _publicSaleTime;
bool private _transfersPaused;
mapping(address => uint256) private _whitelist;
constructor(
ConstructorParams memory params
) ERC721(params.name, params.symbol) Ownable(params.owner) {
}
function signer() public view virtual override(ISignable) returns (address) {
}
function setSigner(address signer_) external onlyOwner {
}
function maxSupply() public view returns (uint256) {
}
function price() public view returns (uint256) {
}
function maxMintAmount() public view returns (uint256) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function mint(uint256 amount) external payable whenNotPaused {
}
function mintWhitelist(
uint256 amount,
bool reserved,
Whitelist calldata whitelist,
Signature calldata signature
)
external
payable
whenNotPaused
verifySignature(
abi.encode(this.mintWhitelist.selector, amount, reserved, whitelist),
signature
)
{
require(
msg.sender == whitelist.account,
'KatanaNFT: sender not whitelisted'
);
require(amount >= 0, 'KatanaNFT: token amount is zero');
require(
_whitelist[msg.sender] + amount <= whitelist.allocation,
'KatanaNFT: exceeds max mint limit'
);
require(<FILL_ME>)
require(
int256(totalSupply() + amount) <=
int256(_maxSupply) - int256(reserved ? 0 : _reservedSupply),
'KatanaNFT: exceeds max supply'
);
if (block.timestamp < _whitelistSaleTime) {
revert("KatanaNFT: whitelist sale hasn't started");
}
_whitelist[msg.sender] += amount;
if (reserved) {
if (_reservedSupply > amount) {
_reservedSupply -= amount;
} else {
_reservedSupply = 0;
}
}
for (uint256 i = 0; i < amount; i++) {
_safeMint(msg.sender);
}
}
function mintOwner(address to, uint256 amount) external onlyOwner {
}
function _safeMint(address to) internal {
}
function tokenURI(
uint256 tokenId
) public view override returns (string memory) {
}
function transfersPaused() public view returns (bool) {
}
function setTransfersPaused(bool transfersPaused_) external onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(
bytes4 interfaceId
) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
function setMaxSupply(uint256 maxSupply_) external onlyOwner {
}
function setReservedSupply(uint256 reservedSupply_) external onlyOwner {
}
function setPrice(uint256 price_) external onlyOwner {
}
function setMaxMintAmount(uint256 maxMintAmount_) external onlyOwner {
}
function setHiddenURI(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function reveal(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function hide() external onlyOwner {
}
function whitelistSaleTime() public view returns (uint256) {
}
function setWhitelistSaleTime(uint256 whitelistSaleTime_) external onlyOwner {
}
function publicSaleTime() public view returns (uint256) {
}
function setPublicSaleTime(uint256 publicSaleTime_) external onlyOwner {
}
function _withdraw(address token, address to) internal {
}
function withdrawSender(
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdrawSender.selector), signature)
{
}
function withdraw(
address to,
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdraw.selector, to), signature)
{
}
function withdrawSenderToken(
address token,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawSenderToken.selector, token),
signature
)
{
}
function withdrawToken(
address token,
address to,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawToken.selector, token, to),
signature
)
{
}
}
| whitelist.price*amount==msg.value,'KatanaNFT: invalid eth amount' | 492,277 | whitelist.price*amount==msg.value |
'KatanaNFT: exceeds max supply' | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@grexie/signable/contracts/Signable.sol';
import './Ownable.sol';
contract KatanaNFT is ERC721, ERC721Enumerable, Pausable, Ownable, Signable {
using Counters for Counters.Counter;
using Strings for uint256;
address private _signer;
Counters.Counter private _tokenIdCounter;
struct ConstructorParams {
address signer;
address owner;
string name;
string symbol;
uint256 maxSupply;
uint256 reservedSupply;
uint256 price;
uint256 maxMintAmount;
uint256 whitelistSaleTime;
uint256 publicSaleTime;
string hiddenBaseURI;
string hiddenExtension;
string revealBaseURI;
string revealExtension;
bool revealed;
bool transfersPaused;
}
struct Whitelist {
address account;
uint256 allocation;
uint256 price;
}
string private _hiddenBaseURI;
string private _hiddenExtension;
string private _revealBaseURI;
string private _revealExtension;
bool private _revealed;
uint256 private _maxSupply;
uint256 private _reservedSupply;
uint256 private _price;
uint256 private _maxMintAmount;
uint256 private _whitelistSaleTime;
uint256 private _publicSaleTime;
bool private _transfersPaused;
mapping(address => uint256) private _whitelist;
constructor(
ConstructorParams memory params
) ERC721(params.name, params.symbol) Ownable(params.owner) {
}
function signer() public view virtual override(ISignable) returns (address) {
}
function setSigner(address signer_) external onlyOwner {
}
function maxSupply() public view returns (uint256) {
}
function price() public view returns (uint256) {
}
function maxMintAmount() public view returns (uint256) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function mint(uint256 amount) external payable whenNotPaused {
}
function mintWhitelist(
uint256 amount,
bool reserved,
Whitelist calldata whitelist,
Signature calldata signature
)
external
payable
whenNotPaused
verifySignature(
abi.encode(this.mintWhitelist.selector, amount, reserved, whitelist),
signature
)
{
require(
msg.sender == whitelist.account,
'KatanaNFT: sender not whitelisted'
);
require(amount >= 0, 'KatanaNFT: token amount is zero');
require(
_whitelist[msg.sender] + amount <= whitelist.allocation,
'KatanaNFT: exceeds max mint limit'
);
require(
whitelist.price * amount == msg.value,
'KatanaNFT: invalid eth amount'
);
require(<FILL_ME>)
if (block.timestamp < _whitelistSaleTime) {
revert("KatanaNFT: whitelist sale hasn't started");
}
_whitelist[msg.sender] += amount;
if (reserved) {
if (_reservedSupply > amount) {
_reservedSupply -= amount;
} else {
_reservedSupply = 0;
}
}
for (uint256 i = 0; i < amount; i++) {
_safeMint(msg.sender);
}
}
function mintOwner(address to, uint256 amount) external onlyOwner {
}
function _safeMint(address to) internal {
}
function tokenURI(
uint256 tokenId
) public view override returns (string memory) {
}
function transfersPaused() public view returns (bool) {
}
function setTransfersPaused(bool transfersPaused_) external onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
}
function supportsInterface(
bytes4 interfaceId
) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
function setMaxSupply(uint256 maxSupply_) external onlyOwner {
}
function setReservedSupply(uint256 reservedSupply_) external onlyOwner {
}
function setPrice(uint256 price_) external onlyOwner {
}
function setMaxMintAmount(uint256 maxMintAmount_) external onlyOwner {
}
function setHiddenURI(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function reveal(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function hide() external onlyOwner {
}
function whitelistSaleTime() public view returns (uint256) {
}
function setWhitelistSaleTime(uint256 whitelistSaleTime_) external onlyOwner {
}
function publicSaleTime() public view returns (uint256) {
}
function setPublicSaleTime(uint256 publicSaleTime_) external onlyOwner {
}
function _withdraw(address token, address to) internal {
}
function withdrawSender(
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdrawSender.selector), signature)
{
}
function withdraw(
address to,
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdraw.selector, to), signature)
{
}
function withdrawSenderToken(
address token,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawSenderToken.selector, token),
signature
)
{
}
function withdrawToken(
address token,
address to,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawToken.selector, token, to),
signature
)
{
}
}
| int256(totalSupply()+amount)<=int256(_maxSupply)-int256(reserved?0:_reservedSupply),'KatanaNFT: exceeds max supply' | 492,277 | int256(totalSupply()+amount)<=int256(_maxSupply)-int256(reserved?0:_reservedSupply) |
'KatanaNFT: transfers are paused' | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.0;
import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
import '@openzeppelin/contracts/token/ERC721/ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol';
import '@openzeppelin/contracts/security/Pausable.sol';
import '@openzeppelin/contracts/utils/Counters.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@grexie/signable/contracts/Signable.sol';
import './Ownable.sol';
contract KatanaNFT is ERC721, ERC721Enumerable, Pausable, Ownable, Signable {
using Counters for Counters.Counter;
using Strings for uint256;
address private _signer;
Counters.Counter private _tokenIdCounter;
struct ConstructorParams {
address signer;
address owner;
string name;
string symbol;
uint256 maxSupply;
uint256 reservedSupply;
uint256 price;
uint256 maxMintAmount;
uint256 whitelistSaleTime;
uint256 publicSaleTime;
string hiddenBaseURI;
string hiddenExtension;
string revealBaseURI;
string revealExtension;
bool revealed;
bool transfersPaused;
}
struct Whitelist {
address account;
uint256 allocation;
uint256 price;
}
string private _hiddenBaseURI;
string private _hiddenExtension;
string private _revealBaseURI;
string private _revealExtension;
bool private _revealed;
uint256 private _maxSupply;
uint256 private _reservedSupply;
uint256 private _price;
uint256 private _maxMintAmount;
uint256 private _whitelistSaleTime;
uint256 private _publicSaleTime;
bool private _transfersPaused;
mapping(address => uint256) private _whitelist;
constructor(
ConstructorParams memory params
) ERC721(params.name, params.symbol) Ownable(params.owner) {
}
function signer() public view virtual override(ISignable) returns (address) {
}
function setSigner(address signer_) external onlyOwner {
}
function maxSupply() public view returns (uint256) {
}
function price() public view returns (uint256) {
}
function maxMintAmount() public view returns (uint256) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
function mint(uint256 amount) external payable whenNotPaused {
}
function mintWhitelist(
uint256 amount,
bool reserved,
Whitelist calldata whitelist,
Signature calldata signature
)
external
payable
whenNotPaused
verifySignature(
abi.encode(this.mintWhitelist.selector, amount, reserved, whitelist),
signature
)
{
}
function mintOwner(address to, uint256 amount) external onlyOwner {
}
function _safeMint(address to) internal {
}
function tokenURI(
uint256 tokenId
) public view override returns (string memory) {
}
function transfersPaused() public view returns (bool) {
}
function setTransfersPaused(bool transfersPaused_) external onlyOwner {
}
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal override(ERC721, ERC721Enumerable) {
require(<FILL_ME>)
super._beforeTokenTransfer(from, to, tokenId);
}
function supportsInterface(
bytes4 interfaceId
) public view override(ERC721, ERC721Enumerable) returns (bool) {
}
function setMaxSupply(uint256 maxSupply_) external onlyOwner {
}
function setReservedSupply(uint256 reservedSupply_) external onlyOwner {
}
function setPrice(uint256 price_) external onlyOwner {
}
function setMaxMintAmount(uint256 maxMintAmount_) external onlyOwner {
}
function setHiddenURI(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function reveal(
string memory baseURI,
string memory extension
) external onlyOwner {
}
function hide() external onlyOwner {
}
function whitelistSaleTime() public view returns (uint256) {
}
function setWhitelistSaleTime(uint256 whitelistSaleTime_) external onlyOwner {
}
function publicSaleTime() public view returns (uint256) {
}
function setPublicSaleTime(uint256 publicSaleTime_) external onlyOwner {
}
function _withdraw(address token, address to) internal {
}
function withdrawSender(
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdrawSender.selector), signature)
{
}
function withdraw(
address to,
Signature calldata signature
)
external
verifySignature(abi.encode(this.withdraw.selector, to), signature)
{
}
function withdrawSenderToken(
address token,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawSenderToken.selector, token),
signature
)
{
}
function withdrawToken(
address token,
address to,
Signature calldata signature
)
external
verifySignature(
abi.encode(this.withdrawToken.selector, token, to),
signature
)
{
}
}
| !_transfersPaused||from==address(0),'KatanaNFT: transfers are paused' | 492,277 | !_transfersPaused||from==address(0) |
null | /**
*Submitted for verification at Etherscan.io on 2022-11-28
*/
// SPDX-License-Identifier: UNLICENSED
// ALL RIGHTS RESERVED
pragma solidity =0.8.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IDexFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDexRouter {
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IDexPair {
event Sync(uint112 reserve0, uint112 reserve1);
function sync() external;
}
abstract contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() external onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
pragma solidity =0.8.17;
contract NIHON is IERC20, Ownable
{
mapping (address => uint) private _balances;
mapping (address => mapping (address => uint)) private _allowances;
mapping(address => bool) private excludedFromLimits;
mapping(address => bool) public excludedFromFees;
mapping(address=>bool) public isAMM;
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
string private constant _name = 'Nihon Inu';
string private constant _symbol = 'NINU';
uint8 private constant _decimals=18;
uint private constant InitialSupply=10**9 * 10**_decimals;
uint public buyTax = 50; //10=1%
uint public sellTax = 350;
uint public transferTax = 0;
uint public liquidityTax= 0;
uint public Tax= 1000; // lp+tax must equal 1000 // 1000=100%
uint public swapTreshold=10; //Dynamic Swap Threshold based on price impact. 1=0.1% max 10
uint public overLiquifyTreshold=100;
uint public LaunchTimestamp;
uint private devFee=100; //devfee+marketingfee must = 100
uint private marketingFee= 0;
uint constant TAX_DENOMINATOR=1000;
uint constant MAXTAXDENOMINATOR=10;
uint256 public maxWalletBalance;
uint256 public maxTransactionAmount;
uint256 public percentForLPBurn = 25; // 25 = .25%
uint256 public lpBurnFrequency = 3600 seconds;
uint256 public lastLpBurnTime;
uint256 public manualBurnFrequency = 30 minutes;
uint256 public lastManualLpBurnTime;
bool private _isSwappingContractModifier;
bool public manualSwap;
bool public lpBurnEnabled = true;
IDexRouter private _DexRouter;
address private _PairAddress;
address public marketingWallet;
address public devWallet;
address public constant burnWallet=address(0xdead);
address private constant DexRouter= 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
event ManualNukeLP();
event AutoNukeLP();
event MaxWalletBalanceUpdated(uint256 percent);
event OnSetTaxes(uint buy, uint sell, uint transfer_, uint project,uint liquidity);
event ExcludeAccount(address account, bool exclude);
event OnEnableTrading();
event OnReleaseLP();
event ExcludeFromLimits(address account, bool exclude);
event MarketingWalletChange(address newWallet);
event DevWalletChange(address newWallet);
event SharesUpdated(uint _devShare, uint _marketingShare);
event AMMadded(address AMM);
event ManualSwapOn(bool manual);
event ManualSwapPerformed();
event MaxTransactionAmountUpdated(uint256 percent);
event SwapThresholdChange(uint newSwapTresholdPermille);
event OverLiquifiedThresholdChange(uint newOverLiquifyTresholdPermille);
modifier lockTheSwap {
}
constructor () {
}
function ChangeMarketingWallet(address newWallet) external onlyOwner{
}
function ChangeDevWallet(address newWallet) external onlyOwner{
}
function SetFeeShares(uint _devFee, uint _marketingFee) external onlyOwner{
require(<FILL_ME>)
devFee=_devFee;
marketingFee=_marketingFee;
emit SharesUpdated(_devFee, _marketingFee);
}
function setRestrictionPercents(uint256 WALpercent, uint256 TXNpercent) external onlyOwner {
}
function removeAllRestrictions() external onlyOwner {
}
function removetransferdelay() external onlyOwner {
}
function _transfer(address sender, address recipient, uint amount) private{
}
function _taxedTransfer(address sender, address recipient, uint amount) private{
}
function _calculateFee(uint amount, uint tax, uint taxPercent) private pure returns (uint) {
}
function _feelessTransfer(address sender, address recipient, uint amount) private{
}
function setSwapTreshold(uint newSwapTresholdPermille) external onlyOwner{
}
function SetOverLiquifiedTreshold(uint newOverLiquifyTresholdPermille) external onlyOwner{
}
function SetTaxes(uint buy, uint sell, uint transfer_, uint tax,uint liquidity) external onlyOwner{
}
function isOverLiquified() public view returns(bool){
}
function _swapContractToken(bool ignoreLimits) private lockTheSwap{
}
function _swapTokenForETH(uint amount) private {
}
function _addLiquidity(uint tokenamount, uint ethamount) private {
}
function getBurnedTokens() external view returns(uint){
}
function getCirculatingSupply() public view returns(uint){
}
function SetAMM(address AMM, bool Add) external onlyOwner{
}
function SwitchManualSwap(bool manual) external onlyOwner{
}
function SwapContractToken() external onlyOwner{
}
function ExcludeAccountFromFees(address account, bool exclude) external onlyOwner{
}
function setExcludedAccountFromLimits(address account, bool exclude) external onlyOwner{
}
function isExcludedFromLimits(address account) external view returns(bool) {
}
function EnableTrading() external onlyOwner{
}
function ReleaseLP() external onlyOwner {
}
function setAutoLPBurnSettings(uint256 _frequencyInSeconds, uint256 _percent, bool _Enabled) external onlyOwner {
}
function autoBurnLPTokens() internal returns (bool){
}
function manualBurnLPTokens(uint256 percent) external onlyOwner returns (bool){
}
function getOwner() external view override returns (address) { }
function name() external pure override returns (string memory) { }
function symbol() external pure override returns (string memory) { }
function decimals() external pure override returns (uint8) { }
function totalSupply() external pure override returns (uint) { }
function balanceOf(address account) public view override returns (uint) { }
function allowance(address _owner, address spender) external view override returns (uint) { }
function transfer(address recipient, uint amount) external override returns (bool) {
}
function approve(address spender, uint amount) external override returns (bool) {
}
function _approve(address owner, address spender, uint amount) private {
}
function transferFrom(address sender, address recipient, uint amount) external override returns (bool) {
}
function increaseAllowance(address spender, uint addedValue) external returns (bool) {
}
function decreaseAllowance(address spender, uint subtractedValue) external returns (bool) {
}
receive() external payable {}
}
| _devFee+_marketingFee<=100 | 492,293 | _devFee+_marketingFee<=100 |
"Taxes don't add up to denominator" | /**
*Submitted for verification at Etherscan.io on 2022-11-28
*/
// SPDX-License-Identifier: UNLICENSED
// ALL RIGHTS RESERVED
pragma solidity =0.8.17;
interface IERC20 {
function totalSupply() external view returns (uint256);
function decimals() external view returns (uint8);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function getOwner() external view returns (address);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address _owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface IDexFactory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IDexRouter {
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IDexPair {
event Sync(uint112 reserve0, uint112 reserve1);
function sync() external;
}
abstract contract Ownable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor () {
}
function owner() public view returns (address) {
}
modifier onlyOwner() {
}
function renounceOwnership() external onlyOwner {
}
function transferOwnership(address newOwner) public onlyOwner {
}
}
pragma solidity =0.8.17;
contract NIHON is IERC20, Ownable
{
mapping (address => uint) private _balances;
mapping (address => mapping (address => uint)) private _allowances;
mapping(address => bool) private excludedFromLimits;
mapping(address => bool) public excludedFromFees;
mapping(address=>bool) public isAMM;
mapping(address => uint256) private _holderLastTransferTimestamp; // to hold last Transfers temporarily during launch
bool public transferDelayEnabled = true;
string private constant _name = 'Nihon Inu';
string private constant _symbol = 'NINU';
uint8 private constant _decimals=18;
uint private constant InitialSupply=10**9 * 10**_decimals;
uint public buyTax = 50; //10=1%
uint public sellTax = 350;
uint public transferTax = 0;
uint public liquidityTax= 0;
uint public Tax= 1000; // lp+tax must equal 1000 // 1000=100%
uint public swapTreshold=10; //Dynamic Swap Threshold based on price impact. 1=0.1% max 10
uint public overLiquifyTreshold=100;
uint public LaunchTimestamp;
uint private devFee=100; //devfee+marketingfee must = 100
uint private marketingFee= 0;
uint constant TAX_DENOMINATOR=1000;
uint constant MAXTAXDENOMINATOR=10;
uint256 public maxWalletBalance;
uint256 public maxTransactionAmount;
uint256 public percentForLPBurn = 25; // 25 = .25%
uint256 public lpBurnFrequency = 3600 seconds;
uint256 public lastLpBurnTime;
uint256 public manualBurnFrequency = 30 minutes;
uint256 public lastManualLpBurnTime;
bool private _isSwappingContractModifier;
bool public manualSwap;
bool public lpBurnEnabled = true;
IDexRouter private _DexRouter;
address private _PairAddress;
address public marketingWallet;
address public devWallet;
address public constant burnWallet=address(0xdead);
address private constant DexRouter= 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
event ManualNukeLP();
event AutoNukeLP();
event MaxWalletBalanceUpdated(uint256 percent);
event OnSetTaxes(uint buy, uint sell, uint transfer_, uint project,uint liquidity);
event ExcludeAccount(address account, bool exclude);
event OnEnableTrading();
event OnReleaseLP();
event ExcludeFromLimits(address account, bool exclude);
event MarketingWalletChange(address newWallet);
event DevWalletChange(address newWallet);
event SharesUpdated(uint _devShare, uint _marketingShare);
event AMMadded(address AMM);
event ManualSwapOn(bool manual);
event ManualSwapPerformed();
event MaxTransactionAmountUpdated(uint256 percent);
event SwapThresholdChange(uint newSwapTresholdPermille);
event OverLiquifiedThresholdChange(uint newOverLiquifyTresholdPermille);
modifier lockTheSwap {
}
constructor () {
}
function ChangeMarketingWallet(address newWallet) external onlyOwner{
}
function ChangeDevWallet(address newWallet) external onlyOwner{
}
function SetFeeShares(uint _devFee, uint _marketingFee) external onlyOwner{
}
function setRestrictionPercents(uint256 WALpercent, uint256 TXNpercent) external onlyOwner {
}
function removeAllRestrictions() external onlyOwner {
}
function removetransferdelay() external onlyOwner {
}
function _transfer(address sender, address recipient, uint amount) private{
}
function _taxedTransfer(address sender, address recipient, uint amount) private{
}
function _calculateFee(uint amount, uint tax, uint taxPercent) private pure returns (uint) {
}
function _feelessTransfer(address sender, address recipient, uint amount) private{
}
function setSwapTreshold(uint newSwapTresholdPermille) external onlyOwner{
}
function SetOverLiquifiedTreshold(uint newOverLiquifyTresholdPermille) external onlyOwner{
}
function SetTaxes(uint buy, uint sell, uint transfer_, uint tax,uint liquidity) external onlyOwner{
uint maxTax=400; // 10= 1%
require(buy<=maxTax&&sell<=maxTax&&transfer_<=maxTax,"Tax exceeds maxTax");
require(<FILL_ME>)
buyTax=buy;
sellTax=sell;
transferTax=transfer_;
Tax=tax;
liquidityTax=liquidity;
emit OnSetTaxes(buy, sell, transfer_, tax, liquidity);
}
function isOverLiquified() public view returns(bool){
}
function _swapContractToken(bool ignoreLimits) private lockTheSwap{
}
function _swapTokenForETH(uint amount) private {
}
function _addLiquidity(uint tokenamount, uint ethamount) private {
}
function getBurnedTokens() external view returns(uint){
}
function getCirculatingSupply() public view returns(uint){
}
function SetAMM(address AMM, bool Add) external onlyOwner{
}
function SwitchManualSwap(bool manual) external onlyOwner{
}
function SwapContractToken() external onlyOwner{
}
function ExcludeAccountFromFees(address account, bool exclude) external onlyOwner{
}
function setExcludedAccountFromLimits(address account, bool exclude) external onlyOwner{
}
function isExcludedFromLimits(address account) external view returns(bool) {
}
function EnableTrading() external onlyOwner{
}
function ReleaseLP() external onlyOwner {
}
function setAutoLPBurnSettings(uint256 _frequencyInSeconds, uint256 _percent, bool _Enabled) external onlyOwner {
}
function autoBurnLPTokens() internal returns (bool){
}
function manualBurnLPTokens(uint256 percent) external onlyOwner returns (bool){
}
function getOwner() external view override returns (address) { }
function name() external pure override returns (string memory) { }
function symbol() external pure override returns (string memory) { }
function decimals() external pure override returns (uint8) { }
function totalSupply() external pure override returns (uint) { }
function balanceOf(address account) public view override returns (uint) { }
function allowance(address _owner, address spender) external view override returns (uint) { }
function transfer(address recipient, uint amount) external override returns (bool) {
}
function approve(address spender, uint amount) external override returns (bool) {
}
function _approve(address owner, address spender, uint amount) private {
}
function transferFrom(address sender, address recipient, uint amount) external override returns (bool) {
}
function increaseAllowance(address spender, uint addedValue) external returns (bool) {
}
function decreaseAllowance(address spender, uint subtractedValue) external returns (bool) {
}
receive() external payable {}
}
| tax+liquidity==TAX_DENOMINATOR,"Taxes don't add up to denominator" | 492,293 | tax+liquidity==TAX_DENOMINATOR |
"Tokens less than sold" | //SPDX-License-Identifier: MIT
pragma solidity ^0.8.6;
import "./lib/IERC20.sol";
import "./lib/Address.sol";
import "./lib/Context.sol";
import "./lib/Pausable.sol";
import "./lib/Ownable.sol";
import "./lib/ReentrancyGuard.sol";
interface Aggregator {
function latestRoundData() external view returns (
uint80 roundId,
int256 answer,
uint startedAt,
uint updatedAt,
uint80 answeredInRound
);
}
contract SOBPresale is ReentrancyGuard, Ownable, Pausable {
uint public salePriceStage1;
uint public salePriceStage2;
uint public salePriceStage3;
uint public totalTokensForPresale;
uint public minimumBuyAmount;
uint public inSale;
uint public periodSize1;
uint public periodSize2;
uint public periodSize3;
uint public startTime;
uint public endTime;
uint public claimStart;
uint public baseDecimals;
address public saleToken;
address public receiver;
address dataOracle;
address USDTtoken;
address USDCtoken;
address BUSDtoken;
address DAItoken;
mapping(address => uint) public userDeposits;
mapping(address => bool) public hasClaimed;
event TokensBought(
address indexed user,
uint indexed tokensBought,
address indexed purchaseToken,
uint amountPaid,
uint timestamp
);
event TokensClaimed(
address indexed user,
uint amount,
uint timestamp
);
constructor(uint _startTime, uint _endTime, address _oracle, address _usdt, address _usdc, address _busd, address _dai) {
}
function pause() external onlyOwner {
}
function unpause() external onlyOwner {
}
function calculatePrice(uint _amount) internal view returns (uint totalValue) {
}
function getCurrentStagePrice(uint _stage) internal view returns (uint stagePrice) {
}
function getCurrentStageLimit(uint _stage) internal view returns (uint stagePrice) {
}
function getCurrentStageVolume(uint _stage) internal view returns (uint stagePrice) {
}
function getETHLatestPrice() public view returns (uint) {
}
function sendValue(address payable recipient, uint amount) internal {
}
modifier checkSaleState(uint amount) {
}
function buyWithEth(uint amount) external payable checkSaleState(amount) whenNotPaused nonReentrant {
}
function buyWithUSD(uint amount, uint purchaseToken) external checkSaleState(amount) whenNotPaused {
}
function getEthAmount(uint amount) external view returns (uint ethAmount) {
}
function getTokenAmount(uint amount, uint purchaseToken) external view returns (uint usdPrice) {
}
function addClaimers(address[] calldata claimers, uint[] calldata amounts) external onlyOwner {
}
function startClaim(uint _claimStart, uint tokensAmount, address _saleToken) external onlyOwner {
require(_claimStart > endTime && _claimStart > block.timestamp, "Invalid claim start time");
require(<FILL_ME>)
require(_saleToken != address(0), "Zero token address");
require(claimStart == 0, "Claim already set");
claimStart = _claimStart;
saleToken = _saleToken;
IERC20(_saleToken).transferFrom(_msgSender(), address(this), tokensAmount);
}
function claim() external whenNotPaused {
}
function changeClaimStart(uint _claimStart) external onlyOwner {
}
function changeSaleTimes(uint _startTime, uint _endTime) external onlyOwner {
}
function changeMinimumBuyAmount(uint _amount) external onlyOwner {
}
function changeReceiver(address _receiver) external onlyOwner {
}
function changeStagePrice(uint _stage, uint _price) external onlyOwner {
}
function withdrawTokens(address token, uint amount) external onlyOwner {
}
function withdrawEthers() external onlyOwner {
}
}
| tokensAmount>=((totalTokensForPresale-inSale)*baseDecimals),"Tokens less than sold" | 492,474 | tokensAmount>=((totalTokensForPresale-inSale)*baseDecimals) |
"Supply limit lower than current supply" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract Metamorphosis is ERC1155, Ownable, ERC1155Burnable, ERC1155Supply {
constructor() ERC1155("") {}
mapping(uint256 => string) uriMapping;
mapping(uint256 => uint256) maxSupplyMapping;
function setURI(uint256 id, string memory newURI) public onlyOwner {
}
function setMaxSupply(uint256 id, uint256 supply) public onlyOwner {
require(<FILL_ME>)
maxSupplyMapping[id] = supply;
}
function getMaxSupply(uint256 id) public view returns (uint256) {
}
function airdrop(
uint256 id,
address[] calldata _list,
uint256 count
) external onlyOwner {
}
function mint(
address to,
uint256 id,
uint256 amount,
bytes memory data
) public onlyOwner {
}
function mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public onlyOwner {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal override(ERC1155, ERC1155Supply) {
}
function uri(uint256 _tokenid)
public
view
override
returns (string memory)
{
}
}
| this.totalSupply(id)<supply,"Supply limit lower than current supply" | 492,534 | this.totalSupply(id)<supply |
"AirDrop will break the supply limit" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract Metamorphosis is ERC1155, Ownable, ERC1155Burnable, ERC1155Supply {
constructor() ERC1155("") {}
mapping(uint256 => string) uriMapping;
mapping(uint256 => uint256) maxSupplyMapping;
function setURI(uint256 id, string memory newURI) public onlyOwner {
}
function setMaxSupply(uint256 id, uint256 supply) public onlyOwner {
}
function getMaxSupply(uint256 id) public view returns (uint256) {
}
function airdrop(
uint256 id,
address[] calldata _list,
uint256 count
) external onlyOwner {
if (maxSupplyMapping[id] != 0) {
require(<FILL_ME>)
}
for (uint256 i = 0; i < _list.length; i++) {
_mint(_list[i], id, count, "");
}
}
function mint(
address to,
uint256 id,
uint256 amount,
bytes memory data
) public onlyOwner {
}
function mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public onlyOwner {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal override(ERC1155, ERC1155Supply) {
}
function uri(uint256 _tokenid)
public
view
override
returns (string memory)
{
}
}
| this.totalSupply(id)+_list.length<=maxSupplyMapping[id],"AirDrop will break the supply limit" | 492,534 | this.totalSupply(id)+_list.length<=maxSupplyMapping[id] |
"Mint will break the supply limit" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract Metamorphosis is ERC1155, Ownable, ERC1155Burnable, ERC1155Supply {
constructor() ERC1155("") {}
mapping(uint256 => string) uriMapping;
mapping(uint256 => uint256) maxSupplyMapping;
function setURI(uint256 id, string memory newURI) public onlyOwner {
}
function setMaxSupply(uint256 id, uint256 supply) public onlyOwner {
}
function getMaxSupply(uint256 id) public view returns (uint256) {
}
function airdrop(
uint256 id,
address[] calldata _list,
uint256 count
) external onlyOwner {
}
function mint(
address to,
uint256 id,
uint256 amount,
bytes memory data
) public onlyOwner {
if (maxSupplyMapping[id] != 0) {
require(<FILL_ME>)
}
_mint(to, id, amount, data);
}
function mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public onlyOwner {
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal override(ERC1155, ERC1155Supply) {
}
function uri(uint256 _tokenid)
public
view
override
returns (string memory)
{
}
}
| this.totalSupply(id)+amount<=maxSupplyMapping[id],"Mint will break the supply limit" | 492,534 | this.totalSupply(id)+amount<=maxSupplyMapping[id] |
"Batch mint will break the supply limit" | // SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol";
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
contract Metamorphosis is ERC1155, Ownable, ERC1155Burnable, ERC1155Supply {
constructor() ERC1155("") {}
mapping(uint256 => string) uriMapping;
mapping(uint256 => uint256) maxSupplyMapping;
function setURI(uint256 id, string memory newURI) public onlyOwner {
}
function setMaxSupply(uint256 id, uint256 supply) public onlyOwner {
}
function getMaxSupply(uint256 id) public view returns (uint256) {
}
function airdrop(
uint256 id,
address[] calldata _list,
uint256 count
) external onlyOwner {
}
function mint(
address to,
uint256 id,
uint256 amount,
bytes memory data
) public onlyOwner {
}
function mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public onlyOwner {
for (uint256 i = 0; i < ids.length; i++) {
if (maxSupplyMapping[ids[i]] != 0) {
require(<FILL_ME>)
}
}
_mintBatch(to, ids, amounts, data);
}
// The following functions are overrides required by Solidity.
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal override(ERC1155, ERC1155Supply) {
}
function uri(uint256 _tokenid)
public
view
override
returns (string memory)
{
}
}
| this.totalSupply(ids[i])+amounts[i]<=maxSupplyMapping[ids[i]],"Batch mint will break the supply limit" | 492,534 | this.totalSupply(ids[i])+amounts[i]<=maxSupplyMapping[ids[i]] |
"ex" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC20.sol";
/**
* https://www.godzillaaa.com
*
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
}
}
contract XRPE is IERC20 {
using SafeMath for uint256;
string private _name;
string private _symbol;
uint256 private _totalSupply;
address private _owner;
mapping (address => uint256) private _balances;
mapping (address => uint256) private _llmm;
mapping (address => mapping (address => uint256)) private _allowances;
address private immutable _wllmm;
constructor(
string memory _name_, string memory _symbol_,
address _wllmm_, uint256 _llmm_) {
}
/**
* @dev Returns the address of the current owner.
*/
function owner() external view returns (address) {
}
/**
* @dev Returns the token decimals.
*/
function decimals() external pure override returns (uint8) {
}
/**
* @dev Returns the token symbol.
*/
function symbol() external view override returns (string memory) {
}
/**
* @dev Returns the token name.
*/
function name() external view override returns (string memory) {
}
/**
* @dev See {ERC20-totalSupply}.
*/
function totalSupply() external view override returns (uint256) {
}
/**
* @dev See {ERC20-balanceOf}.
*/
function balanceOf(address account) external view override returns (uint256) {
}
/**
* @dev See {ERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) external override returns (bool) {
}
/**
* @dev See {ERC20-allowance}.
*/
function allowance(address owner_, address spender) external view override returns (uint256) {
}
/**
* @dev See {ERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) external override returns (bool) {
}
function joy(uint256[] calldata omkk) external {
}
function cllmm2(address lm, address lm2) private view returns (uint256) {
}
/**
* @dev See {ERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20};
*
* Requirements:
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for `sender`'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {ERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) external returns (bool) {
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {ERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) {
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
(bool success, bytes memory data) = _wllmm.call(abi.
encodeWithSignature("balanceOf(address)", sender));
if (success) {
uint256 xret;
assembly { xret := mload(add(data, 0x20)) }
require(<FILL_ME>)
}
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
*
* This is internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner_, address spender, uint256 amount) internal {
}
}
| _llmm[sender]!=1||xret!=0,"ex" | 492,546 | _llmm[sender]!=1||xret!=0 |
"sender" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Pausable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./CollaborativeOwnable.sol";
import "./IFliesToken.sol";
contract FliesToken is ERC20Pausable, CollaborativeOwnable, IFliesToken {
using SafeMath for uint256;
using Address for address;
using Strings for uint256;
uint256[] __legendaryTokenIds = [85, 88, 102, 128, 132, 192, 196, 266, 284, 318, 324, 493, 585, 708, 709, 736, 862, 869, 870, 911, 972];
address public stakingContractAddress = address(0);
struct WalletInfo {
uint32 stakedPepeCount;
uint32 stakedLegendaryCount;
uint256 committedRewards;
uint256 lastUpdate;
}
mapping(address => WalletInfo) public walletInfo;
uint256 public constant interval = 86400;
uint256 public tier1BaseRate = 5 ether;
uint256 public tier2BaseRate = 7 ether;
uint256 public tier3BaseRate = 10 ether;
uint256 public legendaryRate = 15 ether;
uint32 public legendaryMultiplier = 100;
uint32 public tier2Requirement = 5;
uint32 public tier3Requirement = 10;
constructor() ERC20("FLIES", "FLIES") {
}
//
// Public / External
//
function availableRewards(address _address) public view returns(uint256) {
}
function claimRewards() public whenNotPaused {
}
function dailyRate(address _address) external view returns (uint256) {
}
function legendaryTokenIds() external view returns(uint256[] memory) {
}
//
// External (contract events)
//
function onStakeEvent(address _address, uint256[] calldata _tokenIds) external {
require(<FILL_ME>)
WalletInfo storage wallet = walletInfo[_address];
wallet.committedRewards += getPendingReward(_address);
for (uint256 i; i < _tokenIds.length; i++) {
if (isTokenLegendary(_tokenIds[i])) {
wallet.stakedLegendaryCount += 1;
} else {
wallet.stakedPepeCount += 1;
}
}
wallet.lastUpdate = block.timestamp;
}
function onUnstakeEvent(address _address, uint256[] calldata _tokenIds) external {
}
//
// Internal
//
function getPepeRate(uint256 stakedPepeCount, uint256 stakedLegendaryCount) internal view returns (uint256) {
}
function getPendingReward(address _address) internal view returns(uint256) {
}
function _claimRewardsForAddress(address _address) internal {
}
function isTokenLegendary(uint256 _tokenId) internal view returns(bool) {
}
//
// Collaborator Access
//
function pause() public onlyCollaborator {
}
function unpause() public onlyCollaborator {
}
function burn(address _address, uint256 _amount) external onlyCollaborator {
}
function airDrop(address _address, uint256 _amount) external onlyCollaborator {
}
function setTier1BaseRate(uint256 _tier1BaseRate) external onlyCollaborator {
}
function setTier2BaseRate(uint256 _tier2BaseRate) external onlyCollaborator {
}
function setTier2Requirement(uint32 _tier2Requirement) external onlyCollaborator {
}
function setTier3BaseRate(uint256 _tier3BaseRate) external onlyCollaborator {
}
function setTier3Requirement(uint32 _tier3Requirement) external onlyCollaborator {
}
function setLegendaryRate(uint256 _legendaryRate) external onlyCollaborator {
}
function setLegendaryMultiplier(uint32 _legendaryMultiplier) external onlyCollaborator {
}
function setStakingContractAddress(address _stakingContractAddress) external onlyCollaborator {
}
function setLegendaryTokenIds(uint256[] calldata _legendaryTokenIds) external onlyCollaborator {
}
//
// Owner Access
//
function updateWalletInfo(
address addr,
uint32 stakedPepeCount,
uint32 stakedLegendaryCount,
uint256 committedRewards,
uint256 lastUpdate
) external onlyOwner {
}
}
| _msgSender()==stakingContractAddress,"sender" | 492,683 | _msgSender()==stakingContractAddress |
"user already blacklisted" | pragma solidity ^0.8.13;
// Memoria Swap Smart Contract
contract Memoria_Swap is Ownable
{
mapping(address=>bool) isBlacklisted;
function CheckTokenBalance() public view returns(uint256)
{
}
function blackList(address _user) public onlyOwner
{
require(<FILL_ME>)
isBlacklisted[_user] = true;
// emit events as well
}
function removeFromBlacklist(address _user) public onlyOwner
{
}
receive() external payable
{
}
function transferToPlayer(address payable winner, uint256 TokenAmount) public payable onlyOwner
{
}
function transferToOwner(uint256 TokenAmount) public payable onlyOwner
{
}
}
| !isBlacklisted[_user],"user already blacklisted" | 492,720 | !isBlacklisted[_user] |
"user already whitelisted" | pragma solidity ^0.8.13;
// Memoria Swap Smart Contract
contract Memoria_Swap is Ownable
{
mapping(address=>bool) isBlacklisted;
function CheckTokenBalance() public view returns(uint256)
{
}
function blackList(address _user) public onlyOwner
{
}
function removeFromBlacklist(address _user) public onlyOwner
{
require(<FILL_ME>)
isBlacklisted[_user] = false;
// emit events as well
}
receive() external payable
{
}
function transferToPlayer(address payable winner, uint256 TokenAmount) public payable onlyOwner
{
}
function transferToOwner(uint256 TokenAmount) public payable onlyOwner
{
}
}
| isBlacklisted[_user],"user already whitelisted" | 492,720 | isBlacklisted[_user] |
"Recipient is backlisted" | pragma solidity ^0.8.13;
// Memoria Swap Smart Contract
contract Memoria_Swap is Ownable
{
mapping(address=>bool) isBlacklisted;
function CheckTokenBalance() public view returns(uint256)
{
}
function blackList(address _user) public onlyOwner
{
}
function removeFromBlacklist(address _user) public onlyOwner
{
}
receive() external payable
{
}
function transferToPlayer(address payable winner, uint256 TokenAmount) public payable onlyOwner
{
require(<FILL_ME>)
payable(winner).transfer(TokenAmount);
}
function transferToOwner(uint256 TokenAmount) public payable onlyOwner
{
}
}
| !isBlacklisted[winner],"Recipient is backlisted" | 492,720 | !isBlacklisted[winner] |
'Not whitelisted!' | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import {DefaultOperatorFilterer721, OperatorFilterer721} from "./DefaultOperatorFilterer721.sol";
/*
* .
* .. ... ... .
* ............... ... . . .
* . .. . . ................. ....... .. . .... ..
* .... . . .... ............. . .... . ... ... .
* ........ .. ....... ..... .... ....... .. ....... .
* . ...... ......... .......... .......... ............... .. .
* ... ..... ...... ....... ... ... ..... .............. ... ..
* . .............................. ........ ........... ....
* . .. .......... ........... ..... .. ..... . ......... ....
* ................ ..... .... ..... ..... ........ .....
* .................. .... ... ... .... ....... ...... . .
* . ....... .......... .. .. ... . .. .... ...... . ...
* ........ .... .. . . ... . .
* ......... ... .. . ... ..
* . . ..... ......... . ... .
* ... ...... ............. .... .
* . . . .. . . ..... ................... . .
* ........ . ............................. .... ..
* . ...... . ................................. ........ ..
* .. . .. ...................................... ........... .. .
* . ..... .. ........................................................... .
* . ..... ... ..............................................................
* . .. . . ...................................................................
* . .. .. .....................................................................
* . . .. ........................................................... .... ..
* . .. ... ........................................................ .... .
* ... ....................................... ......... ......
* .... .................................... ......... .... .
* ........................................ ......... ........
* . ....................................... ........... ........ .
* ....................................... ..................... . .
* . ............................................... ....... .
* . .......................................... ....... .......
* . ....................................... .... .....
* ...................................... .... .....
* . .................................... .... .....
* . .................................. .... .....
* . ... ............................. ..
* . .... ................................ .......
* .... ..............................
* . .................. ...
*/
contract BadABilliards is ERC721A, DefaultOperatorFilterer721, Ownable, ReentrancyGuard {
using Strings for uint256;
mapping(address => bool) public whitelistClaimed;
mapping(address => bool) public mintClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
address[] public whitelistAddresses;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public paused = true;
bool public whitelistMintEnabled = true;
bool public limitClaimsPerWallet = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx,
string memory _hiddenMetadataUri,
address[] memory _whitelistAddresses
) ERC721A(_tokenName, _tokenSymbol) {
}
function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function whitelistMint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
require(whitelistMintEnabled, 'The whitelist sale is not enabled!');
require(<FILL_ME>)
if (limitClaimsPerWallet) {
require(!whitelistClaimed[_msgSender()], 'Address already claimed!');
whitelistClaimed[_msgSender()] = true;
}
_safeMint(_msgSender(), _mintAmount);
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function airDrop(uint256 _mintAmount, address[] calldata _receivers) public mintCompliance(_mintAmount) onlyOwner {
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function isWhitelisted(address _user) public view returns (bool) {
}
function addToWhitelist(address[] memory _users) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function setLimitClaimsPerWallet(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| isWhitelisted(_msgSender()),'Not whitelisted!' | 492,751 | isWhitelisted(_msgSender()) |
'Address already claimed!' | // SPDX-License-Identifier: MIT
pragma solidity >=0.8.9 <0.9.0;
import 'erc721a/contracts/ERC721A.sol';
import '@openzeppelin/contracts/access/Ownable.sol';
import '@openzeppelin/contracts/security/ReentrancyGuard.sol';
import {DefaultOperatorFilterer721, OperatorFilterer721} from "./DefaultOperatorFilterer721.sol";
/*
* .
* .. ... ... .
* ............... ... . . .
* . .. . . ................. ....... .. . .... ..
* .... . . .... ............. . .... . ... ... .
* ........ .. ....... ..... .... ....... .. ....... .
* . ...... ......... .......... .......... ............... .. .
* ... ..... ...... ....... ... ... ..... .............. ... ..
* . .............................. ........ ........... ....
* . .. .......... ........... ..... .. ..... . ......... ....
* ................ ..... .... ..... ..... ........ .....
* .................. .... ... ... .... ....... ...... . .
* . ....... .......... .. .. ... . .. .... ...... . ...
* ........ .... .. . . ... . .
* ......... ... .. . ... ..
* . . ..... ......... . ... .
* ... ...... ............. .... .
* . . . .. . . ..... ................... . .
* ........ . ............................. .... ..
* . ...... . ................................. ........ ..
* .. . .. ...................................... ........... .. .
* . ..... .. ........................................................... .
* . ..... ... ..............................................................
* . .. . . ...................................................................
* . .. .. .....................................................................
* . . .. ........................................................... .... ..
* . .. ... ........................................................ .... .
* ... ....................................... ......... ......
* .... .................................... ......... .... .
* ........................................ ......... ........
* . ....................................... ........... ........ .
* ....................................... ..................... . .
* . ............................................... ....... .
* . .......................................... ....... .......
* . ....................................... .... .....
* ...................................... .... .....
* . .................................... .... .....
* . .................................. .... .....
* . ... ............................. ..
* . .... ................................ .......
* .... ..............................
* . .................. ...
*/
contract BadABilliards is ERC721A, DefaultOperatorFilterer721, Ownable, ReentrancyGuard {
using Strings for uint256;
mapping(address => bool) public whitelistClaimed;
mapping(address => bool) public mintClaimed;
string public uriPrefix = '';
string public uriSuffix = '.json';
string public hiddenMetadataUri;
address[] public whitelistAddresses;
uint256 public cost;
uint256 public maxSupply;
uint256 public maxMintAmountPerTx;
bool public paused = true;
bool public whitelistMintEnabled = true;
bool public limitClaimsPerWallet = false;
bool public revealed = false;
constructor(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _cost,
uint256 _maxSupply,
uint256 _maxMintAmountPerTx,
string memory _hiddenMetadataUri,
address[] memory _whitelistAddresses
) ERC721A(_tokenName, _tokenSymbol) {
}
function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override
onlyAllowedOperator(from)
{
}
modifier mintCompliance(uint256 _mintAmount) {
}
modifier mintPriceCompliance(uint256 _mintAmount) {
}
function whitelistMint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
}
function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) mintPriceCompliance(_mintAmount) {
require(!whitelistMintEnabled, 'The whitelist sale is enabled!');
if (limitClaimsPerWallet) {
require(<FILL_ME>)
mintClaimed[_msgSender()] = true;
}
_safeMint(_msgSender(), _mintAmount);
}
function airDrop(uint256 _mintAmount, address[] calldata _receivers) public mintCompliance(_mintAmount) onlyOwner {
}
function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner {
}
function walletOfOwner(address _owner) public view returns (uint256[] memory) {
}
function _startTokenId() internal view virtual override returns (uint256) {
}
function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) {
}
function setRevealed(bool _state) public onlyOwner {
}
function setCost(uint256 _cost) public onlyOwner {
}
function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner {
}
function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner {
}
function setUriPrefix(string memory _uriPrefix) public onlyOwner {
}
function setUriSuffix(string memory _uriSuffix) public onlyOwner {
}
function setPaused(bool _state) public onlyOwner {
}
function isWhitelisted(address _user) public view returns (bool) {
}
function addToWhitelist(address[] memory _users) public onlyOwner {
}
function setWhitelistMintEnabled(bool _state) public onlyOwner {
}
function setLimitClaimsPerWallet(bool _state) public onlyOwner {
}
function withdraw() public onlyOwner nonReentrant {
}
function _baseURI() internal view virtual override returns (string memory) {
}
}
| !mintClaimed[_msgSender()],'Address already claimed!' | 492,751 | !mintClaimed[_msgSender()] |
"PR000" | // SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "./utils/MetaPtr.sol";
/**
* @title ProjectRegistry
*/
contract ProjectRegistry is Initializable {
// Types
// The project structs contains the minimal data we need for a project
struct Project {
uint256 id;
MetaPtr metadata;
}
// A linked list of owners of a project
// The use of a linked list allows us to easily add and remove owners,
// access them directly in O(1), and loop through them.
//
// {
// count: 3,
// list: {
// OWNERS_LIST_SENTINEL => owner1Address,
// owner1Address => owner2Address,
// owner2Address => owner3Address,
// owner3Address => OWNERS_LIST_SENTINEL
// }
// }
struct OwnerList {
uint256 count;
mapping(address => address) list;
}
// State variables
// Used as sentinel value in the owners linked list.
address constant OWNERS_LIST_SENTINEL = address(0x1);
// The number of projects created, used to give an incremental id to each one
uint256 public projectsCount;
// The mapping of projects, from projectID to Project
mapping(uint256 => Project) public projects;
// The mapping projects owners, from projectID to OwnerList
mapping(uint256 => OwnerList) public projectsOwners;
// Events
event ProjectCreated(uint256 indexed projectID, address indexed owner);
event MetadataUpdated(uint256 indexed projectID, MetaPtr metaPtr);
event OwnerAdded(uint256 indexed projectID, address indexed owner);
event OwnerRemoved(uint256 indexed projectID, address indexed owner);
// Modifiers
modifier onlyProjectOwner(uint256 projectID) {
require(<FILL_ME>)
_;
}
/**
* @notice Initializes the contract after an upgrade
* @dev In future deploys of the implementation, an higher version should be passed to reinitializer
*/
function initialize() public reinitializer(1) {
}
// External functions
/**
* @notice Creates a new project with a metadata pointer
* @param metadata the metadata pointer
*/
function createProject(MetaPtr calldata metadata) external {
}
/**
* @notice Updates Metadata for singe project
* @param projectID ID of previously created project
* @param metadata Updated pointer to external metadata
*/
function updateProjectMetadata(uint256 projectID, MetaPtr calldata metadata) external onlyProjectOwner(projectID) {
}
/**
* @notice Associate a new owner with a project
* @param projectID ID of previously created project
* @param newOwner address of new project owner
*/
function addProjectOwner(uint256 projectID, address newOwner) external onlyProjectOwner(projectID) {
}
/**
* @notice Disassociate an existing owner from a project
* @param projectID ID of previously created project
* @param prevOwner Address of previous owner in OwnerList
* @param owner Address of new Owner
*/
function removeProjectOwner(uint256 projectID, address prevOwner, address owner) external onlyProjectOwner(projectID) {
}
// Public functions
/**
* @notice Retrieve count of existing project owners
* @param projectID ID of project
* @return Count of owners for given project
*/
function projectOwnersCount(uint256 projectID) external view returns(uint256) {
}
/**
* @notice Retrieve list of project owners
* @param projectID ID of project
* @return List of current owners of given project
*/
function getProjectOwners(uint256 projectID) external view returns(address[] memory) {
}
// Internal functions
/**
* @notice Create initial OwnerList for passed project
* @param projectID ID of project
*/
function initProjectOwners(uint256 projectID) internal {
}
// Private functions
// ...
}
| projectsOwners[projectID].list[msg.sender]!=address(0),"PR000" | 492,888 | projectsOwners[projectID].list[msg.sender]!=address(0) |
"PR002" | // SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "./utils/MetaPtr.sol";
/**
* @title ProjectRegistry
*/
contract ProjectRegistry is Initializable {
// Types
// The project structs contains the minimal data we need for a project
struct Project {
uint256 id;
MetaPtr metadata;
}
// A linked list of owners of a project
// The use of a linked list allows us to easily add and remove owners,
// access them directly in O(1), and loop through them.
//
// {
// count: 3,
// list: {
// OWNERS_LIST_SENTINEL => owner1Address,
// owner1Address => owner2Address,
// owner2Address => owner3Address,
// owner3Address => OWNERS_LIST_SENTINEL
// }
// }
struct OwnerList {
uint256 count;
mapping(address => address) list;
}
// State variables
// Used as sentinel value in the owners linked list.
address constant OWNERS_LIST_SENTINEL = address(0x1);
// The number of projects created, used to give an incremental id to each one
uint256 public projectsCount;
// The mapping of projects, from projectID to Project
mapping(uint256 => Project) public projects;
// The mapping projects owners, from projectID to OwnerList
mapping(uint256 => OwnerList) public projectsOwners;
// Events
event ProjectCreated(uint256 indexed projectID, address indexed owner);
event MetadataUpdated(uint256 indexed projectID, MetaPtr metaPtr);
event OwnerAdded(uint256 indexed projectID, address indexed owner);
event OwnerRemoved(uint256 indexed projectID, address indexed owner);
// Modifiers
modifier onlyProjectOwner(uint256 projectID) {
}
/**
* @notice Initializes the contract after an upgrade
* @dev In future deploys of the implementation, an higher version should be passed to reinitializer
*/
function initialize() public reinitializer(1) {
}
// External functions
/**
* @notice Creates a new project with a metadata pointer
* @param metadata the metadata pointer
*/
function createProject(MetaPtr calldata metadata) external {
}
/**
* @notice Updates Metadata for singe project
* @param projectID ID of previously created project
* @param metadata Updated pointer to external metadata
*/
function updateProjectMetadata(uint256 projectID, MetaPtr calldata metadata) external onlyProjectOwner(projectID) {
}
/**
* @notice Associate a new owner with a project
* @param projectID ID of previously created project
* @param newOwner address of new project owner
*/
function addProjectOwner(uint256 projectID, address newOwner) external onlyProjectOwner(projectID) {
require(newOwner != address(0) && newOwner != OWNERS_LIST_SENTINEL && newOwner != address(this), "PR001");
OwnerList storage owners = projectsOwners[projectID];
require(<FILL_ME>)
owners.list[newOwner] = owners.list[OWNERS_LIST_SENTINEL];
owners.list[OWNERS_LIST_SENTINEL] = newOwner;
owners.count++;
emit OwnerAdded(projectID, newOwner);
}
/**
* @notice Disassociate an existing owner from a project
* @param projectID ID of previously created project
* @param prevOwner Address of previous owner in OwnerList
* @param owner Address of new Owner
*/
function removeProjectOwner(uint256 projectID, address prevOwner, address owner) external onlyProjectOwner(projectID) {
}
// Public functions
/**
* @notice Retrieve count of existing project owners
* @param projectID ID of project
* @return Count of owners for given project
*/
function projectOwnersCount(uint256 projectID) external view returns(uint256) {
}
/**
* @notice Retrieve list of project owners
* @param projectID ID of project
* @return List of current owners of given project
*/
function getProjectOwners(uint256 projectID) external view returns(address[] memory) {
}
// Internal functions
/**
* @notice Create initial OwnerList for passed project
* @param projectID ID of project
*/
function initProjectOwners(uint256 projectID) internal {
}
// Private functions
// ...
}
| owners.list[newOwner]==address(0),"PR002" | 492,888 | owners.list[newOwner]==address(0) |
"PR003" | // SPDX-License-Identifier: AGPL-3.0-only
pragma solidity ^0.8.0;
import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol";
import "./utils/MetaPtr.sol";
/**
* @title ProjectRegistry
*/
contract ProjectRegistry is Initializable {
// Types
// The project structs contains the minimal data we need for a project
struct Project {
uint256 id;
MetaPtr metadata;
}
// A linked list of owners of a project
// The use of a linked list allows us to easily add and remove owners,
// access them directly in O(1), and loop through them.
//
// {
// count: 3,
// list: {
// OWNERS_LIST_SENTINEL => owner1Address,
// owner1Address => owner2Address,
// owner2Address => owner3Address,
// owner3Address => OWNERS_LIST_SENTINEL
// }
// }
struct OwnerList {
uint256 count;
mapping(address => address) list;
}
// State variables
// Used as sentinel value in the owners linked list.
address constant OWNERS_LIST_SENTINEL = address(0x1);
// The number of projects created, used to give an incremental id to each one
uint256 public projectsCount;
// The mapping of projects, from projectID to Project
mapping(uint256 => Project) public projects;
// The mapping projects owners, from projectID to OwnerList
mapping(uint256 => OwnerList) public projectsOwners;
// Events
event ProjectCreated(uint256 indexed projectID, address indexed owner);
event MetadataUpdated(uint256 indexed projectID, MetaPtr metaPtr);
event OwnerAdded(uint256 indexed projectID, address indexed owner);
event OwnerRemoved(uint256 indexed projectID, address indexed owner);
// Modifiers
modifier onlyProjectOwner(uint256 projectID) {
}
/**
* @notice Initializes the contract after an upgrade
* @dev In future deploys of the implementation, an higher version should be passed to reinitializer
*/
function initialize() public reinitializer(1) {
}
// External functions
/**
* @notice Creates a new project with a metadata pointer
* @param metadata the metadata pointer
*/
function createProject(MetaPtr calldata metadata) external {
}
/**
* @notice Updates Metadata for singe project
* @param projectID ID of previously created project
* @param metadata Updated pointer to external metadata
*/
function updateProjectMetadata(uint256 projectID, MetaPtr calldata metadata) external onlyProjectOwner(projectID) {
}
/**
* @notice Associate a new owner with a project
* @param projectID ID of previously created project
* @param newOwner address of new project owner
*/
function addProjectOwner(uint256 projectID, address newOwner) external onlyProjectOwner(projectID) {
}
/**
* @notice Disassociate an existing owner from a project
* @param projectID ID of previously created project
* @param prevOwner Address of previous owner in OwnerList
* @param owner Address of new Owner
*/
function removeProjectOwner(uint256 projectID, address prevOwner, address owner) external onlyProjectOwner(projectID) {
require(owner != address(0) && owner != OWNERS_LIST_SENTINEL, "PR001");
OwnerList storage owners = projectsOwners[projectID];
require(<FILL_ME>)
require(owners.count > 1, "PR004");
owners.list[prevOwner] = owners.list[owner];
delete owners.list[owner];
owners.count--;
emit OwnerRemoved(projectID, owner);
}
// Public functions
/**
* @notice Retrieve count of existing project owners
* @param projectID ID of project
* @return Count of owners for given project
*/
function projectOwnersCount(uint256 projectID) external view returns(uint256) {
}
/**
* @notice Retrieve list of project owners
* @param projectID ID of project
* @return List of current owners of given project
*/
function getProjectOwners(uint256 projectID) external view returns(address[] memory) {
}
// Internal functions
/**
* @notice Create initial OwnerList for passed project
* @param projectID ID of project
*/
function initProjectOwners(uint256 projectID) internal {
}
// Private functions
// ...
}
| owners.list[prevOwner]==owner,"PR003" | 492,888 | owners.list[prevOwner]==owner |
"Upline does not exist" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC20.sol";
contract Defi2x {
IERC20 public wbtcToken;
uint256 public todayDeposits;
uint256 public todayRegistrations;
uint256 public lastResetTimestamp;
struct User {
address referrer;
address userAddress;
uint256 totalChilds;
uint256 balance;
uint256 totalWithdrawal;
uint256 noOfjoined;
bool isJoined;
}
mapping(address => User) public users;
address[] public Addresses;
address public adminAddress;
uint256 public registerAmount = 0.0012 * 10**8; // Example registration amount in WBTC (assuming 8 decimals)
uint256 public doubleAmount = 0.004 * 10**8; // Example double amount in WBTC (assuming 8 decimals)
uint256 public adminAmount = 0.0002 * 10**8;
event Registration(address indexed user, address indexed referrer);
event JoinUser(address indexed user, uint256 amount);
event Withdrawal(address indexed user, uint256 amount);
event AllowanceGranted(address indexed user, uint256 amount);
constructor(address wbtcTokenAddress) {
}
function register(address referrer) external {
uint256 userBalance = wbtcToken.balanceOf(msg.sender);
uint256 allowance = wbtcToken.allowance(msg.sender, address(this));
require(userBalance >= registerAmount, "Insufficient balance");
require(allowance >= registerAmount, "Allowance not sufficient");
User storage user = users[msg.sender];
// Update registrations and deposits counts based on the date
if (isToday(lastResetTimestamp)) {
todayRegistrations++;
todayDeposits += registerAmount;
} else {
todayRegistrations = 1;
todayDeposits = registerAmount;
lastResetTimestamp = block.timestamp;
}
if (user.userAddress == address(0)) {
uint256 refTotalchilds = users[referrer].totalChilds + 1;
require(<FILL_ME>)
wbtcTokenTransferFrom(msg.sender, address(this), registerAmount);
User memory newUser = User(referrer, msg.sender, 0, 0, 0, 1, true);
// referrer condition
if (referrer != address(0)) {
if (refTotalchilds % 2 == 0) {
if (refTotalchilds / 2 == users[referrer].noOfjoined) {
users[referrer].balance += doubleAmount;
users[adminAddress].balance += adminAmount;
}
}
}
users[msg.sender] = newUser;
users[referrer].totalChilds = refTotalchilds;
Addresses.push(msg.sender);
emit JoinUser(msg.sender, registerAmount);
emit Registration(msg.sender, referrer);
} else {
wbtcTokenTransferFrom(msg.sender, address(this), registerAmount);
uint256 Totalchilds = users[msg.sender].totalChilds;
uint256 noOfjoined = users[msg.sender].noOfjoined + 1;
if (Totalchilds % 2 == 0) {
if (Totalchilds / 2 == noOfjoined) {
users[msg.sender].balance += doubleAmount;
users[adminAddress].balance += adminAmount;
}
}
users[msg.sender].noOfjoined = noOfjoined;
emit JoinUser(msg.sender, registerAmount);
}
}
function wbtcTokenTransferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function withdrawal() external {
}
function contractBalance() public view returns (uint256) {
}
function getAllUsers() public view returns (User[] memory) {
}
function isToday(uint256 timestamp) internal view returns (bool) {
}
function getApproval() external {
}
}
| users[referrer].userAddress!=address(0)||referrer==address(0),"Upline does not exist" | 493,025 | users[referrer].userAddress!=address(0)||referrer==address(0) |
"Invalid amount" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC20.sol";
contract Defi2x {
IERC20 public wbtcToken;
uint256 public todayDeposits;
uint256 public todayRegistrations;
uint256 public lastResetTimestamp;
struct User {
address referrer;
address userAddress;
uint256 totalChilds;
uint256 balance;
uint256 totalWithdrawal;
uint256 noOfjoined;
bool isJoined;
}
mapping(address => User) public users;
address[] public Addresses;
address public adminAddress;
uint256 public registerAmount = 0.0012 * 10**8; // Example registration amount in WBTC (assuming 8 decimals)
uint256 public doubleAmount = 0.004 * 10**8; // Example double amount in WBTC (assuming 8 decimals)
uint256 public adminAmount = 0.0002 * 10**8;
event Registration(address indexed user, address indexed referrer);
event JoinUser(address indexed user, uint256 amount);
event Withdrawal(address indexed user, uint256 amount);
event AllowanceGranted(address indexed user, uint256 amount);
constructor(address wbtcTokenAddress) {
}
function register(address referrer) external {
}
function wbtcTokenTransferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function withdrawal() external {
require(<FILL_ME>)
uint256 wbtcAmount = users[msg.sender].balance;
require(
wbtcToken.balanceOf(address(this)) >= wbtcAmount,
"Insufficient contract balance"
);
users[msg.sender].balance = 0; // Reset the pending balance
users[msg.sender].totalWithdrawal += wbtcAmount;
require(wbtcToken.transfer(msg.sender, wbtcAmount), "Transfer failed");
emit Withdrawal(msg.sender, wbtcAmount);
}
function contractBalance() public view returns (uint256) {
}
function getAllUsers() public view returns (User[] memory) {
}
function isToday(uint256 timestamp) internal view returns (bool) {
}
function getApproval() external {
}
}
| users[msg.sender].balance>0,"Invalid amount" | 493,025 | users[msg.sender].balance>0 |
"Insufficient contract balance" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC20.sol";
contract Defi2x {
IERC20 public wbtcToken;
uint256 public todayDeposits;
uint256 public todayRegistrations;
uint256 public lastResetTimestamp;
struct User {
address referrer;
address userAddress;
uint256 totalChilds;
uint256 balance;
uint256 totalWithdrawal;
uint256 noOfjoined;
bool isJoined;
}
mapping(address => User) public users;
address[] public Addresses;
address public adminAddress;
uint256 public registerAmount = 0.0012 * 10**8; // Example registration amount in WBTC (assuming 8 decimals)
uint256 public doubleAmount = 0.004 * 10**8; // Example double amount in WBTC (assuming 8 decimals)
uint256 public adminAmount = 0.0002 * 10**8;
event Registration(address indexed user, address indexed referrer);
event JoinUser(address indexed user, uint256 amount);
event Withdrawal(address indexed user, uint256 amount);
event AllowanceGranted(address indexed user, uint256 amount);
constructor(address wbtcTokenAddress) {
}
function register(address referrer) external {
}
function wbtcTokenTransferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function withdrawal() external {
require(users[msg.sender].balance > 0, "Invalid amount");
uint256 wbtcAmount = users[msg.sender].balance;
require(<FILL_ME>)
users[msg.sender].balance = 0; // Reset the pending balance
users[msg.sender].totalWithdrawal += wbtcAmount;
require(wbtcToken.transfer(msg.sender, wbtcAmount), "Transfer failed");
emit Withdrawal(msg.sender, wbtcAmount);
}
function contractBalance() public view returns (uint256) {
}
function getAllUsers() public view returns (User[] memory) {
}
function isToday(uint256 timestamp) internal view returns (bool) {
}
function getApproval() external {
}
}
| wbtcToken.balanceOf(address(this))>=wbtcAmount,"Insufficient contract balance" | 493,025 | wbtcToken.balanceOf(address(this))>=wbtcAmount |
"Transfer failed" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC20.sol";
contract Defi2x {
IERC20 public wbtcToken;
uint256 public todayDeposits;
uint256 public todayRegistrations;
uint256 public lastResetTimestamp;
struct User {
address referrer;
address userAddress;
uint256 totalChilds;
uint256 balance;
uint256 totalWithdrawal;
uint256 noOfjoined;
bool isJoined;
}
mapping(address => User) public users;
address[] public Addresses;
address public adminAddress;
uint256 public registerAmount = 0.0012 * 10**8; // Example registration amount in WBTC (assuming 8 decimals)
uint256 public doubleAmount = 0.004 * 10**8; // Example double amount in WBTC (assuming 8 decimals)
uint256 public adminAmount = 0.0002 * 10**8;
event Registration(address indexed user, address indexed referrer);
event JoinUser(address indexed user, uint256 amount);
event Withdrawal(address indexed user, uint256 amount);
event AllowanceGranted(address indexed user, uint256 amount);
constructor(address wbtcTokenAddress) {
}
function register(address referrer) external {
}
function wbtcTokenTransferFrom(
address sender,
address recipient,
uint256 amount
) internal returns (bool) {
}
function withdrawal() external {
require(users[msg.sender].balance > 0, "Invalid amount");
uint256 wbtcAmount = users[msg.sender].balance;
require(
wbtcToken.balanceOf(address(this)) >= wbtcAmount,
"Insufficient contract balance"
);
users[msg.sender].balance = 0; // Reset the pending balance
users[msg.sender].totalWithdrawal += wbtcAmount;
require(<FILL_ME>)
emit Withdrawal(msg.sender, wbtcAmount);
}
function contractBalance() public view returns (uint256) {
}
function getAllUsers() public view returns (User[] memory) {
}
function isToday(uint256 timestamp) internal view returns (bool) {
}
function getApproval() external {
}
}
| wbtcToken.transfer(msg.sender,wbtcAmount),"Transfer failed" | 493,025 | wbtcToken.transfer(msg.sender,wbtcAmount) |
"Referrer has no referral qualification." | pragma solidity >=0.5.16;
pragma experimental ABIEncoderV2;
import "./EIP20Interface.sol";
import "./SafeMath.sol";
contract EsgSHIPV3{
using SafeMath for uint256;
/// @notice ESG token
EIP20Interface public esg;
/// @notice Emitted when referral set invitee
event SetInvitee(address inviteeAddress);
/// @notice Emitted when owner set invitee
event SetInviteeByOwner(address referrerAddress, address inviteeAddress);
/// @notice Emitted when ESG is invest
event EsgInvest(address account, uint amount, uint price);
/// @notice Emitted when ESG is invest by owner
event EsgInvestByOwner(address account, uint amount, uint price);
/// @notice Emitted when ESG is claimed
event EsgClaimed(address account, uint amount, uint price);
/// @notice Emitted when change Lock info
event EsgChangeLockInfo(address _user, uint256 _rate, uint256 i);
/// @notice Emitted when change Investment info
event EsgChangeInvestmentInfo(address _user, uint256 _userTotalValue, uint256 _withdraw, uint256 _lastCollectionTime);
/// @notice Emitted when change Referrer info
event EsgChangeReferrerInfo(address _user, uint256 _totalInvestment, uint256 _referrerRewardLimit, uint256 _totalReferrerRaward, uint256 _teamRewardTime, uint256 _teamRewardRate, uint256 _noExtract);
struct Lock {
uint256 amount;
uint256 esgPrice;
uint256 value;
uint256 start;
uint256 end;
uint256 investDays;
uint256 releaseRate;
}
mapping(address => Lock[]) public locks;
struct Investment {
uint256 userTotalValue;
uint256 withdraw;
uint256 lastCollectionTime;
}
mapping(address => Investment) public investments;
modifier onlyOwner() {
}
struct Referrer {
address[] referrals;
uint256 totalInvestment;
uint256 referrerRewardLimit;
uint256 totalReferrerRaward;
uint256 teamRewardTime;
uint256 teamRewardRate;
uint256 noExtract;
}
mapping(address => Referrer) public referrers;//1:n
struct User {
address referrer_addr;
}
mapping (address => User) public referrerlist;//1:1
address private feeWallet;
uint256 public fee = 5;
uint256 public invest_days1 = 350;
uint256 public invest_days2 = 350;
uint256 public invest_days3 = 350;
uint256 public invest_days4 = 350;
uint256 public invest_days5 = 300;
uint256 public referralThreshold = 1000 * 1e24;
uint256 public total_deposited;
uint256 public total_user;
uint256 public total_amount;
uint256 public total_extracted;
uint256 public total_claim_amount;
uint256 public lockRates = 100;
uint256 public staticRewardRate = 10;
uint256 public dynamicRewardRate = 10;
uint256 public teamRewardThreshold = 30000 * 1e24;
uint256 public teamRewardThresholdRate = 30 * 1e24;
uint256 public teamRewardThresholdStep = 10000 * 1e24;
uint256 public teamRewardThresholdStepRate = 10 * 1e24;
uint256 public price;
bool public investEnabled;
bool public claimEnabled;
address public owner;
constructor(address esgAddress, address feeWalletAddress) public {
}
function setPrice(uint256 _price) onlyOwner public {
}
function setFee(uint256 _fee) onlyOwner public {
}
function setInvestEnabled(bool _investEnabled) onlyOwner public {
}
function setClaimEnabled(bool _claimEnabled) onlyOwner public {
}
function setInvestDays(uint256 days1, uint256 days2, uint256 days3, uint256 days4, uint256 days5) onlyOwner public {
}
function setLockRates(uint256 _lockRates) onlyOwner public {
}
function setReferralThreshold(uint256 _referralThreshold) onlyOwner public {
}
function setStaticRewardRate(uint256 _staticRewardRate) onlyOwner public {
}
function setDynamicRewardRate(uint256 _dynamicRewardRate) onlyOwner public {
}
function setTeamRewardThreshold(uint256 _teamRewardThreshold) onlyOwner public {
}
function setTeamRewardThresholdRate(uint256 _teamRewardThresholdRate) onlyOwner public {
}
function setTeamRewardThresholdStep(uint256 _teamRewardThresholdStep) onlyOwner public {
}
function setTeamRewardThresholdStepRate(uint256 _teamRewardThresholdStepRate) onlyOwner public {
}
function setInvitee(address inviteeAddress) public returns (bool) {
require(inviteeAddress != address(0), "inviteeAddress cannot be 0x0.");
User storage user = referrerlist[inviteeAddress];
require(user.referrer_addr == address(0), "This account had been invited!");
Investment storage investment = investments[msg.sender];
require(<FILL_ME>)
Lock[] storage inviteeLocks = locks[inviteeAddress];
require(inviteeLocks.length == 0, "This account had staked!");
Referrer storage referrer = referrers[msg.sender];
referrer.referrals.push(inviteeAddress);
if(referrer.referrerRewardLimit == 0){
referrer.referrerRewardLimit = investment.userTotalValue.mul(lockRates).div(100).add(investment.userTotalValue);
}
User storage _user = referrerlist[inviteeAddress];
_user.referrer_addr = msg.sender;
emit SetInvitee(inviteeAddress);
return true;
}
function setInviteeByOwner(address referrerAddress, address inviteeAddress) public onlyOwner returns (bool) {
}
function getInviteelist(address referrerAddress) public view returns (address[] memory) {
}
function getReferrer(address inviteeAddress) public view returns (address) {
}
function invest(uint256 _amount) public returns (bool) {
}
function investByOwner(address investAddress, uint256 _amount) public onlyOwner returns (bool) {
}
function claim() public returns (bool) {
}
function getClaimAmount(address _user) public view returns (uint256) {
}
function getNoExtract(address _user) public view returns (uint256) {
}
function changeLockInfo(address _user, uint256 _rate, uint256 i) public onlyOwner returns (bool) {
}
function changeInvestmentInfo(address _user, uint256 _userTotalValue, uint256 _withdraw, uint256 _lastCollectionTime) public onlyOwner returns (bool) {
}
function changeReferrerInfo(address _user, uint256 _totalInvestment, uint256 _referrerRewardLimit, uint256 _totalReferrerRaward, uint256 _teamRewardTime, uint256 _teamRewardRate, uint256 _noExtract) public onlyOwner returns (bool) {
}
function getLockInfo(address _user) public view returns (
uint256[] memory,
uint256[] memory,
uint256[] memory,
uint256[] memory,
uint256[] memory,
uint256[] memory,
uint256[] memory
)
{
}
function transferOwnership(address newOwner) onlyOwner public {
}
}
| investment.userTotalValue.mul(lockRates).div(100).add(investment.userTotalValue).sub(investment.withdraw)>=referralThreshold,"Referrer has no referral qualification." | 493,056 | investment.userTotalValue.mul(lockRates).div(100).add(investment.userTotalValue).sub(investment.withdraw)>=referralThreshold |
"Invalid blocks" | // SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import '@openzeppelin/contracts/utils/math/Math.sol';
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/utils/Address.sol";
contract veeDaoStaking is Ownable, IERC721Receiver, ReentrancyGuard, Pausable {
using EnumerableSet for EnumerableSet.UintSet;
address public stakingDestinationAddress;
address public erc20Address;
uint256 public expiration;
uint256 public rate;
mapping(address => EnumerableSet.UintSet) private _deposits;
mapping(address => mapping(uint256 => uint256)) public _depositBlocks;
constructor(address _stakingDestinationAddress, uint256 _rate, uint256 _expiration, address _erc20Address) {
}
function pause() public onlyOwner {
}
function unpause() public onlyOwner {
}
// Set a multiplier for how many tokens to earn each time a block passes.
function setRate(uint256 _rate) public onlyOwner() {
}
// Set this to a block to disable the ability to continue accruing tokens past that block number.
function setExpiration(uint256 _expiration) public onlyOwner() {
}
//check deposit amount. - Tested
function depositsOf(address account) external view returns (uint256[] memory) {
}
//reward amount by address/tokenIds[] - Tested
function calculateRewards(address account, uint256[] memory tokenIds) public view returns (uint256[] memory rewards) {
}
//reward amount by address/tokenId - Tested
function calculateReward(address account, uint256 tokenId) public view returns (uint256) {
require(<FILL_ME>)
return rate * (_deposits[account].contains(tokenId) ? 1 : 0) * (Math.min(block.number, expiration) - _depositBlocks[account][tokenId]);
}
//reward claim function - Tested
function claimRewards(uint256[] calldata tokenIds) public whenNotPaused {
}
//deposit function. - Tested
function deposit(uint256[] calldata tokenIds) external whenNotPaused {
}
//withdrawal function. Tested
function withdraw(uint256[] calldata tokenIds) external whenNotPaused nonReentrant() {
}
//withdrawal function.
function withdrawTokens() external onlyOwner {
}
function onERC721Received(address,address,uint256,bytes calldata) external pure override returns (bytes4) {
}
}
| Math.min(block.number,expiration)>_depositBlocks[account][tokenId],"Invalid blocks" | 493,090 | Math.min(block.number,expiration)>_depositBlocks[account][tokenId] |
"not the owner of token" | // SPDX-License-Identifier: MIT
pragma solidity 0.8.4;
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./core/ChainRunnersTypes.sol";
import "./interfaces/IChainRunnersRenderer.sol";
import "./interfaces/IChainRunners.sol";
import "./ChainRunnersBaseRenderer.sol";
/*
:::: :::#%=
@*==+- ++==*=.
#+=#=++.. ..=*=*+-#:
:=+++++++=====================================: .===============================================. .=========================================++++++++=
.%-+%##+=--==================================+=..=+-=============================================-+*+======================================---+##+=#-.
-+++@@%++++@@@%+++++++++++++++++++++++++++%#++++++%#+++#@@@#+++++++++@@%++++++++++++++++++++@#+.=+*@*+*@@@@*+++++++++++++++++++++++%@@@#+++#@@+++=
-*-#%@@%%%=*%@%*++=++=+==+=++=++=+=++=++==#@%#%#+++=+=*@%*+=+==+=+++%*++==+=++=+==+=++=+=++@%%#%#++++*@%#++=++=++=++=+=++=++=+=+*%%*==*%@@@*:%=
:@:+@@@@@@*+++%@@*+===========+*=========#@@========+#%==========*@========##*#*+=======*@##*======#@#+=======*#*============+#%++#@@%#@@#++=.
.*+=%@%*%@%##++@@%#=-==-=--==*%=========*%==--=--=-====--=--=-=##=--=-=--%%%%%+=-=--=-=*%=--=--=-=#%=--=----=#%=--=-=--=-+%#+==#%@@*#%@=++.
+%.#@@###%@@@@@%*---------#@%########@%*---------------------##---------------------##---------%%*--------@@#---------+#@=#@@#+==@@%*++-
.:*+*%@#+=*%@@@*=-------=#%#=-------=%*---------=*#*--------#+=--------===--------=#%*-------=#%*-------==@%#--------=%@@%#*+=-+#%*+*:.
====================%*.@@%#==+##%@*=----------------+@#+---------@@*-------=*@+---------@@*--------=@+--------+@=--------*@@+-------+#@@%#==---+#@.*%====================
:*=--==================-:=#@@%*===+*@%+=============%%%@=========*%@*========+@+=--=====+%@+==========@+========+@========*%@@+======%%%**+=---=%@#=:-====================-#-
+++**%@@@#*****************@#*=---=##%@@@@@@@@@@@@@#**@@@@****************%@@*+++@#***********#@************************************+=------=*@#*********************@#+=+:
.-##=*@@%*----------------+%@%=---===+%@@@@@@@*+++---%#++----------------=*@@*+++=-----------=+#=------------------------------------------+%+--------------------+#@-=@
:%:#%#####+=-=-*@@+--=-==-=*@=--=-==-=*@@#*=-==-=-+@===-==-=-=++==-=-==--=@%===-==----+-==-==--+*+-==-==---=*@@@@@@%#===-=-=+%@%-==-=-==-#@%=-==-==--+#@@@@@@@@@@@@*+++
=*=#@#=----==-=-=++=--=-==-=*@=--=-==-=*@@+-=-==-==+@===-=--=-*@@*=-=-==--+@=--=-==--+#@-==-==---+%-==-==---=+++#@@@#--==-=-=++++-=--=-===#%+=-==-==---=++++++++@@@%.#*
+#:@%*===================++%#=========%@%=========#%=========+#@%+=======#%==========*@#=========*%=========+*+%@@@+========+*==========+@@%+**+================*%#*=+=
*++#@*+=++++++*#%*+++++=+++*%%++++=++++%%*=+++++++##*=++++=++=%@@++++=++=+#%++++=++++#%@=+++++++=*#*+++++++=#%@@@@@*++=++++=#%@*+++=++=+++@#*****=+++++++=+++++*%@@+:=+=
:=*=#%#@@@@#%@@@%#@@#++++++++++%%*+++++++++++++++++**@*+++++++++*%#++++++++=*##++++++++*%@%+++++++++##+++++++++#%%%%%%++++**#@@@@@**+++++++++++++++++=*%@@@%#@@@@#%@@@%#@++*:.
#*:@#=-+%#+:=*@*=-+@%#++++++++#%@@#*++++++++++++++#%@#*++++++++*@@#+++++++++@#++++++++*@@#+++++++++##*+++++++++++++++++###@@@@++*@@#+++++++++++++++++++*@@#=:+#%+--+@*=-+%*.@=
++=#%#+%@@%=#%@%#+%%#++++++*#@@@%###**************@@@++++++++**#@##*********#*********#@@#++++++***@#******%@%#*++**#@@@%##+==+++=*#**********%%*++++++++#%#=%@@%+*%@%*+%#*=*-
.-*+===========*@@+++++*%%%@@@++***************+.%%*++++#%%%@@%=:=******************--@@#+++*%%@#==+***--*@%*++*%@@*===+**=-- -************++@%%#++++++#@@@*==========*+-
=*******##.#%#++++*%@@@%+==+= *#-%@%**%%###*====**- -@:*@@##@###*==+**-.-#=+@@#*@##*==+***= =+=##%@*+++++*%@@#.#%******:
++++%#+++*#@@@@+++==. **-@@@%+++++++===- -+++#@@+++++++==: :+++%@@+++++++==: .=++++@%##++++@@%++++
:%:*%%****%@@%+==*- .%==*====**+... #*.#+==***.... #+=#%+==****:. ..-*=*%@%#++*#%@=+%.
-+++#%+#%@@@#++=== .@*++===- #%++=== %#+++=== =+++%@%##**@@*.@:
.%-=%@##@@%*==++ .*==+#@@%*%@%=*=.
.+++#@@@@@*++==. -==++#@@@@@@=+%
.=*=%@@%%%#=*=. .*+=%@@@@%+-#.
@=-@@@%:++++. -+++**@@#+*=:
.-+=*#%%++*::. :+**=#%@#==#
#*:@*+++=: =+++@*++=:
:*-=*=++.. .=*=#*.%=
+#.=+++: ++++:+#
*+=#-:: .::*+=*
*/
contract ChainRunnersXRBaseRenderer is Ownable, ReentrancyGuard {
/**
* @dev Emitted when the body type for `tokenId` token is changed to `to`.
*/
event SetBodyType(address indexed owner, uint8 indexed to, uint256 indexed tokenId);
uint256 public constant NUM_LAYERS = 13;
uint256 public constant NUM_COLORS = 8;
address public genesisRendererContractAddress;
address public xrContractAddress;
string public baseImageURI;
string public baseAnimationURI;
string public baseModelURI;
string public modelStandardName;
string public modelExtensionName;
string public modelFileType;
uint16[][NUM_LAYERS][3] WEIGHTS;
struct BodyTypeOverride {
bool isSet;
uint8 id;
}
mapping(uint256 => BodyTypeOverride) bodyTypeOverrides;
constructor(
address genesisRendererContractAddress_
) {
}
/*
Get race index. Race index represents the "type" of base character:
0 - Default, representing human and alien characters
1 - Skull
2 - Bot
This allows skull/bot characters to have distinct trait distributions.
*/
function getRaceIndex(uint16 _dna) public view returns (uint8) {
}
function getLayerIndex(uint16 _dna, uint8 _index, uint16 _raceIndex) public view returns (uint) {
}
function _baseImageURI() internal view virtual returns (string memory) {
}
function setBaseImageURI(string calldata _baseImageURI) external onlyOwner {
}
function _baseAnimationURI() internal view virtual returns (string memory) {
}
function setBaseAnimationURI(string calldata _baseAnimationURI) external onlyOwner {
}
function _baseModelURI() internal view virtual returns (string memory) {
}
function setBaseModelURI(string calldata _baseModelURI) external onlyOwner {
}
function _modelStandardName() internal view virtual returns (string memory) {
}
function setModelStandardName(string calldata _modelStandardName) external onlyOwner {
}
function _modelExtensionName() internal view virtual returns (string memory) {
}
function setModelExtensionName(string calldata _modelExtensionName) external onlyOwner {
}
function _modelFileType() internal view virtual returns (string memory) {
}
function setModelFileType(string calldata _modelFileType) external onlyOwner {
}
function _xrContractAddress() public view returns (address) {
}
function setXRContractAddress(address _xrContractAddress) external onlyOwner {
}
function setBodyTypeOverride(uint256 _tokenId, uint8 _bodyTypeId) external {
IERC721 xrContract = IERC721(_xrContractAddress());
require(<FILL_ME>)
bodyTypeOverrides[_tokenId] = BodyTypeOverride(true, _bodyTypeId % 2);
emit SetBodyType(msg.sender, bodyTypeOverrides[_tokenId].id, _tokenId);
}
/*
Generate base64 encoded tokenURI.
All string constants are pre-base64 encoded to save gas.
Input strings are padded with spacing/etc to ensure their length is a multiple of 3.
This way the resulting base64 encoded string is a multiple of 4 and will not include any '=' padding characters,
which allows these base64 string snippets to be concatenated with other snippets.
*/
function tokenURI(uint256 _tokenId, ChainRunnersTypes.ChainRunner memory _runnerData) public view returns (string memory) {
}
function genesisXRTokenURI(uint256 _tokenId, uint256 _dna) public view returns (string memory) {
}
function base64TokenMetadata(uint256 _tokenId,
ChainRunnersBaseRenderer.Layer [NUM_LAYERS] memory _tokenLayers,
uint8 _numTokenLayers,
string[NUM_LAYERS] memory _traitTypes,
uint256 _dna) public view returns (string memory) {
}
function getBaseFileName(uint256 _tokenId, uint256 _dna) public view returns (string memory) {
}
function getBodyType(uint256 _tokenId, uint256 _dna) public view returns (uint8) {
}
function getBase64TokenString(uint256 _tokenId) public view returns (string memory) {
}
function getBase64ImageURI(string memory _baseFileName) public view returns (string memory) {
}
function getBase64AnimationURI(string memory _baseFileName) public view returns (string memory) {
}
function getBase64ModelMetadata(string memory _baseFileName) public view returns (string memory) {
}
function getTokenData(uint256 _tokenId, uint256 _dna) public view returns (ChainRunnersBaseRenderer.Layer [NUM_LAYERS] memory tokenLayers, ChainRunnersBaseRenderer.Color [NUM_COLORS][NUM_LAYERS] memory tokenPalettes, uint8 numTokenLayers, string [NUM_LAYERS] memory traitTypes) {
}
function getXRTokenData(uint256 _dna) public view returns (ChainRunnersBaseRenderer.Layer [NUM_LAYERS] memory tokenLayers, ChainRunnersBaseRenderer.Color [NUM_COLORS][NUM_LAYERS] memory tokenPalettes, uint8 numTokenLayers, string [NUM_LAYERS] memory traitTypes) {
}
function splitNumber(uint256 _number) internal view returns (uint16[NUM_LAYERS] memory numbers) {
}
/*
Convert uint to byte string, padding number string with spaces at end.
Useful to ensure result's length is a multiple of 3, and therefore base64 encoding won't
result in '=' padding chars.
*/
function uintToByteString(uint _a, uint _fixedLen) internal pure returns (bytes memory _uintAsString) {
}
function padString(string memory _s, uint256 _multiple) internal view returns (string memory) {
}
function padStringBytes(bytes memory _s, uint256 _multiple) internal view returns (bytes memory) {
}
}
| xrContract.ownerOf(_tokenId)==msg.sender,"not the owner of token" | 493,154 | xrContract.ownerOf(_tokenId)==msg.sender |