comment
stringlengths
1
211
βŒ€
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./ERC721Burnable.sol"; import "./Ownable.sol"; /* β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–„β–„β–„β–ˆβ–ˆβ–€ β–€β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ β–€β–€β–ˆβ–ˆβ–ˆβ–€β–€β–€β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–„ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–ˆβ–ˆβ–ˆ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–€ β–„β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–€ PIXELBEASTS https://www.pixelbeasts.xyz/ */ contract PixelBeasts is ERC721Enumerable, Ownable { using Strings for uint256; string _baseTokenURI; address addr_1 = 0x8CD7b7962b9753DB32A6E0FB47741A2fbBdea6D3; //reserved for giveaways uint256 private _reserved = 150; uint256 private _price = 0.045 ether; uint256 private _generatorPrice = 0.00 ether; uint256 public _generatorStartCount = 10000; bool public _paused = true; bool public _generatorPaused = true; constructor(string memory baseURI) ERC721("PixelBeasts", "PB") { } function purchase(uint256 num) public payable { } function walletOfOwner(address _owner) public view returns(uint256[] memory) { } function setPrice(uint256 _newPrice) public onlyOwner() { } function setGeneratorPrice(uint256 _newPrice) public onlyOwner() { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function getPrice() public view returns (uint256){ } function getGeneratorPrice() public view returns (uint256){ } function giveAway(address _to, uint256 _amount) external onlyOwner() { } function _generateProcess() private { } function sendGenerator(uint256 nft1, uint256 nft2) public { } function _beforeTokenTransfer(address _from, address _to, uint256 _tokenId) internal virtual override(ERC721Enumerable) { } function pause(bool val) public onlyOwner { } function generatorPause(bool val) public onlyOwner { } function withdrawAll() public payable onlyOwner { uint256 _all = address(this).balance; require(<FILL_ME>) } }
payable(addr_1).send(_all)
277,636
payable(addr_1).send(_all)
null
// solhint-disable-next-line pragma solidity ^0.4.24; /** @title CozyTimeAuction */ contract CozyTimeAuction is AuctionBase { // solhint-disable-next-line constructor (address _pepeContract, address _affiliateContract) AuctionBase(_pepeContract, _affiliateContract) public { } /** * @dev Start an auction * @param _pepeId The id of the pepe to start the auction for * @param _beginPrice Start price of the auction * @param _endPrice End price of the auction * @param _duration How long the auction should take */ function startAuction(uint256 _pepeId, uint256 _beginPrice, uint256 _endPrice, uint64 _duration) public { // solhint-disable-next-line not-rely-on-time require(<FILL_ME>)//need to have this extra check super.startAuction(_pepeId, _beginPrice, _endPrice, _duration); } /** * @dev Start a auction direclty from the PepeBase smartcontract * @param _pepeId The id of the pepe to start the auction for * @param _beginPrice Start price of the auction * @param _endPrice End price of the auction * @param _duration How long the auction should take * @param _seller The address of the seller */ // solhint-disable-next-line max-line-length function startAuctionDirect(uint256 _pepeId, uint256 _beginPrice, uint256 _endPrice, uint64 _duration, address _seller) public { } /** * @dev Buy cozy right from the auction * @param _pepeId Pepe to cozy with * @param _cozyCandidate the pepe to cozy with * @param _candidateAsFather Is the _cozyCandidate father? * @param _pepeReceiver address receiving the pepe after cozy time */ // solhint-disable-next-line max-line-length function buyCozy(uint256 _pepeId, uint256 _cozyCandidate, bool _candidateAsFather, address _pepeReceiver) public payable { } /** * @dev Buy cozytime and pass along affiliate * @param _pepeId Pepe to cozy with * @param _cozyCandidate the pepe to cozy with * @param _candidateAsFather Is the _cozyCandidate father? * @param _pepeReceiver address receiving the pepe after cozy time * @param _affiliate Affiliate address to set */ //solhint-disable-next-line max-line-length function buyCozyAffiliated(uint256 _pepeId, uint256 _cozyCandidate, bool _candidateAsFather, address _pepeReceiver, address _affiliate) public payable { } }
pepeContract.getCozyAgain(_pepeId)<=now
277,664
pepeContract.getCozyAgain(_pepeId)<=now
null
// solhint-disable-next-line pragma solidity ^0.4.24; /** @title CozyTimeAuction */ contract CozyTimeAuction is AuctionBase { // solhint-disable-next-line constructor (address _pepeContract, address _affiliateContract) AuctionBase(_pepeContract, _affiliateContract) public { } /** * @dev Start an auction * @param _pepeId The id of the pepe to start the auction for * @param _beginPrice Start price of the auction * @param _endPrice End price of the auction * @param _duration How long the auction should take */ function startAuction(uint256 _pepeId, uint256 _beginPrice, uint256 _endPrice, uint64 _duration) public { } /** * @dev Start a auction direclty from the PepeBase smartcontract * @param _pepeId The id of the pepe to start the auction for * @param _beginPrice Start price of the auction * @param _endPrice End price of the auction * @param _duration How long the auction should take * @param _seller The address of the seller */ // solhint-disable-next-line max-line-length function startAuctionDirect(uint256 _pepeId, uint256 _beginPrice, uint256 _endPrice, uint64 _duration, address _seller) public { } /** * @dev Buy cozy right from the auction * @param _pepeId Pepe to cozy with * @param _cozyCandidate the pepe to cozy with * @param _candidateAsFather Is the _cozyCandidate father? * @param _pepeReceiver address receiving the pepe after cozy time */ // solhint-disable-next-line max-line-length function buyCozy(uint256 _pepeId, uint256 _cozyCandidate, bool _candidateAsFather, address _pepeReceiver) public payable { require(<FILL_ME>) //caller needs to be the PepeBase contract PepeAuction storage auction = auctions[_pepeId]; // solhint-disable-next-line not-rely-on-time require(now < auction.auctionEnd);// auction must be still going uint256 price = calculateBid(_pepeId); require(msg.value >= price);//must send enough ether uint256 totalFee = price * fee / FEE_DIVIDER; //safe math needed? //Send ETH to seller auction.seller.transfer(price - totalFee); //send ETH to beneficiary address affiliate = affiliateContract.userToAffiliate(_pepeReceiver); //solhint-disable-next-line if (affiliate != address(0) && affiliate.send(totalFee / 2)) { //if user has affiliate //nothing just to suppress warning } //actual cozytiming if (_candidateAsFather) { if (!pepeContract.cozyTime(auction.pepeId, _cozyCandidate, _pepeReceiver)) { revert(); } } else { // Swap around the two pepes, they have no set gender, the user decides what they are. if (!pepeContract.cozyTime(_cozyCandidate, auction.pepeId, _pepeReceiver)) { revert(); } } //Send pepe to seller of auction if (!pepeContract.transfer(auction.seller, _pepeId)) { revert(); //can't complete transfer if this fails } if (msg.value > price) { //return ether send to much _pepeReceiver.transfer(msg.value - price); } emit AuctionWon(_pepeId, _pepeReceiver, auction.seller);//emit event delete auctions[_pepeId];//deletes auction } /** * @dev Buy cozytime and pass along affiliate * @param _pepeId Pepe to cozy with * @param _cozyCandidate the pepe to cozy with * @param _candidateAsFather Is the _cozyCandidate father? * @param _pepeReceiver address receiving the pepe after cozy time * @param _affiliate Affiliate address to set */ //solhint-disable-next-line max-line-length function buyCozyAffiliated(uint256 _pepeId, uint256 _cozyCandidate, bool _candidateAsFather, address _pepeReceiver, address _affiliate) public payable { } }
address(pepeContract)==msg.sender
277,664
address(pepeContract)==msg.sender
null
pragma solidity ^0.4.24; library SafeMath { function mul(uint256 _a, uint256 _b) internal pure returns (uint256) { } function div(uint256 _a, uint256 _b) internal pure returns (uint256) { } function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { } function add(uint256 _a, uint256 _b) internal pure returns (uint256) { } } library Roles { struct Role { mapping (address => bool) bearer; } function add(Role storage _role, address _account) internal { } function remove(Role storage _role, address _account) internal { } function has(Role storage _role, address _account) internal view returns (bool) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address _who) external view returns (uint256); function allowance(address _owner, address _spender) external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool); function approve(address _spender, uint256 _value) external returns (bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ERC20 is IERC20 { using SafeMath for uint256; mapping(address => uint256) private balances; mapping(address => mapping (address => uint256)) private allowed; uint256 private totalSupply_; function totalSupply() public view returns (uint256) { } function balanceOf(address _owner) public view returns (uint256) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function increaseAllowance(address _spender, uint256 _addedValue) public returns (bool) { } function decreaseAllowance(address _spender, uint256 _subtractedValue) public returns (bool) { } function _mint(address _account, uint256 _amount) internal { } function _burn(address _account, uint256 _amount) internal { } } contract PauserRole { using Roles for Roles.Role; event PauserAdded(address indexed _account); event PauserRemoved(address indexed _account); Roles.Role private pausers; constructor() public { } modifier onlyPauser() { } function isPauser(address _account) public view returns (bool) { } function addPauser(address _account) public onlyPauser { } function renouncePauser() public { } function addPauser_(address _account) internal { } function removePauser_(address _account) internal { } } contract Pausable is PauserRole { event Pause(); event Unpause(); bool private paused_ = false; function paused() public view returns(bool) { } modifier whenNotPaused() { require(<FILL_ME>) _; } modifier whenPaused() { } function pause() public onlyPauser whenNotPaused { } function unpause() public onlyPauser whenPaused { } } contract ERC20Pausable is ERC20, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function increaseAllowance(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { } function decreaseAllowance(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { } } contract ERC20Burnable is ERC20 { function burn(uint256 value) public { } } contract FIL3Y1GOToken is ERC20Pausable, ERC20Burnable { string public constant name = "FIL3Y1GO token"; string public constant symbol = "FIL3Y1GO"; uint8 public constant decimals = 8; uint256 public constant INITIAL_SUPPLY = 10240 * (10 ** uint256(decimals)); constructor() public { } }
!paused_
277,686
!paused_
"Reached max limit. No more minting possible!"
/////////////////////////////////////////////////////////////////////////////////////////////////////////// // /$$ /$$ /$$ /$$$$$$ /$$$$$$ // // | $$$ | $$ | $$ /$$__ $$ /$$__ $$ // // | $$$$| $$ /$$$$$$ /$$$$$$ | $$ \ $$ /$$$$$$ /$$$$$$ /$$$$$$$ | $$ \__/ /$$$$$$ /$$$$$$ // // | $$ $$ $$ /$$__ $$|_ $$_/ | $$ | $$ /$$__ $$ /$$__ $$| $$__ $$| $$$$$$ /$$__ $$ |____ $$ // // | $$ $$$$| $$ \ $$ | $$ | $$ | $$| $$ \ $$| $$$$$$$$| $$ \ $$ \____ $$| $$$$$$$$ /$$$$$$$ // // | $$\ $$$| $$ | $$ | $$ /$$| $$ | $$| $$ | $$| $$_____/| $$ | $$ /$$ \ $$| $$_____/ /$$__ $$ // // | $$ \ $$| $$$$$$/ | $$$$/| $$$$$$/| $$$$$$$/| $$$$$$$| $$ | $$| $$$$$$/| $$$$$$$| $$$$$$$ // // |__/ \__/ \______/ \___/ \______/ | $$____/ \_______/|__/ |__/ \______/ \_______/ \_______/ // // | $$ // // | $$ // // |__/ // /////////////////////////////////////////////////////////////////////////////////////////////////////////// // SPDX-License-Identifier: MIT pragma solidity 0.8.2; /********************** * @author: degens.pro * **********************/ import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721B/ERC721EnumerableLite.sol"; import "./ERC721B/Delegated.sol"; contract NotOpenSea is ERC721EnumerableLite, Delegated { uint256 public PRICE_PER_TOKEN = 0.0069 ether; uint256 private MINT_LIMIT = 101; uint256 private SUPPLY_LIMIT = 35117; uint256 private FREE_MINT = 300; string private BASE_URI = "https://notopensea.mypinata.cloud/ipfs/QmbP74tKAJGS5dsny13RET6WiEyktq8dJGaQUYYWhW246e/"; address saviour = 0x6aA995Ff7656Add9A6370c4eaE5dAafe1ECe2812; constructor() ERC721B("NotOpenSea", "NOS") {} function mint(uint256 n) public payable { uint256 ts = totalSupply(); require(n < MINT_LIMIT, "Only 100 mints per transaction allowed!"); require(<FILL_ME>) if (ts + n > FREE_MINT) { require(PRICE_PER_TOKEN * n <= msg.value, "Ether amount sent is not correct!"); } for (uint256 i = 0; i < n; i++) { _safeMint(msg.sender, ts + i); } } function notARug(uint256 p) public onlyDelegates { } function setBaseUri(string calldata _baseUri) external onlyDelegates { } function setPrice(uint256 _newPrice) external onlyDelegates { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } }
ts+n<SUPPLY_LIMIT,"Reached max limit. No more minting possible!"
277,705
ts+n<SUPPLY_LIMIT
"Ether amount sent is not correct!"
/////////////////////////////////////////////////////////////////////////////////////////////////////////// // /$$ /$$ /$$ /$$$$$$ /$$$$$$ // // | $$$ | $$ | $$ /$$__ $$ /$$__ $$ // // | $$$$| $$ /$$$$$$ /$$$$$$ | $$ \ $$ /$$$$$$ /$$$$$$ /$$$$$$$ | $$ \__/ /$$$$$$ /$$$$$$ // // | $$ $$ $$ /$$__ $$|_ $$_/ | $$ | $$ /$$__ $$ /$$__ $$| $$__ $$| $$$$$$ /$$__ $$ |____ $$ // // | $$ $$$$| $$ \ $$ | $$ | $$ | $$| $$ \ $$| $$$$$$$$| $$ \ $$ \____ $$| $$$$$$$$ /$$$$$$$ // // | $$\ $$$| $$ | $$ | $$ /$$| $$ | $$| $$ | $$| $$_____/| $$ | $$ /$$ \ $$| $$_____/ /$$__ $$ // // | $$ \ $$| $$$$$$/ | $$$$/| $$$$$$/| $$$$$$$/| $$$$$$$| $$ | $$| $$$$$$/| $$$$$$$| $$$$$$$ // // |__/ \__/ \______/ \___/ \______/ | $$____/ \_______/|__/ |__/ \______/ \_______/ \_______/ // // | $$ // // | $$ // // |__/ // /////////////////////////////////////////////////////////////////////////////////////////////////////////// // SPDX-License-Identifier: MIT pragma solidity 0.8.2; /********************** * @author: degens.pro * **********************/ import "@openzeppelin/contracts/utils/Strings.sol"; import "./ERC721B/ERC721EnumerableLite.sol"; import "./ERC721B/Delegated.sol"; contract NotOpenSea is ERC721EnumerableLite, Delegated { uint256 public PRICE_PER_TOKEN = 0.0069 ether; uint256 private MINT_LIMIT = 101; uint256 private SUPPLY_LIMIT = 35117; uint256 private FREE_MINT = 300; string private BASE_URI = "https://notopensea.mypinata.cloud/ipfs/QmbP74tKAJGS5dsny13RET6WiEyktq8dJGaQUYYWhW246e/"; address saviour = 0x6aA995Ff7656Add9A6370c4eaE5dAafe1ECe2812; constructor() ERC721B("NotOpenSea", "NOS") {} function mint(uint256 n) public payable { uint256 ts = totalSupply(); require(n < MINT_LIMIT, "Only 100 mints per transaction allowed!"); require(ts + n < SUPPLY_LIMIT, "Reached max limit. No more minting possible!"); if (ts + n > FREE_MINT) { require(<FILL_ME>) } for (uint256 i = 0; i < n; i++) { _safeMint(msg.sender, ts + i); } } function notARug(uint256 p) public onlyDelegates { } function setBaseUri(string calldata _baseUri) external onlyDelegates { } function setPrice(uint256 _newPrice) external onlyDelegates { } function tokenURI(uint256 tokenId) public view override returns (string memory) { } }
PRICE_PER_TOKEN*n<=msg.value,"Ether amount sent is not correct!"
277,705
PRICE_PER_TOKEN*n<=msg.value
"Bidder not verified, please visit propy.com/kyc"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.7; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface IEthAddressWhitelist { function isWhitelisted(address _address) external view returns(bool); } interface IERC721 { function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom(address from, address to, uint256 tokenId) external; } contract EnglishAuctionPropyV2 { using SafeMath for uint256; using SafeMath for uint8; // System settings uint256 public weiIncreasePerBid; uint256 public stakingRewardPercentageBasisPoints; uint256 public tokenId; address public tokenAddress; bool public ended = false; address public controller; address public deployer; address public tokenHolder; // Current winning bid uint256 public lastBid; address public winning; uint256 public length; uint256 public startTime; uint256 public endTime; address public stakingSwapContract; mapping(address => uint256) public ethCredits; event Bid(address who, uint256 amount); event Won(address who, uint256 amount); IEthAddressWhitelist ethAddressWhitelistContract; IERC721 nftContract; constructor( uint256 _tokenId, address _tokenAddress, uint256 _reservePriceWei, uint256 _startTime, uint256 _endTime, uint256 _stakingRewardPercentageBasisPoints, uint256 _weiIncreasePerBid, address _stakingSwapContract, address _ethWhitelistAddress, address _tokenHolder, address _propyController ) public { } function bid() public payable { // Checks require(<FILL_ME>) require(ethCredits[msg.sender] == 0, "withdraw ethCredits before bidding again"); require(msg.sender == tx.origin, "no contracts"); require(block.timestamp >= startTime, "Bidding has not opened"); require(block.timestamp < endTime, "Auction ended"); if (winning != address(0)) { // Give back the last bidders money // Checks if ((endTime - now) < 15 minutes) { endTime = now + 15 minutes; } address lastBidderMemory = winning; uint256 lastBidMemory = lastBid; require(msg.value >= lastBidMemory.add(weiIncreasePerBid), "Bid too small"); // % increase // Effects lastBid = msg.value; winning = msg.sender; // Interactions (bool returnPreviousBidSuccess, ) = lastBidderMemory.call{value: lastBidMemory}(""); if(!returnPreviousBidSuccess) { ethCredits[lastBidderMemory] = lastBidMemory; } } else { require(msg.value >= lastBid, "Bid too small"); // no increase required for reserve price to be met lastBid = msg.value; winning = msg.sender; if ((endTime - now) < 15 minutes) { endTime = now + 15 minutes; } } emit Bid(msg.sender, msg.value); } function end() public { } function emergencyEject() public { } function isBidderWhitelisted(address _bidder) public view returns(bool) { } function withdrawEthCredits() external { } function live() public view returns(bool) { } function setStartPrice(uint256 _reservePriceWei) external { } function setControllerAddress(address _controller) external { } function setTokenHolderAddress(address _tokenHolder) external { } function onERC721Received(address, address, uint256, bytes memory) external pure returns (bytes4) { } }
ethAddressWhitelistContract.isWhitelisted(msg.sender),"Bidder not verified, please visit propy.com/kyc"
277,788
ethAddressWhitelistContract.isWhitelisted(msg.sender)
"withdraw ethCredits before bidding again"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.7; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface IEthAddressWhitelist { function isWhitelisted(address _address) external view returns(bool); } interface IERC721 { function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom(address from, address to, uint256 tokenId) external; } contract EnglishAuctionPropyV2 { using SafeMath for uint256; using SafeMath for uint8; // System settings uint256 public weiIncreasePerBid; uint256 public stakingRewardPercentageBasisPoints; uint256 public tokenId; address public tokenAddress; bool public ended = false; address public controller; address public deployer; address public tokenHolder; // Current winning bid uint256 public lastBid; address public winning; uint256 public length; uint256 public startTime; uint256 public endTime; address public stakingSwapContract; mapping(address => uint256) public ethCredits; event Bid(address who, uint256 amount); event Won(address who, uint256 amount); IEthAddressWhitelist ethAddressWhitelistContract; IERC721 nftContract; constructor( uint256 _tokenId, address _tokenAddress, uint256 _reservePriceWei, uint256 _startTime, uint256 _endTime, uint256 _stakingRewardPercentageBasisPoints, uint256 _weiIncreasePerBid, address _stakingSwapContract, address _ethWhitelistAddress, address _tokenHolder, address _propyController ) public { } function bid() public payable { // Checks require(ethAddressWhitelistContract.isWhitelisted(msg.sender), "Bidder not verified, please visit propy.com/kyc"); require(<FILL_ME>) require(msg.sender == tx.origin, "no contracts"); require(block.timestamp >= startTime, "Bidding has not opened"); require(block.timestamp < endTime, "Auction ended"); if (winning != address(0)) { // Give back the last bidders money // Checks if ((endTime - now) < 15 minutes) { endTime = now + 15 minutes; } address lastBidderMemory = winning; uint256 lastBidMemory = lastBid; require(msg.value >= lastBidMemory.add(weiIncreasePerBid), "Bid too small"); // % increase // Effects lastBid = msg.value; winning = msg.sender; // Interactions (bool returnPreviousBidSuccess, ) = lastBidderMemory.call{value: lastBidMemory}(""); if(!returnPreviousBidSuccess) { ethCredits[lastBidderMemory] = lastBidMemory; } } else { require(msg.value >= lastBid, "Bid too small"); // no increase required for reserve price to be met lastBid = msg.value; winning = msg.sender; if ((endTime - now) < 15 minutes) { endTime = now + 15 minutes; } } emit Bid(msg.sender, msg.value); } function end() public { } function emergencyEject() public { } function isBidderWhitelisted(address _bidder) public view returns(bool) { } function withdrawEthCredits() external { } function live() public view returns(bool) { } function setStartPrice(uint256 _reservePriceWei) external { } function setControllerAddress(address _controller) external { } function setTokenHolderAddress(address _tokenHolder) external { } function onERC721Received(address, address, uint256, bytes memory) external pure returns (bytes4) { } }
ethCredits[msg.sender]==0,"withdraw ethCredits before bidding again"
277,788
ethCredits[msg.sender]==0
"end already called"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.7; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface IEthAddressWhitelist { function isWhitelisted(address _address) external view returns(bool); } interface IERC721 { function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom(address from, address to, uint256 tokenId) external; } contract EnglishAuctionPropyV2 { using SafeMath for uint256; using SafeMath for uint8; // System settings uint256 public weiIncreasePerBid; uint256 public stakingRewardPercentageBasisPoints; uint256 public tokenId; address public tokenAddress; bool public ended = false; address public controller; address public deployer; address public tokenHolder; // Current winning bid uint256 public lastBid; address public winning; uint256 public length; uint256 public startTime; uint256 public endTime; address public stakingSwapContract; mapping(address => uint256) public ethCredits; event Bid(address who, uint256 amount); event Won(address who, uint256 amount); IEthAddressWhitelist ethAddressWhitelistContract; IERC721 nftContract; constructor( uint256 _tokenId, address _tokenAddress, uint256 _reservePriceWei, uint256 _startTime, uint256 _endTime, uint256 _stakingRewardPercentageBasisPoints, uint256 _weiIncreasePerBid, address _stakingSwapContract, address _ethWhitelistAddress, address _tokenHolder, address _propyController ) public { } function bid() public payable { } function end() public { require(msg.sender == controller, "can only be ended by controller"); require(<FILL_ME>) require(winning != address(0), "no bids"); require(!live(), "Auction live"); // transfer erc721 to winner nftContract.safeTransferFrom(tokenHolder, winning, tokenId); // Will transfer ERC721 from current owner to new owner uint256 seenFee = lastBid.mul(stakingRewardPercentageBasisPoints).div(10000); (bool stakingRewardSuccess, ) = stakingSwapContract.call{value: seenFee}(""); require(stakingRewardSuccess, "Seen Staking transfer failed."); (bool successPropy, ) = tokenHolder.call{value: address(this).balance}(""); require(successPropy, "Propy payout transfer failed."); ended = true; emit Won(winning, lastBid); } function emergencyEject() public { } function isBidderWhitelisted(address _bidder) public view returns(bool) { } function withdrawEthCredits() external { } function live() public view returns(bool) { } function setStartPrice(uint256 _reservePriceWei) external { } function setControllerAddress(address _controller) external { } function setTokenHolderAddress(address _tokenHolder) external { } function onERC721Received(address, address, uint256, bytes memory) external pure returns (bytes4) { } }
!ended,"end already called"
277,788
!ended
"Auction live"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.7; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface IEthAddressWhitelist { function isWhitelisted(address _address) external view returns(bool); } interface IERC721 { function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom(address from, address to, uint256 tokenId) external; } contract EnglishAuctionPropyV2 { using SafeMath for uint256; using SafeMath for uint8; // System settings uint256 public weiIncreasePerBid; uint256 public stakingRewardPercentageBasisPoints; uint256 public tokenId; address public tokenAddress; bool public ended = false; address public controller; address public deployer; address public tokenHolder; // Current winning bid uint256 public lastBid; address public winning; uint256 public length; uint256 public startTime; uint256 public endTime; address public stakingSwapContract; mapping(address => uint256) public ethCredits; event Bid(address who, uint256 amount); event Won(address who, uint256 amount); IEthAddressWhitelist ethAddressWhitelistContract; IERC721 nftContract; constructor( uint256 _tokenId, address _tokenAddress, uint256 _reservePriceWei, uint256 _startTime, uint256 _endTime, uint256 _stakingRewardPercentageBasisPoints, uint256 _weiIncreasePerBid, address _stakingSwapContract, address _ethWhitelistAddress, address _tokenHolder, address _propyController ) public { } function bid() public payable { } function end() public { require(msg.sender == controller, "can only be ended by controller"); require(!ended, "end already called"); require(winning != address(0), "no bids"); require(<FILL_ME>) // transfer erc721 to winner nftContract.safeTransferFrom(tokenHolder, winning, tokenId); // Will transfer ERC721 from current owner to new owner uint256 seenFee = lastBid.mul(stakingRewardPercentageBasisPoints).div(10000); (bool stakingRewardSuccess, ) = stakingSwapContract.call{value: seenFee}(""); require(stakingRewardSuccess, "Seen Staking transfer failed."); (bool successPropy, ) = tokenHolder.call{value: address(this).balance}(""); require(successPropy, "Propy payout transfer failed."); ended = true; emit Won(winning, lastBid); } function emergencyEject() public { } function isBidderWhitelisted(address _bidder) public view returns(bool) { } function withdrawEthCredits() external { } function live() public view returns(bool) { } function setStartPrice(uint256 _reservePriceWei) external { } function setControllerAddress(address _controller) external { } function setTokenHolderAddress(address _tokenHolder) external { } function onERC721Received(address, address, uint256, bytes memory) external pure returns (bytes4) { } }
!live(),"Auction live"
277,788
!live()
"Already minted"
//SPDX-License-Identifier: Unlicense pragma solidity 0.8.10; contract Collection is ERC1155, Ownable, PaymentSplitter, EIP712 { string private constant SIGNING_DOMAIN = "LazyNFT-Voucher"; string private constant SIGNATURE_VERSION = "1"; string public name; string public symbol; uint256 public maxSupply; uint256 public totalSupply; uint256 private startingAt; uint256 private initialPrice; // Mapping from token ID to copies mapping(uint256 => uint256) private copiesOf; // Mapping from token ID to initial price mapping(uint256 => uint256) private price; struct NFTVoucher { uint256 tokenId; uint256 maxSupply; string uri; bytes signature; } event NFTMinted(address, address, uint256, string); event NFTTransfered(address, address, uint256); constructor( uint256 _startingAt, uint256 _maxSupply, uint256 _initialPrice, string memory _uri, string memory _name, string memory _symbol, address _artist, address[] memory _payees, uint256[] memory _shares ) payable ERC1155(_uri) PaymentSplitter(_payees, _shares) EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) { } function mint(address _redeemer, NFTVoucher calldata _voucher) public payable { require(startingAt < block.timestamp, "Not started"); require(<FILL_ME>) // make sure signature is valid and get the address of the signer address signer = _verify(_voucher); // make sure that the signer is authorized to mint NFTs require(signer == owner(), "Signature invalid or unauthorized"); // make sure that the redeemer is paying enough to cover the buyer's cost require(msg.value >= initialPrice, "Insufficient funds to mint"); copiesOf[_voucher.tokenId] = 1; totalSupply = totalSupply + 1; // first assign the token to the signer, to establish provenance on-chain _mint(signer, _voucher.tokenId, 0, ""); // transfer the token to the redeemer _mint(_redeemer, _voucher.tokenId, 1, ""); emit NFTMinted(signer, _redeemer, _voucher.tokenId, _voucher.uri); } function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public override { } function _verify(NFTVoucher calldata voucher) private view returns (address) { } function _hash(NFTVoucher calldata voucher) private view returns (bytes32) { } }
copiesOf[_voucher.tokenId]<1,"Already minted"
277,973
copiesOf[_voucher.tokenId]<1
"You don't have enough balance for this airdrop"
// SPDX-License-Identifier: MIT // _________ ________ ________ _________ //|\___ ___\\ __ \|\ __ \|\___ ___\ //\|___ \ \_\ \ \|\ /\ \ \|\ \|___ \ \_| // \ \ \ \ \ __ \ \ \\\ \ \ \ \ // \ \ \ \ \ \|\ \ \ \\\ \ \ \ \ // \ \__\ \ \_______\ \_______\ \ \__\ // \|__| \|_______|\|_______| \|__| pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract Airdrop is Ownable { using SafeMath for uint256; IERC20 public token; mapping (address=>uint256) public airdrop; bool public locked = false; address[] private wallets; constructor(address _token) { } event claimAirdrop(address _wallet, uint256 _amount); event clearContract(); modifier isLocked(){ } function changeLock(bool newLock) external onlyOwner{ } function getAirdrop() external isLocked { } function addAirdrop(address[] memory _wallets, uint256[] memory _amounts) external onlyOwner{ require(_wallets.length != 0 && _amounts.length != 0, "Missing data"); require(_wallets.length == _amounts.length, "Both lists need to be the same length"); uint256 totalNew; for (uint256 index = 0; index < _amounts.length; index++) { totalNew += _amounts[index]; } uint256 totalSored; for (uint256 index = 0; index < wallets.length; index++) { totalSored += airdrop[ wallets[index] ]; } require(<FILL_ME>) for (uint256 i = 0; i < _wallets.length; i++) { airdrop[_wallets[i]] += _amounts[i]; bool foundWallet = false; for (uint256 j = 0; j < wallets.length; j++) { if(_wallets[i] == wallets[j]){ foundWallet = true; } } if(!foundWallet){ wallets.push(_wallets[i]); } } } function clearAllAirdrops() private { } function withdraw(address to) external onlyOwner{ } function count() external view returns(uint256){ } }
token.balanceOf(address(this))>=totalNew+totalSored,"You don't have enough balance for this airdrop"
278,029
token.balanceOf(address(this))>=totalNew+totalSored
"init done"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/StrongPoolInterface.sol"; import "./interfaces/IERC1155Preset.sol"; import "./interfaces/StrongNFTBonusInterface.sol"; import "./lib/rewards.sol"; contract ServiceV18 { event Requested(address indexed miner); event Claimed(address indexed miner, uint256 reward); using SafeMath for uint256; bool public initDone; address public admin; address public pendingAdmin; address public superAdmin; address public pendingSuperAdmin; address public serviceAdmin; address public parameterAdmin; address payable public feeCollector; IERC20 public strongToken; StrongPoolInterface public strongPool; uint256 public rewardPerBlockNumerator; uint256 public rewardPerBlockDenominator; uint256 public naasRewardPerBlockNumerator; uint256 public naasRewardPerBlockDenominator; uint256 public claimingFeeNumerator; uint256 public claimingFeeDenominator; uint256 public requestingFeeInWei; uint256 public strongFeeInWei; uint256 public recurringFeeInWei; uint256 public recurringNaaSFeeInWei; uint256 public recurringPaymentCycleInBlocks; uint256 public rewardBalance; mapping(address => uint256) public entityBlockLastClaimedOn; address[] public entities; mapping(address => uint256) public entityIndex; mapping(address => bool) public entityActive; mapping(address => bool) public requestPending; mapping(address => bool) public entityIsNaaS; mapping(address => uint256) public paidOnBlock; uint256 public activeEntities; string public desciption; uint256 public claimingFeeInWei; uint256 public naasRequestingFeeInWei; uint256 public naasStrongFeeInWei; bool public removedTokens; mapping(address => uint256) public traunch; uint256 public currentTraunch; mapping(bytes => bool) public entityNodeIsActive; mapping(bytes => bool) public entityNodeIsBYON; mapping(bytes => uint256) public entityNodeTraunch; mapping(bytes => uint256) public entityNodePaidOnBlock; mapping(bytes => uint256) public entityNodeClaimedOnBlock; mapping(address => uint128) public entityNodeCount; event Paid(address indexed entity, uint128 nodeId, bool isBYON, bool isRenewal, uint256 upToBlockNumber); event Migrated(address indexed from, address indexed to, uint128 fromNodeId, uint128 toNodeId, bool isBYON); uint256 public rewardPerBlockNumeratorNew; uint256 public rewardPerBlockDenominatorNew; uint256 public naasRewardPerBlockNumeratorNew; uint256 public naasRewardPerBlockDenominatorNew; uint256 public rewardPerBlockNewEffectiveBlock; StrongNFTBonusInterface public strongNFTBonus; uint256 public gracePeriodInBlocks; uint128 public maxNodes; uint256 public maxPaymentPeriods; event Deactivated(address indexed entity, uint128 nodeId, bool isBYON, uint256 atBlockNumber); function init( address strongTokenAddress, address strongPoolAddress, address adminAddress, address superAdminAddress, uint256 rewardPerBlockNumeratorValue, uint256 rewardPerBlockDenominatorValue, uint256 naasRewardPerBlockNumeratorValue, uint256 naasRewardPerBlockDenominatorValue, uint256 requestingFeeInWeiValue, uint256 strongFeeInWeiValue, uint256 recurringFeeInWeiValue, uint256 recurringNaaSFeeInWeiValue, uint256 recurringPaymentCycleInBlocksValue, uint256 claimingFeeNumeratorValue, uint256 claimingFeeDenominatorValue, string memory desc ) public { require(<FILL_ME>) strongToken = IERC20(strongTokenAddress); strongPool = StrongPoolInterface(strongPoolAddress); admin = adminAddress; superAdmin = superAdminAddress; rewardPerBlockNumerator = rewardPerBlockNumeratorValue; rewardPerBlockDenominator = rewardPerBlockDenominatorValue; naasRewardPerBlockNumerator = naasRewardPerBlockNumeratorValue; naasRewardPerBlockDenominator = naasRewardPerBlockDenominatorValue; requestingFeeInWei = requestingFeeInWeiValue; strongFeeInWei = strongFeeInWeiValue; recurringFeeInWei = recurringFeeInWeiValue; recurringNaaSFeeInWei = recurringNaaSFeeInWeiValue; claimingFeeNumerator = claimingFeeNumeratorValue; claimingFeeDenominator = claimingFeeDenominatorValue; recurringPaymentCycleInBlocks = recurringPaymentCycleInBlocksValue; desciption = desc; initDone = true; } function updateServiceAdmin(address newServiceAdmin) public { } function updateParameterAdmin(address newParameterAdmin) public { } function updateFeeCollector(address payable newFeeCollector) public { } function setPendingAdmin(address newPendingAdmin) public { } function acceptAdmin() public { } function setPendingSuperAdmin(address newPendingSuperAdmin) public { } function acceptSuperAdmin() public { } function isEntityActive(address entity) public view returns (bool) { } function updateRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateNaaSRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateRewardPerBlockNew( uint256 numerator, uint256 denominator, uint256 numeratorNass, uint256 denominatorNass, uint256 effectiveBlock ) public { } function deposit(uint256 amount) public { } function withdraw(address destination, uint256 amount) public { } function updateRequestingFee(uint256 feeInWei) public { } function updateStrongFee(uint256 feeInWei) public { } function updateNaasRequestingFee(uint256 feeInWei) public { } function updateNaasStrongFee(uint256 feeInWei) public { } function updateClaimingFee(uint256 numerator, uint256 denominator) public { } function updateRecurringFee(uint256 feeInWei) public { } function updateRecurringNaaSFee(uint256 feeInWei) public { } function updateRecurringPaymentCycleInBlocks(uint256 blocks) public { } function updateGracePeriodInBlocks(uint256 blocks) public { } function requestAccess(bool isNaaS) public payable { } function setEntityActiveStatus(address entity, bool status) public { } function payFee(uint128 nodeId) public payable { } function getReward(address entity, uint128 nodeId) public view returns (uint256) { } function getRewardByBlock(address entity, uint128 nodeId, uint256 blockNumber) public view returns (uint256) { } function getRewardByBlockLegacy(address entity, uint256 blockNumber) public view returns (uint256) { } function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) public payable returns (bool) { } function getRewardAll(address entity, uint256 blockNumber) public view returns (uint256) { } function canBePaid(address entity, uint128 nodeId) public view returns (bool) { } function doesNodeExist(address entity, uint128 nodeId) public view returns (bool) { } function hasNodeExpired(address entity, uint128 nodeId) public view returns (bool) { } function hasMaxPayments(address entity, uint128 nodeId) public view returns (bool) { } function getNodeId(address entity, uint128 nodeId) public view returns (bytes memory) { } function getNodePaidOn(address entity, uint128 nodeId) public view returns (uint256) { } function isNodeActive(address entity, uint128 nodeId) public view returns (bool) { } function isNodeBYON(address entity, uint128 nodeId) public view returns (bool) { } function hasLegacyNode(address entity) public view returns (bool) { } function approveBYONNode(address entity, uint128 nodeId) public { } function suspendBYONNode(address entity, uint128 nodeId) public { } function setNodeIsActive(address entity, uint128 nodeId, bool isActive) public { } function setNodeIsNaaS(address entity, uint128 nodeId, bool isNaaS) public { } function migrateLegacyNode(address entity) private { } function claimAll(uint256 blockNumber, bool toStrongPool) public payable { } function payAll(uint256 nodeCount) public payable { } function addNFTBonusContract(address _contract) public { } function disableNodeAdmin(address entity, uint128 nodeId) public { } function updateLimits(uint128 _maxNodes, uint256 _maxPaymentPeriods) public { } }
!initDone,"init done"
278,057
!initDone
"limit reached"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/StrongPoolInterface.sol"; import "./interfaces/IERC1155Preset.sol"; import "./interfaces/StrongNFTBonusInterface.sol"; import "./lib/rewards.sol"; contract ServiceV18 { event Requested(address indexed miner); event Claimed(address indexed miner, uint256 reward); using SafeMath for uint256; bool public initDone; address public admin; address public pendingAdmin; address public superAdmin; address public pendingSuperAdmin; address public serviceAdmin; address public parameterAdmin; address payable public feeCollector; IERC20 public strongToken; StrongPoolInterface public strongPool; uint256 public rewardPerBlockNumerator; uint256 public rewardPerBlockDenominator; uint256 public naasRewardPerBlockNumerator; uint256 public naasRewardPerBlockDenominator; uint256 public claimingFeeNumerator; uint256 public claimingFeeDenominator; uint256 public requestingFeeInWei; uint256 public strongFeeInWei; uint256 public recurringFeeInWei; uint256 public recurringNaaSFeeInWei; uint256 public recurringPaymentCycleInBlocks; uint256 public rewardBalance; mapping(address => uint256) public entityBlockLastClaimedOn; address[] public entities; mapping(address => uint256) public entityIndex; mapping(address => bool) public entityActive; mapping(address => bool) public requestPending; mapping(address => bool) public entityIsNaaS; mapping(address => uint256) public paidOnBlock; uint256 public activeEntities; string public desciption; uint256 public claimingFeeInWei; uint256 public naasRequestingFeeInWei; uint256 public naasStrongFeeInWei; bool public removedTokens; mapping(address => uint256) public traunch; uint256 public currentTraunch; mapping(bytes => bool) public entityNodeIsActive; mapping(bytes => bool) public entityNodeIsBYON; mapping(bytes => uint256) public entityNodeTraunch; mapping(bytes => uint256) public entityNodePaidOnBlock; mapping(bytes => uint256) public entityNodeClaimedOnBlock; mapping(address => uint128) public entityNodeCount; event Paid(address indexed entity, uint128 nodeId, bool isBYON, bool isRenewal, uint256 upToBlockNumber); event Migrated(address indexed from, address indexed to, uint128 fromNodeId, uint128 toNodeId, bool isBYON); uint256 public rewardPerBlockNumeratorNew; uint256 public rewardPerBlockDenominatorNew; uint256 public naasRewardPerBlockNumeratorNew; uint256 public naasRewardPerBlockDenominatorNew; uint256 public rewardPerBlockNewEffectiveBlock; StrongNFTBonusInterface public strongNFTBonus; uint256 public gracePeriodInBlocks; uint128 public maxNodes; uint256 public maxPaymentPeriods; event Deactivated(address indexed entity, uint128 nodeId, bool isBYON, uint256 atBlockNumber); function init( address strongTokenAddress, address strongPoolAddress, address adminAddress, address superAdminAddress, uint256 rewardPerBlockNumeratorValue, uint256 rewardPerBlockDenominatorValue, uint256 naasRewardPerBlockNumeratorValue, uint256 naasRewardPerBlockDenominatorValue, uint256 requestingFeeInWeiValue, uint256 strongFeeInWeiValue, uint256 recurringFeeInWeiValue, uint256 recurringNaaSFeeInWeiValue, uint256 recurringPaymentCycleInBlocksValue, uint256 claimingFeeNumeratorValue, uint256 claimingFeeDenominatorValue, string memory desc ) public { } function updateServiceAdmin(address newServiceAdmin) public { } function updateParameterAdmin(address newParameterAdmin) public { } function updateFeeCollector(address payable newFeeCollector) public { } function setPendingAdmin(address newPendingAdmin) public { } function acceptAdmin() public { } function setPendingSuperAdmin(address newPendingSuperAdmin) public { } function acceptSuperAdmin() public { } function isEntityActive(address entity) public view returns (bool) { } function updateRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateNaaSRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateRewardPerBlockNew( uint256 numerator, uint256 denominator, uint256 numeratorNass, uint256 denominatorNass, uint256 effectiveBlock ) public { } function deposit(uint256 amount) public { } function withdraw(address destination, uint256 amount) public { } function updateRequestingFee(uint256 feeInWei) public { } function updateStrongFee(uint256 feeInWei) public { } function updateNaasRequestingFee(uint256 feeInWei) public { } function updateNaasStrongFee(uint256 feeInWei) public { } function updateClaimingFee(uint256 numerator, uint256 denominator) public { } function updateRecurringFee(uint256 feeInWei) public { } function updateRecurringNaaSFee(uint256 feeInWei) public { } function updateRecurringPaymentCycleInBlocks(uint256 blocks) public { } function updateGracePeriodInBlocks(uint256 blocks) public { } function requestAccess(bool isNaaS) public payable { require(<FILL_ME>) uint256 rFee; uint256 sFee; if (hasLegacyNode(msg.sender)) { migrateLegacyNode(msg.sender); } uint128 nodeId = entityNodeCount[msg.sender] + 1; bytes memory id = getNodeId(msg.sender, nodeId); if (isNaaS) { rFee = naasRequestingFeeInWei; sFee = naasStrongFeeInWei; activeEntities = activeEntities.add(1); } else { rFee = requestingFeeInWei; sFee = strongFeeInWei; entityNodeIsBYON[id] = true; } require(msg.value == rFee, "invalid fee"); entityNodePaidOnBlock[id] = block.number; entityNodeClaimedOnBlock[id] = block.number; entityNodeCount[msg.sender] = entityNodeCount[msg.sender] + 1; feeCollector.transfer(msg.value); strongToken.transferFrom(msg.sender, address(this), sFee); strongToken.transfer(feeCollector, sFee); emit Paid(msg.sender, nodeId, entityNodeIsBYON[id], false, entityNodePaidOnBlock[id].add(recurringPaymentCycleInBlocks)); } function setEntityActiveStatus(address entity, bool status) public { } function payFee(uint128 nodeId) public payable { } function getReward(address entity, uint128 nodeId) public view returns (uint256) { } function getRewardByBlock(address entity, uint128 nodeId, uint256 blockNumber) public view returns (uint256) { } function getRewardByBlockLegacy(address entity, uint256 blockNumber) public view returns (uint256) { } function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) public payable returns (bool) { } function getRewardAll(address entity, uint256 blockNumber) public view returns (uint256) { } function canBePaid(address entity, uint128 nodeId) public view returns (bool) { } function doesNodeExist(address entity, uint128 nodeId) public view returns (bool) { } function hasNodeExpired(address entity, uint128 nodeId) public view returns (bool) { } function hasMaxPayments(address entity, uint128 nodeId) public view returns (bool) { } function getNodeId(address entity, uint128 nodeId) public view returns (bytes memory) { } function getNodePaidOn(address entity, uint128 nodeId) public view returns (uint256) { } function isNodeActive(address entity, uint128 nodeId) public view returns (bool) { } function isNodeBYON(address entity, uint128 nodeId) public view returns (bool) { } function hasLegacyNode(address entity) public view returns (bool) { } function approveBYONNode(address entity, uint128 nodeId) public { } function suspendBYONNode(address entity, uint128 nodeId) public { } function setNodeIsActive(address entity, uint128 nodeId, bool isActive) public { } function setNodeIsNaaS(address entity, uint128 nodeId, bool isNaaS) public { } function migrateLegacyNode(address entity) private { } function claimAll(uint256 blockNumber, bool toStrongPool) public payable { } function payAll(uint256 nodeCount) public payable { } function addNFTBonusContract(address _contract) public { } function disableNodeAdmin(address entity, uint128 nodeId) public { } function updateLimits(uint128 _maxNodes, uint256 _maxPaymentPeriods) public { } }
entityNodeCount[msg.sender]<maxNodes,"limit reached"
278,057
entityNodeCount[msg.sender]<maxNodes
"invalid entity"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/StrongPoolInterface.sol"; import "./interfaces/IERC1155Preset.sol"; import "./interfaces/StrongNFTBonusInterface.sol"; import "./lib/rewards.sol"; contract ServiceV18 { event Requested(address indexed miner); event Claimed(address indexed miner, uint256 reward); using SafeMath for uint256; bool public initDone; address public admin; address public pendingAdmin; address public superAdmin; address public pendingSuperAdmin; address public serviceAdmin; address public parameterAdmin; address payable public feeCollector; IERC20 public strongToken; StrongPoolInterface public strongPool; uint256 public rewardPerBlockNumerator; uint256 public rewardPerBlockDenominator; uint256 public naasRewardPerBlockNumerator; uint256 public naasRewardPerBlockDenominator; uint256 public claimingFeeNumerator; uint256 public claimingFeeDenominator; uint256 public requestingFeeInWei; uint256 public strongFeeInWei; uint256 public recurringFeeInWei; uint256 public recurringNaaSFeeInWei; uint256 public recurringPaymentCycleInBlocks; uint256 public rewardBalance; mapping(address => uint256) public entityBlockLastClaimedOn; address[] public entities; mapping(address => uint256) public entityIndex; mapping(address => bool) public entityActive; mapping(address => bool) public requestPending; mapping(address => bool) public entityIsNaaS; mapping(address => uint256) public paidOnBlock; uint256 public activeEntities; string public desciption; uint256 public claimingFeeInWei; uint256 public naasRequestingFeeInWei; uint256 public naasStrongFeeInWei; bool public removedTokens; mapping(address => uint256) public traunch; uint256 public currentTraunch; mapping(bytes => bool) public entityNodeIsActive; mapping(bytes => bool) public entityNodeIsBYON; mapping(bytes => uint256) public entityNodeTraunch; mapping(bytes => uint256) public entityNodePaidOnBlock; mapping(bytes => uint256) public entityNodeClaimedOnBlock; mapping(address => uint128) public entityNodeCount; event Paid(address indexed entity, uint128 nodeId, bool isBYON, bool isRenewal, uint256 upToBlockNumber); event Migrated(address indexed from, address indexed to, uint128 fromNodeId, uint128 toNodeId, bool isBYON); uint256 public rewardPerBlockNumeratorNew; uint256 public rewardPerBlockDenominatorNew; uint256 public naasRewardPerBlockNumeratorNew; uint256 public naasRewardPerBlockDenominatorNew; uint256 public rewardPerBlockNewEffectiveBlock; StrongNFTBonusInterface public strongNFTBonus; uint256 public gracePeriodInBlocks; uint128 public maxNodes; uint256 public maxPaymentPeriods; event Deactivated(address indexed entity, uint128 nodeId, bool isBYON, uint256 atBlockNumber); function init( address strongTokenAddress, address strongPoolAddress, address adminAddress, address superAdminAddress, uint256 rewardPerBlockNumeratorValue, uint256 rewardPerBlockDenominatorValue, uint256 naasRewardPerBlockNumeratorValue, uint256 naasRewardPerBlockDenominatorValue, uint256 requestingFeeInWeiValue, uint256 strongFeeInWeiValue, uint256 recurringFeeInWeiValue, uint256 recurringNaaSFeeInWeiValue, uint256 recurringPaymentCycleInBlocksValue, uint256 claimingFeeNumeratorValue, uint256 claimingFeeDenominatorValue, string memory desc ) public { } function updateServiceAdmin(address newServiceAdmin) public { } function updateParameterAdmin(address newParameterAdmin) public { } function updateFeeCollector(address payable newFeeCollector) public { } function setPendingAdmin(address newPendingAdmin) public { } function acceptAdmin() public { } function setPendingSuperAdmin(address newPendingSuperAdmin) public { } function acceptSuperAdmin() public { } function isEntityActive(address entity) public view returns (bool) { } function updateRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateNaaSRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateRewardPerBlockNew( uint256 numerator, uint256 denominator, uint256 numeratorNass, uint256 denominatorNass, uint256 effectiveBlock ) public { } function deposit(uint256 amount) public { } function withdraw(address destination, uint256 amount) public { } function updateRequestingFee(uint256 feeInWei) public { } function updateStrongFee(uint256 feeInWei) public { } function updateNaasRequestingFee(uint256 feeInWei) public { } function updateNaasStrongFee(uint256 feeInWei) public { } function updateClaimingFee(uint256 numerator, uint256 denominator) public { } function updateRecurringFee(uint256 feeInWei) public { } function updateRecurringNaaSFee(uint256 feeInWei) public { } function updateRecurringPaymentCycleInBlocks(uint256 blocks) public { } function updateGracePeriodInBlocks(uint256 blocks) public { } function requestAccess(bool isNaaS) public payable { } function setEntityActiveStatus(address entity, bool status) public { require(msg.sender == admin || msg.sender == serviceAdmin || msg.sender == superAdmin); uint256 index = entityIndex[entity]; require(<FILL_ME>) require(entityActive[entity] != status, "already set"); entityActive[entity] = status; if (status) { activeEntities = activeEntities.add(1); entityBlockLastClaimedOn[entity] = block.number; } else { activeEntities = activeEntities.sub(1); entityBlockLastClaimedOn[entity] = 0; } } function payFee(uint128 nodeId) public payable { } function getReward(address entity, uint128 nodeId) public view returns (uint256) { } function getRewardByBlock(address entity, uint128 nodeId, uint256 blockNumber) public view returns (uint256) { } function getRewardByBlockLegacy(address entity, uint256 blockNumber) public view returns (uint256) { } function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) public payable returns (bool) { } function getRewardAll(address entity, uint256 blockNumber) public view returns (uint256) { } function canBePaid(address entity, uint128 nodeId) public view returns (bool) { } function doesNodeExist(address entity, uint128 nodeId) public view returns (bool) { } function hasNodeExpired(address entity, uint128 nodeId) public view returns (bool) { } function hasMaxPayments(address entity, uint128 nodeId) public view returns (bool) { } function getNodeId(address entity, uint128 nodeId) public view returns (bytes memory) { } function getNodePaidOn(address entity, uint128 nodeId) public view returns (uint256) { } function isNodeActive(address entity, uint128 nodeId) public view returns (bool) { } function isNodeBYON(address entity, uint128 nodeId) public view returns (bool) { } function hasLegacyNode(address entity) public view returns (bool) { } function approveBYONNode(address entity, uint128 nodeId) public { } function suspendBYONNode(address entity, uint128 nodeId) public { } function setNodeIsActive(address entity, uint128 nodeId, bool isActive) public { } function setNodeIsNaaS(address entity, uint128 nodeId, bool isNaaS) public { } function migrateLegacyNode(address entity) private { } function claimAll(uint256 blockNumber, bool toStrongPool) public payable { } function payAll(uint256 nodeCount) public payable { } function addNFTBonusContract(address _contract) public { } function disableNodeAdmin(address entity, uint128 nodeId) public { } function updateLimits(uint128 _maxNodes, uint256 _maxPaymentPeriods) public { } }
entities[index]==entity,"invalid entity"
278,057
entities[index]==entity
"already set"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/StrongPoolInterface.sol"; import "./interfaces/IERC1155Preset.sol"; import "./interfaces/StrongNFTBonusInterface.sol"; import "./lib/rewards.sol"; contract ServiceV18 { event Requested(address indexed miner); event Claimed(address indexed miner, uint256 reward); using SafeMath for uint256; bool public initDone; address public admin; address public pendingAdmin; address public superAdmin; address public pendingSuperAdmin; address public serviceAdmin; address public parameterAdmin; address payable public feeCollector; IERC20 public strongToken; StrongPoolInterface public strongPool; uint256 public rewardPerBlockNumerator; uint256 public rewardPerBlockDenominator; uint256 public naasRewardPerBlockNumerator; uint256 public naasRewardPerBlockDenominator; uint256 public claimingFeeNumerator; uint256 public claimingFeeDenominator; uint256 public requestingFeeInWei; uint256 public strongFeeInWei; uint256 public recurringFeeInWei; uint256 public recurringNaaSFeeInWei; uint256 public recurringPaymentCycleInBlocks; uint256 public rewardBalance; mapping(address => uint256) public entityBlockLastClaimedOn; address[] public entities; mapping(address => uint256) public entityIndex; mapping(address => bool) public entityActive; mapping(address => bool) public requestPending; mapping(address => bool) public entityIsNaaS; mapping(address => uint256) public paidOnBlock; uint256 public activeEntities; string public desciption; uint256 public claimingFeeInWei; uint256 public naasRequestingFeeInWei; uint256 public naasStrongFeeInWei; bool public removedTokens; mapping(address => uint256) public traunch; uint256 public currentTraunch; mapping(bytes => bool) public entityNodeIsActive; mapping(bytes => bool) public entityNodeIsBYON; mapping(bytes => uint256) public entityNodeTraunch; mapping(bytes => uint256) public entityNodePaidOnBlock; mapping(bytes => uint256) public entityNodeClaimedOnBlock; mapping(address => uint128) public entityNodeCount; event Paid(address indexed entity, uint128 nodeId, bool isBYON, bool isRenewal, uint256 upToBlockNumber); event Migrated(address indexed from, address indexed to, uint128 fromNodeId, uint128 toNodeId, bool isBYON); uint256 public rewardPerBlockNumeratorNew; uint256 public rewardPerBlockDenominatorNew; uint256 public naasRewardPerBlockNumeratorNew; uint256 public naasRewardPerBlockDenominatorNew; uint256 public rewardPerBlockNewEffectiveBlock; StrongNFTBonusInterface public strongNFTBonus; uint256 public gracePeriodInBlocks; uint128 public maxNodes; uint256 public maxPaymentPeriods; event Deactivated(address indexed entity, uint128 nodeId, bool isBYON, uint256 atBlockNumber); function init( address strongTokenAddress, address strongPoolAddress, address adminAddress, address superAdminAddress, uint256 rewardPerBlockNumeratorValue, uint256 rewardPerBlockDenominatorValue, uint256 naasRewardPerBlockNumeratorValue, uint256 naasRewardPerBlockDenominatorValue, uint256 requestingFeeInWeiValue, uint256 strongFeeInWeiValue, uint256 recurringFeeInWeiValue, uint256 recurringNaaSFeeInWeiValue, uint256 recurringPaymentCycleInBlocksValue, uint256 claimingFeeNumeratorValue, uint256 claimingFeeDenominatorValue, string memory desc ) public { } function updateServiceAdmin(address newServiceAdmin) public { } function updateParameterAdmin(address newParameterAdmin) public { } function updateFeeCollector(address payable newFeeCollector) public { } function setPendingAdmin(address newPendingAdmin) public { } function acceptAdmin() public { } function setPendingSuperAdmin(address newPendingSuperAdmin) public { } function acceptSuperAdmin() public { } function isEntityActive(address entity) public view returns (bool) { } function updateRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateNaaSRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateRewardPerBlockNew( uint256 numerator, uint256 denominator, uint256 numeratorNass, uint256 denominatorNass, uint256 effectiveBlock ) public { } function deposit(uint256 amount) public { } function withdraw(address destination, uint256 amount) public { } function updateRequestingFee(uint256 feeInWei) public { } function updateStrongFee(uint256 feeInWei) public { } function updateNaasRequestingFee(uint256 feeInWei) public { } function updateNaasStrongFee(uint256 feeInWei) public { } function updateClaimingFee(uint256 numerator, uint256 denominator) public { } function updateRecurringFee(uint256 feeInWei) public { } function updateRecurringNaaSFee(uint256 feeInWei) public { } function updateRecurringPaymentCycleInBlocks(uint256 blocks) public { } function updateGracePeriodInBlocks(uint256 blocks) public { } function requestAccess(bool isNaaS) public payable { } function setEntityActiveStatus(address entity, bool status) public { require(msg.sender == admin || msg.sender == serviceAdmin || msg.sender == superAdmin); uint256 index = entityIndex[entity]; require(entities[index] == entity, "invalid entity"); require(<FILL_ME>) entityActive[entity] = status; if (status) { activeEntities = activeEntities.add(1); entityBlockLastClaimedOn[entity] = block.number; } else { activeEntities = activeEntities.sub(1); entityBlockLastClaimedOn[entity] = 0; } } function payFee(uint128 nodeId) public payable { } function getReward(address entity, uint128 nodeId) public view returns (uint256) { } function getRewardByBlock(address entity, uint128 nodeId, uint256 blockNumber) public view returns (uint256) { } function getRewardByBlockLegacy(address entity, uint256 blockNumber) public view returns (uint256) { } function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) public payable returns (bool) { } function getRewardAll(address entity, uint256 blockNumber) public view returns (uint256) { } function canBePaid(address entity, uint128 nodeId) public view returns (bool) { } function doesNodeExist(address entity, uint128 nodeId) public view returns (bool) { } function hasNodeExpired(address entity, uint128 nodeId) public view returns (bool) { } function hasMaxPayments(address entity, uint128 nodeId) public view returns (bool) { } function getNodeId(address entity, uint128 nodeId) public view returns (bytes memory) { } function getNodePaidOn(address entity, uint128 nodeId) public view returns (uint256) { } function isNodeActive(address entity, uint128 nodeId) public view returns (bool) { } function isNodeBYON(address entity, uint128 nodeId) public view returns (bool) { } function hasLegacyNode(address entity) public view returns (bool) { } function approveBYONNode(address entity, uint128 nodeId) public { } function suspendBYONNode(address entity, uint128 nodeId) public { } function setNodeIsActive(address entity, uint128 nodeId, bool isActive) public { } function setNodeIsNaaS(address entity, uint128 nodeId, bool isNaaS) public { } function migrateLegacyNode(address entity) private { } function claimAll(uint256 blockNumber, bool toStrongPool) public payable { } function payAll(uint256 nodeCount) public payable { } function addNFTBonusContract(address _contract) public { } function disableNodeAdmin(address entity, uint128 nodeId) public { } function updateLimits(uint128 _maxNodes, uint256 _maxPaymentPeriods) public { } }
entityActive[entity]!=status,"already set"
278,057
entityActive[entity]!=status
"doesnt exist"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/StrongPoolInterface.sol"; import "./interfaces/IERC1155Preset.sol"; import "./interfaces/StrongNFTBonusInterface.sol"; import "./lib/rewards.sol"; contract ServiceV18 { event Requested(address indexed miner); event Claimed(address indexed miner, uint256 reward); using SafeMath for uint256; bool public initDone; address public admin; address public pendingAdmin; address public superAdmin; address public pendingSuperAdmin; address public serviceAdmin; address public parameterAdmin; address payable public feeCollector; IERC20 public strongToken; StrongPoolInterface public strongPool; uint256 public rewardPerBlockNumerator; uint256 public rewardPerBlockDenominator; uint256 public naasRewardPerBlockNumerator; uint256 public naasRewardPerBlockDenominator; uint256 public claimingFeeNumerator; uint256 public claimingFeeDenominator; uint256 public requestingFeeInWei; uint256 public strongFeeInWei; uint256 public recurringFeeInWei; uint256 public recurringNaaSFeeInWei; uint256 public recurringPaymentCycleInBlocks; uint256 public rewardBalance; mapping(address => uint256) public entityBlockLastClaimedOn; address[] public entities; mapping(address => uint256) public entityIndex; mapping(address => bool) public entityActive; mapping(address => bool) public requestPending; mapping(address => bool) public entityIsNaaS; mapping(address => uint256) public paidOnBlock; uint256 public activeEntities; string public desciption; uint256 public claimingFeeInWei; uint256 public naasRequestingFeeInWei; uint256 public naasStrongFeeInWei; bool public removedTokens; mapping(address => uint256) public traunch; uint256 public currentTraunch; mapping(bytes => bool) public entityNodeIsActive; mapping(bytes => bool) public entityNodeIsBYON; mapping(bytes => uint256) public entityNodeTraunch; mapping(bytes => uint256) public entityNodePaidOnBlock; mapping(bytes => uint256) public entityNodeClaimedOnBlock; mapping(address => uint128) public entityNodeCount; event Paid(address indexed entity, uint128 nodeId, bool isBYON, bool isRenewal, uint256 upToBlockNumber); event Migrated(address indexed from, address indexed to, uint128 fromNodeId, uint128 toNodeId, bool isBYON); uint256 public rewardPerBlockNumeratorNew; uint256 public rewardPerBlockDenominatorNew; uint256 public naasRewardPerBlockNumeratorNew; uint256 public naasRewardPerBlockDenominatorNew; uint256 public rewardPerBlockNewEffectiveBlock; StrongNFTBonusInterface public strongNFTBonus; uint256 public gracePeriodInBlocks; uint128 public maxNodes; uint256 public maxPaymentPeriods; event Deactivated(address indexed entity, uint128 nodeId, bool isBYON, uint256 atBlockNumber); function init( address strongTokenAddress, address strongPoolAddress, address adminAddress, address superAdminAddress, uint256 rewardPerBlockNumeratorValue, uint256 rewardPerBlockDenominatorValue, uint256 naasRewardPerBlockNumeratorValue, uint256 naasRewardPerBlockDenominatorValue, uint256 requestingFeeInWeiValue, uint256 strongFeeInWeiValue, uint256 recurringFeeInWeiValue, uint256 recurringNaaSFeeInWeiValue, uint256 recurringPaymentCycleInBlocksValue, uint256 claimingFeeNumeratorValue, uint256 claimingFeeDenominatorValue, string memory desc ) public { } function updateServiceAdmin(address newServiceAdmin) public { } function updateParameterAdmin(address newParameterAdmin) public { } function updateFeeCollector(address payable newFeeCollector) public { } function setPendingAdmin(address newPendingAdmin) public { } function acceptAdmin() public { } function setPendingSuperAdmin(address newPendingSuperAdmin) public { } function acceptSuperAdmin() public { } function isEntityActive(address entity) public view returns (bool) { } function updateRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateNaaSRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateRewardPerBlockNew( uint256 numerator, uint256 denominator, uint256 numeratorNass, uint256 denominatorNass, uint256 effectiveBlock ) public { } function deposit(uint256 amount) public { } function withdraw(address destination, uint256 amount) public { } function updateRequestingFee(uint256 feeInWei) public { } function updateStrongFee(uint256 feeInWei) public { } function updateNaasRequestingFee(uint256 feeInWei) public { } function updateNaasStrongFee(uint256 feeInWei) public { } function updateClaimingFee(uint256 numerator, uint256 denominator) public { } function updateRecurringFee(uint256 feeInWei) public { } function updateRecurringNaaSFee(uint256 feeInWei) public { } function updateRecurringPaymentCycleInBlocks(uint256 blocks) public { } function updateGracePeriodInBlocks(uint256 blocks) public { } function requestAccess(bool isNaaS) public payable { } function setEntityActiveStatus(address entity, bool status) public { } function payFee(uint128 nodeId) public payable { address sender = msg.sender == address(this) ? tx.origin : msg.sender; bytes memory id = getNodeId(sender, nodeId); if (hasLegacyNode(sender)) { migrateLegacyNode(sender); } require(<FILL_ME>) require(hasNodeExpired(sender, nodeId) == false, "too late"); require(hasMaxPayments(sender, nodeId) == false, "too soon"); if (entityNodeIsBYON[id]) { require(msg.value == recurringFeeInWei, "invalid fee"); } else { require(msg.value == recurringNaaSFeeInWei, "invalid fee"); } feeCollector.transfer(msg.value); entityNodePaidOnBlock[id] = entityNodePaidOnBlock[id].add(recurringPaymentCycleInBlocks); emit Paid(sender, nodeId, entityNodeIsBYON[id], true, entityNodePaidOnBlock[id]); } function getReward(address entity, uint128 nodeId) public view returns (uint256) { } function getRewardByBlock(address entity, uint128 nodeId, uint256 blockNumber) public view returns (uint256) { } function getRewardByBlockLegacy(address entity, uint256 blockNumber) public view returns (uint256) { } function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) public payable returns (bool) { } function getRewardAll(address entity, uint256 blockNumber) public view returns (uint256) { } function canBePaid(address entity, uint128 nodeId) public view returns (bool) { } function doesNodeExist(address entity, uint128 nodeId) public view returns (bool) { } function hasNodeExpired(address entity, uint128 nodeId) public view returns (bool) { } function hasMaxPayments(address entity, uint128 nodeId) public view returns (bool) { } function getNodeId(address entity, uint128 nodeId) public view returns (bytes memory) { } function getNodePaidOn(address entity, uint128 nodeId) public view returns (uint256) { } function isNodeActive(address entity, uint128 nodeId) public view returns (bool) { } function isNodeBYON(address entity, uint128 nodeId) public view returns (bool) { } function hasLegacyNode(address entity) public view returns (bool) { } function approveBYONNode(address entity, uint128 nodeId) public { } function suspendBYONNode(address entity, uint128 nodeId) public { } function setNodeIsActive(address entity, uint128 nodeId, bool isActive) public { } function setNodeIsNaaS(address entity, uint128 nodeId, bool isNaaS) public { } function migrateLegacyNode(address entity) private { } function claimAll(uint256 blockNumber, bool toStrongPool) public payable { } function payAll(uint256 nodeCount) public payable { } function addNFTBonusContract(address _contract) public { } function disableNodeAdmin(address entity, uint128 nodeId) public { } function updateLimits(uint128 _maxNodes, uint256 _maxPaymentPeriods) public { } }
doesNodeExist(sender,nodeId),"doesnt exist"
278,057
doesNodeExist(sender,nodeId)
"too late"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/StrongPoolInterface.sol"; import "./interfaces/IERC1155Preset.sol"; import "./interfaces/StrongNFTBonusInterface.sol"; import "./lib/rewards.sol"; contract ServiceV18 { event Requested(address indexed miner); event Claimed(address indexed miner, uint256 reward); using SafeMath for uint256; bool public initDone; address public admin; address public pendingAdmin; address public superAdmin; address public pendingSuperAdmin; address public serviceAdmin; address public parameterAdmin; address payable public feeCollector; IERC20 public strongToken; StrongPoolInterface public strongPool; uint256 public rewardPerBlockNumerator; uint256 public rewardPerBlockDenominator; uint256 public naasRewardPerBlockNumerator; uint256 public naasRewardPerBlockDenominator; uint256 public claimingFeeNumerator; uint256 public claimingFeeDenominator; uint256 public requestingFeeInWei; uint256 public strongFeeInWei; uint256 public recurringFeeInWei; uint256 public recurringNaaSFeeInWei; uint256 public recurringPaymentCycleInBlocks; uint256 public rewardBalance; mapping(address => uint256) public entityBlockLastClaimedOn; address[] public entities; mapping(address => uint256) public entityIndex; mapping(address => bool) public entityActive; mapping(address => bool) public requestPending; mapping(address => bool) public entityIsNaaS; mapping(address => uint256) public paidOnBlock; uint256 public activeEntities; string public desciption; uint256 public claimingFeeInWei; uint256 public naasRequestingFeeInWei; uint256 public naasStrongFeeInWei; bool public removedTokens; mapping(address => uint256) public traunch; uint256 public currentTraunch; mapping(bytes => bool) public entityNodeIsActive; mapping(bytes => bool) public entityNodeIsBYON; mapping(bytes => uint256) public entityNodeTraunch; mapping(bytes => uint256) public entityNodePaidOnBlock; mapping(bytes => uint256) public entityNodeClaimedOnBlock; mapping(address => uint128) public entityNodeCount; event Paid(address indexed entity, uint128 nodeId, bool isBYON, bool isRenewal, uint256 upToBlockNumber); event Migrated(address indexed from, address indexed to, uint128 fromNodeId, uint128 toNodeId, bool isBYON); uint256 public rewardPerBlockNumeratorNew; uint256 public rewardPerBlockDenominatorNew; uint256 public naasRewardPerBlockNumeratorNew; uint256 public naasRewardPerBlockDenominatorNew; uint256 public rewardPerBlockNewEffectiveBlock; StrongNFTBonusInterface public strongNFTBonus; uint256 public gracePeriodInBlocks; uint128 public maxNodes; uint256 public maxPaymentPeriods; event Deactivated(address indexed entity, uint128 nodeId, bool isBYON, uint256 atBlockNumber); function init( address strongTokenAddress, address strongPoolAddress, address adminAddress, address superAdminAddress, uint256 rewardPerBlockNumeratorValue, uint256 rewardPerBlockDenominatorValue, uint256 naasRewardPerBlockNumeratorValue, uint256 naasRewardPerBlockDenominatorValue, uint256 requestingFeeInWeiValue, uint256 strongFeeInWeiValue, uint256 recurringFeeInWeiValue, uint256 recurringNaaSFeeInWeiValue, uint256 recurringPaymentCycleInBlocksValue, uint256 claimingFeeNumeratorValue, uint256 claimingFeeDenominatorValue, string memory desc ) public { } function updateServiceAdmin(address newServiceAdmin) public { } function updateParameterAdmin(address newParameterAdmin) public { } function updateFeeCollector(address payable newFeeCollector) public { } function setPendingAdmin(address newPendingAdmin) public { } function acceptAdmin() public { } function setPendingSuperAdmin(address newPendingSuperAdmin) public { } function acceptSuperAdmin() public { } function isEntityActive(address entity) public view returns (bool) { } function updateRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateNaaSRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateRewardPerBlockNew( uint256 numerator, uint256 denominator, uint256 numeratorNass, uint256 denominatorNass, uint256 effectiveBlock ) public { } function deposit(uint256 amount) public { } function withdraw(address destination, uint256 amount) public { } function updateRequestingFee(uint256 feeInWei) public { } function updateStrongFee(uint256 feeInWei) public { } function updateNaasRequestingFee(uint256 feeInWei) public { } function updateNaasStrongFee(uint256 feeInWei) public { } function updateClaimingFee(uint256 numerator, uint256 denominator) public { } function updateRecurringFee(uint256 feeInWei) public { } function updateRecurringNaaSFee(uint256 feeInWei) public { } function updateRecurringPaymentCycleInBlocks(uint256 blocks) public { } function updateGracePeriodInBlocks(uint256 blocks) public { } function requestAccess(bool isNaaS) public payable { } function setEntityActiveStatus(address entity, bool status) public { } function payFee(uint128 nodeId) public payable { address sender = msg.sender == address(this) ? tx.origin : msg.sender; bytes memory id = getNodeId(sender, nodeId); if (hasLegacyNode(sender)) { migrateLegacyNode(sender); } require(doesNodeExist(sender, nodeId), "doesnt exist"); require(<FILL_ME>) require(hasMaxPayments(sender, nodeId) == false, "too soon"); if (entityNodeIsBYON[id]) { require(msg.value == recurringFeeInWei, "invalid fee"); } else { require(msg.value == recurringNaaSFeeInWei, "invalid fee"); } feeCollector.transfer(msg.value); entityNodePaidOnBlock[id] = entityNodePaidOnBlock[id].add(recurringPaymentCycleInBlocks); emit Paid(sender, nodeId, entityNodeIsBYON[id], true, entityNodePaidOnBlock[id]); } function getReward(address entity, uint128 nodeId) public view returns (uint256) { } function getRewardByBlock(address entity, uint128 nodeId, uint256 blockNumber) public view returns (uint256) { } function getRewardByBlockLegacy(address entity, uint256 blockNumber) public view returns (uint256) { } function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) public payable returns (bool) { } function getRewardAll(address entity, uint256 blockNumber) public view returns (uint256) { } function canBePaid(address entity, uint128 nodeId) public view returns (bool) { } function doesNodeExist(address entity, uint128 nodeId) public view returns (bool) { } function hasNodeExpired(address entity, uint128 nodeId) public view returns (bool) { } function hasMaxPayments(address entity, uint128 nodeId) public view returns (bool) { } function getNodeId(address entity, uint128 nodeId) public view returns (bytes memory) { } function getNodePaidOn(address entity, uint128 nodeId) public view returns (uint256) { } function isNodeActive(address entity, uint128 nodeId) public view returns (bool) { } function isNodeBYON(address entity, uint128 nodeId) public view returns (bool) { } function hasLegacyNode(address entity) public view returns (bool) { } function approveBYONNode(address entity, uint128 nodeId) public { } function suspendBYONNode(address entity, uint128 nodeId) public { } function setNodeIsActive(address entity, uint128 nodeId, bool isActive) public { } function setNodeIsNaaS(address entity, uint128 nodeId, bool isNaaS) public { } function migrateLegacyNode(address entity) private { } function claimAll(uint256 blockNumber, bool toStrongPool) public payable { } function payAll(uint256 nodeCount) public payable { } function addNFTBonusContract(address _contract) public { } function disableNodeAdmin(address entity, uint128 nodeId) public { } function updateLimits(uint128 _maxNodes, uint256 _maxPaymentPeriods) public { } }
hasNodeExpired(sender,nodeId)==false,"too late"
278,057
hasNodeExpired(sender,nodeId)==false
"too soon"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/StrongPoolInterface.sol"; import "./interfaces/IERC1155Preset.sol"; import "./interfaces/StrongNFTBonusInterface.sol"; import "./lib/rewards.sol"; contract ServiceV18 { event Requested(address indexed miner); event Claimed(address indexed miner, uint256 reward); using SafeMath for uint256; bool public initDone; address public admin; address public pendingAdmin; address public superAdmin; address public pendingSuperAdmin; address public serviceAdmin; address public parameterAdmin; address payable public feeCollector; IERC20 public strongToken; StrongPoolInterface public strongPool; uint256 public rewardPerBlockNumerator; uint256 public rewardPerBlockDenominator; uint256 public naasRewardPerBlockNumerator; uint256 public naasRewardPerBlockDenominator; uint256 public claimingFeeNumerator; uint256 public claimingFeeDenominator; uint256 public requestingFeeInWei; uint256 public strongFeeInWei; uint256 public recurringFeeInWei; uint256 public recurringNaaSFeeInWei; uint256 public recurringPaymentCycleInBlocks; uint256 public rewardBalance; mapping(address => uint256) public entityBlockLastClaimedOn; address[] public entities; mapping(address => uint256) public entityIndex; mapping(address => bool) public entityActive; mapping(address => bool) public requestPending; mapping(address => bool) public entityIsNaaS; mapping(address => uint256) public paidOnBlock; uint256 public activeEntities; string public desciption; uint256 public claimingFeeInWei; uint256 public naasRequestingFeeInWei; uint256 public naasStrongFeeInWei; bool public removedTokens; mapping(address => uint256) public traunch; uint256 public currentTraunch; mapping(bytes => bool) public entityNodeIsActive; mapping(bytes => bool) public entityNodeIsBYON; mapping(bytes => uint256) public entityNodeTraunch; mapping(bytes => uint256) public entityNodePaidOnBlock; mapping(bytes => uint256) public entityNodeClaimedOnBlock; mapping(address => uint128) public entityNodeCount; event Paid(address indexed entity, uint128 nodeId, bool isBYON, bool isRenewal, uint256 upToBlockNumber); event Migrated(address indexed from, address indexed to, uint128 fromNodeId, uint128 toNodeId, bool isBYON); uint256 public rewardPerBlockNumeratorNew; uint256 public rewardPerBlockDenominatorNew; uint256 public naasRewardPerBlockNumeratorNew; uint256 public naasRewardPerBlockDenominatorNew; uint256 public rewardPerBlockNewEffectiveBlock; StrongNFTBonusInterface public strongNFTBonus; uint256 public gracePeriodInBlocks; uint128 public maxNodes; uint256 public maxPaymentPeriods; event Deactivated(address indexed entity, uint128 nodeId, bool isBYON, uint256 atBlockNumber); function init( address strongTokenAddress, address strongPoolAddress, address adminAddress, address superAdminAddress, uint256 rewardPerBlockNumeratorValue, uint256 rewardPerBlockDenominatorValue, uint256 naasRewardPerBlockNumeratorValue, uint256 naasRewardPerBlockDenominatorValue, uint256 requestingFeeInWeiValue, uint256 strongFeeInWeiValue, uint256 recurringFeeInWeiValue, uint256 recurringNaaSFeeInWeiValue, uint256 recurringPaymentCycleInBlocksValue, uint256 claimingFeeNumeratorValue, uint256 claimingFeeDenominatorValue, string memory desc ) public { } function updateServiceAdmin(address newServiceAdmin) public { } function updateParameterAdmin(address newParameterAdmin) public { } function updateFeeCollector(address payable newFeeCollector) public { } function setPendingAdmin(address newPendingAdmin) public { } function acceptAdmin() public { } function setPendingSuperAdmin(address newPendingSuperAdmin) public { } function acceptSuperAdmin() public { } function isEntityActive(address entity) public view returns (bool) { } function updateRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateNaaSRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateRewardPerBlockNew( uint256 numerator, uint256 denominator, uint256 numeratorNass, uint256 denominatorNass, uint256 effectiveBlock ) public { } function deposit(uint256 amount) public { } function withdraw(address destination, uint256 amount) public { } function updateRequestingFee(uint256 feeInWei) public { } function updateStrongFee(uint256 feeInWei) public { } function updateNaasRequestingFee(uint256 feeInWei) public { } function updateNaasStrongFee(uint256 feeInWei) public { } function updateClaimingFee(uint256 numerator, uint256 denominator) public { } function updateRecurringFee(uint256 feeInWei) public { } function updateRecurringNaaSFee(uint256 feeInWei) public { } function updateRecurringPaymentCycleInBlocks(uint256 blocks) public { } function updateGracePeriodInBlocks(uint256 blocks) public { } function requestAccess(bool isNaaS) public payable { } function setEntityActiveStatus(address entity, bool status) public { } function payFee(uint128 nodeId) public payable { address sender = msg.sender == address(this) ? tx.origin : msg.sender; bytes memory id = getNodeId(sender, nodeId); if (hasLegacyNode(sender)) { migrateLegacyNode(sender); } require(doesNodeExist(sender, nodeId), "doesnt exist"); require(hasNodeExpired(sender, nodeId) == false, "too late"); require(<FILL_ME>) if (entityNodeIsBYON[id]) { require(msg.value == recurringFeeInWei, "invalid fee"); } else { require(msg.value == recurringNaaSFeeInWei, "invalid fee"); } feeCollector.transfer(msg.value); entityNodePaidOnBlock[id] = entityNodePaidOnBlock[id].add(recurringPaymentCycleInBlocks); emit Paid(sender, nodeId, entityNodeIsBYON[id], true, entityNodePaidOnBlock[id]); } function getReward(address entity, uint128 nodeId) public view returns (uint256) { } function getRewardByBlock(address entity, uint128 nodeId, uint256 blockNumber) public view returns (uint256) { } function getRewardByBlockLegacy(address entity, uint256 blockNumber) public view returns (uint256) { } function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) public payable returns (bool) { } function getRewardAll(address entity, uint256 blockNumber) public view returns (uint256) { } function canBePaid(address entity, uint128 nodeId) public view returns (bool) { } function doesNodeExist(address entity, uint128 nodeId) public view returns (bool) { } function hasNodeExpired(address entity, uint128 nodeId) public view returns (bool) { } function hasMaxPayments(address entity, uint128 nodeId) public view returns (bool) { } function getNodeId(address entity, uint128 nodeId) public view returns (bytes memory) { } function getNodePaidOn(address entity, uint128 nodeId) public view returns (uint256) { } function isNodeActive(address entity, uint128 nodeId) public view returns (bool) { } function isNodeBYON(address entity, uint128 nodeId) public view returns (bool) { } function hasLegacyNode(address entity) public view returns (bool) { } function approveBYONNode(address entity, uint128 nodeId) public { } function suspendBYONNode(address entity, uint128 nodeId) public { } function setNodeIsActive(address entity, uint128 nodeId, bool isActive) public { } function setNodeIsNaaS(address entity, uint128 nodeId, bool isNaaS) public { } function migrateLegacyNode(address entity) private { } function claimAll(uint256 blockNumber, bool toStrongPool) public payable { } function payAll(uint256 nodeCount) public payable { } function addNFTBonusContract(address _contract) public { } function disableNodeAdmin(address entity, uint128 nodeId) public { } function updateLimits(uint128 _maxNodes, uint256 _maxPaymentPeriods) public { } }
hasMaxPayments(sender,nodeId)==false,"too soon"
278,057
hasMaxPayments(sender,nodeId)==false
"not active"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/StrongPoolInterface.sol"; import "./interfaces/IERC1155Preset.sol"; import "./interfaces/StrongNFTBonusInterface.sol"; import "./lib/rewards.sol"; contract ServiceV18 { event Requested(address indexed miner); event Claimed(address indexed miner, uint256 reward); using SafeMath for uint256; bool public initDone; address public admin; address public pendingAdmin; address public superAdmin; address public pendingSuperAdmin; address public serviceAdmin; address public parameterAdmin; address payable public feeCollector; IERC20 public strongToken; StrongPoolInterface public strongPool; uint256 public rewardPerBlockNumerator; uint256 public rewardPerBlockDenominator; uint256 public naasRewardPerBlockNumerator; uint256 public naasRewardPerBlockDenominator; uint256 public claimingFeeNumerator; uint256 public claimingFeeDenominator; uint256 public requestingFeeInWei; uint256 public strongFeeInWei; uint256 public recurringFeeInWei; uint256 public recurringNaaSFeeInWei; uint256 public recurringPaymentCycleInBlocks; uint256 public rewardBalance; mapping(address => uint256) public entityBlockLastClaimedOn; address[] public entities; mapping(address => uint256) public entityIndex; mapping(address => bool) public entityActive; mapping(address => bool) public requestPending; mapping(address => bool) public entityIsNaaS; mapping(address => uint256) public paidOnBlock; uint256 public activeEntities; string public desciption; uint256 public claimingFeeInWei; uint256 public naasRequestingFeeInWei; uint256 public naasStrongFeeInWei; bool public removedTokens; mapping(address => uint256) public traunch; uint256 public currentTraunch; mapping(bytes => bool) public entityNodeIsActive; mapping(bytes => bool) public entityNodeIsBYON; mapping(bytes => uint256) public entityNodeTraunch; mapping(bytes => uint256) public entityNodePaidOnBlock; mapping(bytes => uint256) public entityNodeClaimedOnBlock; mapping(address => uint128) public entityNodeCount; event Paid(address indexed entity, uint128 nodeId, bool isBYON, bool isRenewal, uint256 upToBlockNumber); event Migrated(address indexed from, address indexed to, uint128 fromNodeId, uint128 toNodeId, bool isBYON); uint256 public rewardPerBlockNumeratorNew; uint256 public rewardPerBlockDenominatorNew; uint256 public naasRewardPerBlockNumeratorNew; uint256 public naasRewardPerBlockDenominatorNew; uint256 public rewardPerBlockNewEffectiveBlock; StrongNFTBonusInterface public strongNFTBonus; uint256 public gracePeriodInBlocks; uint128 public maxNodes; uint256 public maxPaymentPeriods; event Deactivated(address indexed entity, uint128 nodeId, bool isBYON, uint256 atBlockNumber); function init( address strongTokenAddress, address strongPoolAddress, address adminAddress, address superAdminAddress, uint256 rewardPerBlockNumeratorValue, uint256 rewardPerBlockDenominatorValue, uint256 naasRewardPerBlockNumeratorValue, uint256 naasRewardPerBlockDenominatorValue, uint256 requestingFeeInWeiValue, uint256 strongFeeInWeiValue, uint256 recurringFeeInWeiValue, uint256 recurringNaaSFeeInWeiValue, uint256 recurringPaymentCycleInBlocksValue, uint256 claimingFeeNumeratorValue, uint256 claimingFeeDenominatorValue, string memory desc ) public { } function updateServiceAdmin(address newServiceAdmin) public { } function updateParameterAdmin(address newParameterAdmin) public { } function updateFeeCollector(address payable newFeeCollector) public { } function setPendingAdmin(address newPendingAdmin) public { } function acceptAdmin() public { } function setPendingSuperAdmin(address newPendingSuperAdmin) public { } function acceptSuperAdmin() public { } function isEntityActive(address entity) public view returns (bool) { } function updateRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateNaaSRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateRewardPerBlockNew( uint256 numerator, uint256 denominator, uint256 numeratorNass, uint256 denominatorNass, uint256 effectiveBlock ) public { } function deposit(uint256 amount) public { } function withdraw(address destination, uint256 amount) public { } function updateRequestingFee(uint256 feeInWei) public { } function updateStrongFee(uint256 feeInWei) public { } function updateNaasRequestingFee(uint256 feeInWei) public { } function updateNaasStrongFee(uint256 feeInWei) public { } function updateClaimingFee(uint256 numerator, uint256 denominator) public { } function updateRecurringFee(uint256 feeInWei) public { } function updateRecurringNaaSFee(uint256 feeInWei) public { } function updateRecurringPaymentCycleInBlocks(uint256 blocks) public { } function updateGracePeriodInBlocks(uint256 blocks) public { } function requestAccess(bool isNaaS) public payable { } function setEntityActiveStatus(address entity, bool status) public { } function payFee(uint128 nodeId) public payable { } function getReward(address entity, uint128 nodeId) public view returns (uint256) { } function getRewardByBlock(address entity, uint128 nodeId, uint256 blockNumber) public view returns (uint256) { } function getRewardByBlockLegacy(address entity, uint256 blockNumber) public view returns (uint256) { } function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) public payable returns (bool) { address sender = msg.sender == address(this) || msg.sender == address(strongNFTBonus) ? tx.origin : msg.sender; bytes memory id = getNodeId(sender, nodeId); if (hasLegacyNode(sender)) { migrateLegacyNode(sender); } uint256 blockLastClaimedOn = entityNodeClaimedOnBlock[id] != 0 ? entityNodeClaimedOnBlock[id] : entityNodePaidOnBlock[id]; uint256 blockLastPaidOn = entityNodePaidOnBlock[id]; require(blockLastClaimedOn != 0, "never claimed"); require(blockNumber <= block.number, "invalid block"); require(blockNumber > blockLastClaimedOn, "too soon"); require(<FILL_ME>) if ( (!entityNodeIsBYON[id] && recurringNaaSFeeInWei != 0) || (entityNodeIsBYON[id] && recurringFeeInWei != 0) ) { require(blockNumber < blockLastPaidOn.add(recurringPaymentCycleInBlocks), "pay fee"); } uint256 reward = getRewardByBlock(sender, nodeId, blockNumber); require(reward > 0, "no reward"); uint256 fee = reward.mul(claimingFeeNumerator).div(claimingFeeDenominator); require(msg.value >= fee, "invalid fee"); feeCollector.transfer(msg.value); if (toStrongPool) { strongToken.approve(address(strongPool), reward); strongPool.mineFor(sender, reward); } else { strongToken.transfer(sender, reward); } rewardBalance = rewardBalance.sub(reward); entityNodeClaimedOnBlock[id] = blockNumber; emit Claimed(sender, reward); return true; } function getRewardAll(address entity, uint256 blockNumber) public view returns (uint256) { } function canBePaid(address entity, uint128 nodeId) public view returns (bool) { } function doesNodeExist(address entity, uint128 nodeId) public view returns (bool) { } function hasNodeExpired(address entity, uint128 nodeId) public view returns (bool) { } function hasMaxPayments(address entity, uint128 nodeId) public view returns (bool) { } function getNodeId(address entity, uint128 nodeId) public view returns (bytes memory) { } function getNodePaidOn(address entity, uint128 nodeId) public view returns (uint256) { } function isNodeActive(address entity, uint128 nodeId) public view returns (bool) { } function isNodeBYON(address entity, uint128 nodeId) public view returns (bool) { } function hasLegacyNode(address entity) public view returns (bool) { } function approveBYONNode(address entity, uint128 nodeId) public { } function suspendBYONNode(address entity, uint128 nodeId) public { } function setNodeIsActive(address entity, uint128 nodeId, bool isActive) public { } function setNodeIsNaaS(address entity, uint128 nodeId, bool isNaaS) public { } function migrateLegacyNode(address entity) private { } function claimAll(uint256 blockNumber, bool toStrongPool) public payable { } function payAll(uint256 nodeCount) public payable { } function addNFTBonusContract(address _contract) public { } function disableNodeAdmin(address entity, uint128 nodeId) public { } function updateLimits(uint128 _maxNodes, uint256 _maxPaymentPeriods) public { } }
!entityNodeIsBYON[id]||entityNodeIsActive[id],"not active"
278,057
!entityNodeIsBYON[id]||entityNodeIsActive[id]
"claim failed"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./interfaces/StrongPoolInterface.sol"; import "./interfaces/IERC1155Preset.sol"; import "./interfaces/StrongNFTBonusInterface.sol"; import "./lib/rewards.sol"; contract ServiceV18 { event Requested(address indexed miner); event Claimed(address indexed miner, uint256 reward); using SafeMath for uint256; bool public initDone; address public admin; address public pendingAdmin; address public superAdmin; address public pendingSuperAdmin; address public serviceAdmin; address public parameterAdmin; address payable public feeCollector; IERC20 public strongToken; StrongPoolInterface public strongPool; uint256 public rewardPerBlockNumerator; uint256 public rewardPerBlockDenominator; uint256 public naasRewardPerBlockNumerator; uint256 public naasRewardPerBlockDenominator; uint256 public claimingFeeNumerator; uint256 public claimingFeeDenominator; uint256 public requestingFeeInWei; uint256 public strongFeeInWei; uint256 public recurringFeeInWei; uint256 public recurringNaaSFeeInWei; uint256 public recurringPaymentCycleInBlocks; uint256 public rewardBalance; mapping(address => uint256) public entityBlockLastClaimedOn; address[] public entities; mapping(address => uint256) public entityIndex; mapping(address => bool) public entityActive; mapping(address => bool) public requestPending; mapping(address => bool) public entityIsNaaS; mapping(address => uint256) public paidOnBlock; uint256 public activeEntities; string public desciption; uint256 public claimingFeeInWei; uint256 public naasRequestingFeeInWei; uint256 public naasStrongFeeInWei; bool public removedTokens; mapping(address => uint256) public traunch; uint256 public currentTraunch; mapping(bytes => bool) public entityNodeIsActive; mapping(bytes => bool) public entityNodeIsBYON; mapping(bytes => uint256) public entityNodeTraunch; mapping(bytes => uint256) public entityNodePaidOnBlock; mapping(bytes => uint256) public entityNodeClaimedOnBlock; mapping(address => uint128) public entityNodeCount; event Paid(address indexed entity, uint128 nodeId, bool isBYON, bool isRenewal, uint256 upToBlockNumber); event Migrated(address indexed from, address indexed to, uint128 fromNodeId, uint128 toNodeId, bool isBYON); uint256 public rewardPerBlockNumeratorNew; uint256 public rewardPerBlockDenominatorNew; uint256 public naasRewardPerBlockNumeratorNew; uint256 public naasRewardPerBlockDenominatorNew; uint256 public rewardPerBlockNewEffectiveBlock; StrongNFTBonusInterface public strongNFTBonus; uint256 public gracePeriodInBlocks; uint128 public maxNodes; uint256 public maxPaymentPeriods; event Deactivated(address indexed entity, uint128 nodeId, bool isBYON, uint256 atBlockNumber); function init( address strongTokenAddress, address strongPoolAddress, address adminAddress, address superAdminAddress, uint256 rewardPerBlockNumeratorValue, uint256 rewardPerBlockDenominatorValue, uint256 naasRewardPerBlockNumeratorValue, uint256 naasRewardPerBlockDenominatorValue, uint256 requestingFeeInWeiValue, uint256 strongFeeInWeiValue, uint256 recurringFeeInWeiValue, uint256 recurringNaaSFeeInWeiValue, uint256 recurringPaymentCycleInBlocksValue, uint256 claimingFeeNumeratorValue, uint256 claimingFeeDenominatorValue, string memory desc ) public { } function updateServiceAdmin(address newServiceAdmin) public { } function updateParameterAdmin(address newParameterAdmin) public { } function updateFeeCollector(address payable newFeeCollector) public { } function setPendingAdmin(address newPendingAdmin) public { } function acceptAdmin() public { } function setPendingSuperAdmin(address newPendingSuperAdmin) public { } function acceptSuperAdmin() public { } function isEntityActive(address entity) public view returns (bool) { } function updateRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateNaaSRewardPerBlock(uint256 numerator, uint256 denominator) public { } function updateRewardPerBlockNew( uint256 numerator, uint256 denominator, uint256 numeratorNass, uint256 denominatorNass, uint256 effectiveBlock ) public { } function deposit(uint256 amount) public { } function withdraw(address destination, uint256 amount) public { } function updateRequestingFee(uint256 feeInWei) public { } function updateStrongFee(uint256 feeInWei) public { } function updateNaasRequestingFee(uint256 feeInWei) public { } function updateNaasStrongFee(uint256 feeInWei) public { } function updateClaimingFee(uint256 numerator, uint256 denominator) public { } function updateRecurringFee(uint256 feeInWei) public { } function updateRecurringNaaSFee(uint256 feeInWei) public { } function updateRecurringPaymentCycleInBlocks(uint256 blocks) public { } function updateGracePeriodInBlocks(uint256 blocks) public { } function requestAccess(bool isNaaS) public payable { } function setEntityActiveStatus(address entity, bool status) public { } function payFee(uint128 nodeId) public payable { } function getReward(address entity, uint128 nodeId) public view returns (uint256) { } function getRewardByBlock(address entity, uint128 nodeId, uint256 blockNumber) public view returns (uint256) { } function getRewardByBlockLegacy(address entity, uint256 blockNumber) public view returns (uint256) { } function claim(uint128 nodeId, uint256 blockNumber, bool toStrongPool) public payable returns (bool) { } function getRewardAll(address entity, uint256 blockNumber) public view returns (uint256) { } function canBePaid(address entity, uint128 nodeId) public view returns (bool) { } function doesNodeExist(address entity, uint128 nodeId) public view returns (bool) { } function hasNodeExpired(address entity, uint128 nodeId) public view returns (bool) { } function hasMaxPayments(address entity, uint128 nodeId) public view returns (bool) { } function getNodeId(address entity, uint128 nodeId) public view returns (bytes memory) { } function getNodePaidOn(address entity, uint128 nodeId) public view returns (uint256) { } function isNodeActive(address entity, uint128 nodeId) public view returns (bool) { } function isNodeBYON(address entity, uint128 nodeId) public view returns (bool) { } function hasLegacyNode(address entity) public view returns (bool) { } function approveBYONNode(address entity, uint128 nodeId) public { } function suspendBYONNode(address entity, uint128 nodeId) public { } function setNodeIsActive(address entity, uint128 nodeId, bool isActive) public { } function setNodeIsNaaS(address entity, uint128 nodeId, bool isNaaS) public { } function migrateLegacyNode(address entity) private { } function claimAll(uint256 blockNumber, bool toStrongPool) public payable { uint256 value = msg.value; for (uint16 i = 1; i <= entityNodeCount[msg.sender]; i++) { uint256 reward = getRewardByBlock(msg.sender, i, blockNumber); uint256 fee = reward.mul(claimingFeeNumerator).div(claimingFeeDenominator); require(value >= fee, "invalid fee"); if (reward > 0) { require(<FILL_ME>) } value = value.sub(fee); } } function payAll(uint256 nodeCount) public payable { } function addNFTBonusContract(address _contract) public { } function disableNodeAdmin(address entity, uint128 nodeId) public { } function updateLimits(uint128 _maxNodes, uint256 _maxPaymentPeriods) public { } }
this.claim{value:fee}(i,blockNumber,toStrongPool),"claim failed"
278,057
this.claim{value:fee}(i,blockNumber,toStrongPool)
"Max amount of free mints per wallet exceeded"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract xFellaz is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; uint256 public PRICE; string private BASE_URI; bool public IS_PRE_SALE_ACTIVE; bool public IS_PUBLIC_SALE_ACTIVE; uint256 public MAX_FREE_MINT_PER_WALLET; uint256 public MAX_MINT_PER_TRANSACTION; uint256 public MAX_FREE_MINT_SUPPLY; uint256 public MAX_SUPPLY; mapping(address => uint256) private freeMintCounts; constructor(uint256 price, string memory baseURI, uint256 maxFreeMintPerWallet, uint256 maxMintPerTransaction, uint256 maxFreeMintSupply, uint256 maxSupply) ERC721A("0xFellaz", "0xFellaz") { } function _baseURI() internal view virtual override returns (string memory) { } function setPrice(uint256 customPrice) external onlyOwner { } function lowerMaxSupply(uint256 newMaxSupply) external onlyOwner { } function raiseMaxFreeMintSupply(uint256 newMaxFreeMintSupply) external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function setPreSaleActive(bool preSaleIsActive) external onlyOwner { } function setPublicSaleActive(bool publicSaleIsActive) external onlyOwner { } modifier validMintAmount(uint256 _mintAmount) { } function freeMint(uint256 _mintAmount) public payable validMintAmount(_mintAmount) { require(IS_PRE_SALE_ACTIVE, "Pre-sale is not active"); require(<FILL_ME>) require(totalSupply() + _mintAmount <= MAX_FREE_MINT_SUPPLY, "Max free mint supply exceeded"); // Update how many free mints this address has done freeMintCounts[msg.sender] += _mintAmount; _safeMint(msg.sender, _mintAmount); } function mint(uint256 _mintAmount) public payable validMintAmount(_mintAmount) { } function mintOwner(address _to, uint256 _mintAmount) public onlyOwner validMintAmount(_mintAmount) { } address private constant payoutAddress1 = 0x573fbe11F7d06284b699dFd4B9C941D47700e6BA; address private constant payoutAddress2 = 0x5Cb90548FaAeD7Aa5DAd107D35DEb266B1E7ED66; address private constant payoutAddress3 = 0x6eF8C5eaEC11Fc6fa5bbA4BB183DFd5A1405E8cf; address private constant payoutAddress4 = 0xea0F9254950C9dC5c2DD3423091ace518bd69aa9; function withdraw() public onlyOwner nonReentrant { } }
freeMintCounts[msg.sender]+_mintAmount<=MAX_FREE_MINT_PER_WALLET,"Max amount of free mints per wallet exceeded"
278,107
freeMintCounts[msg.sender]+_mintAmount<=MAX_FREE_MINT_PER_WALLET
"Max free mint supply exceeded"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract xFellaz is ERC721A, Ownable, ReentrancyGuard { using Strings for uint256; uint256 public PRICE; string private BASE_URI; bool public IS_PRE_SALE_ACTIVE; bool public IS_PUBLIC_SALE_ACTIVE; uint256 public MAX_FREE_MINT_PER_WALLET; uint256 public MAX_MINT_PER_TRANSACTION; uint256 public MAX_FREE_MINT_SUPPLY; uint256 public MAX_SUPPLY; mapping(address => uint256) private freeMintCounts; constructor(uint256 price, string memory baseURI, uint256 maxFreeMintPerWallet, uint256 maxMintPerTransaction, uint256 maxFreeMintSupply, uint256 maxSupply) ERC721A("0xFellaz", "0xFellaz") { } function _baseURI() internal view virtual override returns (string memory) { } function setPrice(uint256 customPrice) external onlyOwner { } function lowerMaxSupply(uint256 newMaxSupply) external onlyOwner { } function raiseMaxFreeMintSupply(uint256 newMaxFreeMintSupply) external onlyOwner { } function setBaseURI(string memory newBaseURI) external onlyOwner { } function setPreSaleActive(bool preSaleIsActive) external onlyOwner { } function setPublicSaleActive(bool publicSaleIsActive) external onlyOwner { } modifier validMintAmount(uint256 _mintAmount) { } function freeMint(uint256 _mintAmount) public payable validMintAmount(_mintAmount) { require(IS_PRE_SALE_ACTIVE, "Pre-sale is not active"); require(freeMintCounts[msg.sender] + _mintAmount <= MAX_FREE_MINT_PER_WALLET, "Max amount of free mints per wallet exceeded"); require(<FILL_ME>) // Update how many free mints this address has done freeMintCounts[msg.sender] += _mintAmount; _safeMint(msg.sender, _mintAmount); } function mint(uint256 _mintAmount) public payable validMintAmount(_mintAmount) { } function mintOwner(address _to, uint256 _mintAmount) public onlyOwner validMintAmount(_mintAmount) { } address private constant payoutAddress1 = 0x573fbe11F7d06284b699dFd4B9C941D47700e6BA; address private constant payoutAddress2 = 0x5Cb90548FaAeD7Aa5DAd107D35DEb266B1E7ED66; address private constant payoutAddress3 = 0x6eF8C5eaEC11Fc6fa5bbA4BB183DFd5A1405E8cf; address private constant payoutAddress4 = 0xea0F9254950C9dC5c2DD3423091ace518bd69aa9; function withdraw() public onlyOwner nonReentrant { } }
totalSupply()+_mintAmount<=MAX_FREE_MINT_SUPPLY,"Max free mint supply exceeded"
278,107
totalSupply()+_mintAmount<=MAX_FREE_MINT_SUPPLY
"Token already exists"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; // :+%%+: // .-*@@@@@@@@#=. // :+%@@@@@@@@@@@@@@%+: // -*@@@@@@@%+: :=#@@@@@@@*-. // :+#@@@@@@@*- :+%@@@@@@@@@%+: // -*@@@@@@@%+: -*@@@@@@@%*%@@@@@@@*- // .=#@@@@@@@*=. :+%@@@@@@@*=. .-*@@@@@@@#=. // @@@@@@@%+: -*@@@@@@@%+: -+%@@@@@@%+: // @@@@@=. :=#@@@@@@@#=. .=#@@@@@@@*-. :+% // @@@@% -*@@@@@@@%+- :+%@@@@@@%+: .=#@@@@ // @@@@% +@@@@@@#=. .=#@@@@@@@#=. :+%@@@@@@@ // @@@@% +@@@@+ :+%@@@@@@%+: .-*@@@@@@@@@@@ // @@@@% +@@@@- =*@@@@@@@#=. :+%@@@@@@%*-#@@@@ // @@@@% +@@@@- @@@@@%+: .=*@@@@@@@#=. *@@@@ // @@@@% +@@@@- @@@@# :+%@@@@@@@*- *@@@@ // @@@@% +@@@@- @@@@# #@@@@@#+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. :+= *@@@@ // @@@@% +@@@@- @@@@# #@@@@. *@@@* *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@@@@+ *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@%+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. . .=%@@@@ // %@@@% +@@@@- @@@@# #@@@@. :+%@@@@@@% // .-*# +@@@@- @@@@# #@@@@. .=#@@@@@@@*=. // +@@@@- @@@@# #@@@@. :+%@@@@@@%+: // :*@@@- @@@@# #@@@@#@@@@@@@#=. // :+: @@@@# #@@@@@@@@%+: // @@@@# #@@@@@#=. // :+%@# #@%+: /* * @title ERC1155 contract for MetaOrganization (https://metaorganization.com/) * * @author loltapes.eth */ contract MetaOrganizationAccessPass is ERC1155, ERC1155Burnable, ERC1155Supply, Ownable, Pausable { // @notice configuration of a single pass struct Pass { uint128 mintPrice; uint96 maxSupply; uint32 walletMintLimit; string metadataUri; } // tokenId => (wallet => amount minted) mapping(uint256 => mapping(address => uint256)) public minted; // @notice indicates which pass is currently up for sale uint256 public tokenIdForSale; // tokenId => Pass mapping(uint256 => Pass) public tokens; // @notice allows to freeze the configuration of a pass to prevent further modification // tokenId => is frozen flag mapping(uint256 => bool) public frozenTokens; // @notice indicates a token metadata was frozen // compatibility with OpenSea https://docs.opensea.io/docs/metadata-standards event PermanentURI(string _value, uint256 indexed _id); // @notice address to withdraw funds address payable private _payoutAddress; // @notice Current root for reserved sale proofs bytes32 public currentMerkleRoot; constructor( address payoutAddress ) ERC1155("") { } // region Pass Configuration function addPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri, uint256 teamReserve ) external onlyOwner { require(<FILL_ME>) require(maxSupply > 0, "Supply must be > 0"); require(maxSupply >= teamReserve, "Max supply must be >= team reserve"); tokens[tokenId] = Pass(mintPrice, maxSupply, walletMintLimit, metadataUri); if (teamReserve > 0) { mintInternal(msg.sender, tokenId, teamReserve); } // required as per ERC1155 standard emit URI(metadataUri, tokenId); } function editPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri ) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassWalletMintLimit(uint256 tokenId, uint32 walletMintLimit) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassMetadataUri(uint256 tokenId, string calldata metadataUri) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function freezeMetadata(uint256 tokenId) external onlyOwner whenTokenValid(tokenId) { } function uri(uint256 tokenId) public view override whenTokenValid(tokenId) returns (string memory) { } // endregion // region Sale function saleState() external view returns (uint256 state) { } function startPublicSale(uint256 tokenId) external onlyOwner whenPaused whenTokenValid(tokenId) { } function startReservedSale(uint256 tokenId, bytes32 merkleRoot) external onlyOwner whenPaused whenTokenValid(tokenId) { } function pauseSale() external onlyOwner whenNotPaused { } function mintSale(uint256 amount, bytes32[] calldata proof) external payable whenNotPaused { } function mintOwner(uint256 tokenId, uint256 amount) external onlyOwner { } function mintInternal(address to, uint256 tokenId, uint256 amount) internal { } function setMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) { } function createLeaf(address account) public pure returns (bytes32) { } // endregion // region Payment receive() external payable {} function withdraw() external onlyOwner { } function setPayoutAddress(address payoutAddress) external onlyOwner { } // endregion // region Default Overrides function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } // endregion // region modifiers modifier whenTokenValid(uint256 tokenId) { } modifier whenNotFrozen(uint256 tokenId) { } // endregion } /* Contract by loltapes.eth _ _ _ ____ | | | | | / __ \| | ___ | | |_ __ _ _ __ ___ ___ / / _` | |/ _ \| | __/ _` | '_ \ / _ \/ __| | | (_| | | (_) | | || (_| | |_) | __/\__ \ \ \__,_|_|\___/|_|\__\__,_| .__/ \___||___/ \____/ | | |_| */
tokens[tokenId].maxSupply==0,"Token already exists"
278,131
tokens[tokenId].maxSupply==0
"Invalid merkle proof"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; // :+%%+: // .-*@@@@@@@@#=. // :+%@@@@@@@@@@@@@@%+: // -*@@@@@@@%+: :=#@@@@@@@*-. // :+#@@@@@@@*- :+%@@@@@@@@@%+: // -*@@@@@@@%+: -*@@@@@@@%*%@@@@@@@*- // .=#@@@@@@@*=. :+%@@@@@@@*=. .-*@@@@@@@#=. // @@@@@@@%+: -*@@@@@@@%+: -+%@@@@@@%+: // @@@@@=. :=#@@@@@@@#=. .=#@@@@@@@*-. :+% // @@@@% -*@@@@@@@%+- :+%@@@@@@%+: .=#@@@@ // @@@@% +@@@@@@#=. .=#@@@@@@@#=. :+%@@@@@@@ // @@@@% +@@@@+ :+%@@@@@@%+: .-*@@@@@@@@@@@ // @@@@% +@@@@- =*@@@@@@@#=. :+%@@@@@@%*-#@@@@ // @@@@% +@@@@- @@@@@%+: .=*@@@@@@@#=. *@@@@ // @@@@% +@@@@- @@@@# :+%@@@@@@@*- *@@@@ // @@@@% +@@@@- @@@@# #@@@@@#+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. :+= *@@@@ // @@@@% +@@@@- @@@@# #@@@@. *@@@* *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@@@@+ *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@%+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. . .=%@@@@ // %@@@% +@@@@- @@@@# #@@@@. :+%@@@@@@% // .-*# +@@@@- @@@@# #@@@@. .=#@@@@@@@*=. // +@@@@- @@@@# #@@@@. :+%@@@@@@%+: // :*@@@- @@@@# #@@@@#@@@@@@@#=. // :+: @@@@# #@@@@@@@@%+: // @@@@# #@@@@@#=. // :+%@# #@%+: /* * @title ERC1155 contract for MetaOrganization (https://metaorganization.com/) * * @author loltapes.eth */ contract MetaOrganizationAccessPass is ERC1155, ERC1155Burnable, ERC1155Supply, Ownable, Pausable { // @notice configuration of a single pass struct Pass { uint128 mintPrice; uint96 maxSupply; uint32 walletMintLimit; string metadataUri; } // tokenId => (wallet => amount minted) mapping(uint256 => mapping(address => uint256)) public minted; // @notice indicates which pass is currently up for sale uint256 public tokenIdForSale; // tokenId => Pass mapping(uint256 => Pass) public tokens; // @notice allows to freeze the configuration of a pass to prevent further modification // tokenId => is frozen flag mapping(uint256 => bool) public frozenTokens; // @notice indicates a token metadata was frozen // compatibility with OpenSea https://docs.opensea.io/docs/metadata-standards event PermanentURI(string _value, uint256 indexed _id); // @notice address to withdraw funds address payable private _payoutAddress; // @notice Current root for reserved sale proofs bytes32 public currentMerkleRoot; constructor( address payoutAddress ) ERC1155("") { } // region Pass Configuration function addPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri, uint256 teamReserve ) external onlyOwner { } function editPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri ) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassWalletMintLimit(uint256 tokenId, uint32 walletMintLimit) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassMetadataUri(uint256 tokenId, string calldata metadataUri) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function freezeMetadata(uint256 tokenId) external onlyOwner whenTokenValid(tokenId) { } function uri(uint256 tokenId) public view override whenTokenValid(tokenId) returns (string memory) { } // endregion // region Sale function saleState() external view returns (uint256 state) { } function startPublicSale(uint256 tokenId) external onlyOwner whenPaused whenTokenValid(tokenId) { } function startReservedSale(uint256 tokenId, bytes32 merkleRoot) external onlyOwner whenPaused whenTokenValid(tokenId) { } function pauseSale() external onlyOwner whenNotPaused { } function mintSale(uint256 amount, bytes32[] calldata proof) external payable whenNotPaused { // Reserved validation if (currentMerkleRoot != 0) { require(<FILL_ME>) } // require to mint at least one require(amount > 0, "Amount must be > 0"); Pass storage pass = tokens[tokenIdForSale]; // require enough supply require(totalSupply(tokenIdForSale) + amount <= pass.maxSupply, "Over supply"); // enforce per wallet mint limit (0 == no limit) if (pass.walletMintLimit > 0) { require(minted[tokenIdForSale][msg.sender] + amount <= pass.walletMintLimit, "Over wallet mint limit"); } // require exact payment require(msg.value == amount * pass.mintPrice, "Wrong ETH amount"); mintInternal(msg.sender, tokenIdForSale, amount); // finish sale automatically if (totalSupply(tokenIdForSale) == pass.maxSupply) { _pause(); } } function mintOwner(uint256 tokenId, uint256 amount) external onlyOwner { } function mintInternal(address to, uint256 tokenId, uint256 amount) internal { } function setMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) { } function createLeaf(address account) public pure returns (bytes32) { } // endregion // region Payment receive() external payable {} function withdraw() external onlyOwner { } function setPayoutAddress(address payoutAddress) external onlyOwner { } // endregion // region Default Overrides function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } // endregion // region modifiers modifier whenTokenValid(uint256 tokenId) { } modifier whenNotFrozen(uint256 tokenId) { } // endregion } /* Contract by loltapes.eth _ _ _ ____ | | | | | / __ \| | ___ | | |_ __ _ _ __ ___ ___ / / _` | |/ _ \| | __/ _` | '_ \ / _ \/ __| | | (_| | | (_) | | || (_| | |_) | __/\__ \ \ \__,_|_|\___/|_|\__\__,_| .__/ \___||___/ \____/ | | |_| */
verify(createLeaf(msg.sender),proof),"Invalid merkle proof"
278,131
verify(createLeaf(msg.sender),proof)
"Over supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; // :+%%+: // .-*@@@@@@@@#=. // :+%@@@@@@@@@@@@@@%+: // -*@@@@@@@%+: :=#@@@@@@@*-. // :+#@@@@@@@*- :+%@@@@@@@@@%+: // -*@@@@@@@%+: -*@@@@@@@%*%@@@@@@@*- // .=#@@@@@@@*=. :+%@@@@@@@*=. .-*@@@@@@@#=. // @@@@@@@%+: -*@@@@@@@%+: -+%@@@@@@%+: // @@@@@=. :=#@@@@@@@#=. .=#@@@@@@@*-. :+% // @@@@% -*@@@@@@@%+- :+%@@@@@@%+: .=#@@@@ // @@@@% +@@@@@@#=. .=#@@@@@@@#=. :+%@@@@@@@ // @@@@% +@@@@+ :+%@@@@@@%+: .-*@@@@@@@@@@@ // @@@@% +@@@@- =*@@@@@@@#=. :+%@@@@@@%*-#@@@@ // @@@@% +@@@@- @@@@@%+: .=*@@@@@@@#=. *@@@@ // @@@@% +@@@@- @@@@# :+%@@@@@@@*- *@@@@ // @@@@% +@@@@- @@@@# #@@@@@#+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. :+= *@@@@ // @@@@% +@@@@- @@@@# #@@@@. *@@@* *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@@@@+ *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@%+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. . .=%@@@@ // %@@@% +@@@@- @@@@# #@@@@. :+%@@@@@@% // .-*# +@@@@- @@@@# #@@@@. .=#@@@@@@@*=. // +@@@@- @@@@# #@@@@. :+%@@@@@@%+: // :*@@@- @@@@# #@@@@#@@@@@@@#=. // :+: @@@@# #@@@@@@@@%+: // @@@@# #@@@@@#=. // :+%@# #@%+: /* * @title ERC1155 contract for MetaOrganization (https://metaorganization.com/) * * @author loltapes.eth */ contract MetaOrganizationAccessPass is ERC1155, ERC1155Burnable, ERC1155Supply, Ownable, Pausable { // @notice configuration of a single pass struct Pass { uint128 mintPrice; uint96 maxSupply; uint32 walletMintLimit; string metadataUri; } // tokenId => (wallet => amount minted) mapping(uint256 => mapping(address => uint256)) public minted; // @notice indicates which pass is currently up for sale uint256 public tokenIdForSale; // tokenId => Pass mapping(uint256 => Pass) public tokens; // @notice allows to freeze the configuration of a pass to prevent further modification // tokenId => is frozen flag mapping(uint256 => bool) public frozenTokens; // @notice indicates a token metadata was frozen // compatibility with OpenSea https://docs.opensea.io/docs/metadata-standards event PermanentURI(string _value, uint256 indexed _id); // @notice address to withdraw funds address payable private _payoutAddress; // @notice Current root for reserved sale proofs bytes32 public currentMerkleRoot; constructor( address payoutAddress ) ERC1155("") { } // region Pass Configuration function addPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri, uint256 teamReserve ) external onlyOwner { } function editPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri ) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassWalletMintLimit(uint256 tokenId, uint32 walletMintLimit) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassMetadataUri(uint256 tokenId, string calldata metadataUri) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function freezeMetadata(uint256 tokenId) external onlyOwner whenTokenValid(tokenId) { } function uri(uint256 tokenId) public view override whenTokenValid(tokenId) returns (string memory) { } // endregion // region Sale function saleState() external view returns (uint256 state) { } function startPublicSale(uint256 tokenId) external onlyOwner whenPaused whenTokenValid(tokenId) { } function startReservedSale(uint256 tokenId, bytes32 merkleRoot) external onlyOwner whenPaused whenTokenValid(tokenId) { } function pauseSale() external onlyOwner whenNotPaused { } function mintSale(uint256 amount, bytes32[] calldata proof) external payable whenNotPaused { // Reserved validation if (currentMerkleRoot != 0) { require(verify(createLeaf(msg.sender), proof), "Invalid merkle proof"); } // require to mint at least one require(amount > 0, "Amount must be > 0"); Pass storage pass = tokens[tokenIdForSale]; // require enough supply require(<FILL_ME>) // enforce per wallet mint limit (0 == no limit) if (pass.walletMintLimit > 0) { require(minted[tokenIdForSale][msg.sender] + amount <= pass.walletMintLimit, "Over wallet mint limit"); } // require exact payment require(msg.value == amount * pass.mintPrice, "Wrong ETH amount"); mintInternal(msg.sender, tokenIdForSale, amount); // finish sale automatically if (totalSupply(tokenIdForSale) == pass.maxSupply) { _pause(); } } function mintOwner(uint256 tokenId, uint256 amount) external onlyOwner { } function mintInternal(address to, uint256 tokenId, uint256 amount) internal { } function setMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) { } function createLeaf(address account) public pure returns (bytes32) { } // endregion // region Payment receive() external payable {} function withdraw() external onlyOwner { } function setPayoutAddress(address payoutAddress) external onlyOwner { } // endregion // region Default Overrides function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } // endregion // region modifiers modifier whenTokenValid(uint256 tokenId) { } modifier whenNotFrozen(uint256 tokenId) { } // endregion } /* Contract by loltapes.eth _ _ _ ____ | | | | | / __ \| | ___ | | |_ __ _ _ __ ___ ___ / / _` | |/ _ \| | __/ _` | '_ \ / _ \/ __| | | (_| | | (_) | | || (_| | |_) | __/\__ \ \ \__,_|_|\___/|_|\__\__,_| .__/ \___||___/ \____/ | | |_| */
totalSupply(tokenIdForSale)+amount<=pass.maxSupply,"Over supply"
278,131
totalSupply(tokenIdForSale)+amount<=pass.maxSupply
"Over wallet mint limit"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; // :+%%+: // .-*@@@@@@@@#=. // :+%@@@@@@@@@@@@@@%+: // -*@@@@@@@%+: :=#@@@@@@@*-. // :+#@@@@@@@*- :+%@@@@@@@@@%+: // -*@@@@@@@%+: -*@@@@@@@%*%@@@@@@@*- // .=#@@@@@@@*=. :+%@@@@@@@*=. .-*@@@@@@@#=. // @@@@@@@%+: -*@@@@@@@%+: -+%@@@@@@%+: // @@@@@=. :=#@@@@@@@#=. .=#@@@@@@@*-. :+% // @@@@% -*@@@@@@@%+- :+%@@@@@@%+: .=#@@@@ // @@@@% +@@@@@@#=. .=#@@@@@@@#=. :+%@@@@@@@ // @@@@% +@@@@+ :+%@@@@@@%+: .-*@@@@@@@@@@@ // @@@@% +@@@@- =*@@@@@@@#=. :+%@@@@@@%*-#@@@@ // @@@@% +@@@@- @@@@@%+: .=*@@@@@@@#=. *@@@@ // @@@@% +@@@@- @@@@# :+%@@@@@@@*- *@@@@ // @@@@% +@@@@- @@@@# #@@@@@#+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. :+= *@@@@ // @@@@% +@@@@- @@@@# #@@@@. *@@@* *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@@@@+ *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@%+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. . .=%@@@@ // %@@@% +@@@@- @@@@# #@@@@. :+%@@@@@@% // .-*# +@@@@- @@@@# #@@@@. .=#@@@@@@@*=. // +@@@@- @@@@# #@@@@. :+%@@@@@@%+: // :*@@@- @@@@# #@@@@#@@@@@@@#=. // :+: @@@@# #@@@@@@@@%+: // @@@@# #@@@@@#=. // :+%@# #@%+: /* * @title ERC1155 contract for MetaOrganization (https://metaorganization.com/) * * @author loltapes.eth */ contract MetaOrganizationAccessPass is ERC1155, ERC1155Burnable, ERC1155Supply, Ownable, Pausable { // @notice configuration of a single pass struct Pass { uint128 mintPrice; uint96 maxSupply; uint32 walletMintLimit; string metadataUri; } // tokenId => (wallet => amount minted) mapping(uint256 => mapping(address => uint256)) public minted; // @notice indicates which pass is currently up for sale uint256 public tokenIdForSale; // tokenId => Pass mapping(uint256 => Pass) public tokens; // @notice allows to freeze the configuration of a pass to prevent further modification // tokenId => is frozen flag mapping(uint256 => bool) public frozenTokens; // @notice indicates a token metadata was frozen // compatibility with OpenSea https://docs.opensea.io/docs/metadata-standards event PermanentURI(string _value, uint256 indexed _id); // @notice address to withdraw funds address payable private _payoutAddress; // @notice Current root for reserved sale proofs bytes32 public currentMerkleRoot; constructor( address payoutAddress ) ERC1155("") { } // region Pass Configuration function addPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri, uint256 teamReserve ) external onlyOwner { } function editPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri ) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassWalletMintLimit(uint256 tokenId, uint32 walletMintLimit) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassMetadataUri(uint256 tokenId, string calldata metadataUri) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function freezeMetadata(uint256 tokenId) external onlyOwner whenTokenValid(tokenId) { } function uri(uint256 tokenId) public view override whenTokenValid(tokenId) returns (string memory) { } // endregion // region Sale function saleState() external view returns (uint256 state) { } function startPublicSale(uint256 tokenId) external onlyOwner whenPaused whenTokenValid(tokenId) { } function startReservedSale(uint256 tokenId, bytes32 merkleRoot) external onlyOwner whenPaused whenTokenValid(tokenId) { } function pauseSale() external onlyOwner whenNotPaused { } function mintSale(uint256 amount, bytes32[] calldata proof) external payable whenNotPaused { // Reserved validation if (currentMerkleRoot != 0) { require(verify(createLeaf(msg.sender), proof), "Invalid merkle proof"); } // require to mint at least one require(amount > 0, "Amount must be > 0"); Pass storage pass = tokens[tokenIdForSale]; // require enough supply require(totalSupply(tokenIdForSale) + amount <= pass.maxSupply, "Over supply"); // enforce per wallet mint limit (0 == no limit) if (pass.walletMintLimit > 0) { require(<FILL_ME>) } // require exact payment require(msg.value == amount * pass.mintPrice, "Wrong ETH amount"); mintInternal(msg.sender, tokenIdForSale, amount); // finish sale automatically if (totalSupply(tokenIdForSale) == pass.maxSupply) { _pause(); } } function mintOwner(uint256 tokenId, uint256 amount) external onlyOwner { } function mintInternal(address to, uint256 tokenId, uint256 amount) internal { } function setMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) { } function createLeaf(address account) public pure returns (bytes32) { } // endregion // region Payment receive() external payable {} function withdraw() external onlyOwner { } function setPayoutAddress(address payoutAddress) external onlyOwner { } // endregion // region Default Overrides function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } // endregion // region modifiers modifier whenTokenValid(uint256 tokenId) { } modifier whenNotFrozen(uint256 tokenId) { } // endregion } /* Contract by loltapes.eth _ _ _ ____ | | | | | / __ \| | ___ | | |_ __ _ _ __ ___ ___ / / _` | |/ _ \| | __/ _` | '_ \ / _ \/ __| | | (_| | | (_) | | || (_| | |_) | __/\__ \ \ \__,_|_|\___/|_|\__\__,_| .__/ \___||___/ \____/ | | |_| */
minted[tokenIdForSale][msg.sender]+amount<=pass.walletMintLimit,"Over wallet mint limit"
278,131
minted[tokenIdForSale][msg.sender]+amount<=pass.walletMintLimit
"Over supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; // :+%%+: // .-*@@@@@@@@#=. // :+%@@@@@@@@@@@@@@%+: // -*@@@@@@@%+: :=#@@@@@@@*-. // :+#@@@@@@@*- :+%@@@@@@@@@%+: // -*@@@@@@@%+: -*@@@@@@@%*%@@@@@@@*- // .=#@@@@@@@*=. :+%@@@@@@@*=. .-*@@@@@@@#=. // @@@@@@@%+: -*@@@@@@@%+: -+%@@@@@@%+: // @@@@@=. :=#@@@@@@@#=. .=#@@@@@@@*-. :+% // @@@@% -*@@@@@@@%+- :+%@@@@@@%+: .=#@@@@ // @@@@% +@@@@@@#=. .=#@@@@@@@#=. :+%@@@@@@@ // @@@@% +@@@@+ :+%@@@@@@%+: .-*@@@@@@@@@@@ // @@@@% +@@@@- =*@@@@@@@#=. :+%@@@@@@%*-#@@@@ // @@@@% +@@@@- @@@@@%+: .=*@@@@@@@#=. *@@@@ // @@@@% +@@@@- @@@@# :+%@@@@@@@*- *@@@@ // @@@@% +@@@@- @@@@# #@@@@@#+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. :+= *@@@@ // @@@@% +@@@@- @@@@# #@@@@. *@@@* *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@@@@+ *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@%+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. . .=%@@@@ // %@@@% +@@@@- @@@@# #@@@@. :+%@@@@@@% // .-*# +@@@@- @@@@# #@@@@. .=#@@@@@@@*=. // +@@@@- @@@@# #@@@@. :+%@@@@@@%+: // :*@@@- @@@@# #@@@@#@@@@@@@#=. // :+: @@@@# #@@@@@@@@%+: // @@@@# #@@@@@#=. // :+%@# #@%+: /* * @title ERC1155 contract for MetaOrganization (https://metaorganization.com/) * * @author loltapes.eth */ contract MetaOrganizationAccessPass is ERC1155, ERC1155Burnable, ERC1155Supply, Ownable, Pausable { // @notice configuration of a single pass struct Pass { uint128 mintPrice; uint96 maxSupply; uint32 walletMintLimit; string metadataUri; } // tokenId => (wallet => amount minted) mapping(uint256 => mapping(address => uint256)) public minted; // @notice indicates which pass is currently up for sale uint256 public tokenIdForSale; // tokenId => Pass mapping(uint256 => Pass) public tokens; // @notice allows to freeze the configuration of a pass to prevent further modification // tokenId => is frozen flag mapping(uint256 => bool) public frozenTokens; // @notice indicates a token metadata was frozen // compatibility with OpenSea https://docs.opensea.io/docs/metadata-standards event PermanentURI(string _value, uint256 indexed _id); // @notice address to withdraw funds address payable private _payoutAddress; // @notice Current root for reserved sale proofs bytes32 public currentMerkleRoot; constructor( address payoutAddress ) ERC1155("") { } // region Pass Configuration function addPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri, uint256 teamReserve ) external onlyOwner { } function editPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri ) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassWalletMintLimit(uint256 tokenId, uint32 walletMintLimit) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassMetadataUri(uint256 tokenId, string calldata metadataUri) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function freezeMetadata(uint256 tokenId) external onlyOwner whenTokenValid(tokenId) { } function uri(uint256 tokenId) public view override whenTokenValid(tokenId) returns (string memory) { } // endregion // region Sale function saleState() external view returns (uint256 state) { } function startPublicSale(uint256 tokenId) external onlyOwner whenPaused whenTokenValid(tokenId) { } function startReservedSale(uint256 tokenId, bytes32 merkleRoot) external onlyOwner whenPaused whenTokenValid(tokenId) { } function pauseSale() external onlyOwner whenNotPaused { } function mintSale(uint256 amount, bytes32[] calldata proof) external payable whenNotPaused { } function mintOwner(uint256 tokenId, uint256 amount) external onlyOwner { require(<FILL_ME>) mintInternal(msg.sender, tokenId, amount); } function mintInternal(address to, uint256 tokenId, uint256 amount) internal { } function setMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) { } function createLeaf(address account) public pure returns (bytes32) { } // endregion // region Payment receive() external payable {} function withdraw() external onlyOwner { } function setPayoutAddress(address payoutAddress) external onlyOwner { } // endregion // region Default Overrides function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } // endregion // region modifiers modifier whenTokenValid(uint256 tokenId) { } modifier whenNotFrozen(uint256 tokenId) { } // endregion } /* Contract by loltapes.eth _ _ _ ____ | | | | | / __ \| | ___ | | |_ __ _ _ __ ___ ___ / / _` | |/ _ \| | __/ _` | '_ \ / _ \/ __| | | (_| | | (_) | | || (_| | |_) | __/\__ \ \ \__,_|_|\___/|_|\__\__,_| .__/ \___||___/ \____/ | | |_| */
totalSupply(tokenId)+amount<=tokens[tokenId].maxSupply,"Over supply"
278,131
totalSupply(tokenId)+amount<=tokens[tokenId].maxSupply
"Invalid token"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; // :+%%+: // .-*@@@@@@@@#=. // :+%@@@@@@@@@@@@@@%+: // -*@@@@@@@%+: :=#@@@@@@@*-. // :+#@@@@@@@*- :+%@@@@@@@@@%+: // -*@@@@@@@%+: -*@@@@@@@%*%@@@@@@@*- // .=#@@@@@@@*=. :+%@@@@@@@*=. .-*@@@@@@@#=. // @@@@@@@%+: -*@@@@@@@%+: -+%@@@@@@%+: // @@@@@=. :=#@@@@@@@#=. .=#@@@@@@@*-. :+% // @@@@% -*@@@@@@@%+- :+%@@@@@@%+: .=#@@@@ // @@@@% +@@@@@@#=. .=#@@@@@@@#=. :+%@@@@@@@ // @@@@% +@@@@+ :+%@@@@@@%+: .-*@@@@@@@@@@@ // @@@@% +@@@@- =*@@@@@@@#=. :+%@@@@@@%*-#@@@@ // @@@@% +@@@@- @@@@@%+: .=*@@@@@@@#=. *@@@@ // @@@@% +@@@@- @@@@# :+%@@@@@@@*- *@@@@ // @@@@% +@@@@- @@@@# #@@@@@#+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. :+= *@@@@ // @@@@% +@@@@- @@@@# #@@@@. *@@@* *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@@@@+ *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@%+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. . .=%@@@@ // %@@@% +@@@@- @@@@# #@@@@. :+%@@@@@@% // .-*# +@@@@- @@@@# #@@@@. .=#@@@@@@@*=. // +@@@@- @@@@# #@@@@. :+%@@@@@@%+: // :*@@@- @@@@# #@@@@#@@@@@@@#=. // :+: @@@@# #@@@@@@@@%+: // @@@@# #@@@@@#=. // :+%@# #@%+: /* * @title ERC1155 contract for MetaOrganization (https://metaorganization.com/) * * @author loltapes.eth */ contract MetaOrganizationAccessPass is ERC1155, ERC1155Burnable, ERC1155Supply, Ownable, Pausable { // @notice configuration of a single pass struct Pass { uint128 mintPrice; uint96 maxSupply; uint32 walletMintLimit; string metadataUri; } // tokenId => (wallet => amount minted) mapping(uint256 => mapping(address => uint256)) public minted; // @notice indicates which pass is currently up for sale uint256 public tokenIdForSale; // tokenId => Pass mapping(uint256 => Pass) public tokens; // @notice allows to freeze the configuration of a pass to prevent further modification // tokenId => is frozen flag mapping(uint256 => bool) public frozenTokens; // @notice indicates a token metadata was frozen // compatibility with OpenSea https://docs.opensea.io/docs/metadata-standards event PermanentURI(string _value, uint256 indexed _id); // @notice address to withdraw funds address payable private _payoutAddress; // @notice Current root for reserved sale proofs bytes32 public currentMerkleRoot; constructor( address payoutAddress ) ERC1155("") { } // region Pass Configuration function addPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri, uint256 teamReserve ) external onlyOwner { } function editPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri ) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassWalletMintLimit(uint256 tokenId, uint32 walletMintLimit) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassMetadataUri(uint256 tokenId, string calldata metadataUri) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function freezeMetadata(uint256 tokenId) external onlyOwner whenTokenValid(tokenId) { } function uri(uint256 tokenId) public view override whenTokenValid(tokenId) returns (string memory) { } // endregion // region Sale function saleState() external view returns (uint256 state) { } function startPublicSale(uint256 tokenId) external onlyOwner whenPaused whenTokenValid(tokenId) { } function startReservedSale(uint256 tokenId, bytes32 merkleRoot) external onlyOwner whenPaused whenTokenValid(tokenId) { } function pauseSale() external onlyOwner whenNotPaused { } function mintSale(uint256 amount, bytes32[] calldata proof) external payable whenNotPaused { } function mintOwner(uint256 tokenId, uint256 amount) external onlyOwner { } function mintInternal(address to, uint256 tokenId, uint256 amount) internal { } function setMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) { } function createLeaf(address account) public pure returns (bytes32) { } // endregion // region Payment receive() external payable {} function withdraw() external onlyOwner { } function setPayoutAddress(address payoutAddress) external onlyOwner { } // endregion // region Default Overrides function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } // endregion // region modifiers modifier whenTokenValid(uint256 tokenId) { require(<FILL_ME>) _; } modifier whenNotFrozen(uint256 tokenId) { } // endregion } /* Contract by loltapes.eth _ _ _ ____ | | | | | / __ \| | ___ | | |_ __ _ _ __ ___ ___ / / _` | |/ _ \| | __/ _` | '_ \ / _ \/ __| | | (_| | | (_) | | || (_| | |_) | __/\__ \ \ \__,_|_|\___/|_|\__\__,_| .__/ \___||___/ \____/ | | |_| */
tokens[tokenId].maxSupply>0,"Invalid token"
278,131
tokens[tokenId].maxSupply>0
"Configuration is frozen"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; // :+%%+: // .-*@@@@@@@@#=. // :+%@@@@@@@@@@@@@@%+: // -*@@@@@@@%+: :=#@@@@@@@*-. // :+#@@@@@@@*- :+%@@@@@@@@@%+: // -*@@@@@@@%+: -*@@@@@@@%*%@@@@@@@*- // .=#@@@@@@@*=. :+%@@@@@@@*=. .-*@@@@@@@#=. // @@@@@@@%+: -*@@@@@@@%+: -+%@@@@@@%+: // @@@@@=. :=#@@@@@@@#=. .=#@@@@@@@*-. :+% // @@@@% -*@@@@@@@%+- :+%@@@@@@%+: .=#@@@@ // @@@@% +@@@@@@#=. .=#@@@@@@@#=. :+%@@@@@@@ // @@@@% +@@@@+ :+%@@@@@@%+: .-*@@@@@@@@@@@ // @@@@% +@@@@- =*@@@@@@@#=. :+%@@@@@@%*-#@@@@ // @@@@% +@@@@- @@@@@%+: .=*@@@@@@@#=. *@@@@ // @@@@% +@@@@- @@@@# :+%@@@@@@@*- *@@@@ // @@@@% +@@@@- @@@@# #@@@@@#+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. :+= *@@@@ // @@@@% +@@@@- @@@@# #@@@@. *@@@* *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@@@@+ *@@@@ // @@@@% +@@@@- @@@@# #@@@@. .@%+: *@@@@ // @@@@% +@@@@- @@@@# #@@@@. . .=%@@@@ // %@@@% +@@@@- @@@@# #@@@@. :+%@@@@@@% // .-*# +@@@@- @@@@# #@@@@. .=#@@@@@@@*=. // +@@@@- @@@@# #@@@@. :+%@@@@@@%+: // :*@@@- @@@@# #@@@@#@@@@@@@#=. // :+: @@@@# #@@@@@@@@%+: // @@@@# #@@@@@#=. // :+%@# #@%+: /* * @title ERC1155 contract for MetaOrganization (https://metaorganization.com/) * * @author loltapes.eth */ contract MetaOrganizationAccessPass is ERC1155, ERC1155Burnable, ERC1155Supply, Ownable, Pausable { // @notice configuration of a single pass struct Pass { uint128 mintPrice; uint96 maxSupply; uint32 walletMintLimit; string metadataUri; } // tokenId => (wallet => amount minted) mapping(uint256 => mapping(address => uint256)) public minted; // @notice indicates which pass is currently up for sale uint256 public tokenIdForSale; // tokenId => Pass mapping(uint256 => Pass) public tokens; // @notice allows to freeze the configuration of a pass to prevent further modification // tokenId => is frozen flag mapping(uint256 => bool) public frozenTokens; // @notice indicates a token metadata was frozen // compatibility with OpenSea https://docs.opensea.io/docs/metadata-standards event PermanentURI(string _value, uint256 indexed _id); // @notice address to withdraw funds address payable private _payoutAddress; // @notice Current root for reserved sale proofs bytes32 public currentMerkleRoot; constructor( address payoutAddress ) ERC1155("") { } // region Pass Configuration function addPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri, uint256 teamReserve ) external onlyOwner { } function editPass( uint256 tokenId, uint128 mintPrice, uint96 maxSupply, uint32 walletMintLimit, string calldata metadataUri ) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassWalletMintLimit(uint256 tokenId, uint32 walletMintLimit) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function setPassMetadataUri(uint256 tokenId, string calldata metadataUri) external onlyOwner whenTokenValid(tokenId) whenNotFrozen(tokenId) { } function freezeMetadata(uint256 tokenId) external onlyOwner whenTokenValid(tokenId) { } function uri(uint256 tokenId) public view override whenTokenValid(tokenId) returns (string memory) { } // endregion // region Sale function saleState() external view returns (uint256 state) { } function startPublicSale(uint256 tokenId) external onlyOwner whenPaused whenTokenValid(tokenId) { } function startReservedSale(uint256 tokenId, bytes32 merkleRoot) external onlyOwner whenPaused whenTokenValid(tokenId) { } function pauseSale() external onlyOwner whenNotPaused { } function mintSale(uint256 amount, bytes32[] calldata proof) external payable whenNotPaused { } function mintOwner(uint256 tokenId, uint256 amount) external onlyOwner { } function mintInternal(address to, uint256 tokenId, uint256 amount) internal { } function setMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function verify(bytes32 leaf, bytes32[] memory proof) internal view returns (bool) { } function createLeaf(address account) public pure returns (bytes32) { } // endregion // region Payment receive() external payable {} function withdraw() external onlyOwner { } function setPayoutAddress(address payoutAddress) external onlyOwner { } // endregion // region Default Overrides function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } // endregion // region modifiers modifier whenTokenValid(uint256 tokenId) { } modifier whenNotFrozen(uint256 tokenId) { require(<FILL_ME>) _; } // endregion } /* Contract by loltapes.eth _ _ _ ____ | | | | | / __ \| | ___ | | |_ __ _ _ __ ___ ___ / / _` | |/ _ \| | __/ _` | '_ \ / _ \/ __| | | (_| | | (_) | | || (_| | |_) | __/\__ \ \ \__,_|_|\___/|_|\__\__,_| .__/ \___||___/ \____/ | | |_| */
!frozenTokens[tokenId],"Configuration is frozen"
278,131
!frozenTokens[tokenId]
null
pragma solidity ^0.4.24; library SafeMath { function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { } function div(uint256 _a, uint256 _b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } contract Ownable { address public owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() public { } modifier onlyOwner() { } function transferOwnership(address _newOwner) public onlyOwner { } function _transferOwnership(address _newOwner) internal { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256) { } } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256) { } function increaseApproval(address _spender, uint256 _addedValue) public returns (bool) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { } } contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function increaseApproval(address _spender, uint256 _addedValue) public whenNotPaused returns (bool success) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public whenNotPaused returns (bool success) { } } contract FrozenableToken is Ownable { mapping (address => bool) public frozenAccount; event FrozenFunds(address indexed to, bool frozen); modifier whenNotFrozen(address _who) { require(<FILL_ME>) _; } function freezeAccount(address _to, bool _freeze) public onlyOwner { } } contract GOP is PausableToken, FrozenableToken { string public name = "gop.finance"; string public symbol = "GOP"; uint256 public decimals = 18; uint256 INITIAL_SUPPLY = 10000000 * (10 ** uint256(decimals)); constructor() public { } function() public payable { } function transfer(address _to, uint256 _value) public whenNotFrozen(_to) returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotFrozen(_from) returns (bool) { } }
!frozenAccount[msg.sender]&&!frozenAccount[_who]
278,170
!frozenAccount[msg.sender]&&!frozenAccount[_who]
"new owner not module admin."
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.11; // Interface import { ITokenERC1155 } from "../interfaces/token/ITokenERC1155.sol"; // Token import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; // Signature utils import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol"; // Access Control + security import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; // Utils import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/MulticallUpgradeable.sol"; import "../lib/CurrencyTransferLib.sol"; import "../lib/FeeType.sol"; import "../openzeppelin-presets/metatx/ERC2771ContextUpgradeable.sol"; // Helper interfaces import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol"; // Thirdweb top-level import "../interfaces/ITWFee.sol"; contract TokenERC1155 is Initializable, EIP712Upgradeable, ReentrancyGuardUpgradeable, ERC2771ContextUpgradeable, MulticallUpgradeable, AccessControlEnumerableUpgradeable, ERC1155Upgradeable, ITokenERC1155 { using ECDSAUpgradeable for bytes32; using StringsUpgradeable for uint256; bytes32 private constant MODULE_TYPE = bytes32("TokenERC1155"); uint256 private constant VERSION = 1; // Token name string public name; // Token symbol string public symbol; bytes32 private constant TYPEHASH = keccak256( "MintRequest(address to,address royaltyRecipient,uint256 royaltyBps,address primarySaleRecipient,uint256 tokenId,string uri,uint256 quantity,uint256 pricePerToken,address currency,uint128 validityStartTimestamp,uint128 validityEndTimestamp,bytes32 uid)" ); /// @dev Only TRANSFER_ROLE holders can have tokens transferred from or to them, during restricted transfers. bytes32 private constant TRANSFER_ROLE = keccak256("TRANSFER_ROLE"); /// @dev Only MINTER_ROLE holders can sign off on `MintRequest`s. bytes32 private constant MINTER_ROLE = keccak256("MINTER_ROLE"); /// @dev Max bps in the thirdweb system uint256 private constant MAX_BPS = 10_000; /// @dev The address interpreted as native token of the chain. address private constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /// @dev The thirdweb contract with fee related information. ITWFee public immutable thirdwebFee; /// @dev Owner of the contract (purpose: OpenSea compatibility, etc.) address private _owner; /// @dev The next token ID of the NFT to mint. uint256 public nextTokenIdToMint; /// @dev The adress that receives all primary sales value. address public primarySaleRecipient; /// @dev The adress that receives all primary sales value. address public platformFeeRecipient; /// @dev The recipient of who gets the royalty. address private royaltyRecipient; /// @dev The percentage of royalty how much royalty in basis points. uint128 private royaltyBps; /// @dev The % of primary sales collected by the contract as fees. uint128 public platformFeeBps; /// @dev Contract level metadata. string public contractURI; /// @dev Mapping from mint request UID => whether the mint request is processed. mapping(bytes32 => bool) private minted; mapping(uint256 => string) private _tokenURI; /// @dev Token ID => total circulating supply of tokens with that ID. mapping(uint256 => uint256) public totalSupply; /// @dev Token ID => the address of the recipient of primary sales. mapping(uint256 => address) public saleRecipientForToken; /// @dev Token ID => royalty recipient and bps for token mapping(uint256 => RoyaltyInfo) private royaltyInfoForToken; constructor(address _thirdwebFee) initializer { } /// @dev Initiliazes the contract, like a constructor. function initialize( address _defaultAdmin, string memory _name, string memory _symbol, string memory _contractURI, address[] memory _trustedForwarders, address _primarySaleRecipient, address _royaltyRecipient, uint128 _royaltyBps, uint128 _platformFeeBps, address _platformFeeRecipient ) external initializer { } /// ===== Public functions ===== /// @dev Returns the module type of the contract. function contractType() external pure returns (bytes32) { } /// @dev Returns the version of the contract. function contractVersion() external pure returns (uint8) { } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { } /// @dev Verifies that a mint request is signed by an account holding MINTER_ROLE (at the time of the function call). function verify(MintRequest calldata _req, bytes calldata _signature) public view returns (bool, address) { } /// @dev Returns the URI for a tokenId function uri(uint256 _tokenId) public view override returns (string memory) { } /// @dev Lets an account with MINTER_ROLE mint an NFT. function mintTo( address _to, uint256 _tokenId, string calldata _uri, uint256 _amount ) external onlyRole(MINTER_ROLE) { } /// ===== External functions ===== /// @dev See EIP-2981 function royaltyInfo(uint256 tokenId, uint256 salePrice) external view virtual returns (address receiver, uint256 royaltyAmount) { } /// @dev Mints an NFT according to the provided mint request. function mintWithSignature(MintRequest calldata _req, bytes calldata _signature) external payable nonReentrant { } // ===== Setter functions ===== /// @dev Lets a module admin set the default recipient of all primary sales. function setPrimarySaleRecipient(address _saleRecipient) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// @dev Lets a module admin update the royalty bps and recipient. function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// @dev Lets a module admin set the royalty recipient for a particular token Id. function setRoyaltyInfoForToken( uint256 _tokenId, address _recipient, uint256 _bps ) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// @dev Lets a module admin update the fees on primary sales. function setPlatformFeeInfo(address _platformFeeRecipient, uint256 _platformFeeBps) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// @dev Lets a module admin set a new owner for the contract. The new owner must be a module admin. function setOwner(address _newOwner) external onlyRole(DEFAULT_ADMIN_ROLE) { require(<FILL_ME>) address _prevOwner = _owner; _owner = _newOwner; emit OwnerUpdated(_prevOwner, _newOwner); } /// @dev Lets a module admin set the URI for contract-level metadata. function setContractURI(string calldata _uri) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// ===== Getter functions ===== /// @dev Returns the platform fee bps and recipient. function getPlatformFeeInfo() external view returns (address, uint16) { } /// @dev Returns the platform fee bps and recipient. function getDefaultRoyaltyInfo() external view returns (address, uint16) { } /// @dev Returns the royalty recipient for a particular token Id. function getRoyaltyInfoForToken(uint256 _tokenId) public view returns (address, uint16) { } /// ===== Internal functions ===== /// @dev Mints an NFT to `to` function _mintTo( address _to, string calldata _uri, uint256 _tokenId, uint256 _amount ) internal { } /// @dev Returns the address of the signer of the mint request. function recoverAddress(MintRequest calldata _req, bytes calldata _signature) internal view returns (address) { } /// @dev Resolves 'stack too deep' error in `recoverAddress`. function _encodeRequest(MintRequest calldata _req) internal pure returns (bytes memory) { } /// @dev Verifies that a mint request is valid. function verifyRequest(MintRequest calldata _req, bytes calldata _signature) internal returns (address) { } /// @dev Collects and distributes the primary sale value of tokens being claimed. function collectPrice(MintRequest memory _req) internal { } /// ===== Low-level overrides ===== /// @dev Lets a token owner burn the tokens they own (i.e. destroy for good) function burn( address account, uint256 id, uint256 value ) public virtual { } /// @dev Lets a token owner burn multiple tokens they own at once (i.e. destroy for good) function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { } function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerableUpgradeable, ERC1155Upgradeable, IERC165Upgradeable) returns (bool) { } function _msgSender() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (address sender) { } function _msgData() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (bytes calldata) { } }
hasRole(DEFAULT_ADMIN_ROLE,_newOwner),"new owner not module admin."
278,189
hasRole(DEFAULT_ADMIN_ROLE,_newOwner)
"restricted to TRANSFER_ROLE holders."
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.11; // Interface import { ITokenERC1155 } from "../interfaces/token/ITokenERC1155.sol"; // Token import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; // Signature utils import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol"; // Access Control + security import "@openzeppelin/contracts-upgradeable/access/AccessControlEnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; // Utils import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/MulticallUpgradeable.sol"; import "../lib/CurrencyTransferLib.sol"; import "../lib/FeeType.sol"; import "../openzeppelin-presets/metatx/ERC2771ContextUpgradeable.sol"; // Helper interfaces import "@openzeppelin/contracts-upgradeable/interfaces/IERC2981Upgradeable.sol"; // Thirdweb top-level import "../interfaces/ITWFee.sol"; contract TokenERC1155 is Initializable, EIP712Upgradeable, ReentrancyGuardUpgradeable, ERC2771ContextUpgradeable, MulticallUpgradeable, AccessControlEnumerableUpgradeable, ERC1155Upgradeable, ITokenERC1155 { using ECDSAUpgradeable for bytes32; using StringsUpgradeable for uint256; bytes32 private constant MODULE_TYPE = bytes32("TokenERC1155"); uint256 private constant VERSION = 1; // Token name string public name; // Token symbol string public symbol; bytes32 private constant TYPEHASH = keccak256( "MintRequest(address to,address royaltyRecipient,uint256 royaltyBps,address primarySaleRecipient,uint256 tokenId,string uri,uint256 quantity,uint256 pricePerToken,address currency,uint128 validityStartTimestamp,uint128 validityEndTimestamp,bytes32 uid)" ); /// @dev Only TRANSFER_ROLE holders can have tokens transferred from or to them, during restricted transfers. bytes32 private constant TRANSFER_ROLE = keccak256("TRANSFER_ROLE"); /// @dev Only MINTER_ROLE holders can sign off on `MintRequest`s. bytes32 private constant MINTER_ROLE = keccak256("MINTER_ROLE"); /// @dev Max bps in the thirdweb system uint256 private constant MAX_BPS = 10_000; /// @dev The address interpreted as native token of the chain. address private constant NATIVE_TOKEN = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /// @dev The thirdweb contract with fee related information. ITWFee public immutable thirdwebFee; /// @dev Owner of the contract (purpose: OpenSea compatibility, etc.) address private _owner; /// @dev The next token ID of the NFT to mint. uint256 public nextTokenIdToMint; /// @dev The adress that receives all primary sales value. address public primarySaleRecipient; /// @dev The adress that receives all primary sales value. address public platformFeeRecipient; /// @dev The recipient of who gets the royalty. address private royaltyRecipient; /// @dev The percentage of royalty how much royalty in basis points. uint128 private royaltyBps; /// @dev The % of primary sales collected by the contract as fees. uint128 public platformFeeBps; /// @dev Contract level metadata. string public contractURI; /// @dev Mapping from mint request UID => whether the mint request is processed. mapping(bytes32 => bool) private minted; mapping(uint256 => string) private _tokenURI; /// @dev Token ID => total circulating supply of tokens with that ID. mapping(uint256 => uint256) public totalSupply; /// @dev Token ID => the address of the recipient of primary sales. mapping(uint256 => address) public saleRecipientForToken; /// @dev Token ID => royalty recipient and bps for token mapping(uint256 => RoyaltyInfo) private royaltyInfoForToken; constructor(address _thirdwebFee) initializer { } /// @dev Initiliazes the contract, like a constructor. function initialize( address _defaultAdmin, string memory _name, string memory _symbol, string memory _contractURI, address[] memory _trustedForwarders, address _primarySaleRecipient, address _royaltyRecipient, uint128 _royaltyBps, uint128 _platformFeeBps, address _platformFeeRecipient ) external initializer { } /// ===== Public functions ===== /// @dev Returns the module type of the contract. function contractType() external pure returns (bytes32) { } /// @dev Returns the version of the contract. function contractVersion() external pure returns (uint8) { } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { } /// @dev Verifies that a mint request is signed by an account holding MINTER_ROLE (at the time of the function call). function verify(MintRequest calldata _req, bytes calldata _signature) public view returns (bool, address) { } /// @dev Returns the URI for a tokenId function uri(uint256 _tokenId) public view override returns (string memory) { } /// @dev Lets an account with MINTER_ROLE mint an NFT. function mintTo( address _to, uint256 _tokenId, string calldata _uri, uint256 _amount ) external onlyRole(MINTER_ROLE) { } /// ===== External functions ===== /// @dev See EIP-2981 function royaltyInfo(uint256 tokenId, uint256 salePrice) external view virtual returns (address receiver, uint256 royaltyAmount) { } /// @dev Mints an NFT according to the provided mint request. function mintWithSignature(MintRequest calldata _req, bytes calldata _signature) external payable nonReentrant { } // ===== Setter functions ===== /// @dev Lets a module admin set the default recipient of all primary sales. function setPrimarySaleRecipient(address _saleRecipient) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// @dev Lets a module admin update the royalty bps and recipient. function setDefaultRoyaltyInfo(address _royaltyRecipient, uint256 _royaltyBps) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// @dev Lets a module admin set the royalty recipient for a particular token Id. function setRoyaltyInfoForToken( uint256 _tokenId, address _recipient, uint256 _bps ) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// @dev Lets a module admin update the fees on primary sales. function setPlatformFeeInfo(address _platformFeeRecipient, uint256 _platformFeeBps) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// @dev Lets a module admin set a new owner for the contract. The new owner must be a module admin. function setOwner(address _newOwner) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// @dev Lets a module admin set the URI for contract-level metadata. function setContractURI(string calldata _uri) external onlyRole(DEFAULT_ADMIN_ROLE) { } /// ===== Getter functions ===== /// @dev Returns the platform fee bps and recipient. function getPlatformFeeInfo() external view returns (address, uint16) { } /// @dev Returns the platform fee bps and recipient. function getDefaultRoyaltyInfo() external view returns (address, uint16) { } /// @dev Returns the royalty recipient for a particular token Id. function getRoyaltyInfoForToken(uint256 _tokenId) public view returns (address, uint16) { } /// ===== Internal functions ===== /// @dev Mints an NFT to `to` function _mintTo( address _to, string calldata _uri, uint256 _tokenId, uint256 _amount ) internal { } /// @dev Returns the address of the signer of the mint request. function recoverAddress(MintRequest calldata _req, bytes calldata _signature) internal view returns (address) { } /// @dev Resolves 'stack too deep' error in `recoverAddress`. function _encodeRequest(MintRequest calldata _req) internal pure returns (bytes memory) { } /// @dev Verifies that a mint request is valid. function verifyRequest(MintRequest calldata _req, bytes calldata _signature) internal returns (address) { } /// @dev Collects and distributes the primary sale value of tokens being claimed. function collectPrice(MintRequest memory _req) internal { } /// ===== Low-level overrides ===== /// @dev Lets a token owner burn the tokens they own (i.e. destroy for good) function burn( address account, uint256 id, uint256 value ) public virtual { } /// @dev Lets a token owner burn multiple tokens they own at once (i.e. destroy for good) function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { } /** * @dev See {ERC1155-_beforeTokenTransfer}. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); // if transfer is restricted on the contract, we still want to allow burning and minting if (!hasRole(TRANSFER_ROLE, address(0)) && from != address(0) && to != address(0)) { require(<FILL_ME>) } if (from == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { totalSupply[ids[i]] += amounts[i]; } } if (to == address(0)) { for (uint256 i = 0; i < ids.length; ++i) { totalSupply[ids[i]] -= amounts[i]; } } } function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControlEnumerableUpgradeable, ERC1155Upgradeable, IERC165Upgradeable) returns (bool) { } function _msgSender() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (address sender) { } function _msgData() internal view virtual override(ContextUpgradeable, ERC2771ContextUpgradeable) returns (bytes calldata) { } }
hasRole(TRANSFER_ROLE,from)||hasRole(TRANSFER_ROLE,to),"restricted to TRANSFER_ROLE holders."
278,189
hasRole(TRANSFER_ROLE,from)||hasRole(TRANSFER_ROLE,to)
'Claim is not available currently.'
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract BipxAirdrop { // This event is triggered whenever a call to #claim succeeds. event Claimed(uint256 index, address account, uint256 amount); address public immutable token; bytes32 public merkleRoot; address owner; bool isClaimingStopped; mapping(bytes32 => mapping(uint256 => uint256)) private claimedBitMap; constructor(address token_) public { } modifier _ownerOnly() { } function setMerkleRoot(bytes32 merkleRoot_) public _ownerOnly { } function stopClaiming() public _ownerOnly { } function startClaiming() public _ownerOnly { } function isClaimed(uint256 index) public view returns (bool) { } function _setClaimed(uint256 index) private { } function claim(uint256 index, address account, uint256 amount, bytes32[] calldata merkleProof) external { require(!isClaimed(index), 'MerkleDistributor: Drop already claimed.'); require(<FILL_ME>) // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(index, account, amount)); require(MerkleProof.verify(merkleProof, merkleRoot, node), 'MerkleDistributor: Invalid proof.'); // Mark it claimed and send the token. _setClaimed(index); require(IERC20(token).transfer(account, amount), 'MerkleDistributor: Transfer failed.'); emit Claimed(index, account, amount); } }
!isClaimingStopped,'Claim is not available currently.'
278,248
!isClaimingStopped
"TribeDripper: time not ended"
pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; import "../refs/CoreRef.sol"; import "../utils/Timed.sol"; /// @title a Tribe dripper /// @author Fei Protocol contract TribeDripper is CoreRef, Timed { /// @notice target address to drip to address public target; /// @notice amount to drip after each window uint256[] public amountsToDrip; /// @notice index of the amount to drip uint256 public dripIndex; event Dripped(uint256 amount, uint256 dripIndex); event Withdrawal(address indexed to, uint256 amount); /// @notice Tribe Dripper constructor /// @param _core Fei Core for reference /// @param _target target address to receive TRIBE /// @param _frequency TRIBE drip frequency constructor( address _core, address _target, uint256 _frequency, uint256[] memory _amountsToDrip ) public CoreRef(_core) Timed(_frequency) { } receive() external payable {} /// @notice withdraw TRIBE from the Tribe dripper /// @param amount of tokens withdrawn /// @param to the address to send PCV to function withdraw(address to, uint256 amount) external onlyPCVController { } /// @notice drip TRIBE to target function drip() external whenNotPaused { require(<FILL_ME>) // reset timer _initTimed(); uint256 currentDripIndex = dripIndex; require(currentDripIndex < amountsToDrip.length, "TribeDripper: index out of bounds"); uint256 amountToDrip = amountsToDrip[currentDripIndex]; dripIndex = currentDripIndex + 1; // drip tribe().transfer(target, amountToDrip); emit Dripped(amountToDrip, currentDripIndex); } }
!isTimeStarted()||isTimeEnded(),"TribeDripper: time not ended"
278,319
!isTimeStarted()||isTimeEnded()
"Insufficient balance"
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; /** * @dev Tracks amounts deposited and or withdrawn, on a per contract:token basis. Does not allow an account to * withdraw more than it has deposited, and provides balance functions inspired by ERC1155. */ abstract contract BalanceTrackingMixin { struct DepositBalance { // balance of deposits, contract address => (token id => balance) mapping(address => mapping(uint256 => uint256)) balances; } mapping(address => DepositBalance) private accountBalances; function _depositIntoAccount( address account, address contractAddress, uint256 tokenId, uint256 amount ) internal { } function _depositIntoAccount( address account, address contractAddress, uint256[] memory tokenIds, uint256[] memory amounts ) internal { } function _withdrawFromAccount( address account, address contractAddress, uint256 tokenId, uint256 amount ) internal { require(<FILL_ME>) uint256 newBalance = accountBalances[account].balances[contractAddress][tokenId] - amount; accountBalances[account].balances[contractAddress][tokenId] = newBalance; } function _withdrawFromAccount( address account, address contractAddress, uint256[] memory tokenIds, uint256[] memory amounts ) internal { } function balanceOf( address account, address contractAddress, uint256 tokenId ) public view returns (uint256 balance) { } function balanceOfBatch( address account, address[] memory contractAddresses, uint256[] memory tokenIds ) public view returns (uint256[] memory batchBalances) { } }
accountBalances[account].balances[contractAddress][tokenId]>=amount,"Insufficient balance"
278,324
accountBalances[account].balances[contractAddress][tokenId]>=amount
"must be operator"
/** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFT is ERC165, IERC1155, IERC1155MetadataURI, IStarNFT { using SafeMath for uint256; using Address for address; using ERC165Checker for address; /* ============ Events ============ */ event GalaxyCommunityTransferred(address indexed previousGalaxyCommunity, address indexed newGalaxyCommunity); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event BurnQuasar(uint256 indexed id); event BurnSuper(uint256 indexed id); /* ============ Modifiers ============ */ /** * Only owner. */ modifier onlyOwner() { } /** * Only galaxy community. */ modifier onlyGalaxyCommunity() { } /** * Only minter. */ modifier onlyMinter() { } /** * Only operator. */ modifier onlyOperator() { require(<FILL_ME>) _; } /* ============ Enums ================ */ /* ============ Structs ============ */ struct NFTInfo { uint128 mintBlock; uint128 powah; address originator; } struct Quasar { IERC20 stakeToken; uint256 amount; uint256 campaignID; } struct Super { // assetToken => amount IERC20[] backingTokens; uint256[] backingAmounts; uint256 campaignID; } /* ============ State Variables ============ */ // Indicates that the contract has been initialized. bool private _initialized; // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string private _baseURI; // Contract owner address private _owner; // Galaxy community address address private _galaxyCommunityAddress; // Mint and burn star mapping(address => bool) private _minters; // Update star info mapping(address => bool) private _operators; // Total star count, including burnt nft uint256 private _starCount; // Mapping from token ID to account mapping(uint256 => address) private _starBelongTo; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // {id} => {star} mapping(uint256 => NFTInfo) private _stars; // {id} => {quasar} mapping(uint256 => Quasar) private _quasars; // {id} => {super} mapping(uint256 => Super) private _supers; /* ============ Constructor ============ */ // constructor () public {} /** * for proxy, use initialize instead. * set 'owner', 'galaxy community' and register 1155, metadata interface. */ function initialize(address owner, address _galaxyCommunity) external { } /* ============ External Functions ============ */ /** * See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) external override { } /** * See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external override { } /** * See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external override { } function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } function mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 erc20Amount) external onlyMinter override returns (uint256) { } function burnQuasar(address account, uint256 id) external onlyMinter override { } function mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) external onlyMinter override returns (uint256) { } function burnSuper(address account, uint256 id) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Update nft powah. */ function updatePowah(address owner, uint256 id, uint256 powah) external onlyOperator override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer community ownership. */ function transferGalaxyCommunity(address newGalaxyCommunity) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer ownership. */ function transferOwner(address newOwner) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new operator. */ function addOperator(address operator) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove an old operator. */ function removeOperator(address operator) external onlyOwner { } /* ============ External Getter Functions ============ */ /** * Is contract initialized. */ function initialized() external view returns (bool) { } /** * Star nft contract owner. */ function starNFTOwner() external view returns (address) { } /** * Galaxy community address. */ function galaxyCommunity() external view returns (address) { } /** * Is minter. */ function isMinter(address minter) external view returns (bool) { } /** * Is operator. */ function isOperator(address operator) external view returns (bool) { } /** * See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** * Base URI for all token types by ID substitution. */ function baseURI() external view returns (string memory) { } /** * Total star nft count, including burnt nft. */ function starNFTCount() external view returns (uint256) { } /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } /** * Get star info. */ function starInfo(uint256 id) external view override returns (uint128 powah, uint128 mintBlock, address originator) { } /** * Get quasar info. */ function quasarInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20 stakeToken, uint256 amount, uint256 campaignID) { } /** * Get super info */ function superInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20[] memory stakeToken, uint256[] memory amount, uint256 campaignID){ } /** * See {IERC1155-balanceOf}. * Requirements: * - `account` must not be zero address. */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** * See {IERC1155-balanceOfBatch}. * Requirements: * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view override returns (uint256[] memory){ } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /** * Create star with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 powah) private returns (uint256) { } /** * Create quasar with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 amount) private returns (uint256) { } /** * Create super with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) private returns (uint256){ } /** * Mint `amount` star nft to `to` * * Requirements: * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256 amount, uint256[] calldata powahArr) private returns (uint256[] memory) { } /** * Burn `id` nft from `account`. */ function _burn(address account, uint256 id) private { } /** * Delete quasar. */ function _burnQuasar(uint256 id) private { } /** * Delete super. */ function _burnSuper(uint256 id) private { } /** * xref:ROOT:erc1155.doc#batch-operations[Batched] version of {_burn}. * * Requirements: * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids) private { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { } function _doSafeQuasarUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldAmount, uint256 newAmount ) private { } function _doSafePowahUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldPowah, uint256 newPowah ) private { } /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
_operators[msg.sender],"must be operator"
278,379
_operators[msg.sender]
"Not the owner"
/** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFT is ERC165, IERC1155, IERC1155MetadataURI, IStarNFT { using SafeMath for uint256; using Address for address; using ERC165Checker for address; /* ============ Events ============ */ event GalaxyCommunityTransferred(address indexed previousGalaxyCommunity, address indexed newGalaxyCommunity); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event BurnQuasar(uint256 indexed id); event BurnSuper(uint256 indexed id); /* ============ Modifiers ============ */ /** * Only owner. */ modifier onlyOwner() { } /** * Only galaxy community. */ modifier onlyGalaxyCommunity() { } /** * Only minter. */ modifier onlyMinter() { } /** * Only operator. */ modifier onlyOperator() { } /* ============ Enums ================ */ /* ============ Structs ============ */ struct NFTInfo { uint128 mintBlock; uint128 powah; address originator; } struct Quasar { IERC20 stakeToken; uint256 amount; uint256 campaignID; } struct Super { // assetToken => amount IERC20[] backingTokens; uint256[] backingAmounts; uint256 campaignID; } /* ============ State Variables ============ */ // Indicates that the contract has been initialized. bool private _initialized; // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string private _baseURI; // Contract owner address private _owner; // Galaxy community address address private _galaxyCommunityAddress; // Mint and burn star mapping(address => bool) private _minters; // Update star info mapping(address => bool) private _operators; // Total star count, including burnt nft uint256 private _starCount; // Mapping from token ID to account mapping(uint256 => address) private _starBelongTo; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // {id} => {star} mapping(uint256 => NFTInfo) private _stars; // {id} => {quasar} mapping(uint256 => Quasar) private _quasars; // {id} => {super} mapping(uint256 => Super) private _supers; /* ============ Constructor ============ */ // constructor () public {} /** * for proxy, use initialize instead. * set 'owner', 'galaxy community' and register 1155, metadata interface. */ function initialize(address owner, address _galaxyCommunity) external { } /* ============ External Functions ============ */ /** * See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) external override { } /** * See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external override { require(to != address(0), "Transfer to must not be null address"); require(amount == 1, "Invalid amount"); require( from == msg.sender || isApprovedForAll(from, msg.sender), "Transfer caller is neither owner nor approved" ); require(<FILL_ME>) _starBelongTo[id] = to; emit TransferSingle(msg.sender, from, to, id, amount); _doSafeTransferAcceptanceCheck(msg.sender, from, to, id, amount, data); } /** * See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external override { } function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } function mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 erc20Amount) external onlyMinter override returns (uint256) { } function burnQuasar(address account, uint256 id) external onlyMinter override { } function mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) external onlyMinter override returns (uint256) { } function burnSuper(address account, uint256 id) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Update nft powah. */ function updatePowah(address owner, uint256 id, uint256 powah) external onlyOperator override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer community ownership. */ function transferGalaxyCommunity(address newGalaxyCommunity) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer ownership. */ function transferOwner(address newOwner) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new operator. */ function addOperator(address operator) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove an old operator. */ function removeOperator(address operator) external onlyOwner { } /* ============ External Getter Functions ============ */ /** * Is contract initialized. */ function initialized() external view returns (bool) { } /** * Star nft contract owner. */ function starNFTOwner() external view returns (address) { } /** * Galaxy community address. */ function galaxyCommunity() external view returns (address) { } /** * Is minter. */ function isMinter(address minter) external view returns (bool) { } /** * Is operator. */ function isOperator(address operator) external view returns (bool) { } /** * See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** * Base URI for all token types by ID substitution. */ function baseURI() external view returns (string memory) { } /** * Total star nft count, including burnt nft. */ function starNFTCount() external view returns (uint256) { } /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } /** * Get star info. */ function starInfo(uint256 id) external view override returns (uint128 powah, uint128 mintBlock, address originator) { } /** * Get quasar info. */ function quasarInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20 stakeToken, uint256 amount, uint256 campaignID) { } /** * Get super info */ function superInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20[] memory stakeToken, uint256[] memory amount, uint256 campaignID){ } /** * See {IERC1155-balanceOf}. * Requirements: * - `account` must not be zero address. */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** * See {IERC1155-balanceOfBatch}. * Requirements: * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view override returns (uint256[] memory){ } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /** * Create star with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 powah) private returns (uint256) { } /** * Create quasar with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 amount) private returns (uint256) { } /** * Create super with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) private returns (uint256){ } /** * Mint `amount` star nft to `to` * * Requirements: * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256 amount, uint256[] calldata powahArr) private returns (uint256[] memory) { } /** * Burn `id` nft from `account`. */ function _burn(address account, uint256 id) private { } /** * Delete quasar. */ function _burnQuasar(uint256 id) private { } /** * Delete super. */ function _burnSuper(uint256 id) private { } /** * xref:ROOT:erc1155.doc#batch-operations[Batched] version of {_burn}. * * Requirements: * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids) private { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { } function _doSafeQuasarUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldAmount, uint256 newAmount ) private { } function _doSafePowahUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldPowah, uint256 newPowah ) private { } /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
isOwnerOf(from,id),"Not the owner"
278,379
isOwnerOf(from,id)
"Not the owner"
/** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFT is ERC165, IERC1155, IERC1155MetadataURI, IStarNFT { using SafeMath for uint256; using Address for address; using ERC165Checker for address; /* ============ Events ============ */ event GalaxyCommunityTransferred(address indexed previousGalaxyCommunity, address indexed newGalaxyCommunity); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event BurnQuasar(uint256 indexed id); event BurnSuper(uint256 indexed id); /* ============ Modifiers ============ */ /** * Only owner. */ modifier onlyOwner() { } /** * Only galaxy community. */ modifier onlyGalaxyCommunity() { } /** * Only minter. */ modifier onlyMinter() { } /** * Only operator. */ modifier onlyOperator() { } /* ============ Enums ================ */ /* ============ Structs ============ */ struct NFTInfo { uint128 mintBlock; uint128 powah; address originator; } struct Quasar { IERC20 stakeToken; uint256 amount; uint256 campaignID; } struct Super { // assetToken => amount IERC20[] backingTokens; uint256[] backingAmounts; uint256 campaignID; } /* ============ State Variables ============ */ // Indicates that the contract has been initialized. bool private _initialized; // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string private _baseURI; // Contract owner address private _owner; // Galaxy community address address private _galaxyCommunityAddress; // Mint and burn star mapping(address => bool) private _minters; // Update star info mapping(address => bool) private _operators; // Total star count, including burnt nft uint256 private _starCount; // Mapping from token ID to account mapping(uint256 => address) private _starBelongTo; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // {id} => {star} mapping(uint256 => NFTInfo) private _stars; // {id} => {quasar} mapping(uint256 => Quasar) private _quasars; // {id} => {super} mapping(uint256 => Super) private _supers; /* ============ Constructor ============ */ // constructor () public {} /** * for proxy, use initialize instead. * set 'owner', 'galaxy community' and register 1155, metadata interface. */ function initialize(address owner, address _galaxyCommunity) external { } /* ============ External Functions ============ */ /** * See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) external override { } /** * See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external override { } /** * See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external override { } function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { require(<FILL_ME>) _burn(account, id); } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } function mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 erc20Amount) external onlyMinter override returns (uint256) { } function burnQuasar(address account, uint256 id) external onlyMinter override { } function mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) external onlyMinter override returns (uint256) { } function burnSuper(address account, uint256 id) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Update nft powah. */ function updatePowah(address owner, uint256 id, uint256 powah) external onlyOperator override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer community ownership. */ function transferGalaxyCommunity(address newGalaxyCommunity) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer ownership. */ function transferOwner(address newOwner) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new operator. */ function addOperator(address operator) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove an old operator. */ function removeOperator(address operator) external onlyOwner { } /* ============ External Getter Functions ============ */ /** * Is contract initialized. */ function initialized() external view returns (bool) { } /** * Star nft contract owner. */ function starNFTOwner() external view returns (address) { } /** * Galaxy community address. */ function galaxyCommunity() external view returns (address) { } /** * Is minter. */ function isMinter(address minter) external view returns (bool) { } /** * Is operator. */ function isOperator(address operator) external view returns (bool) { } /** * See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** * Base URI for all token types by ID substitution. */ function baseURI() external view returns (string memory) { } /** * Total star nft count, including burnt nft. */ function starNFTCount() external view returns (uint256) { } /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } /** * Get star info. */ function starInfo(uint256 id) external view override returns (uint128 powah, uint128 mintBlock, address originator) { } /** * Get quasar info. */ function quasarInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20 stakeToken, uint256 amount, uint256 campaignID) { } /** * Get super info */ function superInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20[] memory stakeToken, uint256[] memory amount, uint256 campaignID){ } /** * See {IERC1155-balanceOf}. * Requirements: * - `account` must not be zero address. */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** * See {IERC1155-balanceOfBatch}. * Requirements: * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view override returns (uint256[] memory){ } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /** * Create star with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 powah) private returns (uint256) { } /** * Create quasar with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 amount) private returns (uint256) { } /** * Create super with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) private returns (uint256){ } /** * Mint `amount` star nft to `to` * * Requirements: * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256 amount, uint256[] calldata powahArr) private returns (uint256[] memory) { } /** * Burn `id` nft from `account`. */ function _burn(address account, uint256 id) private { } /** * Delete quasar. */ function _burnQuasar(uint256 id) private { } /** * Delete super. */ function _burnSuper(uint256 id) private { } /** * xref:ROOT:erc1155.doc#batch-operations[Batched] version of {_burn}. * * Requirements: * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids) private { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { } function _doSafeQuasarUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldAmount, uint256 newAmount ) private { } function _doSafePowahUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldPowah, uint256 newPowah ) private { } /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
isOwnerOf(account,id),"Not the owner"
278,379
isOwnerOf(account,id)
"Not the owner"
/** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFT is ERC165, IERC1155, IERC1155MetadataURI, IStarNFT { using SafeMath for uint256; using Address for address; using ERC165Checker for address; /* ============ Events ============ */ event GalaxyCommunityTransferred(address indexed previousGalaxyCommunity, address indexed newGalaxyCommunity); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event BurnQuasar(uint256 indexed id); event BurnSuper(uint256 indexed id); /* ============ Modifiers ============ */ /** * Only owner. */ modifier onlyOwner() { } /** * Only galaxy community. */ modifier onlyGalaxyCommunity() { } /** * Only minter. */ modifier onlyMinter() { } /** * Only operator. */ modifier onlyOperator() { } /* ============ Enums ================ */ /* ============ Structs ============ */ struct NFTInfo { uint128 mintBlock; uint128 powah; address originator; } struct Quasar { IERC20 stakeToken; uint256 amount; uint256 campaignID; } struct Super { // assetToken => amount IERC20[] backingTokens; uint256[] backingAmounts; uint256 campaignID; } /* ============ State Variables ============ */ // Indicates that the contract has been initialized. bool private _initialized; // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string private _baseURI; // Contract owner address private _owner; // Galaxy community address address private _galaxyCommunityAddress; // Mint and burn star mapping(address => bool) private _minters; // Update star info mapping(address => bool) private _operators; // Total star count, including burnt nft uint256 private _starCount; // Mapping from token ID to account mapping(uint256 => address) private _starBelongTo; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // {id} => {star} mapping(uint256 => NFTInfo) private _stars; // {id} => {quasar} mapping(uint256 => Quasar) private _quasars; // {id} => {super} mapping(uint256 => Super) private _supers; /* ============ Constructor ============ */ // constructor () public {} /** * for proxy, use initialize instead. * set 'owner', 'galaxy community' and register 1155, metadata interface. */ function initialize(address owner, address _galaxyCommunity) external { } /* ============ External Functions ============ */ /** * See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) external override { } /** * See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external override { } /** * See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external override { } function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { for (uint i = 0; i < ids.length; i++) { require(<FILL_ME>) } _burnBatch(account, ids); } function mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 erc20Amount) external onlyMinter override returns (uint256) { } function burnQuasar(address account, uint256 id) external onlyMinter override { } function mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) external onlyMinter override returns (uint256) { } function burnSuper(address account, uint256 id) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Update nft powah. */ function updatePowah(address owner, uint256 id, uint256 powah) external onlyOperator override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer community ownership. */ function transferGalaxyCommunity(address newGalaxyCommunity) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer ownership. */ function transferOwner(address newOwner) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new operator. */ function addOperator(address operator) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove an old operator. */ function removeOperator(address operator) external onlyOwner { } /* ============ External Getter Functions ============ */ /** * Is contract initialized. */ function initialized() external view returns (bool) { } /** * Star nft contract owner. */ function starNFTOwner() external view returns (address) { } /** * Galaxy community address. */ function galaxyCommunity() external view returns (address) { } /** * Is minter. */ function isMinter(address minter) external view returns (bool) { } /** * Is operator. */ function isOperator(address operator) external view returns (bool) { } /** * See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** * Base URI for all token types by ID substitution. */ function baseURI() external view returns (string memory) { } /** * Total star nft count, including burnt nft. */ function starNFTCount() external view returns (uint256) { } /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } /** * Get star info. */ function starInfo(uint256 id) external view override returns (uint128 powah, uint128 mintBlock, address originator) { } /** * Get quasar info. */ function quasarInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20 stakeToken, uint256 amount, uint256 campaignID) { } /** * Get super info */ function superInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20[] memory stakeToken, uint256[] memory amount, uint256 campaignID){ } /** * See {IERC1155-balanceOf}. * Requirements: * - `account` must not be zero address. */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** * See {IERC1155-balanceOfBatch}. * Requirements: * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view override returns (uint256[] memory){ } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /** * Create star with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 powah) private returns (uint256) { } /** * Create quasar with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 amount) private returns (uint256) { } /** * Create super with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) private returns (uint256){ } /** * Mint `amount` star nft to `to` * * Requirements: * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256 amount, uint256[] calldata powahArr) private returns (uint256[] memory) { } /** * Burn `id` nft from `account`. */ function _burn(address account, uint256 id) private { } /** * Delete quasar. */ function _burnQuasar(uint256 id) private { } /** * Delete super. */ function _burnSuper(uint256 id) private { } /** * xref:ROOT:erc1155.doc#batch-operations[Batched] version of {_burn}. * * Requirements: * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids) private { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { } function _doSafeQuasarUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldAmount, uint256 newAmount ) private { } function _doSafePowahUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldPowah, uint256 newPowah ) private { } /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
isOwnerOf(account,ids[i]),"Not the owner"
278,379
isOwnerOf(account,ids[i])
"Must be owner"
/** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFT is ERC165, IERC1155, IERC1155MetadataURI, IStarNFT { using SafeMath for uint256; using Address for address; using ERC165Checker for address; /* ============ Events ============ */ event GalaxyCommunityTransferred(address indexed previousGalaxyCommunity, address indexed newGalaxyCommunity); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event BurnQuasar(uint256 indexed id); event BurnSuper(uint256 indexed id); /* ============ Modifiers ============ */ /** * Only owner. */ modifier onlyOwner() { } /** * Only galaxy community. */ modifier onlyGalaxyCommunity() { } /** * Only minter. */ modifier onlyMinter() { } /** * Only operator. */ modifier onlyOperator() { } /* ============ Enums ================ */ /* ============ Structs ============ */ struct NFTInfo { uint128 mintBlock; uint128 powah; address originator; } struct Quasar { IERC20 stakeToken; uint256 amount; uint256 campaignID; } struct Super { // assetToken => amount IERC20[] backingTokens; uint256[] backingAmounts; uint256 campaignID; } /* ============ State Variables ============ */ // Indicates that the contract has been initialized. bool private _initialized; // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string private _baseURI; // Contract owner address private _owner; // Galaxy community address address private _galaxyCommunityAddress; // Mint and burn star mapping(address => bool) private _minters; // Update star info mapping(address => bool) private _operators; // Total star count, including burnt nft uint256 private _starCount; // Mapping from token ID to account mapping(uint256 => address) private _starBelongTo; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // {id} => {star} mapping(uint256 => NFTInfo) private _stars; // {id} => {quasar} mapping(uint256 => Quasar) private _quasars; // {id} => {super} mapping(uint256 => Super) private _supers; /* ============ Constructor ============ */ // constructor () public {} /** * for proxy, use initialize instead. * set 'owner', 'galaxy community' and register 1155, metadata interface. */ function initialize(address owner, address _galaxyCommunity) external { } /* ============ External Functions ============ */ /** * See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) external override { } /** * See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external override { } /** * See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external override { } function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } function mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 erc20Amount) external onlyMinter override returns (uint256) { } function burnQuasar(address account, uint256 id) external onlyMinter override { } function mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) external onlyMinter override returns (uint256) { } function burnSuper(address account, uint256 id) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Update nft powah. */ function updatePowah(address owner, uint256 id, uint256 powah) external onlyOperator override { require(<FILL_ME>) emit PowahUpdated(id, _stars[id].powah, powah); _doSafePowahUpdatedAcceptanceCheck(owner, id, _stars[id].powah, powah); _stars[id].powah = uint128(powah); } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer community ownership. */ function transferGalaxyCommunity(address newGalaxyCommunity) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer ownership. */ function transferOwner(address newOwner) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new operator. */ function addOperator(address operator) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove an old operator. */ function removeOperator(address operator) external onlyOwner { } /* ============ External Getter Functions ============ */ /** * Is contract initialized. */ function initialized() external view returns (bool) { } /** * Star nft contract owner. */ function starNFTOwner() external view returns (address) { } /** * Galaxy community address. */ function galaxyCommunity() external view returns (address) { } /** * Is minter. */ function isMinter(address minter) external view returns (bool) { } /** * Is operator. */ function isOperator(address operator) external view returns (bool) { } /** * See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** * Base URI for all token types by ID substitution. */ function baseURI() external view returns (string memory) { } /** * Total star nft count, including burnt nft. */ function starNFTCount() external view returns (uint256) { } /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } /** * Get star info. */ function starInfo(uint256 id) external view override returns (uint128 powah, uint128 mintBlock, address originator) { } /** * Get quasar info. */ function quasarInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20 stakeToken, uint256 amount, uint256 campaignID) { } /** * Get super info */ function superInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20[] memory stakeToken, uint256[] memory amount, uint256 campaignID){ } /** * See {IERC1155-balanceOf}. * Requirements: * - `account` must not be zero address. */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** * See {IERC1155-balanceOfBatch}. * Requirements: * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view override returns (uint256[] memory){ } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /** * Create star with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 powah) private returns (uint256) { } /** * Create quasar with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 amount) private returns (uint256) { } /** * Create super with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) private returns (uint256){ } /** * Mint `amount` star nft to `to` * * Requirements: * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256 amount, uint256[] calldata powahArr) private returns (uint256[] memory) { } /** * Burn `id` nft from `account`. */ function _burn(address account, uint256 id) private { } /** * Delete quasar. */ function _burnQuasar(uint256 id) private { } /** * Delete super. */ function _burnSuper(uint256 id) private { } /** * xref:ROOT:erc1155.doc#batch-operations[Batched] version of {_burn}. * * Requirements: * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids) private { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { } function _doSafeQuasarUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldAmount, uint256 newAmount ) private { } function _doSafePowahUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldPowah, uint256 newPowah ) private { } /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
isOwnerOf(owner,id),"Must be owner"
278,379
isOwnerOf(owner,id)
"Minter already added"
/** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFT is ERC165, IERC1155, IERC1155MetadataURI, IStarNFT { using SafeMath for uint256; using Address for address; using ERC165Checker for address; /* ============ Events ============ */ event GalaxyCommunityTransferred(address indexed previousGalaxyCommunity, address indexed newGalaxyCommunity); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event BurnQuasar(uint256 indexed id); event BurnSuper(uint256 indexed id); /* ============ Modifiers ============ */ /** * Only owner. */ modifier onlyOwner() { } /** * Only galaxy community. */ modifier onlyGalaxyCommunity() { } /** * Only minter. */ modifier onlyMinter() { } /** * Only operator. */ modifier onlyOperator() { } /* ============ Enums ================ */ /* ============ Structs ============ */ struct NFTInfo { uint128 mintBlock; uint128 powah; address originator; } struct Quasar { IERC20 stakeToken; uint256 amount; uint256 campaignID; } struct Super { // assetToken => amount IERC20[] backingTokens; uint256[] backingAmounts; uint256 campaignID; } /* ============ State Variables ============ */ // Indicates that the contract has been initialized. bool private _initialized; // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string private _baseURI; // Contract owner address private _owner; // Galaxy community address address private _galaxyCommunityAddress; // Mint and burn star mapping(address => bool) private _minters; // Update star info mapping(address => bool) private _operators; // Total star count, including burnt nft uint256 private _starCount; // Mapping from token ID to account mapping(uint256 => address) private _starBelongTo; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // {id} => {star} mapping(uint256 => NFTInfo) private _stars; // {id} => {quasar} mapping(uint256 => Quasar) private _quasars; // {id} => {super} mapping(uint256 => Super) private _supers; /* ============ Constructor ============ */ // constructor () public {} /** * for proxy, use initialize instead. * set 'owner', 'galaxy community' and register 1155, metadata interface. */ function initialize(address owner, address _galaxyCommunity) external { } /* ============ External Functions ============ */ /** * See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) external override { } /** * See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external override { } /** * See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external override { } function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } function mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 erc20Amount) external onlyMinter override returns (uint256) { } function burnQuasar(address account, uint256 id) external onlyMinter override { } function mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) external onlyMinter override returns (uint256) { } function burnSuper(address account, uint256 id) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Update nft powah. */ function updatePowah(address owner, uint256 id, uint256 powah) external onlyOperator override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer community ownership. */ function transferGalaxyCommunity(address newGalaxyCommunity) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer ownership. */ function transferOwner(address newOwner) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { require(minter != address(0), "Minter must not be null address"); require(<FILL_ME>) _minters[minter] = true; } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new operator. */ function addOperator(address operator) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove an old operator. */ function removeOperator(address operator) external onlyOwner { } /* ============ External Getter Functions ============ */ /** * Is contract initialized. */ function initialized() external view returns (bool) { } /** * Star nft contract owner. */ function starNFTOwner() external view returns (address) { } /** * Galaxy community address. */ function galaxyCommunity() external view returns (address) { } /** * Is minter. */ function isMinter(address minter) external view returns (bool) { } /** * Is operator. */ function isOperator(address operator) external view returns (bool) { } /** * See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** * Base URI for all token types by ID substitution. */ function baseURI() external view returns (string memory) { } /** * Total star nft count, including burnt nft. */ function starNFTCount() external view returns (uint256) { } /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } /** * Get star info. */ function starInfo(uint256 id) external view override returns (uint128 powah, uint128 mintBlock, address originator) { } /** * Get quasar info. */ function quasarInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20 stakeToken, uint256 amount, uint256 campaignID) { } /** * Get super info */ function superInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20[] memory stakeToken, uint256[] memory amount, uint256 campaignID){ } /** * See {IERC1155-balanceOf}. * Requirements: * - `account` must not be zero address. */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** * See {IERC1155-balanceOfBatch}. * Requirements: * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view override returns (uint256[] memory){ } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /** * Create star with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 powah) private returns (uint256) { } /** * Create quasar with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 amount) private returns (uint256) { } /** * Create super with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) private returns (uint256){ } /** * Mint `amount` star nft to `to` * * Requirements: * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256 amount, uint256[] calldata powahArr) private returns (uint256[] memory) { } /** * Burn `id` nft from `account`. */ function _burn(address account, uint256 id) private { } /** * Delete quasar. */ function _burnQuasar(uint256 id) private { } /** * Delete super. */ function _burnSuper(uint256 id) private { } /** * xref:ROOT:erc1155.doc#batch-operations[Batched] version of {_burn}. * * Requirements: * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids) private { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { } function _doSafeQuasarUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldAmount, uint256 newAmount ) private { } function _doSafePowahUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldPowah, uint256 newPowah ) private { } /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
!_minters[minter],"Minter already added"
278,379
!_minters[minter]
"Minter does not exist"
/** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFT is ERC165, IERC1155, IERC1155MetadataURI, IStarNFT { using SafeMath for uint256; using Address for address; using ERC165Checker for address; /* ============ Events ============ */ event GalaxyCommunityTransferred(address indexed previousGalaxyCommunity, address indexed newGalaxyCommunity); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event BurnQuasar(uint256 indexed id); event BurnSuper(uint256 indexed id); /* ============ Modifiers ============ */ /** * Only owner. */ modifier onlyOwner() { } /** * Only galaxy community. */ modifier onlyGalaxyCommunity() { } /** * Only minter. */ modifier onlyMinter() { } /** * Only operator. */ modifier onlyOperator() { } /* ============ Enums ================ */ /* ============ Structs ============ */ struct NFTInfo { uint128 mintBlock; uint128 powah; address originator; } struct Quasar { IERC20 stakeToken; uint256 amount; uint256 campaignID; } struct Super { // assetToken => amount IERC20[] backingTokens; uint256[] backingAmounts; uint256 campaignID; } /* ============ State Variables ============ */ // Indicates that the contract has been initialized. bool private _initialized; // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string private _baseURI; // Contract owner address private _owner; // Galaxy community address address private _galaxyCommunityAddress; // Mint and burn star mapping(address => bool) private _minters; // Update star info mapping(address => bool) private _operators; // Total star count, including burnt nft uint256 private _starCount; // Mapping from token ID to account mapping(uint256 => address) private _starBelongTo; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // {id} => {star} mapping(uint256 => NFTInfo) private _stars; // {id} => {quasar} mapping(uint256 => Quasar) private _quasars; // {id} => {super} mapping(uint256 => Super) private _supers; /* ============ Constructor ============ */ // constructor () public {} /** * for proxy, use initialize instead. * set 'owner', 'galaxy community' and register 1155, metadata interface. */ function initialize(address owner, address _galaxyCommunity) external { } /* ============ External Functions ============ */ /** * See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) external override { } /** * See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external override { } /** * See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external override { } function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } function mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 erc20Amount) external onlyMinter override returns (uint256) { } function burnQuasar(address account, uint256 id) external onlyMinter override { } function mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) external onlyMinter override returns (uint256) { } function burnSuper(address account, uint256 id) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Update nft powah. */ function updatePowah(address owner, uint256 id, uint256 powah) external onlyOperator override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer community ownership. */ function transferGalaxyCommunity(address newGalaxyCommunity) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer ownership. */ function transferOwner(address newOwner) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { require(<FILL_ME>) delete _minters[minter]; } /** * PRIVILEGED MODULE FUNCTION. Add a new operator. */ function addOperator(address operator) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove an old operator. */ function removeOperator(address operator) external onlyOwner { } /* ============ External Getter Functions ============ */ /** * Is contract initialized. */ function initialized() external view returns (bool) { } /** * Star nft contract owner. */ function starNFTOwner() external view returns (address) { } /** * Galaxy community address. */ function galaxyCommunity() external view returns (address) { } /** * Is minter. */ function isMinter(address minter) external view returns (bool) { } /** * Is operator. */ function isOperator(address operator) external view returns (bool) { } /** * See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** * Base URI for all token types by ID substitution. */ function baseURI() external view returns (string memory) { } /** * Total star nft count, including burnt nft. */ function starNFTCount() external view returns (uint256) { } /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } /** * Get star info. */ function starInfo(uint256 id) external view override returns (uint128 powah, uint128 mintBlock, address originator) { } /** * Get quasar info. */ function quasarInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20 stakeToken, uint256 amount, uint256 campaignID) { } /** * Get super info */ function superInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20[] memory stakeToken, uint256[] memory amount, uint256 campaignID){ } /** * See {IERC1155-balanceOf}. * Requirements: * - `account` must not be zero address. */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** * See {IERC1155-balanceOfBatch}. * Requirements: * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view override returns (uint256[] memory){ } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /** * Create star with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 powah) private returns (uint256) { } /** * Create quasar with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 amount) private returns (uint256) { } /** * Create super with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) private returns (uint256){ } /** * Mint `amount` star nft to `to` * * Requirements: * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256 amount, uint256[] calldata powahArr) private returns (uint256[] memory) { } /** * Burn `id` nft from `account`. */ function _burn(address account, uint256 id) private { } /** * Delete quasar. */ function _burnQuasar(uint256 id) private { } /** * Delete super. */ function _burnSuper(uint256 id) private { } /** * xref:ROOT:erc1155.doc#batch-operations[Batched] version of {_burn}. * * Requirements: * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids) private { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { } function _doSafeQuasarUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldAmount, uint256 newAmount ) private { } function _doSafePowahUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldPowah, uint256 newPowah ) private { } /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
_minters[minter],"Minter does not exist"
278,379
_minters[minter]
"Operator already added"
/** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFT is ERC165, IERC1155, IERC1155MetadataURI, IStarNFT { using SafeMath for uint256; using Address for address; using ERC165Checker for address; /* ============ Events ============ */ event GalaxyCommunityTransferred(address indexed previousGalaxyCommunity, address indexed newGalaxyCommunity); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event BurnQuasar(uint256 indexed id); event BurnSuper(uint256 indexed id); /* ============ Modifiers ============ */ /** * Only owner. */ modifier onlyOwner() { } /** * Only galaxy community. */ modifier onlyGalaxyCommunity() { } /** * Only minter. */ modifier onlyMinter() { } /** * Only operator. */ modifier onlyOperator() { } /* ============ Enums ================ */ /* ============ Structs ============ */ struct NFTInfo { uint128 mintBlock; uint128 powah; address originator; } struct Quasar { IERC20 stakeToken; uint256 amount; uint256 campaignID; } struct Super { // assetToken => amount IERC20[] backingTokens; uint256[] backingAmounts; uint256 campaignID; } /* ============ State Variables ============ */ // Indicates that the contract has been initialized. bool private _initialized; // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string private _baseURI; // Contract owner address private _owner; // Galaxy community address address private _galaxyCommunityAddress; // Mint and burn star mapping(address => bool) private _minters; // Update star info mapping(address => bool) private _operators; // Total star count, including burnt nft uint256 private _starCount; // Mapping from token ID to account mapping(uint256 => address) private _starBelongTo; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // {id} => {star} mapping(uint256 => NFTInfo) private _stars; // {id} => {quasar} mapping(uint256 => Quasar) private _quasars; // {id} => {super} mapping(uint256 => Super) private _supers; /* ============ Constructor ============ */ // constructor () public {} /** * for proxy, use initialize instead. * set 'owner', 'galaxy community' and register 1155, metadata interface. */ function initialize(address owner, address _galaxyCommunity) external { } /* ============ External Functions ============ */ /** * See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) external override { } /** * See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external override { } /** * See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external override { } function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } function mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 erc20Amount) external onlyMinter override returns (uint256) { } function burnQuasar(address account, uint256 id) external onlyMinter override { } function mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) external onlyMinter override returns (uint256) { } function burnSuper(address account, uint256 id) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Update nft powah. */ function updatePowah(address owner, uint256 id, uint256 powah) external onlyOperator override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer community ownership. */ function transferGalaxyCommunity(address newGalaxyCommunity) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer ownership. */ function transferOwner(address newOwner) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new operator. */ function addOperator(address operator) external onlyOwner { require(operator != address(0), "Operator must not be null address"); require(<FILL_ME>) _operators[operator] = true; } /** * PRIVILEGED MODULE FUNCTION. Remove an old operator. */ function removeOperator(address operator) external onlyOwner { } /* ============ External Getter Functions ============ */ /** * Is contract initialized. */ function initialized() external view returns (bool) { } /** * Star nft contract owner. */ function starNFTOwner() external view returns (address) { } /** * Galaxy community address. */ function galaxyCommunity() external view returns (address) { } /** * Is minter. */ function isMinter(address minter) external view returns (bool) { } /** * Is operator. */ function isOperator(address operator) external view returns (bool) { } /** * See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** * Base URI for all token types by ID substitution. */ function baseURI() external view returns (string memory) { } /** * Total star nft count, including burnt nft. */ function starNFTCount() external view returns (uint256) { } /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } /** * Get star info. */ function starInfo(uint256 id) external view override returns (uint128 powah, uint128 mintBlock, address originator) { } /** * Get quasar info. */ function quasarInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20 stakeToken, uint256 amount, uint256 campaignID) { } /** * Get super info */ function superInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20[] memory stakeToken, uint256[] memory amount, uint256 campaignID){ } /** * See {IERC1155-balanceOf}. * Requirements: * - `account` must not be zero address. */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** * See {IERC1155-balanceOfBatch}. * Requirements: * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view override returns (uint256[] memory){ } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /** * Create star with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 powah) private returns (uint256) { } /** * Create quasar with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 amount) private returns (uint256) { } /** * Create super with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) private returns (uint256){ } /** * Mint `amount` star nft to `to` * * Requirements: * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256 amount, uint256[] calldata powahArr) private returns (uint256[] memory) { } /** * Burn `id` nft from `account`. */ function _burn(address account, uint256 id) private { } /** * Delete quasar. */ function _burnQuasar(uint256 id) private { } /** * Delete super. */ function _burnSuper(uint256 id) private { } /** * xref:ROOT:erc1155.doc#batch-operations[Batched] version of {_burn}. * * Requirements: * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids) private { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { } function _doSafeQuasarUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldAmount, uint256 newAmount ) private { } function _doSafePowahUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldPowah, uint256 newPowah ) private { } /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
!_operators[operator],"Operator already added"
278,379
!_operators[operator]
"Operator does not exist"
/** * based on https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol */ contract StarNFT is ERC165, IERC1155, IERC1155MetadataURI, IStarNFT { using SafeMath for uint256; using Address for address; using ERC165Checker for address; /* ============ Events ============ */ event GalaxyCommunityTransferred(address indexed previousGalaxyCommunity, address indexed newGalaxyCommunity); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event BurnQuasar(uint256 indexed id); event BurnSuper(uint256 indexed id); /* ============ Modifiers ============ */ /** * Only owner. */ modifier onlyOwner() { } /** * Only galaxy community. */ modifier onlyGalaxyCommunity() { } /** * Only minter. */ modifier onlyMinter() { } /** * Only operator. */ modifier onlyOperator() { } /* ============ Enums ================ */ /* ============ Structs ============ */ struct NFTInfo { uint128 mintBlock; uint128 powah; address originator; } struct Quasar { IERC20 stakeToken; uint256 amount; uint256 campaignID; } struct Super { // assetToken => amount IERC20[] backingTokens; uint256[] backingAmounts; uint256 campaignID; } /* ============ State Variables ============ */ // Indicates that the contract has been initialized. bool private _initialized; // Used as the URI for all token types by ID substitution, e.g. https://galaxy.eco/{address}/{id}.json string private _baseURI; // Contract owner address private _owner; // Galaxy community address address private _galaxyCommunityAddress; // Mint and burn star mapping(address => bool) private _minters; // Update star info mapping(address => bool) private _operators; // Total star count, including burnt nft uint256 private _starCount; // Mapping from token ID to account mapping(uint256 => address) private _starBelongTo; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // {id} => {star} mapping(uint256 => NFTInfo) private _stars; // {id} => {quasar} mapping(uint256 => Quasar) private _quasars; // {id} => {super} mapping(uint256 => Super) private _supers; /* ============ Constructor ============ */ // constructor () public {} /** * for proxy, use initialize instead. * set 'owner', 'galaxy community' and register 1155, metadata interface. */ function initialize(address owner, address _galaxyCommunity) external { } /* ============ External Functions ============ */ /** * See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) external override { } /** * See {IERC1155-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes memory data) external override { } /** * See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom(address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) external override { } function mint(address account, uint256 powah) external onlyMinter override returns (uint256) { } function mintBatch(address account, uint256 amount, uint256[] calldata powahArr) external onlyMinter override returns (uint256[] memory) { } function burn(address account, uint256 id) external onlyMinter override { } function burnBatch(address account, uint256[] calldata ids) external onlyMinter override { } function mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 erc20Amount) external onlyMinter override returns (uint256) { } function burnQuasar(address account, uint256 id) external onlyMinter override { } function mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) external onlyMinter override returns (uint256) { } function burnSuper(address account, uint256 id) external onlyMinter override { } /** * PRIVILEGED MODULE FUNCTION. Update nft powah. */ function updatePowah(address owner, uint256 id, uint256 powah) external onlyOperator override { } /** * PRIVILEGED MODULE FUNCTION. Sets a new baseURI for all token types. */ function setURI(string memory newURI) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer community ownership. */ function transferGalaxyCommunity(address newGalaxyCommunity) external onlyGalaxyCommunity { } /** * PRIVILEGED MODULE FUNCTION. Transfer ownership. */ function transferOwner(address newOwner) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new minter. */ function addMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove a old minter. */ function removeMinter(address minter) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Add a new operator. */ function addOperator(address operator) external onlyOwner { } /** * PRIVILEGED MODULE FUNCTION. Remove an old operator. */ function removeOperator(address operator) external onlyOwner { require(<FILL_ME>) delete _operators[operator]; } /* ============ External Getter Functions ============ */ /** * Is contract initialized. */ function initialized() external view returns (bool) { } /** * Star nft contract owner. */ function starNFTOwner() external view returns (address) { } /** * Galaxy community address. */ function galaxyCommunity() external view returns (address) { } /** * Is minter. */ function isMinter(address minter) external view returns (bool) { } /** * Is operator. */ function isOperator(address operator) external view returns (bool) { } /** * See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** * Base URI for all token types by ID substitution. */ function baseURI() external view returns (string memory) { } /** * Total star nft count, including burnt nft. */ function starNFTCount() external view returns (uint256) { } /** * See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256 id) external view override returns (string memory) { } /** * Is the nft owner. * Requirements: * - `account` must not be zero address. */ function isOwnerOf(address account, uint256 id) public view override returns (bool) { } /** * Get star info. */ function starInfo(uint256 id) external view override returns (uint128 powah, uint128 mintBlock, address originator) { } /** * Get quasar info. */ function quasarInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20 stakeToken, uint256 amount, uint256 campaignID) { } /** * Get super info */ function superInfo(uint256 id) external view override returns (uint128 mintBlock, IERC20[] memory stakeToken, uint256[] memory amount, uint256 campaignID){ } /** * See {IERC1155-balanceOf}. * Requirements: * - `account` must not be zero address. */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** * See {IERC1155-balanceOfBatch}. * Requirements: * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view override returns (uint256[] memory){ } /* ============ Internal Functions ============ */ /* ============ Private Functions ============ */ /** * Create star with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 powah) private returns (uint256) { } /** * Create quasar with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintQuasar(address account, uint256 powah, uint256 campaignID, IERC20 stakeToken, uint256 amount) private returns (uint256) { } /** * Create super with `powah`, and assign it to `account`. * * Emits a {TransferSingle} event. * * Requirements: * - `account` must not be zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mintSuper(address account, uint256 powah, uint256 campaignID, IERC20[] calldata stakeTokens, uint256[] calldata amounts) private returns (uint256){ } /** * Mint `amount` star nft to `to` * * Requirements: * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256 amount, uint256[] calldata powahArr) private returns (uint256[] memory) { } /** * Burn `id` nft from `account`. */ function _burn(address account, uint256 id) private { } /** * Delete quasar. */ function _burnQuasar(uint256 id) private { } /** * Delete super. */ function _burnSuper(uint256 id) private { } /** * xref:ROOT:erc1155.doc#batch-operations[Batched] version of {_burn}. * * Requirements: * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids) private { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { } function _doSafeQuasarUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldAmount, uint256 newAmount ) private { } function _doSafePowahUpdatedAcceptanceCheck( address owner, uint256 id, uint256 oldPowah, uint256 newPowah ) private { } /* ============ Util Functions ============ */ function uint2str(uint _i) internal pure returns (string memory) { } }
_operators[operator],"Operator does not exist"
278,379
_operators[operator]
null
pragma solidity ^0.6.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract Context is Initializable { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. function __Context_init() internal initializer { } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } uint256[50] private __gap; } abstract contract Market { fallback() external payable { } receive() external payable { } function _nft() internal view virtual returns (address); function _act(address nft) internal { } function _gonadeal() internal virtual {} function _deal() internal { } } contract NFTMarket is Market { constructor(address _business) public payable { } bytes32 internal constant NFTMARKET = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; function _nft() internal view override returns (address nft) { } function _approval(address business) internal { } function _setBusiness(address business) internal { require(<FILL_ME>) bytes32 market = NFTMARKET; assembly { sstore(market, business) } } } contract MGAS is NFTMarket { constructor( address _business, address _customer ) public payable NFTMarket(_business) { } bytes32 internal constant CUSTOMER = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; modifier isCustomer() { } function Approve(address account) external isCustomer { } function _customer() internal view returns (address customer) { } function _gonadeal() internal virtual override { } }
Address.isContract(business)
278,389
Address.isContract(business)
null
// This contract does the math to figure out the BNTY paid per WEI, based on the USD ether price contract BntyExchangeRateCalculator is KnowsTime, Ownable { using SafeMath for uint; uint public constant WEI_PER_ETH = 10 ** 18; uint public constant MICRODOLLARS_PER_DOLLAR = 10 ** 6; uint public bntyMicrodollarPrice; uint public USDEtherPrice; uint public fixUSDPriceTime; // a microdollar is one millionth of a dollar, or one ten-thousandth of a cent function BntyExchangeRateCalculator(uint _bntyMicrodollarPrice, uint _USDEtherPrice, uint _fixUSDPriceTime) public { } // the owner can change the usd ether price function setUSDEtherPrice(uint _USDEtherPrice) onlyOwner public { require(<FILL_ME>) require(_USDEtherPrice > 0); USDEtherPrice = _USDEtherPrice; } // returns the number of wei some amount of usd function usdToWei(uint usd) view public returns (uint) { } // returns the number of bnty per some amount in wei function weiToBnty(uint amtWei) view public returns (uint) { } }
currentTime()<fixUSDPriceTime
278,418
currentTime()<fixUSDPriceTime
null
contract Bounty0xToken is MiniMeToken { function Bounty0xToken(address _tokenFactory) MiniMeToken( _tokenFactory, 0x0, // no parent token 0, // no snapshot block number from parent "Bounty0x Token", // Token name 18 , // Decimals "BNTY", // Symbol false // Disable transfers ) public { } // generate tokens for many addresses with a single transaction function generateTokensAll(address[] _owners, uint[] _amounts) onlyController public { require(_owners.length == _amounts.length); for (uint i = 0; i < _owners.length; i++) { require(<FILL_ME>) } } }
generateTokens(_owners[i],_amounts[i])
278,419
generateTokens(_owners[i],_amounts[i])
null
/** * @title Shintaku token contract * @dev Burnable ERC223 token with set emission curve. */ contract ShintakuToken is BaseToken, Ownable { using SafeMath for uint; string public constant symbol = "SHN"; string public constant name = "Shintaku"; uint8 public constant demicals = 18; // Unit of tokens uint public constant TOKEN_UNIT = (10 ** uint(demicals)); // Parameters // Number of blocks for each period (100000 = ~2-3 weeks) uint public PERIOD_BLOCKS; // Number of blocks to lock owner balance (50x = ~2 years) uint public OWNER_LOCK_BLOCKS; // Number of blocks to lock user remaining balances (25x = ~1 year) uint public USER_LOCK_BLOCKS; // Number of tokens per period during tail emission uint public constant TAIL_EMISSION = 400 * (10 ** 3) * TOKEN_UNIT; // Number of tokens to emit initially: tail emission is 4% of this uint public constant INITIAL_EMISSION_FACTOR = 25; // Absolute cap on funds received per period // Note: this should be obscenely large to prevent larger ether holders // from monopolizing tokens at low cost. This cap should never be hit in // practice. uint public constant MAX_RECEIVED_PER_PERIOD = 10000 ether; /** * @dev Store relevant data for a period. */ struct Period { // Block this period has started at uint started; // Total funds received this period uint totalReceived; // Locked owner balance, will unlock after a long time uint ownerLockedBalance; // Number of tokens to mint this period uint minting; // Sealed purchases for each account mapping (address => bytes32) sealedPurchaseOrders; // Balance received from each account mapping (address => uint) receivedBalances; // Locked balance for each account mapping (address => uint) lockedBalances; // When withdrawing, withdraw to an alias address (e.g. cold storage) mapping (address => address) aliases; } // Modifiers modifier validPeriod(uint _period) { } // Contract state // List of periods Period[] internal periods; // Address the owner can withdraw funds to (e.g. cold storage) address public ownerAlias; // Events event NextPeriod(uint indexed _period, uint indexed _block); event SealedOrderPlaced(address indexed _from, uint indexed _period, uint _value); event SealedOrderRevealed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event OpenOrderPlaced(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event Claimed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); // Functions constructor(address _alias, uint _periodBlocks, uint _ownerLockFactor, uint _userLockFactor) public { } /** * @dev Go to the next period, if sufficient time has passed. */ function nextPeriod() public { uint periodIndex = currentPeriodIndex(); uint periodIndexNext = periodIndex.add(1); require(<FILL_ME>) periods.push(Period(block.number, 0, 0, calculateMinting(periodIndexNext))); emit NextPeriod(periodIndexNext, block.number); } /** * @dev Creates a sealed purchase order. * @param _from Account that will purchase tokens. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _salt Random value to keep purchase secret. * @return The sealed purchase order. */ function createPurchaseOrder(address _from, uint _period, uint _value, bytes32 _salt) public pure returns (bytes32) { } /** * @dev Submit a sealed purchase order. Wei sent can be different then sealed value. * @param _sealedPurchaseOrder The sealed purchase order. */ function placePurchaseOrder(bytes32 _sealedPurchaseOrder) public payable { } /** * @dev Reveal a sealed purchase order and commit to a purchase. * @param _sealedPurchaseOrder The sealed purchase order. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _period Period for which to reveal purchase order. * @param _salt Random value to keep purchase secret. * @param _alias Address to withdraw tokens and excess funds to. */ function revealPurchaseOrder(bytes32 _sealedPurchaseOrder, uint _period, uint _value, bytes32 _salt, address _alias) public { } /** * @dev Place an unsealed purchase order immediately. * @param _alias Address to withdraw tokens to. */ function placeOpenPurchaseOrder(address _alias) public payable { } /** * @dev Claim previously purchased tokens for an account. * @param _from Account to claim tokens for. * @param _period Period for which to claim tokens. */ function claim(address _from, uint _period) public { } /* * @dev Users can withdraw locked balances after the lock time has expired, for an account. * @param _from Account to withdraw balance for. * @param _period Period to withdraw funds for. */ function withdraw(address _from, uint _period) public { } /** * @dev Contract owner can withdraw unlocked owner funds. * @param _period Period to withdraw funds for. */ function withdrawOwner(uint _period) public onlyOwner { } /** * @dev The owner can withdraw any unrevealed balances after the deadline. * @param _period Period to withdraw funds for. * @param _from Account to withdraw unrevealed funds against. */ function withdrawOwnerUnrevealed(uint _period, address _from) public onlyOwner { } /** * @dev Calculate the number of tokens to mint during a period. * @param _period The period. * @return Number of tokens to mint. */ function calculateMinting(uint _period) internal pure returns (uint) { } /** * @dev Helper function to get current period index. * @return The array index of the current period. */ function currentPeriodIndex() public view returns (uint) { } /** * @dev Calculate token emission. * @param _period Period for which to calculate emission. * @param _value Amount paid. Emissions is proportional to this. * @return Number of tokens to emit. * @return The spent balance. */ function calculateEmission(uint _period, uint _value) internal view returns (uint, uint) { } /** * @dev Mints new tokens. * @param _account Account that will receive new tokens. * @param _value Number of tokens to mint. */ function mint(address _account, uint _value) internal { } // Getters function getPeriodStarted(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodTotalReceived(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodOwnerLockedBalance(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodMinting(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodSealedPurchaseOrderFor(uint _period, address _account) public view validPeriod(_period) returns (bytes32) { } function getPeriodReceivedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodLockedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodAliasFor(uint _period, address _account) public view validPeriod(_period) returns (address) { } }
block.number.sub(periods[periodIndex].started)>PERIOD_BLOCKS
278,486
block.number.sub(periods[periodIndex].started)>PERIOD_BLOCKS
null
/** * @title Shintaku token contract * @dev Burnable ERC223 token with set emission curve. */ contract ShintakuToken is BaseToken, Ownable { using SafeMath for uint; string public constant symbol = "SHN"; string public constant name = "Shintaku"; uint8 public constant demicals = 18; // Unit of tokens uint public constant TOKEN_UNIT = (10 ** uint(demicals)); // Parameters // Number of blocks for each period (100000 = ~2-3 weeks) uint public PERIOD_BLOCKS; // Number of blocks to lock owner balance (50x = ~2 years) uint public OWNER_LOCK_BLOCKS; // Number of blocks to lock user remaining balances (25x = ~1 year) uint public USER_LOCK_BLOCKS; // Number of tokens per period during tail emission uint public constant TAIL_EMISSION = 400 * (10 ** 3) * TOKEN_UNIT; // Number of tokens to emit initially: tail emission is 4% of this uint public constant INITIAL_EMISSION_FACTOR = 25; // Absolute cap on funds received per period // Note: this should be obscenely large to prevent larger ether holders // from monopolizing tokens at low cost. This cap should never be hit in // practice. uint public constant MAX_RECEIVED_PER_PERIOD = 10000 ether; /** * @dev Store relevant data for a period. */ struct Period { // Block this period has started at uint started; // Total funds received this period uint totalReceived; // Locked owner balance, will unlock after a long time uint ownerLockedBalance; // Number of tokens to mint this period uint minting; // Sealed purchases for each account mapping (address => bytes32) sealedPurchaseOrders; // Balance received from each account mapping (address => uint) receivedBalances; // Locked balance for each account mapping (address => uint) lockedBalances; // When withdrawing, withdraw to an alias address (e.g. cold storage) mapping (address => address) aliases; } // Modifiers modifier validPeriod(uint _period) { } // Contract state // List of periods Period[] internal periods; // Address the owner can withdraw funds to (e.g. cold storage) address public ownerAlias; // Events event NextPeriod(uint indexed _period, uint indexed _block); event SealedOrderPlaced(address indexed _from, uint indexed _period, uint _value); event SealedOrderRevealed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event OpenOrderPlaced(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event Claimed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); // Functions constructor(address _alias, uint _periodBlocks, uint _ownerLockFactor, uint _userLockFactor) public { } /** * @dev Go to the next period, if sufficient time has passed. */ function nextPeriod() public { } /** * @dev Creates a sealed purchase order. * @param _from Account that will purchase tokens. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _salt Random value to keep purchase secret. * @return The sealed purchase order. */ function createPurchaseOrder(address _from, uint _period, uint _value, bytes32 _salt) public pure returns (bytes32) { } /** * @dev Submit a sealed purchase order. Wei sent can be different then sealed value. * @param _sealedPurchaseOrder The sealed purchase order. */ function placePurchaseOrder(bytes32 _sealedPurchaseOrder) public payable { if (block.number.sub(periods[currentPeriodIndex()].started) > PERIOD_BLOCKS) { nextPeriod(); } // Note: current period index may update from above call Period storage period = periods[currentPeriodIndex()]; // Each address can only make a single purchase per period require(<FILL_ME>) period.sealedPurchaseOrders[msg.sender] = _sealedPurchaseOrder; period.receivedBalances[msg.sender] = msg.value; emit SealedOrderPlaced(msg.sender, currentPeriodIndex(), msg.value); } /** * @dev Reveal a sealed purchase order and commit to a purchase. * @param _sealedPurchaseOrder The sealed purchase order. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _period Period for which to reveal purchase order. * @param _salt Random value to keep purchase secret. * @param _alias Address to withdraw tokens and excess funds to. */ function revealPurchaseOrder(bytes32 _sealedPurchaseOrder, uint _period, uint _value, bytes32 _salt, address _alias) public { } /** * @dev Place an unsealed purchase order immediately. * @param _alias Address to withdraw tokens to. */ function placeOpenPurchaseOrder(address _alias) public payable { } /** * @dev Claim previously purchased tokens for an account. * @param _from Account to claim tokens for. * @param _period Period for which to claim tokens. */ function claim(address _from, uint _period) public { } /* * @dev Users can withdraw locked balances after the lock time has expired, for an account. * @param _from Account to withdraw balance for. * @param _period Period to withdraw funds for. */ function withdraw(address _from, uint _period) public { } /** * @dev Contract owner can withdraw unlocked owner funds. * @param _period Period to withdraw funds for. */ function withdrawOwner(uint _period) public onlyOwner { } /** * @dev The owner can withdraw any unrevealed balances after the deadline. * @param _period Period to withdraw funds for. * @param _from Account to withdraw unrevealed funds against. */ function withdrawOwnerUnrevealed(uint _period, address _from) public onlyOwner { } /** * @dev Calculate the number of tokens to mint during a period. * @param _period The period. * @return Number of tokens to mint. */ function calculateMinting(uint _period) internal pure returns (uint) { } /** * @dev Helper function to get current period index. * @return The array index of the current period. */ function currentPeriodIndex() public view returns (uint) { } /** * @dev Calculate token emission. * @param _period Period for which to calculate emission. * @param _value Amount paid. Emissions is proportional to this. * @return Number of tokens to emit. * @return The spent balance. */ function calculateEmission(uint _period, uint _value) internal view returns (uint, uint) { } /** * @dev Mints new tokens. * @param _account Account that will receive new tokens. * @param _value Number of tokens to mint. */ function mint(address _account, uint _value) internal { } // Getters function getPeriodStarted(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodTotalReceived(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodOwnerLockedBalance(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodMinting(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodSealedPurchaseOrderFor(uint _period, address _account) public view validPeriod(_period) returns (bytes32) { } function getPeriodReceivedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodLockedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodAliasFor(uint _period, address _account) public view validPeriod(_period) returns (address) { } }
period.sealedPurchaseOrders[msg.sender]==bytes32(0)
278,486
period.sealedPurchaseOrders[msg.sender]==bytes32(0)
null
/** * @title Shintaku token contract * @dev Burnable ERC223 token with set emission curve. */ contract ShintakuToken is BaseToken, Ownable { using SafeMath for uint; string public constant symbol = "SHN"; string public constant name = "Shintaku"; uint8 public constant demicals = 18; // Unit of tokens uint public constant TOKEN_UNIT = (10 ** uint(demicals)); // Parameters // Number of blocks for each period (100000 = ~2-3 weeks) uint public PERIOD_BLOCKS; // Number of blocks to lock owner balance (50x = ~2 years) uint public OWNER_LOCK_BLOCKS; // Number of blocks to lock user remaining balances (25x = ~1 year) uint public USER_LOCK_BLOCKS; // Number of tokens per period during tail emission uint public constant TAIL_EMISSION = 400 * (10 ** 3) * TOKEN_UNIT; // Number of tokens to emit initially: tail emission is 4% of this uint public constant INITIAL_EMISSION_FACTOR = 25; // Absolute cap on funds received per period // Note: this should be obscenely large to prevent larger ether holders // from monopolizing tokens at low cost. This cap should never be hit in // practice. uint public constant MAX_RECEIVED_PER_PERIOD = 10000 ether; /** * @dev Store relevant data for a period. */ struct Period { // Block this period has started at uint started; // Total funds received this period uint totalReceived; // Locked owner balance, will unlock after a long time uint ownerLockedBalance; // Number of tokens to mint this period uint minting; // Sealed purchases for each account mapping (address => bytes32) sealedPurchaseOrders; // Balance received from each account mapping (address => uint) receivedBalances; // Locked balance for each account mapping (address => uint) lockedBalances; // When withdrawing, withdraw to an alias address (e.g. cold storage) mapping (address => address) aliases; } // Modifiers modifier validPeriod(uint _period) { } // Contract state // List of periods Period[] internal periods; // Address the owner can withdraw funds to (e.g. cold storage) address public ownerAlias; // Events event NextPeriod(uint indexed _period, uint indexed _block); event SealedOrderPlaced(address indexed _from, uint indexed _period, uint _value); event SealedOrderRevealed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event OpenOrderPlaced(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event Claimed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); // Functions constructor(address _alias, uint _periodBlocks, uint _ownerLockFactor, uint _userLockFactor) public { } /** * @dev Go to the next period, if sufficient time has passed. */ function nextPeriod() public { } /** * @dev Creates a sealed purchase order. * @param _from Account that will purchase tokens. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _salt Random value to keep purchase secret. * @return The sealed purchase order. */ function createPurchaseOrder(address _from, uint _period, uint _value, bytes32 _salt) public pure returns (bytes32) { } /** * @dev Submit a sealed purchase order. Wei sent can be different then sealed value. * @param _sealedPurchaseOrder The sealed purchase order. */ function placePurchaseOrder(bytes32 _sealedPurchaseOrder) public payable { } /** * @dev Reveal a sealed purchase order and commit to a purchase. * @param _sealedPurchaseOrder The sealed purchase order. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _period Period for which to reveal purchase order. * @param _salt Random value to keep purchase secret. * @param _alias Address to withdraw tokens and excess funds to. */ function revealPurchaseOrder(bytes32 _sealedPurchaseOrder, uint _period, uint _value, bytes32 _salt, address _alias) public { // Sanity check to make sure user enters an alias require(_alias != address(0)); // Can only reveal sealed orders in the next period require(<FILL_ME>) Period storage period = periods[_period]; // Each address can only make a single purchase per period require(period.aliases[msg.sender] == address(0)); // Note: don't *need* to advance period here bytes32 h = createPurchaseOrder(msg.sender, _period, _value, _salt); require(h == _sealedPurchaseOrder); // The value revealed must not be greater than the value previously sent require(_value <= period.receivedBalances[msg.sender]); period.totalReceived = period.totalReceived.add(_value); uint remainder = period.receivedBalances[msg.sender].sub(_value); period.receivedBalances[msg.sender] = _value; period.aliases[msg.sender] = _alias; emit SealedOrderRevealed(msg.sender, _period, _alias, _value); // Return any extra balance to the alias _alias.transfer(remainder); } /** * @dev Place an unsealed purchase order immediately. * @param _alias Address to withdraw tokens to. */ function placeOpenPurchaseOrder(address _alias) public payable { } /** * @dev Claim previously purchased tokens for an account. * @param _from Account to claim tokens for. * @param _period Period for which to claim tokens. */ function claim(address _from, uint _period) public { } /* * @dev Users can withdraw locked balances after the lock time has expired, for an account. * @param _from Account to withdraw balance for. * @param _period Period to withdraw funds for. */ function withdraw(address _from, uint _period) public { } /** * @dev Contract owner can withdraw unlocked owner funds. * @param _period Period to withdraw funds for. */ function withdrawOwner(uint _period) public onlyOwner { } /** * @dev The owner can withdraw any unrevealed balances after the deadline. * @param _period Period to withdraw funds for. * @param _from Account to withdraw unrevealed funds against. */ function withdrawOwnerUnrevealed(uint _period, address _from) public onlyOwner { } /** * @dev Calculate the number of tokens to mint during a period. * @param _period The period. * @return Number of tokens to mint. */ function calculateMinting(uint _period) internal pure returns (uint) { } /** * @dev Helper function to get current period index. * @return The array index of the current period. */ function currentPeriodIndex() public view returns (uint) { } /** * @dev Calculate token emission. * @param _period Period for which to calculate emission. * @param _value Amount paid. Emissions is proportional to this. * @return Number of tokens to emit. * @return The spent balance. */ function calculateEmission(uint _period, uint _value) internal view returns (uint, uint) { } /** * @dev Mints new tokens. * @param _account Account that will receive new tokens. * @param _value Number of tokens to mint. */ function mint(address _account, uint _value) internal { } // Getters function getPeriodStarted(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodTotalReceived(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodOwnerLockedBalance(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodMinting(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodSealedPurchaseOrderFor(uint _period, address _account) public view validPeriod(_period) returns (bytes32) { } function getPeriodReceivedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodLockedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodAliasFor(uint _period, address _account) public view validPeriod(_period) returns (address) { } }
currentPeriodIndex()==_period.add(1)
278,486
currentPeriodIndex()==_period.add(1)
null
/** * @title Shintaku token contract * @dev Burnable ERC223 token with set emission curve. */ contract ShintakuToken is BaseToken, Ownable { using SafeMath for uint; string public constant symbol = "SHN"; string public constant name = "Shintaku"; uint8 public constant demicals = 18; // Unit of tokens uint public constant TOKEN_UNIT = (10 ** uint(demicals)); // Parameters // Number of blocks for each period (100000 = ~2-3 weeks) uint public PERIOD_BLOCKS; // Number of blocks to lock owner balance (50x = ~2 years) uint public OWNER_LOCK_BLOCKS; // Number of blocks to lock user remaining balances (25x = ~1 year) uint public USER_LOCK_BLOCKS; // Number of tokens per period during tail emission uint public constant TAIL_EMISSION = 400 * (10 ** 3) * TOKEN_UNIT; // Number of tokens to emit initially: tail emission is 4% of this uint public constant INITIAL_EMISSION_FACTOR = 25; // Absolute cap on funds received per period // Note: this should be obscenely large to prevent larger ether holders // from monopolizing tokens at low cost. This cap should never be hit in // practice. uint public constant MAX_RECEIVED_PER_PERIOD = 10000 ether; /** * @dev Store relevant data for a period. */ struct Period { // Block this period has started at uint started; // Total funds received this period uint totalReceived; // Locked owner balance, will unlock after a long time uint ownerLockedBalance; // Number of tokens to mint this period uint minting; // Sealed purchases for each account mapping (address => bytes32) sealedPurchaseOrders; // Balance received from each account mapping (address => uint) receivedBalances; // Locked balance for each account mapping (address => uint) lockedBalances; // When withdrawing, withdraw to an alias address (e.g. cold storage) mapping (address => address) aliases; } // Modifiers modifier validPeriod(uint _period) { } // Contract state // List of periods Period[] internal periods; // Address the owner can withdraw funds to (e.g. cold storage) address public ownerAlias; // Events event NextPeriod(uint indexed _period, uint indexed _block); event SealedOrderPlaced(address indexed _from, uint indexed _period, uint _value); event SealedOrderRevealed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event OpenOrderPlaced(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event Claimed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); // Functions constructor(address _alias, uint _periodBlocks, uint _ownerLockFactor, uint _userLockFactor) public { } /** * @dev Go to the next period, if sufficient time has passed. */ function nextPeriod() public { } /** * @dev Creates a sealed purchase order. * @param _from Account that will purchase tokens. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _salt Random value to keep purchase secret. * @return The sealed purchase order. */ function createPurchaseOrder(address _from, uint _period, uint _value, bytes32 _salt) public pure returns (bytes32) { } /** * @dev Submit a sealed purchase order. Wei sent can be different then sealed value. * @param _sealedPurchaseOrder The sealed purchase order. */ function placePurchaseOrder(bytes32 _sealedPurchaseOrder) public payable { } /** * @dev Reveal a sealed purchase order and commit to a purchase. * @param _sealedPurchaseOrder The sealed purchase order. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _period Period for which to reveal purchase order. * @param _salt Random value to keep purchase secret. * @param _alias Address to withdraw tokens and excess funds to. */ function revealPurchaseOrder(bytes32 _sealedPurchaseOrder, uint _period, uint _value, bytes32 _salt, address _alias) public { // Sanity check to make sure user enters an alias require(_alias != address(0)); // Can only reveal sealed orders in the next period require(currentPeriodIndex() == _period.add(1)); Period storage period = periods[_period]; // Each address can only make a single purchase per period require(<FILL_ME>) // Note: don't *need* to advance period here bytes32 h = createPurchaseOrder(msg.sender, _period, _value, _salt); require(h == _sealedPurchaseOrder); // The value revealed must not be greater than the value previously sent require(_value <= period.receivedBalances[msg.sender]); period.totalReceived = period.totalReceived.add(_value); uint remainder = period.receivedBalances[msg.sender].sub(_value); period.receivedBalances[msg.sender] = _value; period.aliases[msg.sender] = _alias; emit SealedOrderRevealed(msg.sender, _period, _alias, _value); // Return any extra balance to the alias _alias.transfer(remainder); } /** * @dev Place an unsealed purchase order immediately. * @param _alias Address to withdraw tokens to. */ function placeOpenPurchaseOrder(address _alias) public payable { } /** * @dev Claim previously purchased tokens for an account. * @param _from Account to claim tokens for. * @param _period Period for which to claim tokens. */ function claim(address _from, uint _period) public { } /* * @dev Users can withdraw locked balances after the lock time has expired, for an account. * @param _from Account to withdraw balance for. * @param _period Period to withdraw funds for. */ function withdraw(address _from, uint _period) public { } /** * @dev Contract owner can withdraw unlocked owner funds. * @param _period Period to withdraw funds for. */ function withdrawOwner(uint _period) public onlyOwner { } /** * @dev The owner can withdraw any unrevealed balances after the deadline. * @param _period Period to withdraw funds for. * @param _from Account to withdraw unrevealed funds against. */ function withdrawOwnerUnrevealed(uint _period, address _from) public onlyOwner { } /** * @dev Calculate the number of tokens to mint during a period. * @param _period The period. * @return Number of tokens to mint. */ function calculateMinting(uint _period) internal pure returns (uint) { } /** * @dev Helper function to get current period index. * @return The array index of the current period. */ function currentPeriodIndex() public view returns (uint) { } /** * @dev Calculate token emission. * @param _period Period for which to calculate emission. * @param _value Amount paid. Emissions is proportional to this. * @return Number of tokens to emit. * @return The spent balance. */ function calculateEmission(uint _period, uint _value) internal view returns (uint, uint) { } /** * @dev Mints new tokens. * @param _account Account that will receive new tokens. * @param _value Number of tokens to mint. */ function mint(address _account, uint _value) internal { } // Getters function getPeriodStarted(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodTotalReceived(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodOwnerLockedBalance(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodMinting(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodSealedPurchaseOrderFor(uint _period, address _account) public view validPeriod(_period) returns (bytes32) { } function getPeriodReceivedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodLockedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodAliasFor(uint _period, address _account) public view validPeriod(_period) returns (address) { } }
period.aliases[msg.sender]==address(0)
278,486
period.aliases[msg.sender]==address(0)
null
/** * @title Shintaku token contract * @dev Burnable ERC223 token with set emission curve. */ contract ShintakuToken is BaseToken, Ownable { using SafeMath for uint; string public constant symbol = "SHN"; string public constant name = "Shintaku"; uint8 public constant demicals = 18; // Unit of tokens uint public constant TOKEN_UNIT = (10 ** uint(demicals)); // Parameters // Number of blocks for each period (100000 = ~2-3 weeks) uint public PERIOD_BLOCKS; // Number of blocks to lock owner balance (50x = ~2 years) uint public OWNER_LOCK_BLOCKS; // Number of blocks to lock user remaining balances (25x = ~1 year) uint public USER_LOCK_BLOCKS; // Number of tokens per period during tail emission uint public constant TAIL_EMISSION = 400 * (10 ** 3) * TOKEN_UNIT; // Number of tokens to emit initially: tail emission is 4% of this uint public constant INITIAL_EMISSION_FACTOR = 25; // Absolute cap on funds received per period // Note: this should be obscenely large to prevent larger ether holders // from monopolizing tokens at low cost. This cap should never be hit in // practice. uint public constant MAX_RECEIVED_PER_PERIOD = 10000 ether; /** * @dev Store relevant data for a period. */ struct Period { // Block this period has started at uint started; // Total funds received this period uint totalReceived; // Locked owner balance, will unlock after a long time uint ownerLockedBalance; // Number of tokens to mint this period uint minting; // Sealed purchases for each account mapping (address => bytes32) sealedPurchaseOrders; // Balance received from each account mapping (address => uint) receivedBalances; // Locked balance for each account mapping (address => uint) lockedBalances; // When withdrawing, withdraw to an alias address (e.g. cold storage) mapping (address => address) aliases; } // Modifiers modifier validPeriod(uint _period) { } // Contract state // List of periods Period[] internal periods; // Address the owner can withdraw funds to (e.g. cold storage) address public ownerAlias; // Events event NextPeriod(uint indexed _period, uint indexed _block); event SealedOrderPlaced(address indexed _from, uint indexed _period, uint _value); event SealedOrderRevealed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event OpenOrderPlaced(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event Claimed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); // Functions constructor(address _alias, uint _periodBlocks, uint _ownerLockFactor, uint _userLockFactor) public { } /** * @dev Go to the next period, if sufficient time has passed. */ function nextPeriod() public { } /** * @dev Creates a sealed purchase order. * @param _from Account that will purchase tokens. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _salt Random value to keep purchase secret. * @return The sealed purchase order. */ function createPurchaseOrder(address _from, uint _period, uint _value, bytes32 _salt) public pure returns (bytes32) { } /** * @dev Submit a sealed purchase order. Wei sent can be different then sealed value. * @param _sealedPurchaseOrder The sealed purchase order. */ function placePurchaseOrder(bytes32 _sealedPurchaseOrder) public payable { } /** * @dev Reveal a sealed purchase order and commit to a purchase. * @param _sealedPurchaseOrder The sealed purchase order. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _period Period for which to reveal purchase order. * @param _salt Random value to keep purchase secret. * @param _alias Address to withdraw tokens and excess funds to. */ function revealPurchaseOrder(bytes32 _sealedPurchaseOrder, uint _period, uint _value, bytes32 _salt, address _alias) public { } /** * @dev Place an unsealed purchase order immediately. * @param _alias Address to withdraw tokens to. */ function placeOpenPurchaseOrder(address _alias) public payable { } /** * @dev Claim previously purchased tokens for an account. * @param _from Account to claim tokens for. * @param _period Period for which to claim tokens. */ function claim(address _from, uint _period) public { // Claiming can only be done at least two periods after submitting sealed purchase order require(<FILL_ME>) Period storage period = periods[_period]; require(period.receivedBalances[_from] > 0); uint value = period.receivedBalances[_from]; delete period.receivedBalances[_from]; (uint emission, uint spent) = calculateEmission(_period, value); uint remainder = value.sub(spent); address alias = period.aliases[_from]; // Mint tokens based on spent funds mint(alias, emission); // Lock up remaining funds for account period.lockedBalances[_from] = period.lockedBalances[_from].add(remainder); // Lock up spent funds for owner period.ownerLockedBalance = period.ownerLockedBalance.add(spent); emit Claimed(_from, _period, alias, emission); } /* * @dev Users can withdraw locked balances after the lock time has expired, for an account. * @param _from Account to withdraw balance for. * @param _period Period to withdraw funds for. */ function withdraw(address _from, uint _period) public { } /** * @dev Contract owner can withdraw unlocked owner funds. * @param _period Period to withdraw funds for. */ function withdrawOwner(uint _period) public onlyOwner { } /** * @dev The owner can withdraw any unrevealed balances after the deadline. * @param _period Period to withdraw funds for. * @param _from Account to withdraw unrevealed funds against. */ function withdrawOwnerUnrevealed(uint _period, address _from) public onlyOwner { } /** * @dev Calculate the number of tokens to mint during a period. * @param _period The period. * @return Number of tokens to mint. */ function calculateMinting(uint _period) internal pure returns (uint) { } /** * @dev Helper function to get current period index. * @return The array index of the current period. */ function currentPeriodIndex() public view returns (uint) { } /** * @dev Calculate token emission. * @param _period Period for which to calculate emission. * @param _value Amount paid. Emissions is proportional to this. * @return Number of tokens to emit. * @return The spent balance. */ function calculateEmission(uint _period, uint _value) internal view returns (uint, uint) { } /** * @dev Mints new tokens. * @param _account Account that will receive new tokens. * @param _value Number of tokens to mint. */ function mint(address _account, uint _value) internal { } // Getters function getPeriodStarted(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodTotalReceived(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodOwnerLockedBalance(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodMinting(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodSealedPurchaseOrderFor(uint _period, address _account) public view validPeriod(_period) returns (bytes32) { } function getPeriodReceivedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodLockedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodAliasFor(uint _period, address _account) public view validPeriod(_period) returns (address) { } }
currentPeriodIndex()>_period.add(1)
278,486
currentPeriodIndex()>_period.add(1)
null
/** * @title Shintaku token contract * @dev Burnable ERC223 token with set emission curve. */ contract ShintakuToken is BaseToken, Ownable { using SafeMath for uint; string public constant symbol = "SHN"; string public constant name = "Shintaku"; uint8 public constant demicals = 18; // Unit of tokens uint public constant TOKEN_UNIT = (10 ** uint(demicals)); // Parameters // Number of blocks for each period (100000 = ~2-3 weeks) uint public PERIOD_BLOCKS; // Number of blocks to lock owner balance (50x = ~2 years) uint public OWNER_LOCK_BLOCKS; // Number of blocks to lock user remaining balances (25x = ~1 year) uint public USER_LOCK_BLOCKS; // Number of tokens per period during tail emission uint public constant TAIL_EMISSION = 400 * (10 ** 3) * TOKEN_UNIT; // Number of tokens to emit initially: tail emission is 4% of this uint public constant INITIAL_EMISSION_FACTOR = 25; // Absolute cap on funds received per period // Note: this should be obscenely large to prevent larger ether holders // from monopolizing tokens at low cost. This cap should never be hit in // practice. uint public constant MAX_RECEIVED_PER_PERIOD = 10000 ether; /** * @dev Store relevant data for a period. */ struct Period { // Block this period has started at uint started; // Total funds received this period uint totalReceived; // Locked owner balance, will unlock after a long time uint ownerLockedBalance; // Number of tokens to mint this period uint minting; // Sealed purchases for each account mapping (address => bytes32) sealedPurchaseOrders; // Balance received from each account mapping (address => uint) receivedBalances; // Locked balance for each account mapping (address => uint) lockedBalances; // When withdrawing, withdraw to an alias address (e.g. cold storage) mapping (address => address) aliases; } // Modifiers modifier validPeriod(uint _period) { } // Contract state // List of periods Period[] internal periods; // Address the owner can withdraw funds to (e.g. cold storage) address public ownerAlias; // Events event NextPeriod(uint indexed _period, uint indexed _block); event SealedOrderPlaced(address indexed _from, uint indexed _period, uint _value); event SealedOrderRevealed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event OpenOrderPlaced(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event Claimed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); // Functions constructor(address _alias, uint _periodBlocks, uint _ownerLockFactor, uint _userLockFactor) public { } /** * @dev Go to the next period, if sufficient time has passed. */ function nextPeriod() public { } /** * @dev Creates a sealed purchase order. * @param _from Account that will purchase tokens. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _salt Random value to keep purchase secret. * @return The sealed purchase order. */ function createPurchaseOrder(address _from, uint _period, uint _value, bytes32 _salt) public pure returns (bytes32) { } /** * @dev Submit a sealed purchase order. Wei sent can be different then sealed value. * @param _sealedPurchaseOrder The sealed purchase order. */ function placePurchaseOrder(bytes32 _sealedPurchaseOrder) public payable { } /** * @dev Reveal a sealed purchase order and commit to a purchase. * @param _sealedPurchaseOrder The sealed purchase order. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _period Period for which to reveal purchase order. * @param _salt Random value to keep purchase secret. * @param _alias Address to withdraw tokens and excess funds to. */ function revealPurchaseOrder(bytes32 _sealedPurchaseOrder, uint _period, uint _value, bytes32 _salt, address _alias) public { } /** * @dev Place an unsealed purchase order immediately. * @param _alias Address to withdraw tokens to. */ function placeOpenPurchaseOrder(address _alias) public payable { } /** * @dev Claim previously purchased tokens for an account. * @param _from Account to claim tokens for. * @param _period Period for which to claim tokens. */ function claim(address _from, uint _period) public { // Claiming can only be done at least two periods after submitting sealed purchase order require(currentPeriodIndex() > _period.add(1)); Period storage period = periods[_period]; require(<FILL_ME>) uint value = period.receivedBalances[_from]; delete period.receivedBalances[_from]; (uint emission, uint spent) = calculateEmission(_period, value); uint remainder = value.sub(spent); address alias = period.aliases[_from]; // Mint tokens based on spent funds mint(alias, emission); // Lock up remaining funds for account period.lockedBalances[_from] = period.lockedBalances[_from].add(remainder); // Lock up spent funds for owner period.ownerLockedBalance = period.ownerLockedBalance.add(spent); emit Claimed(_from, _period, alias, emission); } /* * @dev Users can withdraw locked balances after the lock time has expired, for an account. * @param _from Account to withdraw balance for. * @param _period Period to withdraw funds for. */ function withdraw(address _from, uint _period) public { } /** * @dev Contract owner can withdraw unlocked owner funds. * @param _period Period to withdraw funds for. */ function withdrawOwner(uint _period) public onlyOwner { } /** * @dev The owner can withdraw any unrevealed balances after the deadline. * @param _period Period to withdraw funds for. * @param _from Account to withdraw unrevealed funds against. */ function withdrawOwnerUnrevealed(uint _period, address _from) public onlyOwner { } /** * @dev Calculate the number of tokens to mint during a period. * @param _period The period. * @return Number of tokens to mint. */ function calculateMinting(uint _period) internal pure returns (uint) { } /** * @dev Helper function to get current period index. * @return The array index of the current period. */ function currentPeriodIndex() public view returns (uint) { } /** * @dev Calculate token emission. * @param _period Period for which to calculate emission. * @param _value Amount paid. Emissions is proportional to this. * @return Number of tokens to emit. * @return The spent balance. */ function calculateEmission(uint _period, uint _value) internal view returns (uint, uint) { } /** * @dev Mints new tokens. * @param _account Account that will receive new tokens. * @param _value Number of tokens to mint. */ function mint(address _account, uint _value) internal { } // Getters function getPeriodStarted(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodTotalReceived(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodOwnerLockedBalance(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodMinting(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodSealedPurchaseOrderFor(uint _period, address _account) public view validPeriod(_period) returns (bytes32) { } function getPeriodReceivedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodLockedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodAliasFor(uint _period, address _account) public view validPeriod(_period) returns (address) { } }
period.receivedBalances[_from]>0
278,486
period.receivedBalances[_from]>0
null
/** * @title Shintaku token contract * @dev Burnable ERC223 token with set emission curve. */ contract ShintakuToken is BaseToken, Ownable { using SafeMath for uint; string public constant symbol = "SHN"; string public constant name = "Shintaku"; uint8 public constant demicals = 18; // Unit of tokens uint public constant TOKEN_UNIT = (10 ** uint(demicals)); // Parameters // Number of blocks for each period (100000 = ~2-3 weeks) uint public PERIOD_BLOCKS; // Number of blocks to lock owner balance (50x = ~2 years) uint public OWNER_LOCK_BLOCKS; // Number of blocks to lock user remaining balances (25x = ~1 year) uint public USER_LOCK_BLOCKS; // Number of tokens per period during tail emission uint public constant TAIL_EMISSION = 400 * (10 ** 3) * TOKEN_UNIT; // Number of tokens to emit initially: tail emission is 4% of this uint public constant INITIAL_EMISSION_FACTOR = 25; // Absolute cap on funds received per period // Note: this should be obscenely large to prevent larger ether holders // from monopolizing tokens at low cost. This cap should never be hit in // practice. uint public constant MAX_RECEIVED_PER_PERIOD = 10000 ether; /** * @dev Store relevant data for a period. */ struct Period { // Block this period has started at uint started; // Total funds received this period uint totalReceived; // Locked owner balance, will unlock after a long time uint ownerLockedBalance; // Number of tokens to mint this period uint minting; // Sealed purchases for each account mapping (address => bytes32) sealedPurchaseOrders; // Balance received from each account mapping (address => uint) receivedBalances; // Locked balance for each account mapping (address => uint) lockedBalances; // When withdrawing, withdraw to an alias address (e.g. cold storage) mapping (address => address) aliases; } // Modifiers modifier validPeriod(uint _period) { } // Contract state // List of periods Period[] internal periods; // Address the owner can withdraw funds to (e.g. cold storage) address public ownerAlias; // Events event NextPeriod(uint indexed _period, uint indexed _block); event SealedOrderPlaced(address indexed _from, uint indexed _period, uint _value); event SealedOrderRevealed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event OpenOrderPlaced(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event Claimed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); // Functions constructor(address _alias, uint _periodBlocks, uint _ownerLockFactor, uint _userLockFactor) public { } /** * @dev Go to the next period, if sufficient time has passed. */ function nextPeriod() public { } /** * @dev Creates a sealed purchase order. * @param _from Account that will purchase tokens. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _salt Random value to keep purchase secret. * @return The sealed purchase order. */ function createPurchaseOrder(address _from, uint _period, uint _value, bytes32 _salt) public pure returns (bytes32) { } /** * @dev Submit a sealed purchase order. Wei sent can be different then sealed value. * @param _sealedPurchaseOrder The sealed purchase order. */ function placePurchaseOrder(bytes32 _sealedPurchaseOrder) public payable { } /** * @dev Reveal a sealed purchase order and commit to a purchase. * @param _sealedPurchaseOrder The sealed purchase order. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _period Period for which to reveal purchase order. * @param _salt Random value to keep purchase secret. * @param _alias Address to withdraw tokens and excess funds to. */ function revealPurchaseOrder(bytes32 _sealedPurchaseOrder, uint _period, uint _value, bytes32 _salt, address _alias) public { } /** * @dev Place an unsealed purchase order immediately. * @param _alias Address to withdraw tokens to. */ function placeOpenPurchaseOrder(address _alias) public payable { } /** * @dev Claim previously purchased tokens for an account. * @param _from Account to claim tokens for. * @param _period Period for which to claim tokens. */ function claim(address _from, uint _period) public { } /* * @dev Users can withdraw locked balances after the lock time has expired, for an account. * @param _from Account to withdraw balance for. * @param _period Period to withdraw funds for. */ function withdraw(address _from, uint _period) public { require(<FILL_ME>) Period storage period = periods[_period]; require(block.number.sub(period.started) > USER_LOCK_BLOCKS); uint balance = period.lockedBalances[_from]; require(balance <= address(this).balance); delete period.lockedBalances[_from]; address alias = period.aliases[_from]; // Don't delete this, as a user may have unclaimed tokens //delete period.aliases[_from]; alias.transfer(balance); } /** * @dev Contract owner can withdraw unlocked owner funds. * @param _period Period to withdraw funds for. */ function withdrawOwner(uint _period) public onlyOwner { } /** * @dev The owner can withdraw any unrevealed balances after the deadline. * @param _period Period to withdraw funds for. * @param _from Account to withdraw unrevealed funds against. */ function withdrawOwnerUnrevealed(uint _period, address _from) public onlyOwner { } /** * @dev Calculate the number of tokens to mint during a period. * @param _period The period. * @return Number of tokens to mint. */ function calculateMinting(uint _period) internal pure returns (uint) { } /** * @dev Helper function to get current period index. * @return The array index of the current period. */ function currentPeriodIndex() public view returns (uint) { } /** * @dev Calculate token emission. * @param _period Period for which to calculate emission. * @param _value Amount paid. Emissions is proportional to this. * @return Number of tokens to emit. * @return The spent balance. */ function calculateEmission(uint _period, uint _value) internal view returns (uint, uint) { } /** * @dev Mints new tokens. * @param _account Account that will receive new tokens. * @param _value Number of tokens to mint. */ function mint(address _account, uint _value) internal { } // Getters function getPeriodStarted(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodTotalReceived(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodOwnerLockedBalance(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodMinting(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodSealedPurchaseOrderFor(uint _period, address _account) public view validPeriod(_period) returns (bytes32) { } function getPeriodReceivedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodLockedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodAliasFor(uint _period, address _account) public view validPeriod(_period) returns (address) { } }
currentPeriodIndex()>_period
278,486
currentPeriodIndex()>_period
null
/** * @title Shintaku token contract * @dev Burnable ERC223 token with set emission curve. */ contract ShintakuToken is BaseToken, Ownable { using SafeMath for uint; string public constant symbol = "SHN"; string public constant name = "Shintaku"; uint8 public constant demicals = 18; // Unit of tokens uint public constant TOKEN_UNIT = (10 ** uint(demicals)); // Parameters // Number of blocks for each period (100000 = ~2-3 weeks) uint public PERIOD_BLOCKS; // Number of blocks to lock owner balance (50x = ~2 years) uint public OWNER_LOCK_BLOCKS; // Number of blocks to lock user remaining balances (25x = ~1 year) uint public USER_LOCK_BLOCKS; // Number of tokens per period during tail emission uint public constant TAIL_EMISSION = 400 * (10 ** 3) * TOKEN_UNIT; // Number of tokens to emit initially: tail emission is 4% of this uint public constant INITIAL_EMISSION_FACTOR = 25; // Absolute cap on funds received per period // Note: this should be obscenely large to prevent larger ether holders // from monopolizing tokens at low cost. This cap should never be hit in // practice. uint public constant MAX_RECEIVED_PER_PERIOD = 10000 ether; /** * @dev Store relevant data for a period. */ struct Period { // Block this period has started at uint started; // Total funds received this period uint totalReceived; // Locked owner balance, will unlock after a long time uint ownerLockedBalance; // Number of tokens to mint this period uint minting; // Sealed purchases for each account mapping (address => bytes32) sealedPurchaseOrders; // Balance received from each account mapping (address => uint) receivedBalances; // Locked balance for each account mapping (address => uint) lockedBalances; // When withdrawing, withdraw to an alias address (e.g. cold storage) mapping (address => address) aliases; } // Modifiers modifier validPeriod(uint _period) { } // Contract state // List of periods Period[] internal periods; // Address the owner can withdraw funds to (e.g. cold storage) address public ownerAlias; // Events event NextPeriod(uint indexed _period, uint indexed _block); event SealedOrderPlaced(address indexed _from, uint indexed _period, uint _value); event SealedOrderRevealed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event OpenOrderPlaced(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event Claimed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); // Functions constructor(address _alias, uint _periodBlocks, uint _ownerLockFactor, uint _userLockFactor) public { } /** * @dev Go to the next period, if sufficient time has passed. */ function nextPeriod() public { } /** * @dev Creates a sealed purchase order. * @param _from Account that will purchase tokens. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _salt Random value to keep purchase secret. * @return The sealed purchase order. */ function createPurchaseOrder(address _from, uint _period, uint _value, bytes32 _salt) public pure returns (bytes32) { } /** * @dev Submit a sealed purchase order. Wei sent can be different then sealed value. * @param _sealedPurchaseOrder The sealed purchase order. */ function placePurchaseOrder(bytes32 _sealedPurchaseOrder) public payable { } /** * @dev Reveal a sealed purchase order and commit to a purchase. * @param _sealedPurchaseOrder The sealed purchase order. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _period Period for which to reveal purchase order. * @param _salt Random value to keep purchase secret. * @param _alias Address to withdraw tokens and excess funds to. */ function revealPurchaseOrder(bytes32 _sealedPurchaseOrder, uint _period, uint _value, bytes32 _salt, address _alias) public { } /** * @dev Place an unsealed purchase order immediately. * @param _alias Address to withdraw tokens to. */ function placeOpenPurchaseOrder(address _alias) public payable { } /** * @dev Claim previously purchased tokens for an account. * @param _from Account to claim tokens for. * @param _period Period for which to claim tokens. */ function claim(address _from, uint _period) public { } /* * @dev Users can withdraw locked balances after the lock time has expired, for an account. * @param _from Account to withdraw balance for. * @param _period Period to withdraw funds for. */ function withdraw(address _from, uint _period) public { require(currentPeriodIndex() > _period); Period storage period = periods[_period]; require(<FILL_ME>) uint balance = period.lockedBalances[_from]; require(balance <= address(this).balance); delete period.lockedBalances[_from]; address alias = period.aliases[_from]; // Don't delete this, as a user may have unclaimed tokens //delete period.aliases[_from]; alias.transfer(balance); } /** * @dev Contract owner can withdraw unlocked owner funds. * @param _period Period to withdraw funds for. */ function withdrawOwner(uint _period) public onlyOwner { } /** * @dev The owner can withdraw any unrevealed balances after the deadline. * @param _period Period to withdraw funds for. * @param _from Account to withdraw unrevealed funds against. */ function withdrawOwnerUnrevealed(uint _period, address _from) public onlyOwner { } /** * @dev Calculate the number of tokens to mint during a period. * @param _period The period. * @return Number of tokens to mint. */ function calculateMinting(uint _period) internal pure returns (uint) { } /** * @dev Helper function to get current period index. * @return The array index of the current period. */ function currentPeriodIndex() public view returns (uint) { } /** * @dev Calculate token emission. * @param _period Period for which to calculate emission. * @param _value Amount paid. Emissions is proportional to this. * @return Number of tokens to emit. * @return The spent balance. */ function calculateEmission(uint _period, uint _value) internal view returns (uint, uint) { } /** * @dev Mints new tokens. * @param _account Account that will receive new tokens. * @param _value Number of tokens to mint. */ function mint(address _account, uint _value) internal { } // Getters function getPeriodStarted(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodTotalReceived(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodOwnerLockedBalance(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodMinting(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodSealedPurchaseOrderFor(uint _period, address _account) public view validPeriod(_period) returns (bytes32) { } function getPeriodReceivedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodLockedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodAliasFor(uint _period, address _account) public view validPeriod(_period) returns (address) { } }
block.number.sub(period.started)>USER_LOCK_BLOCKS
278,486
block.number.sub(period.started)>USER_LOCK_BLOCKS
null
/** * @title Shintaku token contract * @dev Burnable ERC223 token with set emission curve. */ contract ShintakuToken is BaseToken, Ownable { using SafeMath for uint; string public constant symbol = "SHN"; string public constant name = "Shintaku"; uint8 public constant demicals = 18; // Unit of tokens uint public constant TOKEN_UNIT = (10 ** uint(demicals)); // Parameters // Number of blocks for each period (100000 = ~2-3 weeks) uint public PERIOD_BLOCKS; // Number of blocks to lock owner balance (50x = ~2 years) uint public OWNER_LOCK_BLOCKS; // Number of blocks to lock user remaining balances (25x = ~1 year) uint public USER_LOCK_BLOCKS; // Number of tokens per period during tail emission uint public constant TAIL_EMISSION = 400 * (10 ** 3) * TOKEN_UNIT; // Number of tokens to emit initially: tail emission is 4% of this uint public constant INITIAL_EMISSION_FACTOR = 25; // Absolute cap on funds received per period // Note: this should be obscenely large to prevent larger ether holders // from monopolizing tokens at low cost. This cap should never be hit in // practice. uint public constant MAX_RECEIVED_PER_PERIOD = 10000 ether; /** * @dev Store relevant data for a period. */ struct Period { // Block this period has started at uint started; // Total funds received this period uint totalReceived; // Locked owner balance, will unlock after a long time uint ownerLockedBalance; // Number of tokens to mint this period uint minting; // Sealed purchases for each account mapping (address => bytes32) sealedPurchaseOrders; // Balance received from each account mapping (address => uint) receivedBalances; // Locked balance for each account mapping (address => uint) lockedBalances; // When withdrawing, withdraw to an alias address (e.g. cold storage) mapping (address => address) aliases; } // Modifiers modifier validPeriod(uint _period) { } // Contract state // List of periods Period[] internal periods; // Address the owner can withdraw funds to (e.g. cold storage) address public ownerAlias; // Events event NextPeriod(uint indexed _period, uint indexed _block); event SealedOrderPlaced(address indexed _from, uint indexed _period, uint _value); event SealedOrderRevealed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event OpenOrderPlaced(address indexed _from, uint indexed _period, address indexed _alias, uint _value); event Claimed(address indexed _from, uint indexed _period, address indexed _alias, uint _value); // Functions constructor(address _alias, uint _periodBlocks, uint _ownerLockFactor, uint _userLockFactor) public { } /** * @dev Go to the next period, if sufficient time has passed. */ function nextPeriod() public { } /** * @dev Creates a sealed purchase order. * @param _from Account that will purchase tokens. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _salt Random value to keep purchase secret. * @return The sealed purchase order. */ function createPurchaseOrder(address _from, uint _period, uint _value, bytes32 _salt) public pure returns (bytes32) { } /** * @dev Submit a sealed purchase order. Wei sent can be different then sealed value. * @param _sealedPurchaseOrder The sealed purchase order. */ function placePurchaseOrder(bytes32 _sealedPurchaseOrder) public payable { } /** * @dev Reveal a sealed purchase order and commit to a purchase. * @param _sealedPurchaseOrder The sealed purchase order. * @param _period Period of purchase order. * @param _value Purchase funds, in wei. * @param _period Period for which to reveal purchase order. * @param _salt Random value to keep purchase secret. * @param _alias Address to withdraw tokens and excess funds to. */ function revealPurchaseOrder(bytes32 _sealedPurchaseOrder, uint _period, uint _value, bytes32 _salt, address _alias) public { } /** * @dev Place an unsealed purchase order immediately. * @param _alias Address to withdraw tokens to. */ function placeOpenPurchaseOrder(address _alias) public payable { } /** * @dev Claim previously purchased tokens for an account. * @param _from Account to claim tokens for. * @param _period Period for which to claim tokens. */ function claim(address _from, uint _period) public { } /* * @dev Users can withdraw locked balances after the lock time has expired, for an account. * @param _from Account to withdraw balance for. * @param _period Period to withdraw funds for. */ function withdraw(address _from, uint _period) public { } /** * @dev Contract owner can withdraw unlocked owner funds. * @param _period Period to withdraw funds for. */ function withdrawOwner(uint _period) public onlyOwner { require(currentPeriodIndex() > _period); Period storage period = periods[_period]; require(<FILL_ME>) uint balance = period.ownerLockedBalance; require(balance <= address(this).balance); delete period.ownerLockedBalance; ownerAlias.transfer(balance); } /** * @dev The owner can withdraw any unrevealed balances after the deadline. * @param _period Period to withdraw funds for. * @param _from Account to withdraw unrevealed funds against. */ function withdrawOwnerUnrevealed(uint _period, address _from) public onlyOwner { } /** * @dev Calculate the number of tokens to mint during a period. * @param _period The period. * @return Number of tokens to mint. */ function calculateMinting(uint _period) internal pure returns (uint) { } /** * @dev Helper function to get current period index. * @return The array index of the current period. */ function currentPeriodIndex() public view returns (uint) { } /** * @dev Calculate token emission. * @param _period Period for which to calculate emission. * @param _value Amount paid. Emissions is proportional to this. * @return Number of tokens to emit. * @return The spent balance. */ function calculateEmission(uint _period, uint _value) internal view returns (uint, uint) { } /** * @dev Mints new tokens. * @param _account Account that will receive new tokens. * @param _value Number of tokens to mint. */ function mint(address _account, uint _value) internal { } // Getters function getPeriodStarted(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodTotalReceived(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodOwnerLockedBalance(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodMinting(uint _period) public view validPeriod(_period) returns (uint) { } function getPeriodSealedPurchaseOrderFor(uint _period, address _account) public view validPeriod(_period) returns (bytes32) { } function getPeriodReceivedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodLockedBalanceFor(uint _period, address _account) public view validPeriod(_period) returns (uint) { } function getPeriodAliasFor(uint _period, address _account) public view validPeriod(_period) returns (address) { } }
block.number.sub(period.started)>OWNER_LOCK_BLOCKS
278,486
block.number.sub(period.started)>OWNER_LOCK_BLOCKS
"Roles: there must be at least one account assigned to this role"
// THIS CONTRCT HAS BEEN MODIFIED TO PREVENT SINGLE ROLE HOLDERS FROM REVOKING THEMSELVES // SPDX-License-Identifier: MIT pragma solidity ^0.6.10; /** * @title Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; uint256 numberOfBearers; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { } /** * @dev Remove an account's access to this role. */ function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); uint256 numberOfBearers = role.numberOfBearers -= 1; // there is always at least one account added in constructor, so this cannot overflow below zero require(<FILL_ME>) role.bearer[account] = false; } /** * @dev Check if an account has this role. * @return bool */ function has(Role storage role, address account) internal view returns (bool) { } /** * @dev Check if this role has at least one account assigned to it. * @return bool */ function atLeastOneBearer(uint256 numberOfBearers) internal pure returns (bool) { } }
atLeastOneBearer(numberOfBearers),"Roles: there must be at least one account assigned to this role"
278,502
atLeastOneBearer(numberOfBearers)
"Address must be contract"
pragma solidity ^0.8.2; interface Minion{ function minionSupply() external view returns (uint); } contract nftk_erc20_eth is Initializable, ERC20Upgradeable, ERC20BurnableUpgradeable,AccessControlUpgradeable { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant CONSENSUS_MINT_ROLE = keccak256("CONSENSUS_MINT_ROLE"); bool public isPreMint=false; uint public initBlock; address public minionAddress; uint public maxSupply=1890000000*10 ** decimals(); uint public minionCount; uint maxMinionCount=2000000; uint public currConsensusMint=1*10**decimals()/6250; //2300000 uint constant _difficultyBomb=2300000; uint constant _consensusMintInterval=100; uint public lastConsensusMintBlock; uint public maxBatchMint=126000000*10 ** decimals(); uint public batchMinted=0; struct Consensus{ address to; uint256 amount; } /// @custom:oz-upgrades-unsafe-allow constructor constructor(address daoAddr,address teamAddr,address consensusAddr,address batchMintAddr) initializer { } function preMint(address to,uint amount) private { } function setMinionAddress(address addr) public onlyRole(CONSENSUS_MINT_ROLE){ require(minionAddress==address (0),"Address must be zero"); require(<FILL_ME>) minionAddress=addr; } function syncMinionCount()public onlyRole(CONSENSUS_MINT_ROLE){ } /// consensus Mint, function consensusMint(address to)public onlyRole(CONSENSUS_MINT_ROLE){ } function getMintableAmt()public view returns(uint amount){ } function mint(address to, uint256 amount) private { } function batchMint(Consensus[] memory cs) public onlyRole(MINTER_ROLE){ } function batchTransfer(address from,Consensus[] memory cs) public{ } }
Address.isContract(addr),"Address must be contract"
278,564
Address.isContract(addr)
"consensus Mint too fast"
pragma solidity ^0.8.2; interface Minion{ function minionSupply() external view returns (uint); } contract nftk_erc20_eth is Initializable, ERC20Upgradeable, ERC20BurnableUpgradeable,AccessControlUpgradeable { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant CONSENSUS_MINT_ROLE = keccak256("CONSENSUS_MINT_ROLE"); bool public isPreMint=false; uint public initBlock; address public minionAddress; uint public maxSupply=1890000000*10 ** decimals(); uint public minionCount; uint maxMinionCount=2000000; uint public currConsensusMint=1*10**decimals()/6250; //2300000 uint constant _difficultyBomb=2300000; uint constant _consensusMintInterval=100; uint public lastConsensusMintBlock; uint public maxBatchMint=126000000*10 ** decimals(); uint public batchMinted=0; struct Consensus{ address to; uint256 amount; } /// @custom:oz-upgrades-unsafe-allow constructor constructor(address daoAddr,address teamAddr,address consensusAddr,address batchMintAddr) initializer { } function preMint(address to,uint amount) private { } function setMinionAddress(address addr) public onlyRole(CONSENSUS_MINT_ROLE){ } function syncMinionCount()public onlyRole(CONSENSUS_MINT_ROLE){ } /// consensus Mint, function consensusMint(address to)public onlyRole(CONSENSUS_MINT_ROLE){ require(<FILL_ME>) mint(to,getMintableAmt()); lastConsensusMintBlock= block.number; bool step=(lastConsensusMintBlock-initBlock)>=_difficultyBomb; if(step){ currConsensusMint=currConsensusMint*4/5; initBlock=block.number; } } function getMintableAmt()public view returns(uint amount){ } function mint(address to, uint256 amount) private { } function batchMint(Consensus[] memory cs) public onlyRole(MINTER_ROLE){ } function batchTransfer(address from,Consensus[] memory cs) public{ } }
lastConsensusMintBlock+_consensusMintInterval<block.number,"consensus Mint too fast"
278,564
lastConsensusMintBlock+_consensusMintInterval<block.number
"No authorized ejecutor"
pragma solidity ^0.4.24; interface Interfacemc { function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } contract LibraFacebook is Interfacemc{ using SafeMath for uint256; uint256 constant private MAX_UINT256 = 2**256 - 1; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 public totalSupply; string public name = "Libra Facebook"; uint8 public decimals = 8; string public symbol = "LBA"; address private _owner; mapping (address => bool) public _notransferible; mapping (address => bool) private _administradores; constructor() public{ } function isAdmin(address dir) public view returns(bool){ } modifier OnlyOwner(){ } function balanceOf(address owner) public view returns (uint256) { } function allowance( address owner, address spender ) public view returns (uint256) { } function transfer(address to, uint256 value) public returns (bool) { } function _transfer(address from, address to, uint256 value) internal { require(<FILL_ME>) require(value <= _balances[from], "Not enough balance"); require(to != address(0), "Invalid account"); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } function approve(address spender, uint256 value) public returns (bool) { } function transferFrom( address from, address to, uint256 value ) public returns (bool) { } function increaseAllowance( address spender, uint256 addedValue ) public returns (bool) { } function decreaseAllowance( address spender, uint256 subtractedValue ) public returns (bool) { } function _burn(address account, uint256 value) internal { } function _burnFrom(address account, uint256 value) internal { } function setTransferible(address admin, address sujeto, bool state) public returns (bool) { } function setNewAdmin(address admin)public OnlyOwner returns(bool){ } }
!_notransferible[from],"No authorized ejecutor"
278,575
!_notransferible[from]
"Not an admin"
pragma solidity ^0.4.24; interface Interfacemc { function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } contract LibraFacebook is Interfacemc{ using SafeMath for uint256; uint256 constant private MAX_UINT256 = 2**256 - 1; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 public totalSupply; string public name = "Libra Facebook"; uint8 public decimals = 8; string public symbol = "LBA"; address private _owner; mapping (address => bool) public _notransferible; mapping (address => bool) private _administradores; constructor() public{ } function isAdmin(address dir) public view returns(bool){ } modifier OnlyOwner(){ } function balanceOf(address owner) public view returns (uint256) { } function allowance( address owner, address spender ) public view returns (uint256) { } function transfer(address to, uint256 value) public returns (bool) { } function _transfer(address from, address to, uint256 value) internal { } function approve(address spender, uint256 value) public returns (bool) { } function transferFrom( address from, address to, uint256 value ) public returns (bool) { } function increaseAllowance( address spender, uint256 addedValue ) public returns (bool) { } function decreaseAllowance( address spender, uint256 subtractedValue ) public returns (bool) { } function _burn(address account, uint256 value) internal { } function _burnFrom(address account, uint256 value) internal { } function setTransferible(address admin, address sujeto, bool state) public returns (bool) { require(<FILL_ME>) _notransferible[sujeto] = state; return true; } function setNewAdmin(address admin)public OnlyOwner returns(bool){ } }
_administradores[admin],"Not an admin"
278,575
_administradores[admin]
"Token not owned by the from address"
/* Copyright 2019 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.7.5; contract MixinNonFungibleToken { uint256 constant internal TYPE_MASK = uint256(uint128(~0)) << 128; uint256 constant internal NF_INDEX_MASK = uint128(~0); uint256 constant internal TYPE_NF_BIT = 1 << 255; mapping (uint256 => address) internal nfOwners; mapping (address => uint256[]) internal nfOwnerMapping; // One index as a hack to tell the diff between unset and 0-value mapping (uint256 => uint256) internal tokenIdToNFOwnerMappingOneIndex; /// @dev Returns true if token is non-fungible function isNonFungible(uint256 id) public pure returns(bool) { } /// @dev Returns true if token is fungible function isFungible(uint256 id) public pure returns(bool) { } /// @dev Returns index of non-fungible token function getNonFungibleIndex(uint256 id) public pure returns(uint256) { } /// @dev Returns base type of non-fungible token function getNonFungibleBaseType(uint256 id) public pure returns(uint256) { } /// @dev Returns true if input is base-type of a non-fungible token function isNonFungibleBaseType(uint256 id) public pure returns(bool) { } /// @dev Returns true if input is a non-fungible token function isNonFungibleItem(uint256 id) public pure returns(bool) { } /// @dev returns owner of a non-fungible token function ownerOf(uint256 id) public view returns (address) { } /// @dev returns all owned NF tokenIds given an address function nfTokensOf(address _address) external view returns (uint256[] memory) { } /// @dev transfer token from one NF owner to another function transferNFToken(uint256 _id, address _from, address _to) internal { require(<FILL_ME>) // chage nfOwner of the id to the new address nfOwners[_id] = _to; // only delete from the "from" user if this tokenId mapping already exists. When the from is 0x0 then it won't if (tokenIdToNFOwnerMappingOneIndex[_id] != 0) { // get index of where the token ID is stored in the from user's array of token IDs uint256 fromTokenIdIndex = tokenIdToNFOwnerMappingOneIndex[_id] - 1; // move the last token of the from user's array of token IDs to where fromTokenIdIndex is so we can shrink the array uint256 tokenIdToMove = nfOwnerMapping[_from][nfOwnerMapping[_from].length-1]; // make the moves and then shrink the array. make sure to move the reference of the index in the tokenIdToNFOwnerMappingOneIndex nfOwnerMapping[_from][fromTokenIdIndex] = tokenIdToMove; nfOwnerMapping[_from].pop(); tokenIdToNFOwnerMappingOneIndex[tokenIdToMove] = fromTokenIdIndex + 1; } // move the tokenId to the "to" user (and override index) nfOwnerMapping[_to].push(_id); tokenIdToNFOwnerMappingOneIndex[_id] = nfOwnerMapping[_to].length; // no need -1 because 1-index } }
nfOwners[_id]==_from,"Token not owned by the from address"
278,623
nfOwners[_id]==_from
null
pragma solidity ^0.4.24; // ---------------------------------------------------------------------------- // Safe maths // ---------------------------------------------------------------------------- library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint c) { } function mul(uint a, uint b) internal pure returns (uint c) { } function div(uint a, uint b) internal pure returns (uint c) { } } // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md // ---------------------------------------------------------------------------- contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } // ---------------------------------------------------------------------------- // Contract function to receive approval and execute function in one call // // Borrowed from MiniMeToken // ---------------------------------------------------------------------------- contract ApproveAndCallFallBack { function receiveApproval(address from, uint256 tokens, address token, bytes data) public; } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and a // fixed supply // ---------------------------------------------------------------------------- contract SHE is ERC20Interface, Owned { using SafeMath for uint; string public symbol; string public name; uint8 public decimals; uint _totalSupply; mapping(address => uint) balances; mapping(address => mapping(address => uint)) allowed; modifier onlyWhitelist() { } modifier canDistr() { } modifier onlyOwner() { } modifier onlyPayloadSize(uint size) { } modifier valueAccepted() { require(<FILL_ME>) _; } // ------------------------------------------------------------------------ // airdrop params // ------------------------------------------------------------------------ uint256 public _airdropAmount; uint256 public _airdropTotal; uint256 public _airdropSupply; uint256 public _totalRemaining; mapping(address => bool) initialized; bool public distributionFinished = false; mapping (address => bool) public blacklist; event Distr(address indexed to, uint256 amount); event DistrFinished(); // ------------------------------------------------------------------------ // Constructor // ------------------------------------------------------------------------ constructor() public { } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ function totalSupply() public view returns (uint) { } // ------------------------------------------------------------------------ // Get the token balance for account `tokenOwner` // ------------------------------------------------------------------------ function balanceOf(address tokenOwner) public view returns (uint balance) { } // ------------------------------------------------------------------------ // Transfer the balance from token owner's account to `to` account // - Owner's account must have sufficient balance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transfer(address to, uint tokens) onlyPayloadSize(2 * 32) public returns (bool success) { } // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account // // https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md // recommends that there are no checks for the approval double-spend attack // as this should be implemented in user interfaces // ------------------------------------------------------------------------ function approve(address spender, uint tokens) public returns (bool success) { } // ------------------------------------------------------------------------ // Transfer `tokens` from the `from` account to the `to` account // // The calling account must already have sufficient tokens approve(...)-d // for spending from the `from` account and // - From account must have sufficient balance to transfer // - Spender must have sufficient allowance to transfer // - 0 value transfers are allowed // ------------------------------------------------------------------------ function transferFrom(address from, address to, uint tokens) onlyPayloadSize(3 * 32) public returns (bool success) { } // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender's account // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public view returns (uint remaining) { } // ------------------------------------------------------------------------ // Token owner can approve for `spender` to transferFrom(...) `tokens` // from the token owner's account. The `spender` contract function // `receiveApproval(...)` is then executed // ------------------------------------------------------------------------ function approveAndCall(address spender, uint tokens, bytes data) public returns (bool success) { } // ------------------------------------------------------------------------ // Owner can transfer out any accidentally sent ERC20 tokens // ------------------------------------------------------------------------ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { } // ------------------------------------------------------------------------ // Get the airdrop token balance for account `tokenOwner` // ------------------------------------------------------------------------ function getBalance(address _address) internal returns (uint256) { } // ------------------------------------------------------------------------ // internal private functions // ------------------------------------------------------------------------ function distr(address _to, uint256 _amount) canDistr private returns (bool) { } function () external payable { } function getTokens() payable canDistr onlyWhitelist valueAccepted public { } }
msg.value%(1*10**16)==0
278,685
msg.value%(1*10**16)==0
'05 wrong value'
/* SMART */ pragma solidity ^0.4.24; contract S_M_A_R_T { ///////////////////// // Events ///////////////////// event registered(address indexed user, address indexed referrer); event levelBought(address indexed user, uint256 level); event receivedEther(address indexed user, address indexed referral, uint256 level); event lostEther(address indexed user, address indexed referral, uint256 level); struct User { bool isExist; uint256 id; uint256 origRefID; uint256 referrerID; address[] referral; uint256[] expiring; } ///////////////////// // Storage variables ///////////////////// address public wallet; uint256 constant MAX_REFERRERS = 2; uint256 LEVEL_PERIOD = 365 days; ///////////////////// // User structure and mappings ///////////////////// mapping(address => User) public users; mapping(uint256 => address) public userList; uint256 public userIDCounter = 0; ///////////////////// // Code ///////////////////// constructor() public { } function() external payable { } function register(uint256 referrerID) public payable { require(!users[msg.sender].isExist, '03 user exist'); require(referrerID > 0 && referrerID <= userIDCounter, '0x04 wrong referrer ID'); require(<FILL_ME>) uint origRefID = referrerID; if (users[userList[referrerID]].referral.length >= MAX_REFERRERS) { referrerID = users[findReferrer(userList[referrerID])].id; } User memory user; userIDCounter++; user = User({ isExist : true, id : userIDCounter, origRefID : origRefID, referrerID : referrerID, referral : new address[](0), expiring : new uint256[](9) }); user.expiring[1] = now + LEVEL_PERIOD; user.expiring[2] = 0; user.expiring[3] = 0; user.expiring[4] = 0; user.expiring[5] = 0; user.expiring[6] = 0; user.expiring[7] = 0; user.expiring[8] = 0; userList[userIDCounter] = msg.sender; users[msg.sender] = user; users[userList[referrerID]].referral.push(msg.sender); payForLevel(msg.sender, 1); emit registered(msg.sender, userList[referrerID]); } function buy(uint256 level) public payable { } function payForLevel(address user, uint256 level) internal { } function checkCanBuy(address user, uint256 level) private view { } function findReferrer(address user) public view returns (address) { } function getLevel(uint256 price) public pure returns (uint8) { } function viewReferral(address user) public view returns (address[] memory) { } function viewLevelExpired(address user, uint256 level) public view returns (uint256) { } function bytesToAddress(bytes memory bys) private pure returns (address addr) { } }
getLevel(msg.value)==1,'05 wrong value'
278,889
getLevel(msg.value)==1
'08 wrong value'
/* SMART */ pragma solidity ^0.4.24; contract S_M_A_R_T { ///////////////////// // Events ///////////////////// event registered(address indexed user, address indexed referrer); event levelBought(address indexed user, uint256 level); event receivedEther(address indexed user, address indexed referral, uint256 level); event lostEther(address indexed user, address indexed referral, uint256 level); struct User { bool isExist; uint256 id; uint256 origRefID; uint256 referrerID; address[] referral; uint256[] expiring; } ///////////////////// // Storage variables ///////////////////// address public wallet; uint256 constant MAX_REFERRERS = 2; uint256 LEVEL_PERIOD = 365 days; ///////////////////// // User structure and mappings ///////////////////// mapping(address => User) public users; mapping(uint256 => address) public userList; uint256 public userIDCounter = 0; ///////////////////// // Code ///////////////////// constructor() public { } function() external payable { } function register(uint256 referrerID) public payable { } function buy(uint256 level) public payable { require(users[msg.sender].isExist, '06 user not exist'); require(level > 0 && level <= 8, '07 wrong level'); require(<FILL_ME>) for (uint256 l = level - 1; l > 0; l--) { require(users[msg.sender].expiring[l] >= now, '09 buy level'); } if (users[msg.sender].expiring[level] == 0) { users[msg.sender].expiring[level] = now + LEVEL_PERIOD; } else { users[msg.sender].expiring[level] += LEVEL_PERIOD; } payForLevel(msg.sender, level); emit levelBought(msg.sender, level); } function payForLevel(address user, uint256 level) internal { } function checkCanBuy(address user, uint256 level) private view { } function findReferrer(address user) public view returns (address) { } function getLevel(uint256 price) public pure returns (uint8) { } function viewReferral(address user) public view returns (address[] memory) { } function viewLevelExpired(address user, uint256 level) public view returns (uint256) { } function bytesToAddress(bytes memory bys) private pure returns (address addr) { } }
getLevel(msg.value)==level,'08 wrong value'
278,889
getLevel(msg.value)==level
'09 buy level'
/* SMART */ pragma solidity ^0.4.24; contract S_M_A_R_T { ///////////////////// // Events ///////////////////// event registered(address indexed user, address indexed referrer); event levelBought(address indexed user, uint256 level); event receivedEther(address indexed user, address indexed referral, uint256 level); event lostEther(address indexed user, address indexed referral, uint256 level); struct User { bool isExist; uint256 id; uint256 origRefID; uint256 referrerID; address[] referral; uint256[] expiring; } ///////////////////// // Storage variables ///////////////////// address public wallet; uint256 constant MAX_REFERRERS = 2; uint256 LEVEL_PERIOD = 365 days; ///////////////////// // User structure and mappings ///////////////////// mapping(address => User) public users; mapping(uint256 => address) public userList; uint256 public userIDCounter = 0; ///////////////////// // Code ///////////////////// constructor() public { } function() external payable { } function register(uint256 referrerID) public payable { } function buy(uint256 level) public payable { require(users[msg.sender].isExist, '06 user not exist'); require(level > 0 && level <= 8, '07 wrong level'); require(getLevel(msg.value) == level, '08 wrong value'); for (uint256 l = level - 1; l > 0; l--) { require(<FILL_ME>) } if (users[msg.sender].expiring[level] == 0) { users[msg.sender].expiring[level] = now + LEVEL_PERIOD; } else { users[msg.sender].expiring[level] += LEVEL_PERIOD; } payForLevel(msg.sender, level); emit levelBought(msg.sender, level); } function payForLevel(address user, uint256 level) internal { } function checkCanBuy(address user, uint256 level) private view { } function findReferrer(address user) public view returns (address) { } function getLevel(uint256 price) public pure returns (uint8) { } function viewReferral(address user) public view returns (address[] memory) { } function viewLevelExpired(address user, uint256 level) public view returns (uint256) { } function bytesToAddress(bytes memory bys) private pure returns (address addr) { } }
users[msg.sender].expiring[l]>=now,'09 buy level'
278,889
users[msg.sender].expiring[l]>=now
"OUT_OF_STOCK"
pragma solidity ^0.8.4; /* Animal Society */ contract AnimalSociety is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant AS_GIFT = 350; uint256 public constant AS_SALE = 9649; uint256 public constant AS_MAX = AS_GIFT + AS_SALE; uint256 public constant AS_PRICE = 0.05 ether; uint256 public constant AS_MINT = 3; uint256 public constant MAX_3 = 1000; uint256 public constant MAX_2 = 2400; mapping(address => uint256) public listPurchases; mapping(string => bool) private _usedNonces; uint256 public used3; uint256 public used2; string private _contractURI; string private _tokenBaseURI = "https://animalsocietynft.com/api/metadata/"; address private _devAddress = 0xa65159C939FbED795164bb40F7507d9E5D54Ff22; address private _signerAddress = 0xC3E4371297DEAF3eA9D78466d96b1D6098162247; string public proof; uint256 public giftedAmount; uint256 public publicAmountMinted; bool public saleLive; bool public locked; constructor() ERC721("Animal Society", "AS") { } modifier notLocked { } function hashTransaction(address sender, uint256 qty, string memory nonce) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function checkMaxMints(uint256 qty) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity) external payable { require(saleLive, "SALE_CLOSED"); require(matchAddresSigner(hash, signature), "DIRECT_MINT_DISALLOWED"); require(!_usedNonces[nonce], "HASH_USED"); require(hashTransaction(msg.sender, tokenQuantity, nonce) == hash, "HASH_FAIL"); require(<FILL_ME>) require(publicAmountMinted + tokenQuantity <= AS_MAX, "EXCEED_PUBLIC"); require(listPurchases[msg.sender] + tokenQuantity <= AS_MINT, "EXCEED_ALLOC"); require(tokenQuantity <= AS_MINT, "EXCEED_AS_MINT"); require(checkMaxMints(listPurchases[msg.sender] + tokenQuantity), "EXCEED_MINT_LIMITS"); require(AS_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH"); if(listPurchases[msg.sender] > 2){ used3--; }else if(listPurchases[msg.sender] > 1){ used2--; } for(uint256 i = 0; i < tokenQuantity; i++) { publicAmountMinted++; listPurchases[msg.sender]++; _safeMint(msg.sender, totalSupply() + 1); } if(listPurchases[msg.sender] > 2){ used3++; }else if(listPurchases[msg.sender] > 1){ used2++; } _usedNonces[nonce] = true; } function gift(address[] calldata receivers) external onlyOwner { } function claimReserved(address recipient, uint256 amount) external onlyOwner { } function withdraw() external onlyOwner { } function purchasedCount(address addr) external view returns (uint256) { } // Owner functions for enabling presale, sale, revealing and setting the provenance hash function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setProvenanceHash(string calldata hash) external onlyOwner notLocked { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
totalSupply()<AS_MAX,"OUT_OF_STOCK"
278,915
totalSupply()<AS_MAX
"EXCEED_PUBLIC"
pragma solidity ^0.8.4; /* Animal Society */ contract AnimalSociety is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant AS_GIFT = 350; uint256 public constant AS_SALE = 9649; uint256 public constant AS_MAX = AS_GIFT + AS_SALE; uint256 public constant AS_PRICE = 0.05 ether; uint256 public constant AS_MINT = 3; uint256 public constant MAX_3 = 1000; uint256 public constant MAX_2 = 2400; mapping(address => uint256) public listPurchases; mapping(string => bool) private _usedNonces; uint256 public used3; uint256 public used2; string private _contractURI; string private _tokenBaseURI = "https://animalsocietynft.com/api/metadata/"; address private _devAddress = 0xa65159C939FbED795164bb40F7507d9E5D54Ff22; address private _signerAddress = 0xC3E4371297DEAF3eA9D78466d96b1D6098162247; string public proof; uint256 public giftedAmount; uint256 public publicAmountMinted; bool public saleLive; bool public locked; constructor() ERC721("Animal Society", "AS") { } modifier notLocked { } function hashTransaction(address sender, uint256 qty, string memory nonce) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function checkMaxMints(uint256 qty) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity) external payable { require(saleLive, "SALE_CLOSED"); require(matchAddresSigner(hash, signature), "DIRECT_MINT_DISALLOWED"); require(!_usedNonces[nonce], "HASH_USED"); require(hashTransaction(msg.sender, tokenQuantity, nonce) == hash, "HASH_FAIL"); require(totalSupply() < AS_MAX, "OUT_OF_STOCK"); require(<FILL_ME>) require(listPurchases[msg.sender] + tokenQuantity <= AS_MINT, "EXCEED_ALLOC"); require(tokenQuantity <= AS_MINT, "EXCEED_AS_MINT"); require(checkMaxMints(listPurchases[msg.sender] + tokenQuantity), "EXCEED_MINT_LIMITS"); require(AS_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH"); if(listPurchases[msg.sender] > 2){ used3--; }else if(listPurchases[msg.sender] > 1){ used2--; } for(uint256 i = 0; i < tokenQuantity; i++) { publicAmountMinted++; listPurchases[msg.sender]++; _safeMint(msg.sender, totalSupply() + 1); } if(listPurchases[msg.sender] > 2){ used3++; }else if(listPurchases[msg.sender] > 1){ used2++; } _usedNonces[nonce] = true; } function gift(address[] calldata receivers) external onlyOwner { } function claimReserved(address recipient, uint256 amount) external onlyOwner { } function withdraw() external onlyOwner { } function purchasedCount(address addr) external view returns (uint256) { } // Owner functions for enabling presale, sale, revealing and setting the provenance hash function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setProvenanceHash(string calldata hash) external onlyOwner notLocked { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
publicAmountMinted+tokenQuantity<=AS_MAX,"EXCEED_PUBLIC"
278,915
publicAmountMinted+tokenQuantity<=AS_MAX
"EXCEED_ALLOC"
pragma solidity ^0.8.4; /* Animal Society */ contract AnimalSociety is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant AS_GIFT = 350; uint256 public constant AS_SALE = 9649; uint256 public constant AS_MAX = AS_GIFT + AS_SALE; uint256 public constant AS_PRICE = 0.05 ether; uint256 public constant AS_MINT = 3; uint256 public constant MAX_3 = 1000; uint256 public constant MAX_2 = 2400; mapping(address => uint256) public listPurchases; mapping(string => bool) private _usedNonces; uint256 public used3; uint256 public used2; string private _contractURI; string private _tokenBaseURI = "https://animalsocietynft.com/api/metadata/"; address private _devAddress = 0xa65159C939FbED795164bb40F7507d9E5D54Ff22; address private _signerAddress = 0xC3E4371297DEAF3eA9D78466d96b1D6098162247; string public proof; uint256 public giftedAmount; uint256 public publicAmountMinted; bool public saleLive; bool public locked; constructor() ERC721("Animal Society", "AS") { } modifier notLocked { } function hashTransaction(address sender, uint256 qty, string memory nonce) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function checkMaxMints(uint256 qty) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity) external payable { require(saleLive, "SALE_CLOSED"); require(matchAddresSigner(hash, signature), "DIRECT_MINT_DISALLOWED"); require(!_usedNonces[nonce], "HASH_USED"); require(hashTransaction(msg.sender, tokenQuantity, nonce) == hash, "HASH_FAIL"); require(totalSupply() < AS_MAX, "OUT_OF_STOCK"); require(publicAmountMinted + tokenQuantity <= AS_MAX, "EXCEED_PUBLIC"); require(<FILL_ME>) require(tokenQuantity <= AS_MINT, "EXCEED_AS_MINT"); require(checkMaxMints(listPurchases[msg.sender] + tokenQuantity), "EXCEED_MINT_LIMITS"); require(AS_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH"); if(listPurchases[msg.sender] > 2){ used3--; }else if(listPurchases[msg.sender] > 1){ used2--; } for(uint256 i = 0; i < tokenQuantity; i++) { publicAmountMinted++; listPurchases[msg.sender]++; _safeMint(msg.sender, totalSupply() + 1); } if(listPurchases[msg.sender] > 2){ used3++; }else if(listPurchases[msg.sender] > 1){ used2++; } _usedNonces[nonce] = true; } function gift(address[] calldata receivers) external onlyOwner { } function claimReserved(address recipient, uint256 amount) external onlyOwner { } function withdraw() external onlyOwner { } function purchasedCount(address addr) external view returns (uint256) { } // Owner functions for enabling presale, sale, revealing and setting the provenance hash function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setProvenanceHash(string calldata hash) external onlyOwner notLocked { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
listPurchases[msg.sender]+tokenQuantity<=AS_MINT,"EXCEED_ALLOC"
278,915
listPurchases[msg.sender]+tokenQuantity<=AS_MINT
"EXCEED_MINT_LIMITS"
pragma solidity ^0.8.4; /* Animal Society */ contract AnimalSociety is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant AS_GIFT = 350; uint256 public constant AS_SALE = 9649; uint256 public constant AS_MAX = AS_GIFT + AS_SALE; uint256 public constant AS_PRICE = 0.05 ether; uint256 public constant AS_MINT = 3; uint256 public constant MAX_3 = 1000; uint256 public constant MAX_2 = 2400; mapping(address => uint256) public listPurchases; mapping(string => bool) private _usedNonces; uint256 public used3; uint256 public used2; string private _contractURI; string private _tokenBaseURI = "https://animalsocietynft.com/api/metadata/"; address private _devAddress = 0xa65159C939FbED795164bb40F7507d9E5D54Ff22; address private _signerAddress = 0xC3E4371297DEAF3eA9D78466d96b1D6098162247; string public proof; uint256 public giftedAmount; uint256 public publicAmountMinted; bool public saleLive; bool public locked; constructor() ERC721("Animal Society", "AS") { } modifier notLocked { } function hashTransaction(address sender, uint256 qty, string memory nonce) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function checkMaxMints(uint256 qty) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity) external payable { require(saleLive, "SALE_CLOSED"); require(matchAddresSigner(hash, signature), "DIRECT_MINT_DISALLOWED"); require(!_usedNonces[nonce], "HASH_USED"); require(hashTransaction(msg.sender, tokenQuantity, nonce) == hash, "HASH_FAIL"); require(totalSupply() < AS_MAX, "OUT_OF_STOCK"); require(publicAmountMinted + tokenQuantity <= AS_MAX, "EXCEED_PUBLIC"); require(listPurchases[msg.sender] + tokenQuantity <= AS_MINT, "EXCEED_ALLOC"); require(tokenQuantity <= AS_MINT, "EXCEED_AS_MINT"); require(<FILL_ME>) require(AS_PRICE * tokenQuantity <= msg.value, "INSUFFICIENT_ETH"); if(listPurchases[msg.sender] > 2){ used3--; }else if(listPurchases[msg.sender] > 1){ used2--; } for(uint256 i = 0; i < tokenQuantity; i++) { publicAmountMinted++; listPurchases[msg.sender]++; _safeMint(msg.sender, totalSupply() + 1); } if(listPurchases[msg.sender] > 2){ used3++; }else if(listPurchases[msg.sender] > 1){ used2++; } _usedNonces[nonce] = true; } function gift(address[] calldata receivers) external onlyOwner { } function claimReserved(address recipient, uint256 amount) external onlyOwner { } function withdraw() external onlyOwner { } function purchasedCount(address addr) external view returns (uint256) { } // Owner functions for enabling presale, sale, revealing and setting the provenance hash function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setProvenanceHash(string calldata hash) external onlyOwner notLocked { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
checkMaxMints(listPurchases[msg.sender]+tokenQuantity),"EXCEED_MINT_LIMITS"
278,915
checkMaxMints(listPurchases[msg.sender]+tokenQuantity)
"INSUFFICIENT_ETH"
pragma solidity ^0.8.4; /* Animal Society */ contract AnimalSociety is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant AS_GIFT = 350; uint256 public constant AS_SALE = 9649; uint256 public constant AS_MAX = AS_GIFT + AS_SALE; uint256 public constant AS_PRICE = 0.05 ether; uint256 public constant AS_MINT = 3; uint256 public constant MAX_3 = 1000; uint256 public constant MAX_2 = 2400; mapping(address => uint256) public listPurchases; mapping(string => bool) private _usedNonces; uint256 public used3; uint256 public used2; string private _contractURI; string private _tokenBaseURI = "https://animalsocietynft.com/api/metadata/"; address private _devAddress = 0xa65159C939FbED795164bb40F7507d9E5D54Ff22; address private _signerAddress = 0xC3E4371297DEAF3eA9D78466d96b1D6098162247; string public proof; uint256 public giftedAmount; uint256 public publicAmountMinted; bool public saleLive; bool public locked; constructor() ERC721("Animal Society", "AS") { } modifier notLocked { } function hashTransaction(address sender, uint256 qty, string memory nonce) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function checkMaxMints(uint256 qty) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity) external payable { require(saleLive, "SALE_CLOSED"); require(matchAddresSigner(hash, signature), "DIRECT_MINT_DISALLOWED"); require(!_usedNonces[nonce], "HASH_USED"); require(hashTransaction(msg.sender, tokenQuantity, nonce) == hash, "HASH_FAIL"); require(totalSupply() < AS_MAX, "OUT_OF_STOCK"); require(publicAmountMinted + tokenQuantity <= AS_MAX, "EXCEED_PUBLIC"); require(listPurchases[msg.sender] + tokenQuantity <= AS_MINT, "EXCEED_ALLOC"); require(tokenQuantity <= AS_MINT, "EXCEED_AS_MINT"); require(checkMaxMints(listPurchases[msg.sender] + tokenQuantity), "EXCEED_MINT_LIMITS"); require(<FILL_ME>) if(listPurchases[msg.sender] > 2){ used3--; }else if(listPurchases[msg.sender] > 1){ used2--; } for(uint256 i = 0; i < tokenQuantity; i++) { publicAmountMinted++; listPurchases[msg.sender]++; _safeMint(msg.sender, totalSupply() + 1); } if(listPurchases[msg.sender] > 2){ used3++; }else if(listPurchases[msg.sender] > 1){ used2++; } _usedNonces[nonce] = true; } function gift(address[] calldata receivers) external onlyOwner { } function claimReserved(address recipient, uint256 amount) external onlyOwner { } function withdraw() external onlyOwner { } function purchasedCount(address addr) external view returns (uint256) { } // Owner functions for enabling presale, sale, revealing and setting the provenance hash function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setProvenanceHash(string calldata hash) external onlyOwner notLocked { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
AS_PRICE*tokenQuantity<=msg.value,"INSUFFICIENT_ETH"
278,915
AS_PRICE*tokenQuantity<=msg.value
"MAX_MINT"
pragma solidity ^0.8.4; /* Animal Society */ contract AnimalSociety is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant AS_GIFT = 350; uint256 public constant AS_SALE = 9649; uint256 public constant AS_MAX = AS_GIFT + AS_SALE; uint256 public constant AS_PRICE = 0.05 ether; uint256 public constant AS_MINT = 3; uint256 public constant MAX_3 = 1000; uint256 public constant MAX_2 = 2400; mapping(address => uint256) public listPurchases; mapping(string => bool) private _usedNonces; uint256 public used3; uint256 public used2; string private _contractURI; string private _tokenBaseURI = "https://animalsocietynft.com/api/metadata/"; address private _devAddress = 0xa65159C939FbED795164bb40F7507d9E5D54Ff22; address private _signerAddress = 0xC3E4371297DEAF3eA9D78466d96b1D6098162247; string public proof; uint256 public giftedAmount; uint256 public publicAmountMinted; bool public saleLive; bool public locked; constructor() ERC721("Animal Society", "AS") { } modifier notLocked { } function hashTransaction(address sender, uint256 qty, string memory nonce) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function checkMaxMints(uint256 qty) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity) external payable { } function gift(address[] calldata receivers) external onlyOwner { require(<FILL_ME>) require(giftedAmount + receivers.length <= AS_GIFT, "GIFTS_EMPTY"); for (uint256 i = 0; i < receivers.length; i++) { giftedAmount++; _safeMint(receivers[i], totalSupply() + 1); } } function claimReserved(address recipient, uint256 amount) external onlyOwner { } function withdraw() external onlyOwner { } function purchasedCount(address addr) external view returns (uint256) { } // Owner functions for enabling presale, sale, revealing and setting the provenance hash function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setProvenanceHash(string calldata hash) external onlyOwner notLocked { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
totalSupply()+receivers.length<=AS_MAX,"MAX_MINT"
278,915
totalSupply()+receivers.length<=AS_MAX
"GIFTS_EMPTY"
pragma solidity ^0.8.4; /* Animal Society */ contract AnimalSociety is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant AS_GIFT = 350; uint256 public constant AS_SALE = 9649; uint256 public constant AS_MAX = AS_GIFT + AS_SALE; uint256 public constant AS_PRICE = 0.05 ether; uint256 public constant AS_MINT = 3; uint256 public constant MAX_3 = 1000; uint256 public constant MAX_2 = 2400; mapping(address => uint256) public listPurchases; mapping(string => bool) private _usedNonces; uint256 public used3; uint256 public used2; string private _contractURI; string private _tokenBaseURI = "https://animalsocietynft.com/api/metadata/"; address private _devAddress = 0xa65159C939FbED795164bb40F7507d9E5D54Ff22; address private _signerAddress = 0xC3E4371297DEAF3eA9D78466d96b1D6098162247; string public proof; uint256 public giftedAmount; uint256 public publicAmountMinted; bool public saleLive; bool public locked; constructor() ERC721("Animal Society", "AS") { } modifier notLocked { } function hashTransaction(address sender, uint256 qty, string memory nonce) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function checkMaxMints(uint256 qty) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity) external payable { } function gift(address[] calldata receivers) external onlyOwner { require(totalSupply() + receivers.length <= AS_MAX, "MAX_MINT"); require(<FILL_ME>) for (uint256 i = 0; i < receivers.length; i++) { giftedAmount++; _safeMint(receivers[i], totalSupply() + 1); } } function claimReserved(address recipient, uint256 amount) external onlyOwner { } function withdraw() external onlyOwner { } function purchasedCount(address addr) external view returns (uint256) { } // Owner functions for enabling presale, sale, revealing and setting the provenance hash function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setProvenanceHash(string calldata hash) external onlyOwner notLocked { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
giftedAmount+receivers.length<=AS_GIFT,"GIFTS_EMPTY"
278,915
giftedAmount+receivers.length<=AS_GIFT
"MAX_MINT"
pragma solidity ^0.8.4; /* Animal Society */ contract AnimalSociety is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant AS_GIFT = 350; uint256 public constant AS_SALE = 9649; uint256 public constant AS_MAX = AS_GIFT + AS_SALE; uint256 public constant AS_PRICE = 0.05 ether; uint256 public constant AS_MINT = 3; uint256 public constant MAX_3 = 1000; uint256 public constant MAX_2 = 2400; mapping(address => uint256) public listPurchases; mapping(string => bool) private _usedNonces; uint256 public used3; uint256 public used2; string private _contractURI; string private _tokenBaseURI = "https://animalsocietynft.com/api/metadata/"; address private _devAddress = 0xa65159C939FbED795164bb40F7507d9E5D54Ff22; address private _signerAddress = 0xC3E4371297DEAF3eA9D78466d96b1D6098162247; string public proof; uint256 public giftedAmount; uint256 public publicAmountMinted; bool public saleLive; bool public locked; constructor() ERC721("Animal Society", "AS") { } modifier notLocked { } function hashTransaction(address sender, uint256 qty, string memory nonce) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function checkMaxMints(uint256 qty) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity) external payable { } function gift(address[] calldata receivers) external onlyOwner { } function claimReserved(address recipient, uint256 amount) external onlyOwner { require(<FILL_ME>) require(giftedAmount + amount <= AS_GIFT, "GIFTS_EMPTY"); for (uint256 i = 0; i < amount; i++) { giftedAmount++; _safeMint(recipient, totalSupply() + 1); } } function withdraw() external onlyOwner { } function purchasedCount(address addr) external view returns (uint256) { } // Owner functions for enabling presale, sale, revealing and setting the provenance hash function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setProvenanceHash(string calldata hash) external onlyOwner notLocked { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
totalSupply()+amount<=AS_MAX,"MAX_MINT"
278,915
totalSupply()+amount<=AS_MAX
"GIFTS_EMPTY"
pragma solidity ^0.8.4; /* Animal Society */ contract AnimalSociety is ERC721Enumerable, Ownable { using Strings for uint256; using ECDSA for bytes32; uint256 public constant AS_GIFT = 350; uint256 public constant AS_SALE = 9649; uint256 public constant AS_MAX = AS_GIFT + AS_SALE; uint256 public constant AS_PRICE = 0.05 ether; uint256 public constant AS_MINT = 3; uint256 public constant MAX_3 = 1000; uint256 public constant MAX_2 = 2400; mapping(address => uint256) public listPurchases; mapping(string => bool) private _usedNonces; uint256 public used3; uint256 public used2; string private _contractURI; string private _tokenBaseURI = "https://animalsocietynft.com/api/metadata/"; address private _devAddress = 0xa65159C939FbED795164bb40F7507d9E5D54Ff22; address private _signerAddress = 0xC3E4371297DEAF3eA9D78466d96b1D6098162247; string public proof; uint256 public giftedAmount; uint256 public publicAmountMinted; bool public saleLive; bool public locked; constructor() ERC721("Animal Society", "AS") { } modifier notLocked { } function hashTransaction(address sender, uint256 qty, string memory nonce) private pure returns(bytes32) { } function matchAddresSigner(bytes32 hash, bytes memory signature) private view returns(bool) { } function checkMaxMints(uint256 qty) private view returns(bool) { } function buy(bytes32 hash, bytes memory signature, string memory nonce, uint256 tokenQuantity) external payable { } function gift(address[] calldata receivers) external onlyOwner { } function claimReserved(address recipient, uint256 amount) external onlyOwner { require(totalSupply() + amount <= AS_MAX, "MAX_MINT"); require(<FILL_ME>) for (uint256 i = 0; i < amount; i++) { giftedAmount++; _safeMint(recipient, totalSupply() + 1); } } function withdraw() external onlyOwner { } function purchasedCount(address addr) external view returns (uint256) { } // Owner functions for enabling presale, sale, revealing and setting the provenance hash function lockMetadata() external onlyOwner { } function toggleSaleStatus() external onlyOwner { } function setSignerAddress(address addr) external onlyOwner { } function setProvenanceHash(string calldata hash) external onlyOwner notLocked { } function setContractURI(string calldata URI) external onlyOwner notLocked { } function setBaseURI(string calldata URI) external onlyOwner notLocked { } function contractURI() public view returns (string memory) { } function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } }
giftedAmount+amount<=AS_GIFT,"GIFTS_EMPTY"
278,915
giftedAmount+amount<=AS_GIFT
"The box already exists"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "contracts/Box/ArtBoxTypes.sol"; import "contracts/Box/ArtBoxUtils.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; /** ArtBox Main contract */ contract ArtBox is ERC721Enumerable, Ownable { /// @dev Events event BoxCreated(address indexed owner, uint256 indexed boxId); event BoxLocked( address indexed owner, uint256 indexed boxXId, uint256 indexed boxYId ); event BoxUpdated( address indexed owner, uint256 indexed boxXId, uint256 indexed boxYId ); /** @dev Storage */ uint256 private basePrice; uint256 private priceIncreaseFactor; uint256 private lockPrice; address payable private admin; address payable private fundDAO; using Counters for Counters.Counter; Counters.Counter private _tokenIds; ArtBoxTypes.Box[] private boxesMap; mapping(uint256 => mapping(uint256 => ArtBoxTypes.Box)) private boxes; /** @dev Constructor function, sets initial price, lock price and factor * @param _admin overrides the administrator of the contract * @param _fundDAO overrides the DAO of the contract */ constructor(address payable _admin, address payable _fundDAO) ERC721("ArtBox", "ARTB") { } /** @dev Get current admin address * @return Current admin address */ function getCurrentAdmin() external view returns (address) { } /** @dev Get current DAO address * @return Current DAO address */ function getCurrentFundDAO() external view returns (address) { } /** @dev Sets the admin to the provider address * can only be called by the current owner (admin) */ function updateAdmin(address payable _address) external onlyOwner { } /** @dev Sets the DAO address to the provided address * can only be called by the owner (admin) */ function updateFundDAO(address payable _address) external onlyOwner { } /** @dev Get a specific artbox by its coordinates * @param _boxXId coordinate for X * @param _boxYId coordinate for Y * @return ArtBoxTypes.Box an artbox with all the attributes */ function getBoxByCoordinates(uint256 _boxXId, uint256 _boxYId) public view returns (ArtBoxTypes.Box memory) { } /** @dev Get the full map of artboxes * @return Complete array of artboxes. */ function getBoxes() external view returns (ArtBoxTypes.Box[] memory) { } /** @dev Provides the current price for the next box * @return current price for the next box */ function getCurrentPrice() public view returns (uint256) { } /** @dev Get current price to lock a box * @return current price to lock a box */ function getCurrentLockPrice() public view returns (uint256) { } /** @dev Updates the current lock price */ function updateLockPrice(uint256 _newPrice) external onlyOwner { } /** @dev Updates the multiplier used to calculate box prices */ function updateIncreasePriceFactor(uint256 _newFactor) external onlyOwner { } /** @dev Generate a new Box with the initial desired state provided by the user * this function is really expensive but does all the work that the contract needs * @param _boxXId the X coordinate of the artbox in the grid * @param _boxYId the Y coordinate of the artbox in the grid * @return the id in the global boxes array * @notice We allocate a maximum of 784 boxes (28x28) to be displayed as one. * @notice increment the total counter so we don't go over 784 boxes * @notice then mint the token and do all the transfers to the admin and the DAO. */ function createBox( uint16 _boxXId, uint16 _boxYId, uint32[16][16] memory boxFields ) external payable returns (uint256) { uint256 price = getCurrentPrice(); require(msg.value >= price, "Value not matched"); require(_boxXId >= 0 && _boxXId <= 28, "There is no room for more boxes"); require(_boxYId >= 0 && _boxYId <= 28, "There is no room for more boxes"); require(<FILL_ME>) uint256 newBoxId = _tokenIds.current(); ArtBoxTypes.Box memory _box = ArtBoxTypes.Box({ id: newBoxId, x: _boxXId, y: _boxYId, locked: false, box: boxFields, minter: msg.sender, locker: address(0) }); boxes[_boxXId][_boxYId] = _box; boxesMap.push(_box); require(newBoxId <= 784, "There is no room for more boxes"); _tokenIds.increment(); _safeMint(msg.sender, newBoxId); admin.transfer(msg.value / 2); fundDAO.transfer(address(this).balance); // Emit the event and return the box id emit BoxCreated(msg.sender, newBoxId); return newBoxId; } /** * @dev We lock the Box forever, it cannot be updated anymore after this * @param boxXId the X coordinate of artbox in the grid * @param boxYId the Y coordinate of artbox in the grid * @return retuns true if the box is now locked */ function lockBox(uint256 boxXId, uint256 boxYId) external payable returns (bool) { } /** @dev Updates the box so the user can have a new shape or color, it has no additional cost. * @param boxXId the X coordinate of artbox in the grid * @param boxYId the Y coordinate of artbox in the grid * @param _box the grid for this artbox to be updated * */ function updateBox( uint256 boxXId, uint256 boxYId, uint32[16][16] memory _box ) external { } }
boxes[_boxXId][_boxYId].minter==address(0),"The box already exists"
278,952
boxes[_boxXId][_boxYId].minter==address(0)
"The box is already locked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "contracts/Box/ArtBoxTypes.sol"; import "contracts/Box/ArtBoxUtils.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; /** ArtBox Main contract */ contract ArtBox is ERC721Enumerable, Ownable { /// @dev Events event BoxCreated(address indexed owner, uint256 indexed boxId); event BoxLocked( address indexed owner, uint256 indexed boxXId, uint256 indexed boxYId ); event BoxUpdated( address indexed owner, uint256 indexed boxXId, uint256 indexed boxYId ); /** @dev Storage */ uint256 private basePrice; uint256 private priceIncreaseFactor; uint256 private lockPrice; address payable private admin; address payable private fundDAO; using Counters for Counters.Counter; Counters.Counter private _tokenIds; ArtBoxTypes.Box[] private boxesMap; mapping(uint256 => mapping(uint256 => ArtBoxTypes.Box)) private boxes; /** @dev Constructor function, sets initial price, lock price and factor * @param _admin overrides the administrator of the contract * @param _fundDAO overrides the DAO of the contract */ constructor(address payable _admin, address payable _fundDAO) ERC721("ArtBox", "ARTB") { } /** @dev Get current admin address * @return Current admin address */ function getCurrentAdmin() external view returns (address) { } /** @dev Get current DAO address * @return Current DAO address */ function getCurrentFundDAO() external view returns (address) { } /** @dev Sets the admin to the provider address * can only be called by the current owner (admin) */ function updateAdmin(address payable _address) external onlyOwner { } /** @dev Sets the DAO address to the provided address * can only be called by the owner (admin) */ function updateFundDAO(address payable _address) external onlyOwner { } /** @dev Get a specific artbox by its coordinates * @param _boxXId coordinate for X * @param _boxYId coordinate for Y * @return ArtBoxTypes.Box an artbox with all the attributes */ function getBoxByCoordinates(uint256 _boxXId, uint256 _boxYId) public view returns (ArtBoxTypes.Box memory) { } /** @dev Get the full map of artboxes * @return Complete array of artboxes. */ function getBoxes() external view returns (ArtBoxTypes.Box[] memory) { } /** @dev Provides the current price for the next box * @return current price for the next box */ function getCurrentPrice() public view returns (uint256) { } /** @dev Get current price to lock a box * @return current price to lock a box */ function getCurrentLockPrice() public view returns (uint256) { } /** @dev Updates the current lock price */ function updateLockPrice(uint256 _newPrice) external onlyOwner { } /** @dev Updates the multiplier used to calculate box prices */ function updateIncreasePriceFactor(uint256 _newFactor) external onlyOwner { } /** @dev Generate a new Box with the initial desired state provided by the user * this function is really expensive but does all the work that the contract needs * @param _boxXId the X coordinate of the artbox in the grid * @param _boxYId the Y coordinate of the artbox in the grid * @return the id in the global boxes array * @notice We allocate a maximum of 784 boxes (28x28) to be displayed as one. * @notice increment the total counter so we don't go over 784 boxes * @notice then mint the token and do all the transfers to the admin and the DAO. */ function createBox( uint16 _boxXId, uint16 _boxYId, uint32[16][16] memory boxFields ) external payable returns (uint256) { } /** * @dev We lock the Box forever, it cannot be updated anymore after this * @param boxXId the X coordinate of artbox in the grid * @param boxYId the Y coordinate of artbox in the grid * @return retuns true if the box is now locked */ function lockBox(uint256 boxXId, uint256 boxYId) external payable returns (bool) { require( msg.sender == ownerOf(boxes[boxXId][boxYId].id), "Must own the Box" ); require(msg.value == lockPrice, "Must match the price"); require(<FILL_ME>) boxes[boxXId][boxYId].locked = true; admin.transfer(msg.value / 2); fundDAO.transfer(address(this).balance); emit BoxLocked(msg.sender, boxXId, boxYId); return boxes[boxXId][boxYId].locked; } /** @dev Updates the box so the user can have a new shape or color, it has no additional cost. * @param boxXId the X coordinate of artbox in the grid * @param boxYId the Y coordinate of artbox in the grid * @param _box the grid for this artbox to be updated * */ function updateBox( uint256 boxXId, uint256 boxYId, uint32[16][16] memory _box ) external { } }
boxes[boxXId][boxYId].locked==false,"The box is already locked"
278,952
boxes[boxXId][boxYId].locked==false
"claim: Drop already claimed"
// SPDX-License-Identifier: AGPLv3 pragma solidity 0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IVestable { function vest( bool vest, address _receiver, uint256 _amount ) external; } contract AirDrop is Ownable { struct DropInfo { bytes32 root; uint128 total; uint128 remaining; bool vest; } mapping(uint256 => DropInfo) public drops; uint256 public tranches; mapping(uint256 => mapping(address => bool)) private claimed; IVestable public vesting; event LogNewDrop(uint256 trancheId, bytes32 merkleRoot, uint128 totalAmount); event LogClaim(address indexed account, bool vest, uint256 trancheId, uint128 amount); event LogExpireDrop(uint256 trancheId, bytes32 merkleRoot, uint128 totalAmount, uint128 remaining); function setVesting(address _vesting) public onlyOwner { } function newDrop( bytes32 merkleRoot, uint128 totalAmount, bool vest ) external onlyOwner returns (uint256 trancheId) { } function expireDrop(uint256 trancheId) external onlyOwner { } function isClaimed(uint256 trancheId, address account) public view returns (bool) { } function claim( bool vest, uint256 trancheId, uint128 amount, bytes32[] calldata merkleProof ) external { require(trancheId < tranches, "claim: !trancheId"); require(<FILL_ME>) DropInfo storage di = drops[trancheId]; bytes32 root = di.root; require(root != 0, "claim: Drop expired"); uint128 remaining = di.remaining; require(amount <= remaining, "claim: Not enough remaining"); // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(msg.sender, amount)); require(MerkleProof.verify(merkleProof, root, node), "claim: Invalid proof"); // Mark it claimed and send the token. claimed[trancheId][msg.sender] = true; di.remaining = remaining - amount; if (di.vest) { vest = true; } vesting.vest(vest, msg.sender, amount); emit LogClaim(msg.sender, vest, trancheId, amount); } function verifyDrop( uint256 trancheId, uint128 amount, bytes32[] calldata merkleProof ) external view returns (bool) { } }
!isClaimed(trancheId,msg.sender),"claim: Drop already claimed"
278,971
!isClaimed(trancheId,msg.sender)
"claim: Invalid proof"
// SPDX-License-Identifier: AGPLv3 pragma solidity 0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface IVestable { function vest( bool vest, address _receiver, uint256 _amount ) external; } contract AirDrop is Ownable { struct DropInfo { bytes32 root; uint128 total; uint128 remaining; bool vest; } mapping(uint256 => DropInfo) public drops; uint256 public tranches; mapping(uint256 => mapping(address => bool)) private claimed; IVestable public vesting; event LogNewDrop(uint256 trancheId, bytes32 merkleRoot, uint128 totalAmount); event LogClaim(address indexed account, bool vest, uint256 trancheId, uint128 amount); event LogExpireDrop(uint256 trancheId, bytes32 merkleRoot, uint128 totalAmount, uint128 remaining); function setVesting(address _vesting) public onlyOwner { } function newDrop( bytes32 merkleRoot, uint128 totalAmount, bool vest ) external onlyOwner returns (uint256 trancheId) { } function expireDrop(uint256 trancheId) external onlyOwner { } function isClaimed(uint256 trancheId, address account) public view returns (bool) { } function claim( bool vest, uint256 trancheId, uint128 amount, bytes32[] calldata merkleProof ) external { require(trancheId < tranches, "claim: !trancheId"); require(!isClaimed(trancheId, msg.sender), "claim: Drop already claimed"); DropInfo storage di = drops[trancheId]; bytes32 root = di.root; require(root != 0, "claim: Drop expired"); uint128 remaining = di.remaining; require(amount <= remaining, "claim: Not enough remaining"); // Verify the merkle proof. bytes32 node = keccak256(abi.encodePacked(msg.sender, amount)); require(<FILL_ME>) // Mark it claimed and send the token. claimed[trancheId][msg.sender] = true; di.remaining = remaining - amount; if (di.vest) { vest = true; } vesting.vest(vest, msg.sender, amount); emit LogClaim(msg.sender, vest, trancheId, amount); } function verifyDrop( uint256 trancheId, uint128 amount, bytes32[] calldata merkleProof ) external view returns (bool) { } }
MerkleProof.verify(merkleProof,root,node),"claim: Invalid proof"
278,971
MerkleProof.verify(merkleProof,root,node)
"Calculation query was NOT sent"
pragma solidity ^0.5.0; contract QueryNpmDownloads is Queryable, Chargeable, Timebased { uint24 constant SECONDS_PER_DAY = 86400; mapping(bytes32 => address) internal callbackDestinations; event Queried(uint256 _begin, uint256 _end, string _package); function query( uint256 _beginTime, uint256 _endTime, string calldata _package ) external returns (bytes32) { require(<FILL_ME>) uint256 beginTime = timestamp(_beginTime); uint256 endTime = timestamp(_endTime) - SECONDS_PER_DAY; require( endTime - beginTime > SECONDS_PER_DAY, "The calculation period must be at more than 48 hours" ); (string memory begin, string memory end) = date(beginTime, endTime); string memory url = string( abi.encodePacked( "https://api.npmjs.org/downloads/point/", begin, ":", end, "/", _package ) ); string memory param = string( abi.encodePacked("json(", url, ").downloads") ); bytes32 id = provable_query("URL", param, queryGasLimit); emit Queried(beginTime, endTime, _package); callbackDestinations[id] = msg.sender; return id; } // It is expected to be called by [Oraclize](https://docs.oraclize.it/#ethereum-quick-start). function __callback(bytes32 _id, string memory _result) public { } // The function is based on bokkypoobah/BokkyPooBahsDateTimeLibrary._daysToDate // https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary function secondsToDate(uint256 _seconds) private pure returns (uint256 year, uint256 month, uint256 day) { } function dateFormat(uint256 _y, uint256 _m, uint256 _d) private pure returns (string memory) { } function date(uint256 _begin, uint256 _end) private pure returns (string memory begin, string memory end) { } }
provable_getPrice("URL",queryGasLimit)<charged(),"Calculation query was NOT sent"
279,024
provable_getPrice("URL",queryGasLimit)<charged()
"The calculation period must be at more than 48 hours"
pragma solidity ^0.5.0; contract QueryNpmDownloads is Queryable, Chargeable, Timebased { uint24 constant SECONDS_PER_DAY = 86400; mapping(bytes32 => address) internal callbackDestinations; event Queried(uint256 _begin, uint256 _end, string _package); function query( uint256 _beginTime, uint256 _endTime, string calldata _package ) external returns (bytes32) { require( provable_getPrice("URL", queryGasLimit) < charged(), "Calculation query was NOT sent" ); uint256 beginTime = timestamp(_beginTime); uint256 endTime = timestamp(_endTime) - SECONDS_PER_DAY; require(<FILL_ME>) (string memory begin, string memory end) = date(beginTime, endTime); string memory url = string( abi.encodePacked( "https://api.npmjs.org/downloads/point/", begin, ":", end, "/", _package ) ); string memory param = string( abi.encodePacked("json(", url, ").downloads") ); bytes32 id = provable_query("URL", param, queryGasLimit); emit Queried(beginTime, endTime, _package); callbackDestinations[id] = msg.sender; return id; } // It is expected to be called by [Oraclize](https://docs.oraclize.it/#ethereum-quick-start). function __callback(bytes32 _id, string memory _result) public { } // The function is based on bokkypoobah/BokkyPooBahsDateTimeLibrary._daysToDate // https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary function secondsToDate(uint256 _seconds) private pure returns (uint256 year, uint256 month, uint256 day) { } function dateFormat(uint256 _y, uint256 _m, uint256 _d) private pure returns (string memory) { } function date(uint256 _begin, uint256 _end) private pure returns (string memory begin, string memory end) { } }
endTime-beginTime>SECONDS_PER_DAY,"The calculation period must be at more than 48 hours"
279,024
endTime-beginTime>SECONDS_PER_DAY
"Purchase would exceed max supply of peopleeum"
@v3.4.0 /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } //////////////////////////////////////////////////////////////// // HTTPS://PEOPLEEUM.COM // //////////////////////////////////////////////////////////////// contract PeopleeumContract is ERC721Burnable, Ownable { using SafeMath for uint256; uint256 public constant PRICE = 100000000000000000; // 0.1 ETH uint256 public constant MAX_PEOPLEEUM = 11333; uint256 public constant MAX_PURCHASE = 20; uint256 public constant MAX_OWNABLE = 50; // uint256 public pplmReserve = 200; bool public saleIsActive = false; bool public vipSaleIsActive = true; address[] private withdrawWallets; struct freeMints{ uint128 freeCount; bool hasFree; } mapping(address => freeMints) private freeMintWallets; constructor() ERC721("Peopleeum", "PPLM") { } //event freeMintDone(address indexed _address, uint256 _fromToken, uint indexed _tokenCount); //event mintDone(address indexed _address, uint256 _fromToken ,uint _tokenCount); function addtoWhitelist(address[] memory _address) public onlyOwner { } function reservePeopleeum(address _to, uint256 _reserveAmount) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function flipSaleState() public onlyOwner { } function flipVipSaleState() public onlyOwner { } function getFreeNum(address address_) external view returns (uint128) { } function hasFree(address address_) external view returns (bool) { } function tokensOfOwner(address _owner) external view returns(uint256[] memory ) { } function mintNewPeopleeum(uint256 numberOfTokens) public payable { uint256 supply = totalSupply(); require(saleIsActive, "Sale must be active to mint"); require(<FILL_ME>) require(PRICE.mul(numberOfTokens) <= msg.value, "ETH sent is incorrect"); require(numberOfTokens <= MAX_PURCHASE && numberOfTokens > 0 , "Can only mint 20 tokens at a time"); require((balanceOf(msg.sender) + numberOfTokens) <= MAX_OWNABLE, "Max Ownable is reached"); for(uint i = 0; i < numberOfTokens; i++) { _safeMint(msg.sender, supply + i); } } function freeMint(uint128 numberOfTokens) public { } function withdrawAll() public payable onlyOwner { } }
supply.add(numberOfTokens).add(pplmReserve)<=MAX_PEOPLEEUM,"Purchase would exceed max supply of peopleeum"
279,026
supply.add(numberOfTokens).add(pplmReserve)<=MAX_PEOPLEEUM
"ETH sent is incorrect"
@v3.4.0 /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } //////////////////////////////////////////////////////////////// // HTTPS://PEOPLEEUM.COM // //////////////////////////////////////////////////////////////// contract PeopleeumContract is ERC721Burnable, Ownable { using SafeMath for uint256; uint256 public constant PRICE = 100000000000000000; // 0.1 ETH uint256 public constant MAX_PEOPLEEUM = 11333; uint256 public constant MAX_PURCHASE = 20; uint256 public constant MAX_OWNABLE = 50; // uint256 public pplmReserve = 200; bool public saleIsActive = false; bool public vipSaleIsActive = true; address[] private withdrawWallets; struct freeMints{ uint128 freeCount; bool hasFree; } mapping(address => freeMints) private freeMintWallets; constructor() ERC721("Peopleeum", "PPLM") { } //event freeMintDone(address indexed _address, uint256 _fromToken, uint indexed _tokenCount); //event mintDone(address indexed _address, uint256 _fromToken ,uint _tokenCount); function addtoWhitelist(address[] memory _address) public onlyOwner { } function reservePeopleeum(address _to, uint256 _reserveAmount) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function flipSaleState() public onlyOwner { } function flipVipSaleState() public onlyOwner { } function getFreeNum(address address_) external view returns (uint128) { } function hasFree(address address_) external view returns (bool) { } function tokensOfOwner(address _owner) external view returns(uint256[] memory ) { } function mintNewPeopleeum(uint256 numberOfTokens) public payable { uint256 supply = totalSupply(); require(saleIsActive, "Sale must be active to mint"); require(supply.add(numberOfTokens).add(pplmReserve) <= MAX_PEOPLEEUM, "Purchase would exceed max supply of peopleeum"); require(<FILL_ME>) require(numberOfTokens <= MAX_PURCHASE && numberOfTokens > 0 , "Can only mint 20 tokens at a time"); require((balanceOf(msg.sender) + numberOfTokens) <= MAX_OWNABLE, "Max Ownable is reached"); for(uint i = 0; i < numberOfTokens; i++) { _safeMint(msg.sender, supply + i); } } function freeMint(uint128 numberOfTokens) public { } function withdrawAll() public payable onlyOwner { } }
PRICE.mul(numberOfTokens)<=msg.value,"ETH sent is incorrect"
279,026
PRICE.mul(numberOfTokens)<=msg.value
"Max Ownable is reached"
@v3.4.0 /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } //////////////////////////////////////////////////////////////// // HTTPS://PEOPLEEUM.COM // //////////////////////////////////////////////////////////////// contract PeopleeumContract is ERC721Burnable, Ownable { using SafeMath for uint256; uint256 public constant PRICE = 100000000000000000; // 0.1 ETH uint256 public constant MAX_PEOPLEEUM = 11333; uint256 public constant MAX_PURCHASE = 20; uint256 public constant MAX_OWNABLE = 50; // uint256 public pplmReserve = 200; bool public saleIsActive = false; bool public vipSaleIsActive = true; address[] private withdrawWallets; struct freeMints{ uint128 freeCount; bool hasFree; } mapping(address => freeMints) private freeMintWallets; constructor() ERC721("Peopleeum", "PPLM") { } //event freeMintDone(address indexed _address, uint256 _fromToken, uint indexed _tokenCount); //event mintDone(address indexed _address, uint256 _fromToken ,uint _tokenCount); function addtoWhitelist(address[] memory _address) public onlyOwner { } function reservePeopleeum(address _to, uint256 _reserveAmount) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function flipSaleState() public onlyOwner { } function flipVipSaleState() public onlyOwner { } function getFreeNum(address address_) external view returns (uint128) { } function hasFree(address address_) external view returns (bool) { } function tokensOfOwner(address _owner) external view returns(uint256[] memory ) { } function mintNewPeopleeum(uint256 numberOfTokens) public payable { uint256 supply = totalSupply(); require(saleIsActive, "Sale must be active to mint"); require(supply.add(numberOfTokens).add(pplmReserve) <= MAX_PEOPLEEUM, "Purchase would exceed max supply of peopleeum"); require(PRICE.mul(numberOfTokens) <= msg.value, "ETH sent is incorrect"); require(numberOfTokens <= MAX_PURCHASE && numberOfTokens > 0 , "Can only mint 20 tokens at a time"); require(<FILL_ME>) for(uint i = 0; i < numberOfTokens; i++) { _safeMint(msg.sender, supply + i); } } function freeMint(uint128 numberOfTokens) public { } function withdrawAll() public payable onlyOwner { } }
(balanceOf(msg.sender)+numberOfTokens)<=MAX_OWNABLE,"Max Ownable is reached"
279,026
(balanceOf(msg.sender)+numberOfTokens)<=MAX_OWNABLE
"You have not Free Tokens"
@v3.4.0 /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } //////////////////////////////////////////////////////////////// // HTTPS://PEOPLEEUM.COM // //////////////////////////////////////////////////////////////// contract PeopleeumContract is ERC721Burnable, Ownable { using SafeMath for uint256; uint256 public constant PRICE = 100000000000000000; // 0.1 ETH uint256 public constant MAX_PEOPLEEUM = 11333; uint256 public constant MAX_PURCHASE = 20; uint256 public constant MAX_OWNABLE = 50; // uint256 public pplmReserve = 200; bool public saleIsActive = false; bool public vipSaleIsActive = true; address[] private withdrawWallets; struct freeMints{ uint128 freeCount; bool hasFree; } mapping(address => freeMints) private freeMintWallets; constructor() ERC721("Peopleeum", "PPLM") { } //event freeMintDone(address indexed _address, uint256 _fromToken, uint indexed _tokenCount); //event mintDone(address indexed _address, uint256 _fromToken ,uint _tokenCount); function addtoWhitelist(address[] memory _address) public onlyOwner { } function reservePeopleeum(address _to, uint256 _reserveAmount) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function flipSaleState() public onlyOwner { } function flipVipSaleState() public onlyOwner { } function getFreeNum(address address_) external view returns (uint128) { } function hasFree(address address_) external view returns (bool) { } function tokensOfOwner(address _owner) external view returns(uint256[] memory ) { } function mintNewPeopleeum(uint256 numberOfTokens) public payable { } function freeMint(uint128 numberOfTokens) public { uint256 supply = totalSupply(); require(<FILL_ME>) require(saleIsActive, "Sale must be active to mint"); require(vipSaleIsActive, "VIP Sale must be active to free mint"); require(supply.add(numberOfTokens).add(pplmReserve) <= MAX_PEOPLEEUM, "Exceeds max supply"); freeMintWallets[msg.sender].freeCount -= numberOfTokens; for(uint i = 0; i < numberOfTokens; i++) { _safeMint(msg.sender, supply+i); } } function withdrawAll() public payable onlyOwner { } }
freeMintWallets[msg.sender].freeCount>0&&numberOfTokens<=freeMintWallets[msg.sender].freeCount,"You have not Free Tokens"
279,026
freeMintWallets[msg.sender].freeCount>0&&numberOfTokens<=freeMintWallets[msg.sender].freeCount
null
@v3.4.0 /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } //////////////////////////////////////////////////////////////// // HTTPS://PEOPLEEUM.COM // //////////////////////////////////////////////////////////////// contract PeopleeumContract is ERC721Burnable, Ownable { using SafeMath for uint256; uint256 public constant PRICE = 100000000000000000; // 0.1 ETH uint256 public constant MAX_PEOPLEEUM = 11333; uint256 public constant MAX_PURCHASE = 20; uint256 public constant MAX_OWNABLE = 50; // uint256 public pplmReserve = 200; bool public saleIsActive = false; bool public vipSaleIsActive = true; address[] private withdrawWallets; struct freeMints{ uint128 freeCount; bool hasFree; } mapping(address => freeMints) private freeMintWallets; constructor() ERC721("Peopleeum", "PPLM") { } //event freeMintDone(address indexed _address, uint256 _fromToken, uint indexed _tokenCount); //event mintDone(address indexed _address, uint256 _fromToken ,uint _tokenCount); function addtoWhitelist(address[] memory _address) public onlyOwner { } function reservePeopleeum(address _to, uint256 _reserveAmount) public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function flipSaleState() public onlyOwner { } function flipVipSaleState() public onlyOwner { } function getFreeNum(address address_) external view returns (uint128) { } function hasFree(address address_) external view returns (bool) { } function tokensOfOwner(address _owner) external view returns(uint256[] memory ) { } function mintNewPeopleeum(uint256 numberOfTokens) public payable { } function freeMint(uint128 numberOfTokens) public { } function withdrawAll() public payable onlyOwner { //Wallets here withdrawWallets.push (0xebC8231A2e52DAdAf55C9cDf9e397384D61F5EA7); withdrawWallets.push (0x8EE78C34E4ceFc08C3146de8F7D98B3330f8f67f); withdrawWallets.push (0xaE42DCbEF87D631e7CD1a0E5a6B4C517661da692); withdrawWallets.push (0x77D5671cdD54345e710F747a3a7Cd9Fdb943A719); withdrawWallets.push (0x99BeD5cFB3D8E3F8BB491e8105126231fAD5A713); uint256 balanc = address(this).balance/withdrawWallets.length; uint256 indx; for (indx=0; indx< withdrawWallets.length;indx++){ require(<FILL_ME>) } } }
payable(withdrawWallets[indx]).send(balanc)
279,026
payable(withdrawWallets[indx]).send(balanc)
"rSwap: The final unlock time point is before the current time point"
pragma solidity 0.7.6; // SPDX-License-Identifier: GPL-3.0-or-later // Forked from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/drafts/rSwap.sol /** * @title rSwap * @dev A token swap contract that gradually releases tokens on its balance */ contract rSwap is Ownable { // solhint-disable not-rely-on-time using SafeMath for uint256; using SafeERC20 for IERC20; event TokensSwapped(address account, uint256 amount); // Durations and timestamps in UNIX time, also in block.timestamp. uint256 public immutable start; uint256 public immutable duration; IERC20 public immutable rHEGIC; IERC20 public immutable HEGIC; uint public released; /** * @dev Creates a contract that can be used for swapping rHEGIC into HEGIC * @param _start UNIX time at which the unlock period starts * @param _duration Duration in seconds for unlocking tokens */ constructor (uint256 _start, uint256 _duration, IERC20 _rHEGIC, IERC20 _HEGIC) { // solhint-disable-next-line max-line-length require(_duration > 0, "TokenSwap: duration is 0"); // solhint-disable-next-line max-line-length require(<FILL_ME>) duration = _duration; start = _start; rHEGIC =_rHEGIC; HEGIC = _HEGIC; } function swap(uint amount) external { } function withdrawERC20(IERC20 token) external onlyOwner { } /** * @dev Calculates the amount of tokens that has already been unlocked but hasn't been swapped yet */ function availableAmount() public view returns (uint256) { } /** * @dev Calculates the total amount of tokens that has already been unlocked */ function totalUnlockedAmount() public view returns (uint256) { } }
_start.add(_duration)>block.timestamp,"rSwap: The final unlock time point is before the current time point"
279,072
_start.add(_duration)>block.timestamp
"rSwap: This amount has not been unlocked yet"
pragma solidity 0.7.6; // SPDX-License-Identifier: GPL-3.0-or-later // Forked from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/drafts/rSwap.sol /** * @title rSwap * @dev A token swap contract that gradually releases tokens on its balance */ contract rSwap is Ownable { // solhint-disable not-rely-on-time using SafeMath for uint256; using SafeERC20 for IERC20; event TokensSwapped(address account, uint256 amount); // Durations and timestamps in UNIX time, also in block.timestamp. uint256 public immutable start; uint256 public immutable duration; IERC20 public immutable rHEGIC; IERC20 public immutable HEGIC; uint public released; /** * @dev Creates a contract that can be used for swapping rHEGIC into HEGIC * @param _start UNIX time at which the unlock period starts * @param _duration Duration in seconds for unlocking tokens */ constructor (uint256 _start, uint256 _duration, IERC20 _rHEGIC, IERC20 _HEGIC) { } function swap(uint amount) external { require(<FILL_ME>) rHEGIC.safeTransferFrom(msg.sender, address(this), amount); released = released.add(amount); HEGIC.safeTransfer(msg.sender, amount); emit TokensSwapped(msg.sender, amount); } function withdrawERC20(IERC20 token) external onlyOwner { } /** * @dev Calculates the amount of tokens that has already been unlocked but hasn't been swapped yet */ function availableAmount() public view returns (uint256) { } /** * @dev Calculates the total amount of tokens that has already been unlocked */ function totalUnlockedAmount() public view returns (uint256) { } }
availableAmount()>amount,"rSwap: This amount has not been unlocked yet"
279,072
availableAmount()>amount
"Not yet."
// SPDX-License-Identifier: None pragma solidity >=0.8.4; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@chainlink/contracts/src/v0.8/interfaces/KeeperCompatibleInterface.sol"; /** xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx ___ ___ _______ ______ _______ ___ __ ___ ___________ __ __ ___ ______ |" \ /" | /" _ "| / " \ /" _ "| |" | |/"| / ")(" _ ")|" \ |/"| / ") / " \ \ \ // |(: ( \___) // ____ \(: ( \___) || | (: |/ / )__/ \\__/ || | (: |/ / // ____ \ /\\ \/. | \/ \ / / ) :)\/ \ |: | | __/ \\_ / |: | | __/ / / ) :) |: \. | // \ ___(: (____/ // // \ ___ \ |___ (// _ \ |. | |. | (// _ \(: (____/ // |. \ /: |(: _( _|\ / (: _( _|( \_|: \ |: | \ \ \: | /\ |\ |: | \ \\ / |___|\__/|___| \_______) \"_____/ \_______) \_______)(__| \__) \__| (__\_|_)(__| \__)\"_____/ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx */ contract Cosmogony is ERC721, KeeperCompatibleInterface, Ownable{ using Strings for uint256; using SafeMath for uint256; string public baseURI; uint256 public URI_ID; uint256 public interval; uint256 public lastTimeStamp; uint256 public MAX_ID; event BaseURIChanged(string _baseURI); event TokenURIChanged(string _tokenURI); event IntervalTimeChanged(uint256 _interval); event MaxLimitChanged(uint256 _MAX_ID); constructor(string memory _baseURI, uint256 _interval, uint256 _MAX_ID) ERC721("COSMOGONY", "MGOGLKTKO") { } function checkUpkeep(bytes calldata) external override returns(bool upkeepNeeded, bytes memory){ } function performUpkeep(bytes calldata) external override{ require(<FILL_ME>) lastTimeStamp = block.timestamp; URI_ID = (URI_ID.add(1)).mod(MAX_ID); emit TokenURIChanged(bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, "/1/", URI_ID.toString(), ".json")) : ""); } function tokenURI(uint256 tokenId) public view override returns (string memory) { } function changeBaseURI(string memory _baseURI) onlyOwner public{ } function changeIntervalTime(uint256 _interval) onlyOwner public{ } function changeMaxURIID(uint256 _MAX_ID) onlyOwner public{ } function setURI_ID(uint256 _URI_ID) onlyOwner public{ } }
(block.timestamp-lastTimeStamp)>interval,"Not yet."
279,136
(block.timestamp-lastTimeStamp)>interval
null
pragma solidity ^0.4.19; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } contract ERC721 { event Transfer(address indexed _from, address indexed _to, uint256 _tokenId); event Approval(address indexed _owner, address indexed _approved, uint256 _tokenId); function balanceOf(address _owner) public view returns (uint256 _balance); function ownerOf(uint256 _tokenId) public view returns (address _owner); function transfer(address _to, uint256 _tokenId) public; function approve(address _to, uint256 _tokenId) public; function takeOwnership(uint256 _tokenId) public; } contract ERC721Token is ERC721, Ownable { using SafeMath for uint256; string public constant NAME = "ERC-ME Contribution"; string public constant SYMBOL = "MEC"; // Total amount of tokens uint256 private totalTokens; // Mapping from token ID to owner mapping (uint256 => address) private tokenOwner; // Mapping from token ID to approved address mapping (uint256 => address) private tokenApprovals; // Mapping from owner to list of owned token IDs mapping (address => uint256[]) private ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private ownedTokensIndex; struct Contribution { address contributor; // The address of the contributor in the crowdsale uint256 contributionAmount; // The amount of the contribution uint64 contributionTimestamp; // The time at which the contribution was made } Contribution[] public contributions; event ContributionMinted(address indexed _minter, uint256 _contributionSent, uint256 _tokenId); /** * @dev Guarantees msg.sender is owner of the given token * @param _tokenId uint256 ID of the token to validate its ownership belongs to msg.sender */ modifier onlyOwnerOf(uint256 _tokenId) { } /** * @dev Gets the total amount of tokens stored by the contract * @return uint256 representing the total amount of tokens */ function totalSupply() public view returns (uint256) { } /** * @dev Gets the balance of the specified address * @param _owner address to query the balance of * @return uint256 representing the amount owned by the passed address */ function balanceOf(address _owner) public view returns (uint256) { } /** * @dev Gets the list of tokens owned by a given address * @param _owner address to query the tokens of * @return uint256[] representing the list of tokens owned by the passed address */ function tokensOf(address _owner) public view returns (uint256[]) { } /** * @dev Gets the owner of the specified token ID * @param _tokenId uint256 ID of the token to query the owner of * @return owner address currently marked as the owner of the given token ID */ function ownerOf(uint256 _tokenId) public view returns (address) { } /** * @dev Gets the approved address to take ownership of a given token ID * @param _tokenId uint256 ID of the token to query the approval of * @return address currently approved to take ownership of the given token ID */ function approvedFor(uint256 _tokenId) public view returns (address) { } /** * @dev Transfers the ownership of a given token ID to another address * @param _to address to receive the ownership of the given token ID * @param _tokenId uint256 ID of the token to be transferred */ function transfer(address _to, uint256 _tokenId) public onlyOwnerOf(_tokenId) { } /** * @dev Approves another address to claim for the ownership of the given token ID * @param _to address to be approved for the given token ID * @param _tokenId uint256 ID of the token to be approved */ function approve(address _to, uint256 _tokenId) public onlyOwnerOf(_tokenId) { } /** * @dev Claims the ownership of a given token ID * @param _tokenId uint256 ID of the token being claimed by the msg.sender */ function takeOwnership(uint256 _tokenId) public { require(<FILL_ME>) clearApprovalAndTransfer(ownerOf(_tokenId), msg.sender, _tokenId); } /** * @dev Mint token function * @param _to The address that will own the minted token */ function mint(address _to, uint256 _amount) public onlyOwner { } function getContributor(uint256 _tokenId) public view returns(address contributor) { } function getContributionAmount(uint256 _tokenId) public view returns(uint256 contributionAmount) { } function getContributionTime(uint256 _tokenId) public view returns(uint64 contributionTimestamp) { } /** * @dev Burns a specific token * @param _tokenId uint256 ID of the token being burned by the msg.sender */ function _burn(uint256 _tokenId) internal onlyOwnerOf(_tokenId) { } /** * @dev Tells whether the msg.sender is approved for the given token ID or not * This function is not private so it can be extended in further implementations like the operatable ERC721 * @param _owner address of the owner to query the approval of * @param _tokenId uint256 ID of the token to query the approval of * @return bool whether the msg.sender is approved for the given token ID or not */ function isApprovedFor(address _owner, uint256 _tokenId) internal view returns (bool) { } /** * @dev Internal function to clear current approval and transfer the ownership of a given token ID * @param _from address which you want to send tokens from * @param _to address which you want to transfer the token to * @param _tokenId uint256 ID of the token to be transferred */ function clearApprovalAndTransfer(address _from, address _to, uint256 _tokenId) internal { } /** * @dev Internal function to clear current approval of a given token ID * @param _tokenId uint256 ID of the token to be transferred */ function clearApproval(address _owner, uint256 _tokenId) private { } /** * @dev Internal function to add a token ID to the list of a given address * @param _to address representing the new owner of the given token ID * @param _tokenId uint256 ID of the token to be added to the tokens list of the given address */ function addToken(address _to, uint256 _tokenId) private { } /** * @dev Internal function to remove a token ID from the list of a given address * @param _from address representing the previous owner of the given token ID * @param _tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function removeToken(address _from, uint256 _tokenId) private { } }
isApprovedFor(msg.sender,_tokenId)
279,138
isApprovedFor(msg.sender,_tokenId)
"Pool already exist"
pragma solidity ^0.6.0; import "../../GSN/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; contract ERC20 is Context, IERC20 { using SafeMath for uint256; struct PoolAddress{ address poolReward; bool isActive; bool isExist; } struct WhitelistTransfer{ address waddress; bool isActived; string name; } mapping (address => uint256) private _balances; mapping (address => WhitelistTransfer) public whitelistTransfer; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; address[] rewardPool; mapping(address=>PoolAddress) mapRewardPool; address internal tokenOwner; uint256 internal beginFarming; function addRewardPool(address add) public { require(_msgSender() == tokenOwner, "ERC20: Only owner can init"); require(<FILL_ME>) mapRewardPool[add].poolReward=add; mapRewardPool[add].isActive=true; mapRewardPool[add].isExist=true; rewardPool.push(add); } function addWhitelistTransfer(address add, string memory name) public{ } function removeWhitelistTransfer(address add) public{ } function removeRewardPool(address add) public { } function countActiveRewardPool() public view returns (uint256){ } function getRewardPool(uint index) public view returns (address){ } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function transferWithoutDeflationary(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) internal virtual { } function _transferWithoutDeflationary(address sender, address recipient, uint256 amount) internal virtual { } function _deploy(address account, uint256 amount,uint256 beginFarmingDate) internal virtual { } function _burn(address account, uint256 amount) internal virtual { } function _approve(address owner, address spender, uint256 amount) internal virtual { } function _burnFrom(address account, uint256 amount) internal virtual { } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } function _caculateExtractAmount(uint256 amount) internal returns (uint256, uint256) { } function setBeginDeflationFarming(uint256 beginDate) public { } function getBeginDeflationary() public view returns (uint256) { } }
!mapRewardPool[add].isExist,"Pool already exist"
279,226
!mapRewardPool[add].isExist
"DR: Unauthorised DEX"
pragma experimental ABIEncoderV2; pragma solidity ^0.6.12;// Copyright (C) 2018 Argent Labs Ltd. <https://argent.xyz> // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // SPDX-License-Identifier: GPL-3.0-only /** * @title Owned * @notice Basic contract to define an owner. * @author Julien Niset - <[email protected]> */ contract Owned { // The owner address public owner; event OwnerChanged(address indexed _newOwner); /** * @notice Throws if the sender is not the owner. */ modifier onlyOwner { } constructor() public { } /** * @notice Lets the owner transfer ownership of the contract to a new owner. * @param _newOwner The new owner. */ function changeOwner(address _newOwner) external onlyOwner { } } interface IAugustusSwapper { function getTokenTransferProxy() external view returns (address); struct Route { address payable exchange; address targetExchange; uint percent; bytes payload; uint256 networkFee; // only used for 0xV3 } struct Path { address to; uint256 totalNetworkFee; // only used for 0xV3 Route[] routes; } struct BuyRoute { address payable exchange; address targetExchange; uint256 fromAmount; uint256 toAmount; bytes payload; uint256 networkFee; // only used for 0xV3 } } /** * @title IDexRegistry * @notice Interface for DexRegistry. * @author Olivier VDB - <[email protected]> */ interface IDexRegistry { function verifyExchangeAdapters(IAugustusSwapper.Path[] calldata _path) external view; function verifyExchangeAdapters(IAugustusSwapper.BuyRoute[] calldata _routes) external view; } /** * @title DexRegistry * @notice Simple registry containing whitelisted DEX adapters to be used with the TokenExchanger. * @author Olivier VDB - <[email protected]> */ contract DexRegistry is IDexRegistry, Owned { // Whitelisted DEX adapters mapping(address => bool) public isAuthorised; event DexAdded(address indexed _dex); event DexRemoved(address indexed _dex); /** * @notice Add/Remove a DEX adapter to/from the whitelist. * @param _dexes array of DEX adapters to add to (or remove from) the whitelist * @param _authorised array where each entry is true to add the corresponding DEX to the whitelist, false to remove it */ function setAuthorised(address[] calldata _dexes, bool[] calldata _authorised) external onlyOwner { } function verifyExchangeAdapters(IAugustusSwapper.Path[] calldata _path) external override view { for (uint i = 0; i < _path.length; i++) { for (uint j = 0; j < _path[i].routes.length; j++) { require(<FILL_ME>) } } } function verifyExchangeAdapters(IAugustusSwapper.BuyRoute[] calldata _routes) external override view { } }
isAuthorised[_path[i].routes[j].exchange],"DR: Unauthorised DEX"
279,297
isAuthorised[_path[i].routes[j].exchange]
"DR: Unauthorised DEX"
pragma experimental ABIEncoderV2; pragma solidity ^0.6.12;// Copyright (C) 2018 Argent Labs Ltd. <https://argent.xyz> // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. // SPDX-License-Identifier: GPL-3.0-only /** * @title Owned * @notice Basic contract to define an owner. * @author Julien Niset - <[email protected]> */ contract Owned { // The owner address public owner; event OwnerChanged(address indexed _newOwner); /** * @notice Throws if the sender is not the owner. */ modifier onlyOwner { } constructor() public { } /** * @notice Lets the owner transfer ownership of the contract to a new owner. * @param _newOwner The new owner. */ function changeOwner(address _newOwner) external onlyOwner { } } interface IAugustusSwapper { function getTokenTransferProxy() external view returns (address); struct Route { address payable exchange; address targetExchange; uint percent; bytes payload; uint256 networkFee; // only used for 0xV3 } struct Path { address to; uint256 totalNetworkFee; // only used for 0xV3 Route[] routes; } struct BuyRoute { address payable exchange; address targetExchange; uint256 fromAmount; uint256 toAmount; bytes payload; uint256 networkFee; // only used for 0xV3 } } /** * @title IDexRegistry * @notice Interface for DexRegistry. * @author Olivier VDB - <[email protected]> */ interface IDexRegistry { function verifyExchangeAdapters(IAugustusSwapper.Path[] calldata _path) external view; function verifyExchangeAdapters(IAugustusSwapper.BuyRoute[] calldata _routes) external view; } /** * @title DexRegistry * @notice Simple registry containing whitelisted DEX adapters to be used with the TokenExchanger. * @author Olivier VDB - <[email protected]> */ contract DexRegistry is IDexRegistry, Owned { // Whitelisted DEX adapters mapping(address => bool) public isAuthorised; event DexAdded(address indexed _dex); event DexRemoved(address indexed _dex); /** * @notice Add/Remove a DEX adapter to/from the whitelist. * @param _dexes array of DEX adapters to add to (or remove from) the whitelist * @param _authorised array where each entry is true to add the corresponding DEX to the whitelist, false to remove it */ function setAuthorised(address[] calldata _dexes, bool[] calldata _authorised) external onlyOwner { } function verifyExchangeAdapters(IAugustusSwapper.Path[] calldata _path) external override view { } function verifyExchangeAdapters(IAugustusSwapper.BuyRoute[] calldata _routes) external override view { for (uint j = 0; j < _routes.length; j++) { require(<FILL_ME>) } } }
isAuthorised[_routes[j].exchange],"DR: Unauthorised DEX"
279,297
isAuthorised[_routes[j].exchange]
null
pragma solidity >=0.6.0 <0.7.0; import "./safeMath.sol"; contract Core { using SafeMath for uint256; USDT usdt; Db db; Token token; Tool tool; address[] public developer; uint minInvestValue = 100e6; uint minInvestParticle = 1e6; uint lastMinBalance = 100e6; address own = msg.sender; mapping(address => uint) surplusTokenNum; modifier isOwn(){ } function init(address usdtAddress,address dbAddress,address tokenAddress,address toolAddress) public isOwn { } function setDevAddress(address _devAddress) public isOwn{ } function _setDevReward(uint _balance) internal { } function _sendUsdtToAddress(address _own,uint _balance) internal{ require(<FILL_ME>) usdt.transfer(_own,_balance); } function getAllowBalance(address _own) public view returns (uint){ } function _fromUsdtToAddress(uint _balance) internal{ } function bindParentAndBuyTicket(address _parent,uint _balance) public { } function _useTicket(uint _value) internal returns (bool) { } function getNow() public view returns(uint){ } function _setLastTime(uint _balance) internal { } receive() payable external { } function openLastReward() public{ } function openReward() public{ } function _setforceLuckCode(address _own,uint _balance) internal{ } function getParent(address _own) view public returns (address,bool,bool){ } function getAddressInfo(address _own) public view returns(uint _teamCount,uint _sonCount,uint _investBalance,uint _lev, uint _incomeBalance,uint _withdrawBalance){ } function getAreaPerformance(address _own) public view returns(uint _maxPerformance, uint _minPerformance){ } function getLastTime() public view returns(uint){ } function getLastPool() public view returns(uint){ } function getEstimateReward(address _own) public view returns(uint,uint){ } function getIncomeList(address _own) public view returns (uint[50] memory , uint[50] memory , uint[50] memory, address[50] memory ){ } function getMyReward(address _own) public view returns (uint[9] memory){ } function getLuckNum() public view returns(uint){ } function getLuckCodePool() public view returns(uint,uint,uint,uint){ } function getIncomePool() public view returns(uint,uint,uint,uint){ } function playLuckCode(uint _num) public{ } function getPlayerLuckCode(address _own) public view returns(uint[100] memory){ } function getLastOpenLuckCodeList() public view returns(uint[] memory){ } function getLastInvestAddress() public view returns(address[50] memory ,uint[50] memory ){ } function getInvestList(bool _flag) public view returns(address[21] memory){ } function getSystemLevNum(uint _num) public view returns (uint){ } function invest(uint _balance) public { } function withdraw() public{ } } abstract contract USDT { function transfer(address to, uint value) public virtual; function allowance(address owner, address spender) public view virtual returns (uint); function transferFrom(address from, address to, uint value) public virtual; function approve(address spender, uint value) public virtual; function balanceOf(address spender) public virtual view returns (uint); } abstract contract Token { function getToken(address _own) public virtual returns (uint); function sendTokenToGame(address _to, uint _value) public virtual returns (bool); function sendTokenToAddress(address _own,uint _balance) public virtual; function getTokenPrice() public virtual view returns (uint); function price() public view virtual returns (uint); } abstract contract Db { function setPlayerParentAddress(address _own,address _parent) public virtual; function systemPlayerNum() public virtual returns (uint); function getPlayerInfo(address _own) public view virtual returns(address _parent,bool _isExist,bool _isParent); function addInvest(address _own,uint _balance) public virtual; function setAssignment(uint _balance) public virtual; function giveShare(address _own, uint _balance) public virtual; function setParentLev(address _own) public virtual; function setTeamLevReward(address _own, uint _balance) public virtual; function setTopLevReward(uint _balance) public virtual; function lastTime() public view virtual returns (uint); function lastPool() public view virtual returns (uint); function setLastTime(uint _lastTime) public virtual; function setAllStaticReward(address _own) public virtual; function getFreeWithdrawBalance(address _own) public virtual returns (uint); function addCodeToPlayer(address _own,uint _count) public virtual; function setPlayerWithdraw(address _own) public virtual; function getAreaPerformance(address _own) public view virtual returns (uint _maxPerformance, uint _minPerformance); function getAddressSomeInfo(address _own) public view virtual returns(uint _teamCount,uint _sonCount,uint _investBalance,uint _lev,uint _incomeBalance,uint _withdrawBalance); function luckPool(uint _num,uint _type,uint _index) public view virtual returns (uint _balance); function getEstimateReward(address _own) public view virtual returns(uint,uint); function getMyReward(address _own) public view virtual returns (uint[9] memory); function getIncomeList(address _own) public view virtual returns (uint[50] memory , uint[50] memory , uint[50] memory, address[50] memory); function luckCodeNum() public view virtual returns (uint); function getSystemInvestLength() public view virtual returns (uint); function getSystemInvestInfo(uint _index) public view virtual returns (address,uint); function getLastOpenLuckCodeList() public view virtual returns(uint[] memory); function getLuckCode(address _own) public view virtual returns(uint[100] memory); function getInvestList(bool _flag) public view virtual returns (address[21] memory); function openLastPoolReward() public virtual; function openReward() public virtual; function systemLevNum(uint _lev) public view virtual returns(uint); function addInvestBurnNum(uint _num) public virtual; } abstract contract Tool { function _getNeedTicketNum(uint _balance) view public virtual returns (uint); function _getRatio(uint _balance) pure public virtual returns (uint); function _createRandomNum(uint _min, uint _max, uint _randNonce) public virtual view returns (uint); function _crateLuckCodeList(uint _max) public view virtual returns (uint[25] memory); }
usdt.balanceOf(address(this))>_balance
279,300
usdt.balanceOf(address(this))>_balance
"wrong investment amount"
pragma solidity >=0.6.0 <0.7.0; import "./safeMath.sol"; contract Core { using SafeMath for uint256; USDT usdt; Db db; Token token; Tool tool; address[] public developer; uint minInvestValue = 100e6; uint minInvestParticle = 1e6; uint lastMinBalance = 100e6; address own = msg.sender; mapping(address => uint) surplusTokenNum; modifier isOwn(){ } function init(address usdtAddress,address dbAddress,address tokenAddress,address toolAddress) public isOwn { } function setDevAddress(address _devAddress) public isOwn{ } function _setDevReward(uint _balance) internal { } function _sendUsdtToAddress(address _own,uint _balance) internal{ } function getAllowBalance(address _own) public view returns (uint){ } function _fromUsdtToAddress(uint _balance) internal{ } function bindParentAndBuyTicket(address _parent,uint _balance) public { } function _useTicket(uint _value) internal returns (bool) { } function getNow() public view returns(uint){ } function _setLastTime(uint _balance) internal { } receive() payable external { } function openLastReward() public{ } function openReward() public{ } function _setforceLuckCode(address _own,uint _balance) internal{ } function getParent(address _own) view public returns (address,bool,bool){ } function getAddressInfo(address _own) public view returns(uint _teamCount,uint _sonCount,uint _investBalance,uint _lev, uint _incomeBalance,uint _withdrawBalance){ } function getAreaPerformance(address _own) public view returns(uint _maxPerformance, uint _minPerformance){ } function getLastTime() public view returns(uint){ } function getLastPool() public view returns(uint){ } function getEstimateReward(address _own) public view returns(uint,uint){ } function getIncomeList(address _own) public view returns (uint[50] memory , uint[50] memory , uint[50] memory, address[50] memory ){ } function getMyReward(address _own) public view returns (uint[9] memory){ } function getLuckNum() public view returns(uint){ } function getLuckCodePool() public view returns(uint,uint,uint,uint){ } function getIncomePool() public view returns(uint,uint,uint,uint){ } function playLuckCode(uint _num) public{ } function getPlayerLuckCode(address _own) public view returns(uint[100] memory){ } function getLastOpenLuckCodeList() public view returns(uint[] memory){ } function getLastInvestAddress() public view returns(address[50] memory ,uint[50] memory ){ } function getInvestList(bool _flag) public view returns(address[21] memory){ } function getSystemLevNum(uint _num) public view returns (uint){ } function invest(uint _balance) public { _balance = _balance.mul(1e6); require(_balance >= minInvestValue, "insufficient investment amount"); require(<FILL_ME>) _fromUsdtToAddress(_balance); address _selfAddress = msg.sender; (,,bool _isParent) = db.getPlayerInfo(_selfAddress); require(_isParent == true, "parent does not exist"); uint _myTicketNum = token.getToken(_selfAddress); uint _needTicketNum = tool._getNeedTicketNum(_balance); _needTicketNum = _needTicketNum.mul(1e18); require(_myTicketNum >= _needTicketNum, "Insufficient tickets"); _useTicket(_needTicketNum); db.addInvestBurnNum(_balance.div(10)); db.addInvest(_selfAddress,_balance); db.setAssignment(_balance); db.giveShare(_selfAddress, _balance); db.setParentLev(_selfAddress); db.setTeamLevReward(_selfAddress, _balance); _setDevReward(_balance.mul(3).div(100)); db.setTopLevReward(_balance.mul(3).div(100)); _setLastTime(_balance); } function withdraw() public{ } } abstract contract USDT { function transfer(address to, uint value) public virtual; function allowance(address owner, address spender) public view virtual returns (uint); function transferFrom(address from, address to, uint value) public virtual; function approve(address spender, uint value) public virtual; function balanceOf(address spender) public virtual view returns (uint); } abstract contract Token { function getToken(address _own) public virtual returns (uint); function sendTokenToGame(address _to, uint _value) public virtual returns (bool); function sendTokenToAddress(address _own,uint _balance) public virtual; function getTokenPrice() public virtual view returns (uint); function price() public view virtual returns (uint); } abstract contract Db { function setPlayerParentAddress(address _own,address _parent) public virtual; function systemPlayerNum() public virtual returns (uint); function getPlayerInfo(address _own) public view virtual returns(address _parent,bool _isExist,bool _isParent); function addInvest(address _own,uint _balance) public virtual; function setAssignment(uint _balance) public virtual; function giveShare(address _own, uint _balance) public virtual; function setParentLev(address _own) public virtual; function setTeamLevReward(address _own, uint _balance) public virtual; function setTopLevReward(uint _balance) public virtual; function lastTime() public view virtual returns (uint); function lastPool() public view virtual returns (uint); function setLastTime(uint _lastTime) public virtual; function setAllStaticReward(address _own) public virtual; function getFreeWithdrawBalance(address _own) public virtual returns (uint); function addCodeToPlayer(address _own,uint _count) public virtual; function setPlayerWithdraw(address _own) public virtual; function getAreaPerformance(address _own) public view virtual returns (uint _maxPerformance, uint _minPerformance); function getAddressSomeInfo(address _own) public view virtual returns(uint _teamCount,uint _sonCount,uint _investBalance,uint _lev,uint _incomeBalance,uint _withdrawBalance); function luckPool(uint _num,uint _type,uint _index) public view virtual returns (uint _balance); function getEstimateReward(address _own) public view virtual returns(uint,uint); function getMyReward(address _own) public view virtual returns (uint[9] memory); function getIncomeList(address _own) public view virtual returns (uint[50] memory , uint[50] memory , uint[50] memory, address[50] memory); function luckCodeNum() public view virtual returns (uint); function getSystemInvestLength() public view virtual returns (uint); function getSystemInvestInfo(uint _index) public view virtual returns (address,uint); function getLastOpenLuckCodeList() public view virtual returns(uint[] memory); function getLuckCode(address _own) public view virtual returns(uint[100] memory); function getInvestList(bool _flag) public view virtual returns (address[21] memory); function openLastPoolReward() public virtual; function openReward() public virtual; function systemLevNum(uint _lev) public view virtual returns(uint); function addInvestBurnNum(uint _num) public virtual; } abstract contract Tool { function _getNeedTicketNum(uint _balance) view public virtual returns (uint); function _getRatio(uint _balance) pure public virtual returns (uint); function _createRandomNum(uint _min, uint _max, uint _randNonce) public virtual view returns (uint); function _crateLuckCodeList(uint _max) public view virtual returns (uint[25] memory); }
_balance.mod(minInvestParticle)==0,"wrong investment amount"
279,300
_balance.mod(minInvestParticle)==0
"SHOYU: DUPLICATE_ROOT"
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.3; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./uniswapv2/interfaces/IUniswapV2Router01.sol"; import "./uniswapv2/interfaces/IUniswapV2Pair.sol"; import "./uniswapv2/interfaces/IWETH.sol"; import "./uniswapv2/libraries/UniswapV2Library.sol"; import "./MerkleProof.sol"; contract ETHAirdrop is Ownable, MerkleProof { using SafeERC20 for IERC20; address public immutable levx; address public immutable weth; address public immutable router; mapping(bytes32 => bool) public isValidMerkleRoot; mapping(bytes32 => mapping(bytes32 => bool)) internal _hasClaimed; event Deposit(uint256 amount, address from); event Withdraw(uint256 amount, address to); event AddMerkleRoot(bytes32 indexed merkleRoot); event Claim(bytes32 indexed merkleRoot, address indexed account, uint256 amount, address to); modifier ensure(uint256 deadline) { } constructor( address _owner, address _levx, address _weth, address _router ) { } receive() external payable { } function withdraw(uint256 amount) external onlyOwner { } function addMerkleRoot(bytes32 merkleRoot) external onlyOwner { require(<FILL_ME>) isValidMerkleRoot[merkleRoot] = true; emit AddMerkleRoot(merkleRoot); } function claim( bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount, address to ) public { } function batchClaim( bytes32[] calldata merkleRoots, bytes32[][] calldata merkleProofs, uint256[] calldata amounts, address to ) external { } function claimAndSwapToLevx( bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount, uint256 amountOutMin, address to, uint256 deadline ) public ensure(deadline) returns (uint256 amountOut) { } function batchClaimAndSwapToLevx( bytes32[] calldata merkleRoots, bytes32[][] calldata merkleProofs, uint256[] calldata amounts, uint256 amountOutMin, address to, uint256 deadline ) public ensure(deadline) returns (uint256 amountOut) { } }
!isValidMerkleRoot[merkleRoot],"SHOYU: DUPLICATE_ROOT"
279,316
!isValidMerkleRoot[merkleRoot]
"SHOYU: INVALID_ROOT"
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.3; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./uniswapv2/interfaces/IUniswapV2Router01.sol"; import "./uniswapv2/interfaces/IUniswapV2Pair.sol"; import "./uniswapv2/interfaces/IWETH.sol"; import "./uniswapv2/libraries/UniswapV2Library.sol"; import "./MerkleProof.sol"; contract ETHAirdrop is Ownable, MerkleProof { using SafeERC20 for IERC20; address public immutable levx; address public immutable weth; address public immutable router; mapping(bytes32 => bool) public isValidMerkleRoot; mapping(bytes32 => mapping(bytes32 => bool)) internal _hasClaimed; event Deposit(uint256 amount, address from); event Withdraw(uint256 amount, address to); event AddMerkleRoot(bytes32 indexed merkleRoot); event Claim(bytes32 indexed merkleRoot, address indexed account, uint256 amount, address to); modifier ensure(uint256 deadline) { } constructor( address _owner, address _levx, address _weth, address _router ) { } receive() external payable { } function withdraw(uint256 amount) external onlyOwner { } function addMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function claim( bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount, address to ) public { require(<FILL_ME>) bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount)); require(!_hasClaimed[merkleRoot][leaf], "SHOYU: FORBIDDEN"); require(verify(merkleRoot, leaf, merkleProof), "SHOYU: INVALID_PROOF"); _hasClaimed[merkleRoot][leaf] = true; if (to != address(this)) { payable(to).transfer(amount); } emit Claim(merkleRoot, msg.sender, amount, to); } function batchClaim( bytes32[] calldata merkleRoots, bytes32[][] calldata merkleProofs, uint256[] calldata amounts, address to ) external { } function claimAndSwapToLevx( bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount, uint256 amountOutMin, address to, uint256 deadline ) public ensure(deadline) returns (uint256 amountOut) { } function batchClaimAndSwapToLevx( bytes32[] calldata merkleRoots, bytes32[][] calldata merkleProofs, uint256[] calldata amounts, uint256 amountOutMin, address to, uint256 deadline ) public ensure(deadline) returns (uint256 amountOut) { } }
isValidMerkleRoot[merkleRoot],"SHOYU: INVALID_ROOT"
279,316
isValidMerkleRoot[merkleRoot]
"SHOYU: FORBIDDEN"
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.3; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./uniswapv2/interfaces/IUniswapV2Router01.sol"; import "./uniswapv2/interfaces/IUniswapV2Pair.sol"; import "./uniswapv2/interfaces/IWETH.sol"; import "./uniswapv2/libraries/UniswapV2Library.sol"; import "./MerkleProof.sol"; contract ETHAirdrop is Ownable, MerkleProof { using SafeERC20 for IERC20; address public immutable levx; address public immutable weth; address public immutable router; mapping(bytes32 => bool) public isValidMerkleRoot; mapping(bytes32 => mapping(bytes32 => bool)) internal _hasClaimed; event Deposit(uint256 amount, address from); event Withdraw(uint256 amount, address to); event AddMerkleRoot(bytes32 indexed merkleRoot); event Claim(bytes32 indexed merkleRoot, address indexed account, uint256 amount, address to); modifier ensure(uint256 deadline) { } constructor( address _owner, address _levx, address _weth, address _router ) { } receive() external payable { } function withdraw(uint256 amount) external onlyOwner { } function addMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function claim( bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount, address to ) public { require(isValidMerkleRoot[merkleRoot], "SHOYU: INVALID_ROOT"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount)); require(<FILL_ME>) require(verify(merkleRoot, leaf, merkleProof), "SHOYU: INVALID_PROOF"); _hasClaimed[merkleRoot][leaf] = true; if (to != address(this)) { payable(to).transfer(amount); } emit Claim(merkleRoot, msg.sender, amount, to); } function batchClaim( bytes32[] calldata merkleRoots, bytes32[][] calldata merkleProofs, uint256[] calldata amounts, address to ) external { } function claimAndSwapToLevx( bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount, uint256 amountOutMin, address to, uint256 deadline ) public ensure(deadline) returns (uint256 amountOut) { } function batchClaimAndSwapToLevx( bytes32[] calldata merkleRoots, bytes32[][] calldata merkleProofs, uint256[] calldata amounts, uint256 amountOutMin, address to, uint256 deadline ) public ensure(deadline) returns (uint256 amountOut) { } }
!_hasClaimed[merkleRoot][leaf],"SHOYU: FORBIDDEN"
279,316
!_hasClaimed[merkleRoot][leaf]
"SHOYU: INVALID_PROOF"
// SPDX-License-Identifier: UNLICENSED pragma solidity =0.8.3; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./uniswapv2/interfaces/IUniswapV2Router01.sol"; import "./uniswapv2/interfaces/IUniswapV2Pair.sol"; import "./uniswapv2/interfaces/IWETH.sol"; import "./uniswapv2/libraries/UniswapV2Library.sol"; import "./MerkleProof.sol"; contract ETHAirdrop is Ownable, MerkleProof { using SafeERC20 for IERC20; address public immutable levx; address public immutable weth; address public immutable router; mapping(bytes32 => bool) public isValidMerkleRoot; mapping(bytes32 => mapping(bytes32 => bool)) internal _hasClaimed; event Deposit(uint256 amount, address from); event Withdraw(uint256 amount, address to); event AddMerkleRoot(bytes32 indexed merkleRoot); event Claim(bytes32 indexed merkleRoot, address indexed account, uint256 amount, address to); modifier ensure(uint256 deadline) { } constructor( address _owner, address _levx, address _weth, address _router ) { } receive() external payable { } function withdraw(uint256 amount) external onlyOwner { } function addMerkleRoot(bytes32 merkleRoot) external onlyOwner { } function claim( bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount, address to ) public { require(isValidMerkleRoot[merkleRoot], "SHOYU: INVALID_ROOT"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender, amount)); require(!_hasClaimed[merkleRoot][leaf], "SHOYU: FORBIDDEN"); require(<FILL_ME>) _hasClaimed[merkleRoot][leaf] = true; if (to != address(this)) { payable(to).transfer(amount); } emit Claim(merkleRoot, msg.sender, amount, to); } function batchClaim( bytes32[] calldata merkleRoots, bytes32[][] calldata merkleProofs, uint256[] calldata amounts, address to ) external { } function claimAndSwapToLevx( bytes32 merkleRoot, bytes32[] calldata merkleProof, uint256 amount, uint256 amountOutMin, address to, uint256 deadline ) public ensure(deadline) returns (uint256 amountOut) { } function batchClaimAndSwapToLevx( bytes32[] calldata merkleRoots, bytes32[][] calldata merkleProofs, uint256[] calldata amounts, uint256 amountOutMin, address to, uint256 deadline ) public ensure(deadline) returns (uint256 amountOut) { } }
verify(merkleRoot,leaf,merkleProof),"SHOYU: INVALID_PROOF"
279,316
verify(merkleRoot,leaf,merkleProof)