comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
null
contract Partner { function exchangeTokensFromOtherContract(address _source, address _recipient, uint256 _RequestedTokens); } contract Target { function transfer(address _to, uint _value); } contract PRECOE { string public name = "Premined Coeval"; uint8 public decimals = 18; string public symbol = "PRECOE"; address public owner; address public devFeesAddr = 0x36Bdc3B60dC5491fbc7d74a05709E94d5b554321; address tierAdmin; uint256 public totalSupply = 71433000000000000000000; uint256 public mineableTokens = totalSupply; uint public tierLevel = 1; uint256 public fiatPerEth = 3.85E25; uint256 public circulatingSupply = 0; uint maxTier = 132; uint256 public devFees = 0; uint256 fees = 10000; // the calculation expects % * 100 (so 10% is 1000) bool public receiveEth = false; bool payFees = true; bool public canExchange = true; bool addTiers = true; bool public initialTiers = false; // Storage mapping (address => uint256) public balances; mapping (address => bool) public exchangePartners; // mining schedule mapping(uint => uint256) public scheduleTokens; mapping(uint => uint256) public scheduleRates; // events (ERC20) event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint _value); // events (custom) event TokensExchanged(address indexed _owningWallet, address indexed _with, uint256 _value); function PRECOE() { } function populateTierTokens() public { } function populateTierRates() public { } function () payable public { } function convertEthToCents(uint256 _incoming) internal returns (uint256) { } function allocateTokens(uint256 _submitted, uint256 _tokenCount) internal { } function transfer(address _to, uint _value) public { } function exchange(address _partner, uint256 _amount) internal { } function requestTokensFromOtherContract(address _targetContract, address _sourceContract, address _recipient, uint256 _value) internal returns (bool){ } function balanceOf(address _receiver) public constant returns (uint256) { } function balanceInTier() public constant returns (uint256) { } function balanceInSpecificTier(uint256 _tier) public constant returns (uint256) { } function rateOfSpecificTier(uint256 _tier) public constant returns (uint256) { } function setFiatPerEthRate(uint256 _newRate) public { } function addExchangePartnerTargetAddress(address _partner) public { } function canContractExchange(address _contract) public constant returns (bool) { } function removeExchangePartnerTargetAddress(address _partner) public { } function withdrawDevFees() public { } function changeDevFees(address _devFees) public { } function payFeesToggle() public { } function safeWithdrawal(address _receiver, uint256 _value) public { } // enables fee update - must be between 0 and 100 (%) function updateFeeAmount(uint _newFee) public { } function handleTokensFromOtherContracts(address _contract, address _recipient, uint256 _tokens) public { } function changeOwner(address _recipient) public { } function changeTierAdmin(address _tierAdmin) public { } function toggleReceiveEth() public { } function toggleTokenExchange() public { } function addTierRateAndTokens(uint256 _level, uint256 _tokens, uint256 _rate) public { require(<FILL_ME>) scheduleTokens[_level] = _tokens; scheduleRates[_level] = _rate; } // not really needed as we fix the max tiers on contract creation but just for completeness' sake we'll call this // when all tiers have been added to the contract (not possible to deploy with all of them) function closeTierAddition() public { } function mul(uint256 a, uint256 b) internal pure returns (uint) { } function div(uint256 a, uint256 b) internal pure returns (uint) { } function sub(uint256 a, uint256 b) internal pure returns (uint) { } function add(uint256 a, uint256 b) internal pure returns (uint) { } }
((msg.sender==owner)||(msg.sender==tierAdmin))&&(addTiers==true)
57,263
((msg.sender==owner)||(msg.sender==tierAdmin))&&(addTiers==true)
"Not enough tokens left to mint that many"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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/access/Ownable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; /** * _____ ___ _____ _____ __ _____ ___ __ * /\/\ /\_/\/__ \/\ /\ / \\_ \/\ /\\_ \/ _\ \_ \/___\/\ \ \ * / \\_ _/ / /\/ /_/ / / /\ / / /\/\ \ / / / /\/\ \ / /\// // \/ / * / /\/\ \/ \ / / / __ / / /_//\/ /_ \ V /\/ /_ _\ \/\/ /_/ \_// /\ / * \/ \/\_/ \/ \/ /_/ /___,'\____/ \_/\____/ \__/\____/\___/\_\ \/ * */ /** * @title Myth Division All Access Token ERC1155 Smart Contract * @notice Extends ERC1155 */ contract MythDivisionAllAccessToken is ERC1155, ERC1155Supply, ERC1155Burnable, Ownable, PaymentSplitter { string private _contractURI; address public minterAddress; uint256 public mintingTokenID = 0; /// PUBLIC MINT uint256 public tokenPricePublic = 1.0 ether; bool public mintIsActivePublic = false; uint256 public maxTokensPerTransactionPublic = 5; uint256 public numberMintedPublic = 0; uint256 public maxTokensPublic = 100; /// PRESALE MINT uint256 public tokenPricePresale = 0.5 ether; bool public mintIsActivePresale = false; mapping (address => bool) public presaleWalletList; uint256 public maxTokensPerTransactionPresale = 2; uint256 public numberMintedPresale = 0; uint256 public maxTokensPresale = 100; /// FREE WALLET BASED MINT bool public mintIsActiveFree = false; mapping (address => bool) public freeWalletList; constructor(address[] memory _payees, uint256[] memory _shares) ERC1155("") PaymentSplitter(_payees, _shares) {} /// @title PUBLIC MINT /** * @notice turn on/off public mint */ function flipMintStatePublic() external onlyOwner { } /** * @notice Public mint function */ function mint(uint256 numberOfTokens) external payable { require(mintIsActivePublic, "Public mint is not active"); require( numberOfTokens <= maxTokensPerTransactionPublic, "You went over max tokens per transaction" ); require( msg.value >= tokenPricePublic * numberOfTokens, "You sent the incorrect amount of ETH" ); require(<FILL_ME>) _mint(msg.sender, mintingTokenID, numberOfTokens, ""); numberMintedPublic += numberOfTokens; } /// @title PRESALE WALLET MINT /** * @notice Turn on/off presale wallet mint */ function flipPresaleMintState() external onlyOwner { } /** * @notice Add wallets to presale wallet list */ function initPresaleWalletList(address[] memory walletList) external onlyOwner { } /** * @notice Presale wallet list mint */ function mintPresale(uint256 numberOfTokens) external payable { } /// @title Free Wallet Mint /** * @notice turn on/off free wallet mint */ function flipFreeWalletState() external onlyOwner { } /** * @notice data structure for uploading free mint wallets */ function initFreeWalletList(address[] memory walletList) external onlyOwner { } /** * @notice Free mint for wallets in freeWalletList */ function mintFreeWalletList() external { } /** * @notice get contractURI */ function contractURI() public view returns (string memory) { } // OWNER FUNCTIONS /** * @notice Reserve mint a token */ function mintReserve(uint256 id, uint256 numberOfTokens) external onlyOwner { } /** * @notice Enable additional wallet to airdrop tokens */ modifier onlyMinter { } /** * @notice Airdrop a specific token to a list of addresses */ function airdrop(address[] calldata addresses, uint id, uint amt_each) external onlyMinter { } /** * @notice Withdraw ETH in contract to ownership wallet */ function withdraw() external onlyOwner { } // @title SETTER FUNCTIONS /** * @notice Set airdrop minter address */ function setMinterAddress(address minter) external onlyOwner { } /** * @notice Set contract uri */ function setContractURI(string memory newContractURI) external onlyOwner { } /** * @notice Set base URI */ function setURI(string memory baseURI) public onlyOwner { } /** * @notice Set token price of presale - tokenPricePublic */ function setTokenPricePublic(uint256 tokenPrice) external onlyOwner { } /** * @notice Set max tokens allowed minted in public sale - maxTokensPublic */ function setMaxTokensPublic (uint256 amount) external onlyOwner { } /** * @notice Set total number of tokens minted in public sale - numberMintedPublic */ function setNumberMintedPublic(uint256 amount) external onlyOwner { } /** * @notice Set max tokens per transaction for public sale - maxTokensPerTransactionPublic */ function setMaxTokensPerTransactionPublic(uint256 amount) external onlyOwner { } /** * @notice Set token price of presale - tokenPricePresale */ function setTokenPricePresale(uint256 tokenPrice) external onlyOwner { } /** * @notice Set max tokens allowed minted in presale - maxTokensPresale */ function setMaxTokensPresale(uint256 amount) external onlyOwner { } /** * @notice Set total number of tokens minted in presale - numberMintedPresale */ function setNumberMintedPresale(uint256 amount) external onlyOwner { } /** * @notice Set max tokens per transaction for presale - maxTokensPerTransactionPresale */ function setMaxTokensPerTransactionPresale(uint256 amount) external onlyOwner { } /** * @notice Set the current token ID minting - mintingTokenID */ function setMintingTokenID(uint256 tokenID) external onlyOwner { } /** * @notice Set the current token ID minting and reset all counters and active mints to 0 and false respectively */ function setMintingTokenIdAndResetState(uint256 tokenID) external onlyOwner { } /** * @notice Withdraw eth from contract by wallet */ function release(address payable account) public override { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } }
numberMintedPublic+numberOfTokens<=maxTokensPublic,"Not enough tokens left to mint that many"
57,312
numberMintedPublic+numberOfTokens<=maxTokensPublic
"You are not on the presale wallet list or have already minted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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/access/Ownable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; /** * _____ ___ _____ _____ __ _____ ___ __ * /\/\ /\_/\/__ \/\ /\ / \\_ \/\ /\\_ \/ _\ \_ \/___\/\ \ \ * / \\_ _/ / /\/ /_/ / / /\ / / /\/\ \ / / / /\/\ \ / /\// // \/ / * / /\/\ \/ \ / / / __ / / /_//\/ /_ \ V /\/ /_ _\ \/\/ /_/ \_// /\ / * \/ \/\_/ \/ \/ /_/ /___,'\____/ \_/\____/ \__/\____/\___/\_\ \/ * */ /** * @title Myth Division All Access Token ERC1155 Smart Contract * @notice Extends ERC1155 */ contract MythDivisionAllAccessToken is ERC1155, ERC1155Supply, ERC1155Burnable, Ownable, PaymentSplitter { string private _contractURI; address public minterAddress; uint256 public mintingTokenID = 0; /// PUBLIC MINT uint256 public tokenPricePublic = 1.0 ether; bool public mintIsActivePublic = false; uint256 public maxTokensPerTransactionPublic = 5; uint256 public numberMintedPublic = 0; uint256 public maxTokensPublic = 100; /// PRESALE MINT uint256 public tokenPricePresale = 0.5 ether; bool public mintIsActivePresale = false; mapping (address => bool) public presaleWalletList; uint256 public maxTokensPerTransactionPresale = 2; uint256 public numberMintedPresale = 0; uint256 public maxTokensPresale = 100; /// FREE WALLET BASED MINT bool public mintIsActiveFree = false; mapping (address => bool) public freeWalletList; constructor(address[] memory _payees, uint256[] memory _shares) ERC1155("") PaymentSplitter(_payees, _shares) {} /// @title PUBLIC MINT /** * @notice turn on/off public mint */ function flipMintStatePublic() external onlyOwner { } /** * @notice Public mint function */ function mint(uint256 numberOfTokens) external payable { } /// @title PRESALE WALLET MINT /** * @notice Turn on/off presale wallet mint */ function flipPresaleMintState() external onlyOwner { } /** * @notice Add wallets to presale wallet list */ function initPresaleWalletList(address[] memory walletList) external onlyOwner { } /** * @notice Presale wallet list mint */ function mintPresale(uint256 numberOfTokens) external payable { require(mintIsActivePresale, "Presale mint is not active"); require( numberOfTokens <= maxTokensPerTransactionPresale, "You went over max tokens per transaction" ); require( msg.value >= tokenPricePresale * numberOfTokens, "You sent the incorrect amount of ETH" ); require(<FILL_ME>) require( numberMintedPresale + numberOfTokens <= maxTokensPresale, "Not enough tokens left to mint that many" ); _mint(msg.sender, mintingTokenID, numberOfTokens, ""); numberMintedPresale += numberOfTokens; presaleWalletList[msg.sender] = false; } /// @title Free Wallet Mint /** * @notice turn on/off free wallet mint */ function flipFreeWalletState() external onlyOwner { } /** * @notice data structure for uploading free mint wallets */ function initFreeWalletList(address[] memory walletList) external onlyOwner { } /** * @notice Free mint for wallets in freeWalletList */ function mintFreeWalletList() external { } /** * @notice get contractURI */ function contractURI() public view returns (string memory) { } // OWNER FUNCTIONS /** * @notice Reserve mint a token */ function mintReserve(uint256 id, uint256 numberOfTokens) external onlyOwner { } /** * @notice Enable additional wallet to airdrop tokens */ modifier onlyMinter { } /** * @notice Airdrop a specific token to a list of addresses */ function airdrop(address[] calldata addresses, uint id, uint amt_each) external onlyMinter { } /** * @notice Withdraw ETH in contract to ownership wallet */ function withdraw() external onlyOwner { } // @title SETTER FUNCTIONS /** * @notice Set airdrop minter address */ function setMinterAddress(address minter) external onlyOwner { } /** * @notice Set contract uri */ function setContractURI(string memory newContractURI) external onlyOwner { } /** * @notice Set base URI */ function setURI(string memory baseURI) public onlyOwner { } /** * @notice Set token price of presale - tokenPricePublic */ function setTokenPricePublic(uint256 tokenPrice) external onlyOwner { } /** * @notice Set max tokens allowed minted in public sale - maxTokensPublic */ function setMaxTokensPublic (uint256 amount) external onlyOwner { } /** * @notice Set total number of tokens minted in public sale - numberMintedPublic */ function setNumberMintedPublic(uint256 amount) external onlyOwner { } /** * @notice Set max tokens per transaction for public sale - maxTokensPerTransactionPublic */ function setMaxTokensPerTransactionPublic(uint256 amount) external onlyOwner { } /** * @notice Set token price of presale - tokenPricePresale */ function setTokenPricePresale(uint256 tokenPrice) external onlyOwner { } /** * @notice Set max tokens allowed minted in presale - maxTokensPresale */ function setMaxTokensPresale(uint256 amount) external onlyOwner { } /** * @notice Set total number of tokens minted in presale - numberMintedPresale */ function setNumberMintedPresale(uint256 amount) external onlyOwner { } /** * @notice Set max tokens per transaction for presale - maxTokensPerTransactionPresale */ function setMaxTokensPerTransactionPresale(uint256 amount) external onlyOwner { } /** * @notice Set the current token ID minting - mintingTokenID */ function setMintingTokenID(uint256 tokenID) external onlyOwner { } /** * @notice Set the current token ID minting and reset all counters and active mints to 0 and false respectively */ function setMintingTokenIdAndResetState(uint256 tokenID) external onlyOwner { } /** * @notice Withdraw eth from contract by wallet */ function release(address payable account) public override { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } }
presaleWalletList[msg.sender]==true,"You are not on the presale wallet list or have already minted"
57,312
presaleWalletList[msg.sender]==true
"Not enough tokens left to mint that many"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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/access/Ownable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; /** * _____ ___ _____ _____ __ _____ ___ __ * /\/\ /\_/\/__ \/\ /\ / \\_ \/\ /\\_ \/ _\ \_ \/___\/\ \ \ * / \\_ _/ / /\/ /_/ / / /\ / / /\/\ \ / / / /\/\ \ / /\// // \/ / * / /\/\ \/ \ / / / __ / / /_//\/ /_ \ V /\/ /_ _\ \/\/ /_/ \_// /\ / * \/ \/\_/ \/ \/ /_/ /___,'\____/ \_/\____/ \__/\____/\___/\_\ \/ * */ /** * @title Myth Division All Access Token ERC1155 Smart Contract * @notice Extends ERC1155 */ contract MythDivisionAllAccessToken is ERC1155, ERC1155Supply, ERC1155Burnable, Ownable, PaymentSplitter { string private _contractURI; address public minterAddress; uint256 public mintingTokenID = 0; /// PUBLIC MINT uint256 public tokenPricePublic = 1.0 ether; bool public mintIsActivePublic = false; uint256 public maxTokensPerTransactionPublic = 5; uint256 public numberMintedPublic = 0; uint256 public maxTokensPublic = 100; /// PRESALE MINT uint256 public tokenPricePresale = 0.5 ether; bool public mintIsActivePresale = false; mapping (address => bool) public presaleWalletList; uint256 public maxTokensPerTransactionPresale = 2; uint256 public numberMintedPresale = 0; uint256 public maxTokensPresale = 100; /// FREE WALLET BASED MINT bool public mintIsActiveFree = false; mapping (address => bool) public freeWalletList; constructor(address[] memory _payees, uint256[] memory _shares) ERC1155("") PaymentSplitter(_payees, _shares) {} /// @title PUBLIC MINT /** * @notice turn on/off public mint */ function flipMintStatePublic() external onlyOwner { } /** * @notice Public mint function */ function mint(uint256 numberOfTokens) external payable { } /// @title PRESALE WALLET MINT /** * @notice Turn on/off presale wallet mint */ function flipPresaleMintState() external onlyOwner { } /** * @notice Add wallets to presale wallet list */ function initPresaleWalletList(address[] memory walletList) external onlyOwner { } /** * @notice Presale wallet list mint */ function mintPresale(uint256 numberOfTokens) external payable { require(mintIsActivePresale, "Presale mint is not active"); require( numberOfTokens <= maxTokensPerTransactionPresale, "You went over max tokens per transaction" ); require( msg.value >= tokenPricePresale * numberOfTokens, "You sent the incorrect amount of ETH" ); require( presaleWalletList[msg.sender] == true, "You are not on the presale wallet list or have already minted" ); require(<FILL_ME>) _mint(msg.sender, mintingTokenID, numberOfTokens, ""); numberMintedPresale += numberOfTokens; presaleWalletList[msg.sender] = false; } /// @title Free Wallet Mint /** * @notice turn on/off free wallet mint */ function flipFreeWalletState() external onlyOwner { } /** * @notice data structure for uploading free mint wallets */ function initFreeWalletList(address[] memory walletList) external onlyOwner { } /** * @notice Free mint for wallets in freeWalletList */ function mintFreeWalletList() external { } /** * @notice get contractURI */ function contractURI() public view returns (string memory) { } // OWNER FUNCTIONS /** * @notice Reserve mint a token */ function mintReserve(uint256 id, uint256 numberOfTokens) external onlyOwner { } /** * @notice Enable additional wallet to airdrop tokens */ modifier onlyMinter { } /** * @notice Airdrop a specific token to a list of addresses */ function airdrop(address[] calldata addresses, uint id, uint amt_each) external onlyMinter { } /** * @notice Withdraw ETH in contract to ownership wallet */ function withdraw() external onlyOwner { } // @title SETTER FUNCTIONS /** * @notice Set airdrop minter address */ function setMinterAddress(address minter) external onlyOwner { } /** * @notice Set contract uri */ function setContractURI(string memory newContractURI) external onlyOwner { } /** * @notice Set base URI */ function setURI(string memory baseURI) public onlyOwner { } /** * @notice Set token price of presale - tokenPricePublic */ function setTokenPricePublic(uint256 tokenPrice) external onlyOwner { } /** * @notice Set max tokens allowed minted in public sale - maxTokensPublic */ function setMaxTokensPublic (uint256 amount) external onlyOwner { } /** * @notice Set total number of tokens minted in public sale - numberMintedPublic */ function setNumberMintedPublic(uint256 amount) external onlyOwner { } /** * @notice Set max tokens per transaction for public sale - maxTokensPerTransactionPublic */ function setMaxTokensPerTransactionPublic(uint256 amount) external onlyOwner { } /** * @notice Set token price of presale - tokenPricePresale */ function setTokenPricePresale(uint256 tokenPrice) external onlyOwner { } /** * @notice Set max tokens allowed minted in presale - maxTokensPresale */ function setMaxTokensPresale(uint256 amount) external onlyOwner { } /** * @notice Set total number of tokens minted in presale - numberMintedPresale */ function setNumberMintedPresale(uint256 amount) external onlyOwner { } /** * @notice Set max tokens per transaction for presale - maxTokensPerTransactionPresale */ function setMaxTokensPerTransactionPresale(uint256 amount) external onlyOwner { } /** * @notice Set the current token ID minting - mintingTokenID */ function setMintingTokenID(uint256 tokenID) external onlyOwner { } /** * @notice Set the current token ID minting and reset all counters and active mints to 0 and false respectively */ function setMintingTokenIdAndResetState(uint256 tokenID) external onlyOwner { } /** * @notice Withdraw eth from contract by wallet */ function release(address payable account) public override { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } }
numberMintedPresale+numberOfTokens<=maxTokensPresale,"Not enough tokens left to mint that many"
57,312
numberMintedPresale+numberOfTokens<=maxTokensPresale
"You are not on the free wallet list or have already minted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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/access/Ownable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; /** * _____ ___ _____ _____ __ _____ ___ __ * /\/\ /\_/\/__ \/\ /\ / \\_ \/\ /\\_ \/ _\ \_ \/___\/\ \ \ * / \\_ _/ / /\/ /_/ / / /\ / / /\/\ \ / / / /\/\ \ / /\// // \/ / * / /\/\ \/ \ / / / __ / / /_//\/ /_ \ V /\/ /_ _\ \/\/ /_/ \_// /\ / * \/ \/\_/ \/ \/ /_/ /___,'\____/ \_/\____/ \__/\____/\___/\_\ \/ * */ /** * @title Myth Division All Access Token ERC1155 Smart Contract * @notice Extends ERC1155 */ contract MythDivisionAllAccessToken is ERC1155, ERC1155Supply, ERC1155Burnable, Ownable, PaymentSplitter { string private _contractURI; address public minterAddress; uint256 public mintingTokenID = 0; /// PUBLIC MINT uint256 public tokenPricePublic = 1.0 ether; bool public mintIsActivePublic = false; uint256 public maxTokensPerTransactionPublic = 5; uint256 public numberMintedPublic = 0; uint256 public maxTokensPublic = 100; /// PRESALE MINT uint256 public tokenPricePresale = 0.5 ether; bool public mintIsActivePresale = false; mapping (address => bool) public presaleWalletList; uint256 public maxTokensPerTransactionPresale = 2; uint256 public numberMintedPresale = 0; uint256 public maxTokensPresale = 100; /// FREE WALLET BASED MINT bool public mintIsActiveFree = false; mapping (address => bool) public freeWalletList; constructor(address[] memory _payees, uint256[] memory _shares) ERC1155("") PaymentSplitter(_payees, _shares) {} /// @title PUBLIC MINT /** * @notice turn on/off public mint */ function flipMintStatePublic() external onlyOwner { } /** * @notice Public mint function */ function mint(uint256 numberOfTokens) external payable { } /// @title PRESALE WALLET MINT /** * @notice Turn on/off presale wallet mint */ function flipPresaleMintState() external onlyOwner { } /** * @notice Add wallets to presale wallet list */ function initPresaleWalletList(address[] memory walletList) external onlyOwner { } /** * @notice Presale wallet list mint */ function mintPresale(uint256 numberOfTokens) external payable { } /// @title Free Wallet Mint /** * @notice turn on/off free wallet mint */ function flipFreeWalletState() external onlyOwner { } /** * @notice data structure for uploading free mint wallets */ function initFreeWalletList(address[] memory walletList) external onlyOwner { } /** * @notice Free mint for wallets in freeWalletList */ function mintFreeWalletList() external { require(mintIsActiveFree, "Free mint is not active"); require(<FILL_ME>) _mint(msg.sender, mintingTokenID, 1, ""); freeWalletList[msg.sender] = false; } /** * @notice get contractURI */ function contractURI() public view returns (string memory) { } // OWNER FUNCTIONS /** * @notice Reserve mint a token */ function mintReserve(uint256 id, uint256 numberOfTokens) external onlyOwner { } /** * @notice Enable additional wallet to airdrop tokens */ modifier onlyMinter { } /** * @notice Airdrop a specific token to a list of addresses */ function airdrop(address[] calldata addresses, uint id, uint amt_each) external onlyMinter { } /** * @notice Withdraw ETH in contract to ownership wallet */ function withdraw() external onlyOwner { } // @title SETTER FUNCTIONS /** * @notice Set airdrop minter address */ function setMinterAddress(address minter) external onlyOwner { } /** * @notice Set contract uri */ function setContractURI(string memory newContractURI) external onlyOwner { } /** * @notice Set base URI */ function setURI(string memory baseURI) public onlyOwner { } /** * @notice Set token price of presale - tokenPricePublic */ function setTokenPricePublic(uint256 tokenPrice) external onlyOwner { } /** * @notice Set max tokens allowed minted in public sale - maxTokensPublic */ function setMaxTokensPublic (uint256 amount) external onlyOwner { } /** * @notice Set total number of tokens minted in public sale - numberMintedPublic */ function setNumberMintedPublic(uint256 amount) external onlyOwner { } /** * @notice Set max tokens per transaction for public sale - maxTokensPerTransactionPublic */ function setMaxTokensPerTransactionPublic(uint256 amount) external onlyOwner { } /** * @notice Set token price of presale - tokenPricePresale */ function setTokenPricePresale(uint256 tokenPrice) external onlyOwner { } /** * @notice Set max tokens allowed minted in presale - maxTokensPresale */ function setMaxTokensPresale(uint256 amount) external onlyOwner { } /** * @notice Set total number of tokens minted in presale - numberMintedPresale */ function setNumberMintedPresale(uint256 amount) external onlyOwner { } /** * @notice Set max tokens per transaction for presale - maxTokensPerTransactionPresale */ function setMaxTokensPerTransactionPresale(uint256 amount) external onlyOwner { } /** * @notice Set the current token ID minting - mintingTokenID */ function setMintingTokenID(uint256 tokenID) external onlyOwner { } /** * @notice Set the current token ID minting and reset all counters and active mints to 0 and false respectively */ function setMintingTokenIdAndResetState(uint256 tokenID) external onlyOwner { } /** * @notice Withdraw eth from contract by wallet */ function release(address payable account) public override { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } }
freeWalletList[msg.sender]==true,"You are not on the free wallet list or have already minted"
57,312
freeWalletList[msg.sender]==true
null
pragma solidity ^0.4.25; 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 AltcoinToken { function balanceOf(address _owner) constant public returns (uint256); function transfer(address _to, uint256 _value) public returns (bool); } contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract RexusExchange is ERC20 { using SafeMath for uint256; address owner = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public blacklist; string public constant name = "Rexus Exchange"; string public constant symbol = "RXS"; uint public constant decimals = 18; uint256 public totalSupply = 10000000000e18; uint256 public tokenPerETH = 10000000e18; uint256 public valueToGive = 5000e18; uint256 public totalDistributed = 0; uint256 public totalRemaining = totalSupply.sub(totalDistributed); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Distr(address indexed to, uint256 amount); event DistrFinished(); event Burn(address indexed burner, uint256 value); bool public distributionFinished = false; modifier canDistr() { } modifier onlyOwner() { } function RexusExchange () public { } function transferOwnership(address newOwner) onlyOwner public { } function finishDistribution() onlyOwner canDistr public returns (bool) { } function distr(address _to, uint256 _amount) canDistr private returns (bool) { } function () external payable { address investor = msg.sender; uint256 invest = msg.value; if(invest == 0){ require(valueToGive <= totalRemaining); require(<FILL_ME>) uint256 toGive = valueToGive; distr(investor, toGive); blacklist[investor] = true; valueToGive = valueToGive.div(1000000).mul(999999); } if(invest > 0){ buyToken(investor, invest); } } function buyToken(address _investor, uint256 _invest) canDistr public { } function balanceOf(address _owner) constant public returns (uint256) { } modifier onlyPayloadSize(uint size) { } function transfer(address _to, uint256 _amount) onlyPayloadSize(2 * 32) public returns (bool success) { } function transferFrom(address _from, address _to, uint256 _amount) onlyPayloadSize(3 * 32) public returns (bool success) { } function approve(address _spender, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) constant public returns (uint256) { } function getTokenBalance(address tokenAddress, address who) constant public returns (uint){ } function withdraw() onlyOwner public { } function withdrawAltcoinTokens(address _tokenContract) onlyOwner public returns (bool) { } function burn(uint256 _value) onlyOwner public { } function burnFrom(uint256 _value, address _burner) onlyOwner public { } }
blacklist[investor]==false
57,319
blacklist[investor]==false
null
pragma solidity ^0.4.21; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ContractReceiver { function tokenFallback(address from, uint256 value, bytes data) public; } contract AuctusToken { function transfer(address to, uint256 value) public returns (bool); function transfer(address to, uint256 value, bytes data) public returns (bool); function burn(uint256 value) public returns (bool); function setTokenSaleFinished() public; } contract AuctusWhitelist { function getAllowedAmountToContribute(address addr) view public returns(uint256); } contract AuctusTokenSale is ContractReceiver { using SafeMath for uint256; address public auctusTokenAddress = 0xc12d099be31567add4e4e4d0D45691C3F58f5663; address public auctusWhiteListAddress = 0xA6e728E524c1D7A65fE5193cA1636265DE9Bc982; uint256 public startTime = 1522159200; //2018-03-27 2 PM UTC uint256 public endTime; uint256 public basicPricePerEth = 2000; address public owner; uint256 public softCap; uint256 public remainingTokens; uint256 public weiRaised; mapping(address => uint256) public invested; bool public saleWasSet; bool public tokenSaleHalted; event Buy(address indexed buyer, uint256 tokenAmount); event Revoke(address indexed buyer, uint256 investedAmount); function AuctusTokenSale(uint256 minimumCap, uint256 endSaleTime) public { } modifier onlyOwner() { } modifier openSale() { require(<FILL_ME>) _; } modifier saleCompletedSuccessfully() { } modifier saleFailed() { } function transferOwnership(address newOwner) onlyOwner public { } function setTokenSaleHalt(bool halted) onlyOwner public { } function setSoftCap(uint256 minimumCap) onlyOwner public { } function setEndSaleTime(uint256 endSaleTime) onlyOwner public { } function tokenFallback(address, uint256 value, bytes) public { } function() payable openSale public { } function revoke() saleFailed public { } function finish() onlyOwner saleCompletedSuccessfully public { } function getValueToInvest() view private returns (uint256, uint256) { } function getAllowedAmount(uint256 value) view private returns (uint256) { } function setTokenSaleDistribution(uint256 totalAmount) private { } function transferTokens( uint256 auctusCoreTeam, uint256 bounty, uint256 reserveForFuture, uint256 preSale, uint256 partnershipsAdvisoryVested, uint256 partnershipsAdvisoryFree, uint256 privateSales ) private { } }
saleWasSet&&!tokenSaleHalted&&now>=startTime&&now<=endTime&&remainingTokens>0
57,590
saleWasSet&&!tokenSaleHalted&&now>=startTime&&now<=endTime&&remainingTokens>0
null
pragma solidity ^0.4.21; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ContractReceiver { function tokenFallback(address from, uint256 value, bytes data) public; } contract AuctusToken { function transfer(address to, uint256 value) public returns (bool); function transfer(address to, uint256 value, bytes data) public returns (bool); function burn(uint256 value) public returns (bool); function setTokenSaleFinished() public; } contract AuctusWhitelist { function getAllowedAmountToContribute(address addr) view public returns(uint256); } contract AuctusTokenSale is ContractReceiver { using SafeMath for uint256; address public auctusTokenAddress = 0xc12d099be31567add4e4e4d0D45691C3F58f5663; address public auctusWhiteListAddress = 0xA6e728E524c1D7A65fE5193cA1636265DE9Bc982; uint256 public startTime = 1522159200; //2018-03-27 2 PM UTC uint256 public endTime; uint256 public basicPricePerEth = 2000; address public owner; uint256 public softCap; uint256 public remainingTokens; uint256 public weiRaised; mapping(address => uint256) public invested; bool public saleWasSet; bool public tokenSaleHalted; event Buy(address indexed buyer, uint256 tokenAmount); event Revoke(address indexed buyer, uint256 investedAmount); function AuctusTokenSale(uint256 minimumCap, uint256 endSaleTime) public { } modifier onlyOwner() { } modifier openSale() { } modifier saleCompletedSuccessfully() { } modifier saleFailed() { } function transferOwnership(address newOwner) onlyOwner public { } function setTokenSaleHalt(bool halted) onlyOwner public { } function setSoftCap(uint256 minimumCap) onlyOwner public { } function setEndSaleTime(uint256 endSaleTime) onlyOwner public { } function tokenFallback(address, uint256 value, bytes) public { require(msg.sender == auctusTokenAddress); require(<FILL_ME>) setTokenSaleDistribution(value); } function() payable openSale public { } function revoke() saleFailed public { } function finish() onlyOwner saleCompletedSuccessfully public { } function getValueToInvest() view private returns (uint256, uint256) { } function getAllowedAmount(uint256 value) view private returns (uint256) { } function setTokenSaleDistribution(uint256 totalAmount) private { } function transferTokens( uint256 auctusCoreTeam, uint256 bounty, uint256 reserveForFuture, uint256 preSale, uint256 partnershipsAdvisoryVested, uint256 partnershipsAdvisoryFree, uint256 privateSales ) private { } }
!saleWasSet
57,590
!saleWasSet
"Not enough NFTs left to mint"
contract Demonzv2 is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public MAX_TOKENS = 2000; uint256 public MAX_PER_WALLET = 50; uint256 public CURRENT_TOKEN_ID = 0; // for testing string public BEGINNING_URI = "https://api.cryptodemonz.com/"; string public ENDING_URI = ".json"; bool public ALLOW_SACRIFCE = true; IDemonzv1 public demonzv1; constructor(address _demonzv1) ERC721 ("CryptoDemonzV2", "DEMONZv2") { } modifier safeSacrificing { } event tokenSacrificed(address _sender); /// @notice standard minting function /// @param _amount to be minted function mintToken(uint256 _amount) public onlyOwner { require(<FILL_ME>) _batchMint(_amount, msg.sender); } /// @notice will mint demonzv2 for burning demonzv1 /// @param _ids array of demonzv1 ids to be burned function burnV1(uint256[] memory _ids) external safeSacrificing { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function withdraw() external onlyOwner { } function setBeginningURI(string memory _new_uri) external onlyOwner { } function setEndingURI(string memory _new_uri) external onlyOwner { } function toggleSacrifice() external onlyOwner { } function changeMaxPerWalletAmount(uint256 _amount) external onlyOwner { } /// @notice dummy function for unit testing function _incrementTokenId() internal { } function _batchMint(uint256 _amount, address _sender) internal { } /// @notice dummy function for unit testing function getCurrentTokenId() view external returns (uint256) { } /// @dev DO NOT FORMAT THIS TO PURE, even tho compiler is asking function onERC721Received( address, address, uint256, bytes calldata ) external returns (bytes4) { } }
totalSupply()+_amount<=MAX_TOKENS,"Not enough NFTs left to mint"
57,645
totalSupply()+_amount<=MAX_TOKENS
"Invalid list"
contract Demonzv2 is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public MAX_TOKENS = 2000; uint256 public MAX_PER_WALLET = 50; uint256 public CURRENT_TOKEN_ID = 0; // for testing string public BEGINNING_URI = "https://api.cryptodemonz.com/"; string public ENDING_URI = ".json"; bool public ALLOW_SACRIFCE = true; IDemonzv1 public demonzv1; constructor(address _demonzv1) ERC721 ("CryptoDemonzV2", "DEMONZv2") { } modifier safeSacrificing { } event tokenSacrificed(address _sender); /// @notice standard minting function /// @param _amount to be minted function mintToken(uint256 _amount) public onlyOwner { } /// @notice will mint demonzv2 for burning demonzv1 /// @param _ids array of demonzv1 ids to be burned function burnV1(uint256[] memory _ids) external safeSacrificing { uint256 i = 0; require(<FILL_ME>) require(totalSupply() + _ids.length <= MAX_TOKENS, "Not enough NFTs left to mint"); require(balanceOf(msg.sender) + _ids.length <= MAX_PER_WALLET, "Exceeds wallet max allowed balance"); for (i=0; i<_ids.length; ++i) { require(demonzv1.ownerOf(_ids[i]) == msg.sender, "Sender is not owner"); demonzv1.safeTransferFrom(msg.sender, address(this), _ids[i]); demonzv1.burnToken(_ids[i]); } _batchMint(_ids.length / 3, msg.sender); // no need to increment token id here emit tokenSacrificed(msg.sender); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function withdraw() external onlyOwner { } function setBeginningURI(string memory _new_uri) external onlyOwner { } function setEndingURI(string memory _new_uri) external onlyOwner { } function toggleSacrifice() external onlyOwner { } function changeMaxPerWalletAmount(uint256 _amount) external onlyOwner { } /// @notice dummy function for unit testing function _incrementTokenId() internal { } function _batchMint(uint256 _amount, address _sender) internal { } /// @notice dummy function for unit testing function getCurrentTokenId() view external returns (uint256) { } /// @dev DO NOT FORMAT THIS TO PURE, even tho compiler is asking function onERC721Received( address, address, uint256, bytes calldata ) external returns (bytes4) { } }
_ids.length%3==0&&_ids.length<=9,"Invalid list"
57,645
_ids.length%3==0&&_ids.length<=9
"Not enough NFTs left to mint"
contract Demonzv2 is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public MAX_TOKENS = 2000; uint256 public MAX_PER_WALLET = 50; uint256 public CURRENT_TOKEN_ID = 0; // for testing string public BEGINNING_URI = "https://api.cryptodemonz.com/"; string public ENDING_URI = ".json"; bool public ALLOW_SACRIFCE = true; IDemonzv1 public demonzv1; constructor(address _demonzv1) ERC721 ("CryptoDemonzV2", "DEMONZv2") { } modifier safeSacrificing { } event tokenSacrificed(address _sender); /// @notice standard minting function /// @param _amount to be minted function mintToken(uint256 _amount) public onlyOwner { } /// @notice will mint demonzv2 for burning demonzv1 /// @param _ids array of demonzv1 ids to be burned function burnV1(uint256[] memory _ids) external safeSacrificing { uint256 i = 0; require(_ids.length % 3 == 0 && _ids.length <= 9, "Invalid list"); require(<FILL_ME>) require(balanceOf(msg.sender) + _ids.length <= MAX_PER_WALLET, "Exceeds wallet max allowed balance"); for (i=0; i<_ids.length; ++i) { require(demonzv1.ownerOf(_ids[i]) == msg.sender, "Sender is not owner"); demonzv1.safeTransferFrom(msg.sender, address(this), _ids[i]); demonzv1.burnToken(_ids[i]); } _batchMint(_ids.length / 3, msg.sender); // no need to increment token id here emit tokenSacrificed(msg.sender); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function withdraw() external onlyOwner { } function setBeginningURI(string memory _new_uri) external onlyOwner { } function setEndingURI(string memory _new_uri) external onlyOwner { } function toggleSacrifice() external onlyOwner { } function changeMaxPerWalletAmount(uint256 _amount) external onlyOwner { } /// @notice dummy function for unit testing function _incrementTokenId() internal { } function _batchMint(uint256 _amount, address _sender) internal { } /// @notice dummy function for unit testing function getCurrentTokenId() view external returns (uint256) { } /// @dev DO NOT FORMAT THIS TO PURE, even tho compiler is asking function onERC721Received( address, address, uint256, bytes calldata ) external returns (bytes4) { } }
totalSupply()+_ids.length<=MAX_TOKENS,"Not enough NFTs left to mint"
57,645
totalSupply()+_ids.length<=MAX_TOKENS
"Exceeds wallet max allowed balance"
contract Demonzv2 is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public MAX_TOKENS = 2000; uint256 public MAX_PER_WALLET = 50; uint256 public CURRENT_TOKEN_ID = 0; // for testing string public BEGINNING_URI = "https://api.cryptodemonz.com/"; string public ENDING_URI = ".json"; bool public ALLOW_SACRIFCE = true; IDemonzv1 public demonzv1; constructor(address _demonzv1) ERC721 ("CryptoDemonzV2", "DEMONZv2") { } modifier safeSacrificing { } event tokenSacrificed(address _sender); /// @notice standard minting function /// @param _amount to be minted function mintToken(uint256 _amount) public onlyOwner { } /// @notice will mint demonzv2 for burning demonzv1 /// @param _ids array of demonzv1 ids to be burned function burnV1(uint256[] memory _ids) external safeSacrificing { uint256 i = 0; require(_ids.length % 3 == 0 && _ids.length <= 9, "Invalid list"); require(totalSupply() + _ids.length <= MAX_TOKENS, "Not enough NFTs left to mint"); require(<FILL_ME>) for (i=0; i<_ids.length; ++i) { require(demonzv1.ownerOf(_ids[i]) == msg.sender, "Sender is not owner"); demonzv1.safeTransferFrom(msg.sender, address(this), _ids[i]); demonzv1.burnToken(_ids[i]); } _batchMint(_ids.length / 3, msg.sender); // no need to increment token id here emit tokenSacrificed(msg.sender); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function withdraw() external onlyOwner { } function setBeginningURI(string memory _new_uri) external onlyOwner { } function setEndingURI(string memory _new_uri) external onlyOwner { } function toggleSacrifice() external onlyOwner { } function changeMaxPerWalletAmount(uint256 _amount) external onlyOwner { } /// @notice dummy function for unit testing function _incrementTokenId() internal { } function _batchMint(uint256 _amount, address _sender) internal { } /// @notice dummy function for unit testing function getCurrentTokenId() view external returns (uint256) { } /// @dev DO NOT FORMAT THIS TO PURE, even tho compiler is asking function onERC721Received( address, address, uint256, bytes calldata ) external returns (bytes4) { } }
balanceOf(msg.sender)+_ids.length<=MAX_PER_WALLET,"Exceeds wallet max allowed balance"
57,645
balanceOf(msg.sender)+_ids.length<=MAX_PER_WALLET
"Sender is not owner"
contract Demonzv2 is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public MAX_TOKENS = 2000; uint256 public MAX_PER_WALLET = 50; uint256 public CURRENT_TOKEN_ID = 0; // for testing string public BEGINNING_URI = "https://api.cryptodemonz.com/"; string public ENDING_URI = ".json"; bool public ALLOW_SACRIFCE = true; IDemonzv1 public demonzv1; constructor(address _demonzv1) ERC721 ("CryptoDemonzV2", "DEMONZv2") { } modifier safeSacrificing { } event tokenSacrificed(address _sender); /// @notice standard minting function /// @param _amount to be minted function mintToken(uint256 _amount) public onlyOwner { } /// @notice will mint demonzv2 for burning demonzv1 /// @param _ids array of demonzv1 ids to be burned function burnV1(uint256[] memory _ids) external safeSacrificing { uint256 i = 0; require(_ids.length % 3 == 0 && _ids.length <= 9, "Invalid list"); require(totalSupply() + _ids.length <= MAX_TOKENS, "Not enough NFTs left to mint"); require(balanceOf(msg.sender) + _ids.length <= MAX_PER_WALLET, "Exceeds wallet max allowed balance"); for (i=0; i<_ids.length; ++i) { require(<FILL_ME>) demonzv1.safeTransferFrom(msg.sender, address(this), _ids[i]); demonzv1.burnToken(_ids[i]); } _batchMint(_ids.length / 3, msg.sender); // no need to increment token id here emit tokenSacrificed(msg.sender); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function withdraw() external onlyOwner { } function setBeginningURI(string memory _new_uri) external onlyOwner { } function setEndingURI(string memory _new_uri) external onlyOwner { } function toggleSacrifice() external onlyOwner { } function changeMaxPerWalletAmount(uint256 _amount) external onlyOwner { } /// @notice dummy function for unit testing function _incrementTokenId() internal { } function _batchMint(uint256 _amount, address _sender) internal { } /// @notice dummy function for unit testing function getCurrentTokenId() view external returns (uint256) { } /// @dev DO NOT FORMAT THIS TO PURE, even tho compiler is asking function onERC721Received( address, address, uint256, bytes calldata ) external returns (bytes4) { } }
demonzv1.ownerOf(_ids[i])==msg.sender,"Sender is not owner"
57,645
demonzv1.ownerOf(_ids[i])==msg.sender
null
/** * @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. * * 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. */ 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 returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public 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 onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { } } /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } contract LPTokenWrapper is Initializable { using SafeMath for uint256; using SafeERC20 for IERC20; struct PairDesc { address gem; address adapter; address staker; uint256 factor; bytes32 name; } mapping(address => PairDesc) public pairDescs; address[] private registeredGems; uint256 public decimals = 18; uint256 public prec = 1e18; mapping(address => uint256) private _totalSupply; mapping(address => mapping(address => uint256)) private _amounts; mapping(address => mapping(address => uint256)) private _balances; IGemForRewardChecker public gemForRewardChecker; function checkGem(address gem) internal view returns (bool) { } function registerGem(address gem) internal { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function calcCheckValue(uint256 amount, address gem) public view returns (uint256) { } function stakeLp( uint256 amount, address gem, address usr ) internal { } function withdrawLp( uint256 amount, address gem, address usr ) internal { } } ////// src/rewardsDecayHolder.sol /* pragma solidity ^0.5.12; */ /* import "./IERC20.sol"; */ /* import "./safeMath.sol"; */ /* import "./safeERC20.sol"; */ interface IRewarder { function stake( address account, uint256 amount, address gem ) external; function withdraw( address account, uint256 amount, address gem ) external; } contract StakingRewardsDecayHolder { using SafeMath for uint256; using SafeERC20 for IERC20; IRewarder public rewarder; uint256 public withdrawErrorCount; mapping(address => mapping(address => uint256)) public amounts; event withdrawError(uint256 amount, address gem); constructor(address _rewarder) public { } function stake(uint256 amount, address gem) public { } function withdraw(uint256 amount, address gem) public { } } ////// src/rewardDecay.sol /* * MIT License * =========== * * Copyright (c) 2020 Freeliquid * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ /* pragma solidity ^0.5.12; */ /* import "./lpTokenWrapper.sol"; */ /* import "./rewardsDecayHolder.sol"; */ /* import "./lib.sol"; */ /* import "./ReentrancyGuard.sol"; */ contract StakingRewardsDecay is LPTokenWrapper, Auth, ReentrancyGuard { address public gov; address public aggregator; uint256 public totalRewards = 0; struct EpochData { mapping(address => uint256) userRewardPerTokenPaid; mapping(address => uint256) rewards; uint256 initreward; uint256 duration; uint256 starttime; uint256 periodFinish; uint256 rewardRate; uint256 lastUpdateTime; uint256 rewardPerTokenStored; uint256 lastTotalSupply; bool closed; } uint256 public EPOCHCOUNT = 0; uint256 public epochInited = 0; EpochData[] public epochs; mapping(bytes32 => address) public pairNameToGem; mapping(address => uint256) public lastClaimedEpoch; mapping(address => uint256) public yetNotClaimedOldEpochRewards; uint256 public currentEpoch; StakingRewardsDecayHolder public holder; event RewardAdded(uint256 reward, uint256 epoch, uint256 duration, uint256 starttime); event StopRewarding(); event Staked(address indexed user, address indexed gem, uint256 amount); event Withdrawn(address indexed user, address indexed gem, uint256 amount); event RewardTakeStock(address indexed user, uint256 reward, uint256 epoch); event RewardPaid(address indexed user, uint256 reward); constructor() public { } function initialize(address _gov, uint256 epochCount) public initializer { } function setupAggregator(address _aggregator) public { } function getStartTime() public view returns (uint256) { } modifier checkStart() { } function initRewardAmount( uint256 reward, uint256 starttime, uint256 duration, uint256 idx ) public { } function setupGemForRewardChecker(address a) public { } function initEpoch( uint256 reward, uint256 starttime, uint256 duration, uint256 idx ) internal { } function initAllEpochs( uint256[] memory rewards, uint256 starttime, uint256 duration ) public { } function getEpochRewardRate(uint256 epochIdx) public view returns (uint256) { } function getEpochStartTime(uint256 epochIdx) public view returns (uint256) { } function getEpochFinishTime(uint256 epochIdx) public view returns (uint256) { } function getTotalRewards() public view returns (uint256 result) { } function getTotalRewardTime() public view returns (uint256 result) { } function approveEpochsConsistency() public { require(deployer == msg.sender); require(epochInited == 0, "double call not allowed"); uint256 totalReward = epochs[0].initreward; require(<FILL_ME>) for (uint256 i = 1; i < EPOCHCOUNT; i++) { EpochData storage epoch = epochs[i]; require(epoch.starttime > 0); require(epoch.starttime == epochs[i - 1].periodFinish); totalReward = totalReward.add(epoch.initreward); } require(IERC20(gov).balanceOf(address(this)) >= totalReward, "GOV balance not enought"); epochInited = EPOCHCOUNT; } function resetDeployer() public { } function calcCurrentEpoch() public view returns (uint256 res) { } modifier updateCurrentEpoch() { } function registerPairDesc( address gem, address adapter, uint256 factor, bytes32 name ) public auth nonReentrant { } function getPairInfo(bytes32 name, address account) public view returns ( address gem, uint256 avail, uint256 locked, uint256 lockedValue, uint256 availValue ) { } function getPrice(bytes32 name) public view returns (uint256) { } function getRewardPerHour() public view returns (uint256) { } function lastTimeRewardApplicable(EpochData storage epoch) internal view returns (uint256) { } function rewardPerToken(EpochData storage epoch, uint256 lastTotalSupply) internal view returns (uint256) { } function earnedEpoch( address account, EpochData storage epoch, uint256 lastTotalSupply ) internal view returns (uint256) { } function earned(address account) public view returns (uint256 acc) { } function getRewardEpoch(address account, EpochData storage epoch) internal returns (uint256) { } function takeStockReward(address account) internal returns (uint256 acc) { } function gatherOldEpochReward(address account) internal { } function stakeEpoch( uint256 amount, address gem, address usr, EpochData storage epoch ) internal updateReward(usr, epoch) { } function stake( address account, uint256 amount, address gem ) public nonReentrant checkStart updateCurrentEpoch { } function withdrawEpoch( uint256 amount, address gem, address usr, EpochData storage epoch ) internal updateReward(usr, epoch) { } function withdraw( address account, uint256 amount, address gem ) public nonReentrant checkStart updateCurrentEpoch { } function getRewardCore(address account) internal checkStart updateCurrentEpoch updateReward(account, epochs[currentEpoch]) returns (uint256 acc) { } function getReward() public nonReentrant returns (uint256) { } function getRewardEx(address account) public nonReentrant returns (uint256) { } modifier updateReward(address account, EpochData storage epoch) { } } contract RewardDecayAggregator { using SafeMath for uint256; StakingRewardsDecay[2] public rewarders; constructor(address rewarder0, address rewarder1) public { } function claimReward() public { } function earned() public view returns (uint256 res) { } }
getStartTime()>0
57,678
getStartTime()>0
"GOV balance not enought"
/** * @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. * * 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. */ 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 returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public 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 onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { } } /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } contract LPTokenWrapper is Initializable { using SafeMath for uint256; using SafeERC20 for IERC20; struct PairDesc { address gem; address adapter; address staker; uint256 factor; bytes32 name; } mapping(address => PairDesc) public pairDescs; address[] private registeredGems; uint256 public decimals = 18; uint256 public prec = 1e18; mapping(address => uint256) private _totalSupply; mapping(address => mapping(address => uint256)) private _amounts; mapping(address => mapping(address => uint256)) private _balances; IGemForRewardChecker public gemForRewardChecker; function checkGem(address gem) internal view returns (bool) { } function registerGem(address gem) internal { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function calcCheckValue(uint256 amount, address gem) public view returns (uint256) { } function stakeLp( uint256 amount, address gem, address usr ) internal { } function withdrawLp( uint256 amount, address gem, address usr ) internal { } } ////// src/rewardsDecayHolder.sol /* pragma solidity ^0.5.12; */ /* import "./IERC20.sol"; */ /* import "./safeMath.sol"; */ /* import "./safeERC20.sol"; */ interface IRewarder { function stake( address account, uint256 amount, address gem ) external; function withdraw( address account, uint256 amount, address gem ) external; } contract StakingRewardsDecayHolder { using SafeMath for uint256; using SafeERC20 for IERC20; IRewarder public rewarder; uint256 public withdrawErrorCount; mapping(address => mapping(address => uint256)) public amounts; event withdrawError(uint256 amount, address gem); constructor(address _rewarder) public { } function stake(uint256 amount, address gem) public { } function withdraw(uint256 amount, address gem) public { } } ////// src/rewardDecay.sol /* * MIT License * =========== * * Copyright (c) 2020 Freeliquid * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ /* pragma solidity ^0.5.12; */ /* import "./lpTokenWrapper.sol"; */ /* import "./rewardsDecayHolder.sol"; */ /* import "./lib.sol"; */ /* import "./ReentrancyGuard.sol"; */ contract StakingRewardsDecay is LPTokenWrapper, Auth, ReentrancyGuard { address public gov; address public aggregator; uint256 public totalRewards = 0; struct EpochData { mapping(address => uint256) userRewardPerTokenPaid; mapping(address => uint256) rewards; uint256 initreward; uint256 duration; uint256 starttime; uint256 periodFinish; uint256 rewardRate; uint256 lastUpdateTime; uint256 rewardPerTokenStored; uint256 lastTotalSupply; bool closed; } uint256 public EPOCHCOUNT = 0; uint256 public epochInited = 0; EpochData[] public epochs; mapping(bytes32 => address) public pairNameToGem; mapping(address => uint256) public lastClaimedEpoch; mapping(address => uint256) public yetNotClaimedOldEpochRewards; uint256 public currentEpoch; StakingRewardsDecayHolder public holder; event RewardAdded(uint256 reward, uint256 epoch, uint256 duration, uint256 starttime); event StopRewarding(); event Staked(address indexed user, address indexed gem, uint256 amount); event Withdrawn(address indexed user, address indexed gem, uint256 amount); event RewardTakeStock(address indexed user, uint256 reward, uint256 epoch); event RewardPaid(address indexed user, uint256 reward); constructor() public { } function initialize(address _gov, uint256 epochCount) public initializer { } function setupAggregator(address _aggregator) public { } function getStartTime() public view returns (uint256) { } modifier checkStart() { } function initRewardAmount( uint256 reward, uint256 starttime, uint256 duration, uint256 idx ) public { } function setupGemForRewardChecker(address a) public { } function initEpoch( uint256 reward, uint256 starttime, uint256 duration, uint256 idx ) internal { } function initAllEpochs( uint256[] memory rewards, uint256 starttime, uint256 duration ) public { } function getEpochRewardRate(uint256 epochIdx) public view returns (uint256) { } function getEpochStartTime(uint256 epochIdx) public view returns (uint256) { } function getEpochFinishTime(uint256 epochIdx) public view returns (uint256) { } function getTotalRewards() public view returns (uint256 result) { } function getTotalRewardTime() public view returns (uint256 result) { } function approveEpochsConsistency() public { require(deployer == msg.sender); require(epochInited == 0, "double call not allowed"); uint256 totalReward = epochs[0].initreward; require(getStartTime() > 0); for (uint256 i = 1; i < EPOCHCOUNT; i++) { EpochData storage epoch = epochs[i]; require(epoch.starttime > 0); require(epoch.starttime == epochs[i - 1].periodFinish); totalReward = totalReward.add(epoch.initreward); } require(<FILL_ME>) epochInited = EPOCHCOUNT; } function resetDeployer() public { } function calcCurrentEpoch() public view returns (uint256 res) { } modifier updateCurrentEpoch() { } function registerPairDesc( address gem, address adapter, uint256 factor, bytes32 name ) public auth nonReentrant { } function getPairInfo(bytes32 name, address account) public view returns ( address gem, uint256 avail, uint256 locked, uint256 lockedValue, uint256 availValue ) { } function getPrice(bytes32 name) public view returns (uint256) { } function getRewardPerHour() public view returns (uint256) { } function lastTimeRewardApplicable(EpochData storage epoch) internal view returns (uint256) { } function rewardPerToken(EpochData storage epoch, uint256 lastTotalSupply) internal view returns (uint256) { } function earnedEpoch( address account, EpochData storage epoch, uint256 lastTotalSupply ) internal view returns (uint256) { } function earned(address account) public view returns (uint256 acc) { } function getRewardEpoch(address account, EpochData storage epoch) internal returns (uint256) { } function takeStockReward(address account) internal returns (uint256 acc) { } function gatherOldEpochReward(address account) internal { } function stakeEpoch( uint256 amount, address gem, address usr, EpochData storage epoch ) internal updateReward(usr, epoch) { } function stake( address account, uint256 amount, address gem ) public nonReentrant checkStart updateCurrentEpoch { } function withdrawEpoch( uint256 amount, address gem, address usr, EpochData storage epoch ) internal updateReward(usr, epoch) { } function withdraw( address account, uint256 amount, address gem ) public nonReentrant checkStart updateCurrentEpoch { } function getRewardCore(address account) internal checkStart updateCurrentEpoch updateReward(account, epochs[currentEpoch]) returns (uint256 acc) { } function getReward() public nonReentrant returns (uint256) { } function getRewardEx(address account) public nonReentrant returns (uint256) { } modifier updateReward(address account, EpochData storage epoch) { } } contract RewardDecayAggregator { using SafeMath for uint256; StakingRewardsDecay[2] public rewarders; constructor(address rewarder0, address rewarder1) public { } function claimReward() public { } function earned() public view returns (uint256 res) { } }
IERC20(gov).balanceOf(address(this))>=totalReward,"GOV balance not enought"
57,678
IERC20(gov).balanceOf(address(this))>=totalReward
"bad gem"
/** * @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. * * 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. */ 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 returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public 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 onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { } } /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } contract LPTokenWrapper is Initializable { using SafeMath for uint256; using SafeERC20 for IERC20; struct PairDesc { address gem; address adapter; address staker; uint256 factor; bytes32 name; } mapping(address => PairDesc) public pairDescs; address[] private registeredGems; uint256 public decimals = 18; uint256 public prec = 1e18; mapping(address => uint256) private _totalSupply; mapping(address => mapping(address => uint256)) private _amounts; mapping(address => mapping(address => uint256)) private _balances; IGemForRewardChecker public gemForRewardChecker; function checkGem(address gem) internal view returns (bool) { } function registerGem(address gem) internal { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function calcCheckValue(uint256 amount, address gem) public view returns (uint256) { } function stakeLp( uint256 amount, address gem, address usr ) internal { } function withdrawLp( uint256 amount, address gem, address usr ) internal { } } ////// src/rewardsDecayHolder.sol /* pragma solidity ^0.5.12; */ /* import "./IERC20.sol"; */ /* import "./safeMath.sol"; */ /* import "./safeERC20.sol"; */ interface IRewarder { function stake( address account, uint256 amount, address gem ) external; function withdraw( address account, uint256 amount, address gem ) external; } contract StakingRewardsDecayHolder { using SafeMath for uint256; using SafeERC20 for IERC20; IRewarder public rewarder; uint256 public withdrawErrorCount; mapping(address => mapping(address => uint256)) public amounts; event withdrawError(uint256 amount, address gem); constructor(address _rewarder) public { } function stake(uint256 amount, address gem) public { } function withdraw(uint256 amount, address gem) public { } } ////// src/rewardDecay.sol /* * MIT License * =========== * * Copyright (c) 2020 Freeliquid * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ /* pragma solidity ^0.5.12; */ /* import "./lpTokenWrapper.sol"; */ /* import "./rewardsDecayHolder.sol"; */ /* import "./lib.sol"; */ /* import "./ReentrancyGuard.sol"; */ contract StakingRewardsDecay is LPTokenWrapper, Auth, ReentrancyGuard { address public gov; address public aggregator; uint256 public totalRewards = 0; struct EpochData { mapping(address => uint256) userRewardPerTokenPaid; mapping(address => uint256) rewards; uint256 initreward; uint256 duration; uint256 starttime; uint256 periodFinish; uint256 rewardRate; uint256 lastUpdateTime; uint256 rewardPerTokenStored; uint256 lastTotalSupply; bool closed; } uint256 public EPOCHCOUNT = 0; uint256 public epochInited = 0; EpochData[] public epochs; mapping(bytes32 => address) public pairNameToGem; mapping(address => uint256) public lastClaimedEpoch; mapping(address => uint256) public yetNotClaimedOldEpochRewards; uint256 public currentEpoch; StakingRewardsDecayHolder public holder; event RewardAdded(uint256 reward, uint256 epoch, uint256 duration, uint256 starttime); event StopRewarding(); event Staked(address indexed user, address indexed gem, uint256 amount); event Withdrawn(address indexed user, address indexed gem, uint256 amount); event RewardTakeStock(address indexed user, uint256 reward, uint256 epoch); event RewardPaid(address indexed user, uint256 reward); constructor() public { } function initialize(address _gov, uint256 epochCount) public initializer { } function setupAggregator(address _aggregator) public { } function getStartTime() public view returns (uint256) { } modifier checkStart() { } function initRewardAmount( uint256 reward, uint256 starttime, uint256 duration, uint256 idx ) public { } function setupGemForRewardChecker(address a) public { } function initEpoch( uint256 reward, uint256 starttime, uint256 duration, uint256 idx ) internal { } function initAllEpochs( uint256[] memory rewards, uint256 starttime, uint256 duration ) public { } function getEpochRewardRate(uint256 epochIdx) public view returns (uint256) { } function getEpochStartTime(uint256 epochIdx) public view returns (uint256) { } function getEpochFinishTime(uint256 epochIdx) public view returns (uint256) { } function getTotalRewards() public view returns (uint256 result) { } function getTotalRewardTime() public view returns (uint256 result) { } function approveEpochsConsistency() public { } function resetDeployer() public { } function calcCurrentEpoch() public view returns (uint256 res) { } modifier updateCurrentEpoch() { } function registerPairDesc( address gem, address adapter, uint256 factor, bytes32 name ) public auth nonReentrant { require(gem != address(0x0), "gem is null"); require(adapter != address(0x0), "adapter is null"); require(<FILL_ME>) require(pairNameToGem[name] == address(0) || pairNameToGem[name] == gem, "duplicate name"); if (pairDescs[gem].name != "") { delete pairNameToGem[pairDescs[gem].name]; } registerGem(gem); pairDescs[gem] = PairDesc({ gem: gem, adapter: adapter, factor: factor, staker: address(0), name: name }); pairNameToGem[name] = gem; } function getPairInfo(bytes32 name, address account) public view returns ( address gem, uint256 avail, uint256 locked, uint256 lockedValue, uint256 availValue ) { } function getPrice(bytes32 name) public view returns (uint256) { } function getRewardPerHour() public view returns (uint256) { } function lastTimeRewardApplicable(EpochData storage epoch) internal view returns (uint256) { } function rewardPerToken(EpochData storage epoch, uint256 lastTotalSupply) internal view returns (uint256) { } function earnedEpoch( address account, EpochData storage epoch, uint256 lastTotalSupply ) internal view returns (uint256) { } function earned(address account) public view returns (uint256 acc) { } function getRewardEpoch(address account, EpochData storage epoch) internal returns (uint256) { } function takeStockReward(address account) internal returns (uint256 acc) { } function gatherOldEpochReward(address account) internal { } function stakeEpoch( uint256 amount, address gem, address usr, EpochData storage epoch ) internal updateReward(usr, epoch) { } function stake( address account, uint256 amount, address gem ) public nonReentrant checkStart updateCurrentEpoch { } function withdrawEpoch( uint256 amount, address gem, address usr, EpochData storage epoch ) internal updateReward(usr, epoch) { } function withdraw( address account, uint256 amount, address gem ) public nonReentrant checkStart updateCurrentEpoch { } function getRewardCore(address account) internal checkStart updateCurrentEpoch updateReward(account, epochs[currentEpoch]) returns (uint256 acc) { } function getReward() public nonReentrant returns (uint256) { } function getRewardEx(address account) public nonReentrant returns (uint256) { } modifier updateReward(address account, EpochData storage epoch) { } } contract RewardDecayAggregator { using SafeMath for uint256; StakingRewardsDecay[2] public rewarders; constructor(address rewarder0, address rewarder1) public { } function claimReward() public { } function earned() public view returns (uint256 res) { } }
checkGem(gem),"bad gem"
57,678
checkGem(gem)
"duplicate name"
/** * @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. * * 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. */ 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 returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public 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 onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { } } /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } contract LPTokenWrapper is Initializable { using SafeMath for uint256; using SafeERC20 for IERC20; struct PairDesc { address gem; address adapter; address staker; uint256 factor; bytes32 name; } mapping(address => PairDesc) public pairDescs; address[] private registeredGems; uint256 public decimals = 18; uint256 public prec = 1e18; mapping(address => uint256) private _totalSupply; mapping(address => mapping(address => uint256)) private _amounts; mapping(address => mapping(address => uint256)) private _balances; IGemForRewardChecker public gemForRewardChecker; function checkGem(address gem) internal view returns (bool) { } function registerGem(address gem) internal { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function calcCheckValue(uint256 amount, address gem) public view returns (uint256) { } function stakeLp( uint256 amount, address gem, address usr ) internal { } function withdrawLp( uint256 amount, address gem, address usr ) internal { } } ////// src/rewardsDecayHolder.sol /* pragma solidity ^0.5.12; */ /* import "./IERC20.sol"; */ /* import "./safeMath.sol"; */ /* import "./safeERC20.sol"; */ interface IRewarder { function stake( address account, uint256 amount, address gem ) external; function withdraw( address account, uint256 amount, address gem ) external; } contract StakingRewardsDecayHolder { using SafeMath for uint256; using SafeERC20 for IERC20; IRewarder public rewarder; uint256 public withdrawErrorCount; mapping(address => mapping(address => uint256)) public amounts; event withdrawError(uint256 amount, address gem); constructor(address _rewarder) public { } function stake(uint256 amount, address gem) public { } function withdraw(uint256 amount, address gem) public { } } ////// src/rewardDecay.sol /* * MIT License * =========== * * Copyright (c) 2020 Freeliquid * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ /* pragma solidity ^0.5.12; */ /* import "./lpTokenWrapper.sol"; */ /* import "./rewardsDecayHolder.sol"; */ /* import "./lib.sol"; */ /* import "./ReentrancyGuard.sol"; */ contract StakingRewardsDecay is LPTokenWrapper, Auth, ReentrancyGuard { address public gov; address public aggregator; uint256 public totalRewards = 0; struct EpochData { mapping(address => uint256) userRewardPerTokenPaid; mapping(address => uint256) rewards; uint256 initreward; uint256 duration; uint256 starttime; uint256 periodFinish; uint256 rewardRate; uint256 lastUpdateTime; uint256 rewardPerTokenStored; uint256 lastTotalSupply; bool closed; } uint256 public EPOCHCOUNT = 0; uint256 public epochInited = 0; EpochData[] public epochs; mapping(bytes32 => address) public pairNameToGem; mapping(address => uint256) public lastClaimedEpoch; mapping(address => uint256) public yetNotClaimedOldEpochRewards; uint256 public currentEpoch; StakingRewardsDecayHolder public holder; event RewardAdded(uint256 reward, uint256 epoch, uint256 duration, uint256 starttime); event StopRewarding(); event Staked(address indexed user, address indexed gem, uint256 amount); event Withdrawn(address indexed user, address indexed gem, uint256 amount); event RewardTakeStock(address indexed user, uint256 reward, uint256 epoch); event RewardPaid(address indexed user, uint256 reward); constructor() public { } function initialize(address _gov, uint256 epochCount) public initializer { } function setupAggregator(address _aggregator) public { } function getStartTime() public view returns (uint256) { } modifier checkStart() { } function initRewardAmount( uint256 reward, uint256 starttime, uint256 duration, uint256 idx ) public { } function setupGemForRewardChecker(address a) public { } function initEpoch( uint256 reward, uint256 starttime, uint256 duration, uint256 idx ) internal { } function initAllEpochs( uint256[] memory rewards, uint256 starttime, uint256 duration ) public { } function getEpochRewardRate(uint256 epochIdx) public view returns (uint256) { } function getEpochStartTime(uint256 epochIdx) public view returns (uint256) { } function getEpochFinishTime(uint256 epochIdx) public view returns (uint256) { } function getTotalRewards() public view returns (uint256 result) { } function getTotalRewardTime() public view returns (uint256 result) { } function approveEpochsConsistency() public { } function resetDeployer() public { } function calcCurrentEpoch() public view returns (uint256 res) { } modifier updateCurrentEpoch() { } function registerPairDesc( address gem, address adapter, uint256 factor, bytes32 name ) public auth nonReentrant { require(gem != address(0x0), "gem is null"); require(adapter != address(0x0), "adapter is null"); require(checkGem(gem), "bad gem"); require(<FILL_ME>) if (pairDescs[gem].name != "") { delete pairNameToGem[pairDescs[gem].name]; } registerGem(gem); pairDescs[gem] = PairDesc({ gem: gem, adapter: adapter, factor: factor, staker: address(0), name: name }); pairNameToGem[name] = gem; } function getPairInfo(bytes32 name, address account) public view returns ( address gem, uint256 avail, uint256 locked, uint256 lockedValue, uint256 availValue ) { } function getPrice(bytes32 name) public view returns (uint256) { } function getRewardPerHour() public view returns (uint256) { } function lastTimeRewardApplicable(EpochData storage epoch) internal view returns (uint256) { } function rewardPerToken(EpochData storage epoch, uint256 lastTotalSupply) internal view returns (uint256) { } function earnedEpoch( address account, EpochData storage epoch, uint256 lastTotalSupply ) internal view returns (uint256) { } function earned(address account) public view returns (uint256 acc) { } function getRewardEpoch(address account, EpochData storage epoch) internal returns (uint256) { } function takeStockReward(address account) internal returns (uint256 acc) { } function gatherOldEpochReward(address account) internal { } function stakeEpoch( uint256 amount, address gem, address usr, EpochData storage epoch ) internal updateReward(usr, epoch) { } function stake( address account, uint256 amount, address gem ) public nonReentrant checkStart updateCurrentEpoch { } function withdrawEpoch( uint256 amount, address gem, address usr, EpochData storage epoch ) internal updateReward(usr, epoch) { } function withdraw( address account, uint256 amount, address gem ) public nonReentrant checkStart updateCurrentEpoch { } function getRewardCore(address account) internal checkStart updateCurrentEpoch updateReward(account, epochs[currentEpoch]) returns (uint256 acc) { } function getReward() public nonReentrant returns (uint256) { } function getRewardEx(address account) public nonReentrant returns (uint256) { } modifier updateReward(address account, EpochData storage epoch) { } } contract RewardDecayAggregator { using SafeMath for uint256; StakingRewardsDecay[2] public rewarders; constructor(address rewarder0, address rewarder1) public { } function claimReward() public { } function earned() public view returns (uint256 res) { } }
pairNameToGem[name]==address(0)||pairNameToGem[name]==gem,"duplicate name"
57,678
pairNameToGem[name]==address(0)||pairNameToGem[name]==gem
null
/** * @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. * * 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. */ 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 returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public 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 onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { } } /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } contract LPTokenWrapper is Initializable { using SafeMath for uint256; using SafeERC20 for IERC20; struct PairDesc { address gem; address adapter; address staker; uint256 factor; bytes32 name; } mapping(address => PairDesc) public pairDescs; address[] private registeredGems; uint256 public decimals = 18; uint256 public prec = 1e18; mapping(address => uint256) private _totalSupply; mapping(address => mapping(address => uint256)) private _amounts; mapping(address => mapping(address => uint256)) private _balances; IGemForRewardChecker public gemForRewardChecker; function checkGem(address gem) internal view returns (bool) { } function registerGem(address gem) internal { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function calcCheckValue(uint256 amount, address gem) public view returns (uint256) { } function stakeLp( uint256 amount, address gem, address usr ) internal { } function withdrawLp( uint256 amount, address gem, address usr ) internal { } } ////// src/rewardsDecayHolder.sol /* pragma solidity ^0.5.12; */ /* import "./IERC20.sol"; */ /* import "./safeMath.sol"; */ /* import "./safeERC20.sol"; */ interface IRewarder { function stake( address account, uint256 amount, address gem ) external; function withdraw( address account, uint256 amount, address gem ) external; } contract StakingRewardsDecayHolder { using SafeMath for uint256; using SafeERC20 for IERC20; IRewarder public rewarder; uint256 public withdrawErrorCount; mapping(address => mapping(address => uint256)) public amounts; event withdrawError(uint256 amount, address gem); constructor(address _rewarder) public { } function stake(uint256 amount, address gem) public { } function withdraw(uint256 amount, address gem) public { } } ////// src/rewardDecay.sol /* * MIT License * =========== * * Copyright (c) 2020 Freeliquid * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE */ /* pragma solidity ^0.5.12; */ /* import "./lpTokenWrapper.sol"; */ /* import "./rewardsDecayHolder.sol"; */ /* import "./lib.sol"; */ /* import "./ReentrancyGuard.sol"; */ contract StakingRewardsDecay is LPTokenWrapper, Auth, ReentrancyGuard { address public gov; address public aggregator; uint256 public totalRewards = 0; struct EpochData { mapping(address => uint256) userRewardPerTokenPaid; mapping(address => uint256) rewards; uint256 initreward; uint256 duration; uint256 starttime; uint256 periodFinish; uint256 rewardRate; uint256 lastUpdateTime; uint256 rewardPerTokenStored; uint256 lastTotalSupply; bool closed; } uint256 public EPOCHCOUNT = 0; uint256 public epochInited = 0; EpochData[] public epochs; mapping(bytes32 => address) public pairNameToGem; mapping(address => uint256) public lastClaimedEpoch; mapping(address => uint256) public yetNotClaimedOldEpochRewards; uint256 public currentEpoch; StakingRewardsDecayHolder public holder; event RewardAdded(uint256 reward, uint256 epoch, uint256 duration, uint256 starttime); event StopRewarding(); event Staked(address indexed user, address indexed gem, uint256 amount); event Withdrawn(address indexed user, address indexed gem, uint256 amount); event RewardTakeStock(address indexed user, uint256 reward, uint256 epoch); event RewardPaid(address indexed user, uint256 reward); constructor() public { } function initialize(address _gov, uint256 epochCount) public initializer { } function setupAggregator(address _aggregator) public { } function getStartTime() public view returns (uint256) { } modifier checkStart() { } function initRewardAmount( uint256 reward, uint256 starttime, uint256 duration, uint256 idx ) public { } function setupGemForRewardChecker(address a) public { } function initEpoch( uint256 reward, uint256 starttime, uint256 duration, uint256 idx ) internal { } function initAllEpochs( uint256[] memory rewards, uint256 starttime, uint256 duration ) public { } function getEpochRewardRate(uint256 epochIdx) public view returns (uint256) { } function getEpochStartTime(uint256 epochIdx) public view returns (uint256) { } function getEpochFinishTime(uint256 epochIdx) public view returns (uint256) { } function getTotalRewards() public view returns (uint256 result) { } function getTotalRewardTime() public view returns (uint256 result) { } function approveEpochsConsistency() public { } function resetDeployer() public { } function calcCurrentEpoch() public view returns (uint256 res) { } modifier updateCurrentEpoch() { } function registerPairDesc( address gem, address adapter, uint256 factor, bytes32 name ) public auth nonReentrant { } function getPairInfo(bytes32 name, address account) public view returns ( address gem, uint256 avail, uint256 locked, uint256 lockedValue, uint256 availValue ) { } function getPrice(bytes32 name) public view returns (uint256) { } function getRewardPerHour() public view returns (uint256) { } function lastTimeRewardApplicable(EpochData storage epoch) internal view returns (uint256) { } function rewardPerToken(EpochData storage epoch, uint256 lastTotalSupply) internal view returns (uint256) { } function earnedEpoch( address account, EpochData storage epoch, uint256 lastTotalSupply ) internal view returns (uint256) { } function earned(address account) public view returns (uint256 acc) { } function getRewardEpoch(address account, EpochData storage epoch) internal returns (uint256) { } function takeStockReward(address account) internal returns (uint256 acc) { } function gatherOldEpochReward(address account) internal { } function stakeEpoch( uint256 amount, address gem, address usr, EpochData storage epoch ) internal updateReward(usr, epoch) { } function stake( address account, uint256 amount, address gem ) public nonReentrant checkStart updateCurrentEpoch { require(<FILL_ME>) assert(amount > 0); stakeEpoch(amount, gem, account, epochs[currentEpoch]); } function withdrawEpoch( uint256 amount, address gem, address usr, EpochData storage epoch ) internal updateReward(usr, epoch) { } function withdraw( address account, uint256 amount, address gem ) public nonReentrant checkStart updateCurrentEpoch { } function getRewardCore(address account) internal checkStart updateCurrentEpoch updateReward(account, epochs[currentEpoch]) returns (uint256 acc) { } function getReward() public nonReentrant returns (uint256) { } function getRewardEx(address account) public nonReentrant returns (uint256) { } modifier updateReward(address account, EpochData storage epoch) { } } contract RewardDecayAggregator { using SafeMath for uint256; StakingRewardsDecay[2] public rewarders; constructor(address rewarder0, address rewarder1) public { } function claimReward() public { } function earned() public view returns (uint256 res) { } }
address(holder)==msg.sender
57,678
address(holder)==msg.sender
null
pragma solidity ^0.4.23; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns(uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns(uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns(uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns(uint256 c) { } } contract Ownable { address public owner; constructor() public { } modifier onlyOwner() { } function transferOwnership(address newOwner) public onlyOwner { } function withdrawAll() public onlyOwner{ } function withdrawPart(address _to,uint256 _percent) public onlyOwner{ } } contract Pausable is Ownable { bool public paused = false; modifier whenNotPaused() { } modifier whenPaused { } function pause() public onlyOwner whenNotPaused returns(bool) { } function unpause() public onlyOwner whenPaused returns(bool) { } } contract WWC is Pausable { string[33] public teams = [ "", "Egypt", // 1 "Morocco", // 2 "Nigeria", // 3 "Senegal", // 4 "Tunisia", // 5 "Australia", // 6 "IR Iran", // 7 "Japan", // 8 "Korea Republic", // 9 "Saudi Arabia", // 10 "Belgium", // 11 "Croatia", // 12 "Denmark", // 13 "England", // 14 "France", // 15 "Germany", // 16 "Iceland", // 17 "Poland", // 18 "Portugal", // 19 "Russia", // 20 "Serbia", // 21 "Spain", // 22 "Sweden", // 23 "Switzerland", // 24 "Costa Rica", // 25 "Mexico", // 26 "Panama", // 27 "Argentina", // 28 "Brazil", // 29 "Colombia", // 30 "Peru", // 31 "Uruguay" // 32 ]; } contract Champion is WWC { event VoteSuccessful(address user,uint256 team, uint256 amount); using SafeMath for uint256; struct Vote { mapping(address => uint256) amounts; uint256 totalAmount; address[] users; mapping(address => uint256) weightedAmounts; uint256 weightedTotalAmount; } uint256 public pool; Vote[33] votes; uint256 public voteCut = 5; uint256 public poolCut = 30; uint256 public teamWon; uint256 public voteStopped; uint256 public minVote = 0.05 ether; uint256 public voteWeight = 4; mapping(address=>uint256) public alreadyWithdraw; modifier validTeam(uint256 _teamno) { } function setVoteWeight(uint256 _w) public onlyOwner{ } function setMinVote(uint256 _min) public onlyOwner{ } function setVoteCut(uint256 _cut) public onlyOwner{ } function setPoolCut(uint256 _cut) public onlyOwner{ } function getVoteOf(uint256 _team) validTeam(_team) public view returns( uint256 totalUsers, uint256 totalAmount, uint256 meAmount, uint256 meWeightedAmount ) { } function voteFor(uint256 _team) validTeam(_team) public payable whenNotPaused { } function userVoteFor(address _user, uint256 _team, uint256 _amount) internal{ } function stopVote() public onlyOwner { } function setWonTeam(uint256 _team) validTeam(_team) public onlyOwner{ } function myBonus() public view returns(uint256 _bonus,bool _isTaken){ } function bonusAmount(uint256 _team, address _who) internal view returns(uint256) { } function withdrawBonus() public whenNotPaused{ require(teamWon>0); require(<FILL_ME>) alreadyWithdraw[msg.sender] = 1; uint256 _amount = bonusAmount(teamWon,msg.sender); require(_amount<=address(this).balance); if(_amount>0){ msg.sender.transfer(_amount); } } }
alreadyWithdraw[msg.sender]==0
57,703
alreadyWithdraw[msg.sender]==0
"RefundableCrowdsale: not finalized"
/** * @title RefundableCrowdsale * @dev Extension of `FinalizableCrowdsale` contract that adds a funding goal, and the possibility of users * getting a refund if goal is not met. * * Deprecated, use `RefundablePostDeliveryCrowdsale` instead. Note that if you allow tokens to be traded before the goal * is met, then an attack is possible in which the attacker purchases tokens from the crowdsale and when they sees that * the goal is unlikely to be met, they sell their tokens (possibly at a discount). The attacker will be refunded when * the crowdsale is finalized, and the users that purchased from them will be left with worthless tokens. */ contract RefundableCrowdsale is Context, FinalizableCrowdsale { using SafeMath for uint256; // minimum amount of funds to be raised in weis uint256 private _goal; // refund escrow used to hold funds while crowdsale is running RefundEscrow private _escrow; /** * @dev Constructor, creates RefundEscrow. * @param goal Funding goal */ constructor (uint256 goal) public { } /** * @return minimum amount of funds to be raised in wei. */ function goal() public view returns (uint256) { } /** * @dev Investors can claim refunds here if crowdsale is unsuccessful. * @param refundee Whose refund will be claimed. */ function claimRefund(address payable refundee) public { require(<FILL_ME>) require(!goalReached(), "RefundableCrowdsale: goal reached"); _escrow.withdraw(refundee); } /** * @dev Checks whether funding goal was reached. * @return Whether funding goal was reached */ function goalReached() public view returns (bool) { } /** * @dev Escrow finalization task, called when finalize() is called. */ function _finalization() internal { } /** * @dev Overrides Crowdsale fund forwarding, sending funds to escrow. */ function _forwardFunds() internal { } }
finalized(),"RefundableCrowdsale: not finalized"
57,718
finalized()
"Bank account dont exist!"
// SPDX-License-Identifier: BSD-3-Clause pragma solidity 0.6.8; import "./SafeMath.sol"; contract Bank { struct Account { uint amount; uint received; uint percentage; bool exists; } uint internal constant ENTRY_ENABLED = 1; uint internal constant ENTRY_DISABLED = 2; mapping(address => Account) internal accountStorage; mapping(uint => address) internal accountLookup; mapping(uint => uint) internal agreementAmount; uint internal reentry_status; uint internal totalHolders; uint internal systemBalance = 0; using SafeMath for uint; modifier hasAccount(address _account) { require(<FILL_ME>) _; } modifier blockReEntry() { } function initiateDistribute() external hasAccount(msg.sender) { } function distribute(uint _amount) internal returns (uint) { } function deposit(address _to, uint _amount) internal hasAccount(_to) { } receive() external payable blockReEntry() { } function getSystemBalance() external view hasAccount(msg.sender) returns (uint) { } function getBalance() external view hasAccount(msg.sender) returns (uint) { } function getReceived() external view hasAccount(msg.sender) returns (uint) { } function withdraw(uint _amount) external payable hasAccount(msg.sender) blockReEntry() { } function withdrawTo(address payable _to, uint _amount) external hasAccount(msg.sender) blockReEntry() { } function subPercentage(address _addr, uint _percentage) internal hasAccount(_addr) { } function addPercentage(address _addr, uint _percentage) internal hasAccount(_addr) { } function getPercentage() external view hasAccount(msg.sender) returns (uint) { } function validateBalance() external hasAccount(msg.sender) returns (uint) { } function createAccount(address _addr, uint _amount, uint _percentage, uint _agreementAmount) internal { } function deleteAccount(address _addr, address _to) internal hasAccount(_addr) { } }
accountStorage[_account].exists,"Bank account dont exist!"
57,725
accountStorage[_account].exists
"Not enough funds"
// SPDX-License-Identifier: BSD-3-Clause pragma solidity 0.6.8; import "./SafeMath.sol"; contract Bank { struct Account { uint amount; uint received; uint percentage; bool exists; } uint internal constant ENTRY_ENABLED = 1; uint internal constant ENTRY_DISABLED = 2; mapping(address => Account) internal accountStorage; mapping(uint => address) internal accountLookup; mapping(uint => uint) internal agreementAmount; uint internal reentry_status; uint internal totalHolders; uint internal systemBalance = 0; using SafeMath for uint; modifier hasAccount(address _account) { } modifier blockReEntry() { } function initiateDistribute() external hasAccount(msg.sender) { } function distribute(uint _amount) internal returns (uint) { } function deposit(address _to, uint _amount) internal hasAccount(_to) { } receive() external payable blockReEntry() { } function getSystemBalance() external view hasAccount(msg.sender) returns (uint) { } function getBalance() external view hasAccount(msg.sender) returns (uint) { } function getReceived() external view hasAccount(msg.sender) returns (uint) { } function withdraw(uint _amount) external payable hasAccount(msg.sender) blockReEntry() { require(<FILL_ME>) accountStorage[msg.sender].amount = accountStorage[msg.sender].amount.sub(_amount); accountStorage[msg.sender].received = accountStorage[msg.sender].received.add(_amount); (bool success, ) = msg.sender.call{ value: _amount }(""); require(success, "Transfer failed"); } function withdrawTo(address payable _to, uint _amount) external hasAccount(msg.sender) blockReEntry() { } function subPercentage(address _addr, uint _percentage) internal hasAccount(_addr) { } function addPercentage(address _addr, uint _percentage) internal hasAccount(_addr) { } function getPercentage() external view hasAccount(msg.sender) returns (uint) { } function validateBalance() external hasAccount(msg.sender) returns (uint) { } function createAccount(address _addr, uint _amount, uint _percentage, uint _agreementAmount) internal { } function deleteAccount(address _addr, address _to) internal hasAccount(_addr) { } }
accountStorage[msg.sender].amount>=_amount&&_amount>0,"Not enough funds"
57,725
accountStorage[msg.sender].amount>=_amount&&_amount>0
"withdraw already succeeded"
// SPDX-License-Identifier: GPL-3.0-only pragma solidity 0.8.9; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./libraries/PbPool.sol"; import "./Signers.sol"; import "./Pauser.sol"; // add liquidity and withdraw // withdraw can be used by user or liquidity provider interface IWETH { function withdraw(uint256) external; } contract Pool is Signers, ReentrancyGuard, Pauser { using SafeERC20 for IERC20; uint64 public addseq; // ensure unique LiquidityAdded event, start from 1 mapping(address => uint256) public minAdd; // add _amount must > minAdd // map of successful withdraws, if true means already withdrew money or added to delayedTransfers mapping(bytes32 => bool) public withdraws; uint256 public epochLength; // seconds mapping(address => uint256) public epochVolumes; // key is token mapping(address => uint256) public epochVolumeCaps; // key is token mapping(address => uint256) public lastOpTimestamps; // key is token struct delayedTransfer { address receiver; address token; uint256 amount; uint256 timestamp; } mapping(bytes32 => delayedTransfer) public delayedTransfers; mapping(address => uint256) public delayThresholds; uint256 public delayPeriod; // in seconds // erc20 wrap of gas token of this chain, eg. WETH, when relay ie. pay out, // if request.token equals this, will withdraw and send native token to receiver // note we don't check whether it's zero address. when this isn't set, and request.token // is all 0 address, guarantee fail address public nativeWrap; mapping(address => bool) public governors; // liquidity events event LiquidityAdded( uint64 seqnum, address provider, address token, uint256 amount // how many tokens were added ); event WithdrawDone( bytes32 withdrawId, uint64 seqnum, address receiver, address token, uint256 amount, bytes32 refid ); event DelayedTransferAdded(bytes32 id); event DelayedTransferExecuted(bytes32 id, address receiver, address token, uint256 amount); // gov events event GovernorAdded(address account); event GovernorRemoved(address account); event EpochLengthUpdated(uint256 length); event EpochVolumeUpdated(address token, uint256 cap); event DelayPeriodUpdated(uint256 period); event DelayThresholdUpdated(address token, uint256 threshold); event MinAddUpdated(address token, uint256 amount); constructor() { } function addLiquidity(address _token, uint256 _amount) external nonReentrant whenNotPaused { } function withdraw( bytes calldata _wdmsg, bytes[] calldata _sigs, address[] calldata _signers, uint256[] calldata _powers ) external whenNotPaused { verifySigs(_wdmsg, _sigs, _signers, _powers); // decode and check wdmsg PbPool.WithdrawMsg memory wdmsg = PbPool.decWithdrawMsg(_wdmsg); require(wdmsg.chainid == block.chainid, "dst chainId mismatch"); bytes32 wdId = keccak256( abi.encodePacked(wdmsg.chainid, wdmsg.seqnum, wdmsg.receiver, wdmsg.token, wdmsg.amount) ); require(<FILL_ME>) withdraws[wdId] = true; updateVolume(wdmsg.token, wdmsg.amount); uint256 delayThreshold = delayThresholds[wdmsg.token]; if (delayThreshold > 0 && wdmsg.amount > delayThreshold) { addDelayedTransfer(wdId, wdmsg.receiver, wdmsg.token, wdmsg.amount); } else { IERC20(wdmsg.token).safeTransfer(wdmsg.receiver, wdmsg.amount); } emit WithdrawDone(wdId, wdmsg.seqnum, wdmsg.receiver, wdmsg.token, wdmsg.amount, wdmsg.refid); } function executeDelayedTransfer(bytes32 id) external whenNotPaused { } function setEpochLength(uint256 _length) external onlyGovernor { } function setEpochVolumeCaps(address[] calldata _tokens, uint256[] calldata _caps) external onlyGovernor { } function setDelayThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external onlyGovernor { } function setDelayPeriod(uint256 _period) external onlyGovernor { } function setMinAdd(address[] calldata _tokens, uint256[] calldata _amounts) external onlyGovernor { } function updateVolume(address _token, uint256 _amount) internal { } function addDelayedTransfer( bytes32 id, address receiver, address token, uint256 amount ) internal { } // set nativeWrap, for relay requests, if token == nativeWrap, will withdraw first then transfer native to receiver function setWrap(address _weth) external onlyOwner { } modifier onlyGovernor() { } function isGovernor(address _account) public view returns (bool) { } function addGovener(address _account) public onlyOwner { } function removeGovener(address _account) public onlyOwner { } function renounceGovener() public { } function _addGovernor(address _account) private { } function _removeGovernor(address _account) private { } }
withdraws[wdId]==false,"withdraw already succeeded"
57,738
withdraws[wdId]==false
"Caller is not governor"
// SPDX-License-Identifier: GPL-3.0-only pragma solidity 0.8.9; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./libraries/PbPool.sol"; import "./Signers.sol"; import "./Pauser.sol"; // add liquidity and withdraw // withdraw can be used by user or liquidity provider interface IWETH { function withdraw(uint256) external; } contract Pool is Signers, ReentrancyGuard, Pauser { using SafeERC20 for IERC20; uint64 public addseq; // ensure unique LiquidityAdded event, start from 1 mapping(address => uint256) public minAdd; // add _amount must > minAdd // map of successful withdraws, if true means already withdrew money or added to delayedTransfers mapping(bytes32 => bool) public withdraws; uint256 public epochLength; // seconds mapping(address => uint256) public epochVolumes; // key is token mapping(address => uint256) public epochVolumeCaps; // key is token mapping(address => uint256) public lastOpTimestamps; // key is token struct delayedTransfer { address receiver; address token; uint256 amount; uint256 timestamp; } mapping(bytes32 => delayedTransfer) public delayedTransfers; mapping(address => uint256) public delayThresholds; uint256 public delayPeriod; // in seconds // erc20 wrap of gas token of this chain, eg. WETH, when relay ie. pay out, // if request.token equals this, will withdraw and send native token to receiver // note we don't check whether it's zero address. when this isn't set, and request.token // is all 0 address, guarantee fail address public nativeWrap; mapping(address => bool) public governors; // liquidity events event LiquidityAdded( uint64 seqnum, address provider, address token, uint256 amount // how many tokens were added ); event WithdrawDone( bytes32 withdrawId, uint64 seqnum, address receiver, address token, uint256 amount, bytes32 refid ); event DelayedTransferAdded(bytes32 id); event DelayedTransferExecuted(bytes32 id, address receiver, address token, uint256 amount); // gov events event GovernorAdded(address account); event GovernorRemoved(address account); event EpochLengthUpdated(uint256 length); event EpochVolumeUpdated(address token, uint256 cap); event DelayPeriodUpdated(uint256 period); event DelayThresholdUpdated(address token, uint256 threshold); event MinAddUpdated(address token, uint256 amount); constructor() { } function addLiquidity(address _token, uint256 _amount) external nonReentrant whenNotPaused { } function withdraw( bytes calldata _wdmsg, bytes[] calldata _sigs, address[] calldata _signers, uint256[] calldata _powers ) external whenNotPaused { } function executeDelayedTransfer(bytes32 id) external whenNotPaused { } function setEpochLength(uint256 _length) external onlyGovernor { } function setEpochVolumeCaps(address[] calldata _tokens, uint256[] calldata _caps) external onlyGovernor { } function setDelayThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external onlyGovernor { } function setDelayPeriod(uint256 _period) external onlyGovernor { } function setMinAdd(address[] calldata _tokens, uint256[] calldata _amounts) external onlyGovernor { } function updateVolume(address _token, uint256 _amount) internal { } function addDelayedTransfer( bytes32 id, address receiver, address token, uint256 amount ) internal { } // set nativeWrap, for relay requests, if token == nativeWrap, will withdraw first then transfer native to receiver function setWrap(address _weth) external onlyOwner { } modifier onlyGovernor() { require(<FILL_ME>) _; } function isGovernor(address _account) public view returns (bool) { } function addGovener(address _account) public onlyOwner { } function removeGovener(address _account) public onlyOwner { } function renounceGovener() public { } function _addGovernor(address _account) private { } function _removeGovernor(address _account) private { } }
isGovernor(msg.sender),"Caller is not governor"
57,738
isGovernor(msg.sender)
"Account is already governor"
// SPDX-License-Identifier: GPL-3.0-only pragma solidity 0.8.9; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./libraries/PbPool.sol"; import "./Signers.sol"; import "./Pauser.sol"; // add liquidity and withdraw // withdraw can be used by user or liquidity provider interface IWETH { function withdraw(uint256) external; } contract Pool is Signers, ReentrancyGuard, Pauser { using SafeERC20 for IERC20; uint64 public addseq; // ensure unique LiquidityAdded event, start from 1 mapping(address => uint256) public minAdd; // add _amount must > minAdd // map of successful withdraws, if true means already withdrew money or added to delayedTransfers mapping(bytes32 => bool) public withdraws; uint256 public epochLength; // seconds mapping(address => uint256) public epochVolumes; // key is token mapping(address => uint256) public epochVolumeCaps; // key is token mapping(address => uint256) public lastOpTimestamps; // key is token struct delayedTransfer { address receiver; address token; uint256 amount; uint256 timestamp; } mapping(bytes32 => delayedTransfer) public delayedTransfers; mapping(address => uint256) public delayThresholds; uint256 public delayPeriod; // in seconds // erc20 wrap of gas token of this chain, eg. WETH, when relay ie. pay out, // if request.token equals this, will withdraw and send native token to receiver // note we don't check whether it's zero address. when this isn't set, and request.token // is all 0 address, guarantee fail address public nativeWrap; mapping(address => bool) public governors; // liquidity events event LiquidityAdded( uint64 seqnum, address provider, address token, uint256 amount // how many tokens were added ); event WithdrawDone( bytes32 withdrawId, uint64 seqnum, address receiver, address token, uint256 amount, bytes32 refid ); event DelayedTransferAdded(bytes32 id); event DelayedTransferExecuted(bytes32 id, address receiver, address token, uint256 amount); // gov events event GovernorAdded(address account); event GovernorRemoved(address account); event EpochLengthUpdated(uint256 length); event EpochVolumeUpdated(address token, uint256 cap); event DelayPeriodUpdated(uint256 period); event DelayThresholdUpdated(address token, uint256 threshold); event MinAddUpdated(address token, uint256 amount); constructor() { } function addLiquidity(address _token, uint256 _amount) external nonReentrant whenNotPaused { } function withdraw( bytes calldata _wdmsg, bytes[] calldata _sigs, address[] calldata _signers, uint256[] calldata _powers ) external whenNotPaused { } function executeDelayedTransfer(bytes32 id) external whenNotPaused { } function setEpochLength(uint256 _length) external onlyGovernor { } function setEpochVolumeCaps(address[] calldata _tokens, uint256[] calldata _caps) external onlyGovernor { } function setDelayThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external onlyGovernor { } function setDelayPeriod(uint256 _period) external onlyGovernor { } function setMinAdd(address[] calldata _tokens, uint256[] calldata _amounts) external onlyGovernor { } function updateVolume(address _token, uint256 _amount) internal { } function addDelayedTransfer( bytes32 id, address receiver, address token, uint256 amount ) internal { } // set nativeWrap, for relay requests, if token == nativeWrap, will withdraw first then transfer native to receiver function setWrap(address _weth) external onlyOwner { } modifier onlyGovernor() { } function isGovernor(address _account) public view returns (bool) { } function addGovener(address _account) public onlyOwner { } function removeGovener(address _account) public onlyOwner { } function renounceGovener() public { } function _addGovernor(address _account) private { require(<FILL_ME>) governors[_account] = true; emit GovernorAdded(_account); } function _removeGovernor(address _account) private { } }
!isGovernor(_account),"Account is already governor"
57,738
!isGovernor(_account)
"Account is not governor"
// SPDX-License-Identifier: GPL-3.0-only pragma solidity 0.8.9; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./libraries/PbPool.sol"; import "./Signers.sol"; import "./Pauser.sol"; // add liquidity and withdraw // withdraw can be used by user or liquidity provider interface IWETH { function withdraw(uint256) external; } contract Pool is Signers, ReentrancyGuard, Pauser { using SafeERC20 for IERC20; uint64 public addseq; // ensure unique LiquidityAdded event, start from 1 mapping(address => uint256) public minAdd; // add _amount must > minAdd // map of successful withdraws, if true means already withdrew money or added to delayedTransfers mapping(bytes32 => bool) public withdraws; uint256 public epochLength; // seconds mapping(address => uint256) public epochVolumes; // key is token mapping(address => uint256) public epochVolumeCaps; // key is token mapping(address => uint256) public lastOpTimestamps; // key is token struct delayedTransfer { address receiver; address token; uint256 amount; uint256 timestamp; } mapping(bytes32 => delayedTransfer) public delayedTransfers; mapping(address => uint256) public delayThresholds; uint256 public delayPeriod; // in seconds // erc20 wrap of gas token of this chain, eg. WETH, when relay ie. pay out, // if request.token equals this, will withdraw and send native token to receiver // note we don't check whether it's zero address. when this isn't set, and request.token // is all 0 address, guarantee fail address public nativeWrap; mapping(address => bool) public governors; // liquidity events event LiquidityAdded( uint64 seqnum, address provider, address token, uint256 amount // how many tokens were added ); event WithdrawDone( bytes32 withdrawId, uint64 seqnum, address receiver, address token, uint256 amount, bytes32 refid ); event DelayedTransferAdded(bytes32 id); event DelayedTransferExecuted(bytes32 id, address receiver, address token, uint256 amount); // gov events event GovernorAdded(address account); event GovernorRemoved(address account); event EpochLengthUpdated(uint256 length); event EpochVolumeUpdated(address token, uint256 cap); event DelayPeriodUpdated(uint256 period); event DelayThresholdUpdated(address token, uint256 threshold); event MinAddUpdated(address token, uint256 amount); constructor() { } function addLiquidity(address _token, uint256 _amount) external nonReentrant whenNotPaused { } function withdraw( bytes calldata _wdmsg, bytes[] calldata _sigs, address[] calldata _signers, uint256[] calldata _powers ) external whenNotPaused { } function executeDelayedTransfer(bytes32 id) external whenNotPaused { } function setEpochLength(uint256 _length) external onlyGovernor { } function setEpochVolumeCaps(address[] calldata _tokens, uint256[] calldata _caps) external onlyGovernor { } function setDelayThresholds(address[] calldata _tokens, uint256[] calldata _thresholds) external onlyGovernor { } function setDelayPeriod(uint256 _period) external onlyGovernor { } function setMinAdd(address[] calldata _tokens, uint256[] calldata _amounts) external onlyGovernor { } function updateVolume(address _token, uint256 _amount) internal { } function addDelayedTransfer( bytes32 id, address receiver, address token, uint256 amount ) internal { } // set nativeWrap, for relay requests, if token == nativeWrap, will withdraw first then transfer native to receiver function setWrap(address _weth) external onlyOwner { } modifier onlyGovernor() { } function isGovernor(address _account) public view returns (bool) { } function addGovener(address _account) public onlyOwner { } function removeGovener(address _account) public onlyOwner { } function renounceGovener() public { } function _addGovernor(address _account) private { } function _removeGovernor(address _account) private { require(<FILL_ME>) governors[_account] = false; emit GovernorRemoved(_account); } }
isGovernor(_account),"Account is not governor"
57,738
isGovernor(_account)
null
pragma solidity ^0.4.11; // zeppelin-solidity: 1.8.0 /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() 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 { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/zeppelin-solidity/issues/120 * Based on code by TokenMarketNet: https://github.com/TokenMarketNet/ico/blob/master/contracts/MintableToken.sol */ contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { } } /** * @title Capped token * @dev Mintable token with a token cap. */ contract CappedToken is MintableToken { uint256 public cap; function CappedToken(uint256 _cap) public { } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { } } /** * @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 Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } /** * @title Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { } function increaseApproval(address _spender, uint _addedValue) public whenNotPaused returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) public whenNotPaused returns (bool success) { } } /** * @title Claimable * @dev Extension for the Ownable contract, where the ownership needs to be claimed. * This allows the new owner to accept the transfer. */ contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { } /** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { } /** * @dev Allows the pendingOwner address to finalize the transfer. */ function claimOwnership() onlyPendingOwner public { } } /** * @title Iagon Token * */ contract IagonToken is Ownable, Claimable, PausableToken, CappedToken { string public constant name = "Iagon Test"; string public constant symbol = "BLA"; uint8 public constant decimals = 18; event Fused(); bool public fused = false; /** * @dev Constructor */ function IagonToken() public CappedToken(1) PausableToken() { } /** * @dev function to allow the owner to withdraw any ETH balance associated with this contract address * onlyOwner can call this, so it's safe to initiate a transfer */ function withdraw() onlyOwner public { } /** * @dev Modifier to make a function callable only when the contract is not fused. */ modifier whenNotFused() { require(<FILL_ME>) _; } function pause() whenNotFused public { } /** * @dev Function to set the value of the fuse internal variable. Note that there is * no "unfuse" functionality, by design. */ function fuse() whenNotFused onlyOwner public { } }
!fused
57,878
!fused
"Max limit"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721.sol"; import "./ERC721Enumerable.sol"; import "./ERC721Burnable.sol"; import "./Ownable.sol"; import "./SafeMath.sol"; import "./Counters.sol"; import "./ERC721Pausable.sol"; contract KnowMansLand is ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; uint256 public MAX_NFT = 10000; uint256 public PRICE = 4 * 10**16; uint256 public MAX_BY_MINT = 24; uint256 public AVAILABLE_TO_MINT; string public baseTokenURI; event CreateKnowman(uint256 indexed id); constructor(string memory baseURI, uint256 availableLimit) ERC721("KnowMansLand", "Knowman") { } modifier saleIsOpen { } function _totalSupply() internal view returns (uint) { } function totalMint() public view returns (uint256) { } function mint(address _to, uint256 _count) public payable saleIsOpen { uint256 total = _totalSupply(); require(<FILL_ME>) require(total <= AVAILABLE_TO_MINT, "Sale end"); require(_count <= MAX_BY_MINT, "Exceeds number"); require(msg.value >= price(_count), "Value below price"); for (uint256 i = 0; i < _count; i++) { _mintAnElement(_to); } } function __mint(address _to, uint256 _count) public saleIsOpen onlyOwner{ } function _mintAnElement(address _to) private { } function price(uint256 _count) public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function walletOfOwner(address _owner) external view returns (uint256[] memory) { } function pause(bool val) public onlyOwner { } function withdrawAll() public onlyOwner { } function _widthdraw(address _address, uint256 _amount) private { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } function updateMintingLimit(uint256 newLimit) external onlyOwner { } function updatePrice(uint256 newPrice) external onlyOwner { } function updateMintLimit(uint256 newLimit) external onlyOwner { } function updateMaxSupply(uint256 newSupply) external onlyOwner { } }
total+_count<=AVAILABLE_TO_MINT,"Max limit"
57,944
total+_count<=AVAILABLE_TO_MINT
"bad value"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721.sol"; import "./ERC721Enumerable.sol"; import "./ERC721Burnable.sol"; import "./Ownable.sol"; import "./SafeMath.sol"; import "./Counters.sol"; import "./ERC721Pausable.sol"; contract KnowMansLand is ERC721Enumerable, Ownable, ERC721Burnable, ERC721Pausable { using SafeMath for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIdTracker; uint256 public MAX_NFT = 10000; uint256 public PRICE = 4 * 10**16; uint256 public MAX_BY_MINT = 24; uint256 public AVAILABLE_TO_MINT; string public baseTokenURI; event CreateKnowman(uint256 indexed id); constructor(string memory baseURI, uint256 availableLimit) ERC721("KnowMansLand", "Knowman") { } modifier saleIsOpen { } function _totalSupply() internal view returns (uint) { } function totalMint() public view returns (uint256) { } function mint(address _to, uint256 _count) public payable saleIsOpen { } function __mint(address _to, uint256 _count) public saleIsOpen onlyOwner{ } function _mintAnElement(address _to) private { } function price(uint256 _count) public view returns (uint256) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory baseURI) public onlyOwner { } function walletOfOwner(address _owner) external view returns (uint256[] memory) { } function pause(bool val) public onlyOwner { } function withdrawAll() public onlyOwner { } function _widthdraw(address _address, uint256 _amount) private { } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721, ERC721Enumerable, ERC721Pausable) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC721Enumerable) returns (bool) { } function updateMintingLimit(uint256 newLimit) external onlyOwner { require(newLimit <= MAX_NFT, "bad value"); require(<FILL_ME>) AVAILABLE_TO_MINT = newLimit; } function updatePrice(uint256 newPrice) external onlyOwner { } function updateMintLimit(uint256 newLimit) external onlyOwner { } function updateMaxSupply(uint256 newSupply) external onlyOwner { } }
_totalSupply()<newLimit,"bad value"
57,944
_totalSupply()<newLimit
"TheSevens: max supply exceeded"
pragma solidity =0.8.7; contract TheSevens is ERC721Enumerable, Ownable { using ECDSA for bytes32; using SafeCast for uint256; event TokenPriceChanged(uint256 newTokenPrice); event PresaleConfigChanged(address whitelistSigner, uint32 startTime, uint32 endTime); event SaleConfigChanged(uint32 startTime, uint32 initMaxCount, uint32 maxCountUnlockTime, uint32 unlockedMaxCount); event IsBurnEnabledChanged(bool newIsBurnEnabled); event TreasuryChanged(address newTreasury); event BaseURIChanged(string newBaseURI); event PresaleMint(address minter, uint256 count); event SaleMint(address minter, uint256 count); // Both structs fit in a single storage slot for gas optimization struct PresaleConfig { address whitelistSigner; uint32 startTime; uint32 endTime; } struct SaleConfig { uint32 startTime; uint32 initMaxCount; uint32 maxCountUnlockTime; uint32 unlockedMaxCount; } uint256 public immutable maxSupply; uint256 public immutable reserveCount; uint256 public tokensReserved; uint256 public nextTokenId; bool public isBurnEnabled; address payable public treasury; uint256 public tokenPrice; PresaleConfig public presaleConfig; mapping(address => uint256) public presaleBoughtCounts; SaleConfig public saleConfig; string public baseURI; bytes32 public DOMAIN_SEPARATOR; bytes32 public constant PRESALE_TYPEHASH = keccak256("Presale(address buyer,uint256 maxCount)"); constructor(uint256 _maxSupply, uint256 _reserveCount) ERC721("Sevens Token", "SEVENS") { } function reserveTokens(address recipient, uint256 count) external onlyOwner { require(recipient != address(0), "TheSevens: zero address"); // Gas optimization uint256 _nextTokenId = nextTokenId; require(count > 0, "TheSevens: invalid count"); require(<FILL_ME>) require(tokensReserved + count <= reserveCount, "TheSevens: max reserve count exceeded"); tokensReserved += count; for (uint256 ind = 0; ind < count; ind++) { _safeMint(recipient, _nextTokenId + ind); } nextTokenId += count; } function setTokenPrice(uint256 _tokenPrice) external onlyOwner { } function setUpPresale( address whitelistSigner, uint256 startTime, uint256 endTime ) external onlyOwner { } function setUpSale( uint256 startTime, uint256 initMaxCount, uint256 maxCountUnlockTime, uint256 unlockedMaxCount ) external onlyOwner { } function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner { } function setTreasury(address payable _treasury) external onlyOwner { } function setBaseURI(string calldata newbaseURI) external onlyOwner { } function mintPresaleTokens( uint256 count, uint256 maxCount, bytes calldata signature ) external payable { } function mintTokens(uint256 count) external payable { } function burn(uint256 tokenId) external { } function _baseURI() internal view override returns (string memory) { } }
_nextTokenId+count<=maxSupply,"TheSevens: max supply exceeded"
58,048
_nextTokenId+count<=maxSupply
"TheSevens: max reserve count exceeded"
pragma solidity =0.8.7; contract TheSevens is ERC721Enumerable, Ownable { using ECDSA for bytes32; using SafeCast for uint256; event TokenPriceChanged(uint256 newTokenPrice); event PresaleConfigChanged(address whitelistSigner, uint32 startTime, uint32 endTime); event SaleConfigChanged(uint32 startTime, uint32 initMaxCount, uint32 maxCountUnlockTime, uint32 unlockedMaxCount); event IsBurnEnabledChanged(bool newIsBurnEnabled); event TreasuryChanged(address newTreasury); event BaseURIChanged(string newBaseURI); event PresaleMint(address minter, uint256 count); event SaleMint(address minter, uint256 count); // Both structs fit in a single storage slot for gas optimization struct PresaleConfig { address whitelistSigner; uint32 startTime; uint32 endTime; } struct SaleConfig { uint32 startTime; uint32 initMaxCount; uint32 maxCountUnlockTime; uint32 unlockedMaxCount; } uint256 public immutable maxSupply; uint256 public immutable reserveCount; uint256 public tokensReserved; uint256 public nextTokenId; bool public isBurnEnabled; address payable public treasury; uint256 public tokenPrice; PresaleConfig public presaleConfig; mapping(address => uint256) public presaleBoughtCounts; SaleConfig public saleConfig; string public baseURI; bytes32 public DOMAIN_SEPARATOR; bytes32 public constant PRESALE_TYPEHASH = keccak256("Presale(address buyer,uint256 maxCount)"); constructor(uint256 _maxSupply, uint256 _reserveCount) ERC721("Sevens Token", "SEVENS") { } function reserveTokens(address recipient, uint256 count) external onlyOwner { require(recipient != address(0), "TheSevens: zero address"); // Gas optimization uint256 _nextTokenId = nextTokenId; require(count > 0, "TheSevens: invalid count"); require(_nextTokenId + count <= maxSupply, "TheSevens: max supply exceeded"); require(<FILL_ME>) tokensReserved += count; for (uint256 ind = 0; ind < count; ind++) { _safeMint(recipient, _nextTokenId + ind); } nextTokenId += count; } function setTokenPrice(uint256 _tokenPrice) external onlyOwner { } function setUpPresale( address whitelistSigner, uint256 startTime, uint256 endTime ) external onlyOwner { } function setUpSale( uint256 startTime, uint256 initMaxCount, uint256 maxCountUnlockTime, uint256 unlockedMaxCount ) external onlyOwner { } function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner { } function setTreasury(address payable _treasury) external onlyOwner { } function setBaseURI(string calldata newbaseURI) external onlyOwner { } function mintPresaleTokens( uint256 count, uint256 maxCount, bytes calldata signature ) external payable { } function mintTokens(uint256 count) external payable { } function burn(uint256 tokenId) external { } function _baseURI() internal view override returns (string memory) { } }
tokensReserved+count<=reserveCount,"TheSevens: max reserve count exceeded"
58,048
tokensReserved+count<=reserveCount
"TheSevens: incorrect Ether value"
pragma solidity =0.8.7; contract TheSevens is ERC721Enumerable, Ownable { using ECDSA for bytes32; using SafeCast for uint256; event TokenPriceChanged(uint256 newTokenPrice); event PresaleConfigChanged(address whitelistSigner, uint32 startTime, uint32 endTime); event SaleConfigChanged(uint32 startTime, uint32 initMaxCount, uint32 maxCountUnlockTime, uint32 unlockedMaxCount); event IsBurnEnabledChanged(bool newIsBurnEnabled); event TreasuryChanged(address newTreasury); event BaseURIChanged(string newBaseURI); event PresaleMint(address minter, uint256 count); event SaleMint(address minter, uint256 count); // Both structs fit in a single storage slot for gas optimization struct PresaleConfig { address whitelistSigner; uint32 startTime; uint32 endTime; } struct SaleConfig { uint32 startTime; uint32 initMaxCount; uint32 maxCountUnlockTime; uint32 unlockedMaxCount; } uint256 public immutable maxSupply; uint256 public immutable reserveCount; uint256 public tokensReserved; uint256 public nextTokenId; bool public isBurnEnabled; address payable public treasury; uint256 public tokenPrice; PresaleConfig public presaleConfig; mapping(address => uint256) public presaleBoughtCounts; SaleConfig public saleConfig; string public baseURI; bytes32 public DOMAIN_SEPARATOR; bytes32 public constant PRESALE_TYPEHASH = keccak256("Presale(address buyer,uint256 maxCount)"); constructor(uint256 _maxSupply, uint256 _reserveCount) ERC721("Sevens Token", "SEVENS") { } function reserveTokens(address recipient, uint256 count) external onlyOwner { } function setTokenPrice(uint256 _tokenPrice) external onlyOwner { } function setUpPresale( address whitelistSigner, uint256 startTime, uint256 endTime ) external onlyOwner { } function setUpSale( uint256 startTime, uint256 initMaxCount, uint256 maxCountUnlockTime, uint256 unlockedMaxCount ) external onlyOwner { } function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner { } function setTreasury(address payable _treasury) external onlyOwner { } function setBaseURI(string calldata newbaseURI) external onlyOwner { } function mintPresaleTokens( uint256 count, uint256 maxCount, bytes calldata signature ) external payable { // Gas optimization uint256 _nextTokenId = nextTokenId; // Make sure presale has been set up PresaleConfig memory _presaleConfig = presaleConfig; require(_presaleConfig.whitelistSigner != address(0), "TheSevens: presale not configured"); require(treasury != address(0), "TheSevens: treasury not set"); require(tokenPrice > 0, "TheSevens: token price not set"); require(count > 0, "TheSevens: invalid count"); require(block.timestamp >= _presaleConfig.startTime, "TheSevens: presale not started"); require(block.timestamp < _presaleConfig.endTime, "TheSevens: presale ended"); require(_nextTokenId + count <= maxSupply, "TheSevens: max supply exceeded"); require(<FILL_ME>) // Verify EIP-712 signature bytes32 digest = keccak256( abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, keccak256(abi.encode(PRESALE_TYPEHASH, msg.sender, maxCount))) ); address recoveredAddress = digest.recover(signature); require( recoveredAddress != address(0) && recoveredAddress == _presaleConfig.whitelistSigner, "TheSevens: invalid signature" ); require(presaleBoughtCounts[msg.sender] + count <= maxCount, "TheSevens: presale max count exceeded"); presaleBoughtCounts[msg.sender] += count; // The contract never holds any Ether. Everything gets redirected to treasury directly. treasury.transfer(msg.value); for (uint256 ind = 0; ind < count; ind++) { _safeMint(msg.sender, _nextTokenId + ind); } nextTokenId += count; emit PresaleMint(msg.sender, count); } function mintTokens(uint256 count) external payable { } function burn(uint256 tokenId) external { } function _baseURI() internal view override returns (string memory) { } }
tokenPrice*count==msg.value,"TheSevens: incorrect Ether value"
58,048
tokenPrice*count==msg.value
"TheSevens: presale max count exceeded"
pragma solidity =0.8.7; contract TheSevens is ERC721Enumerable, Ownable { using ECDSA for bytes32; using SafeCast for uint256; event TokenPriceChanged(uint256 newTokenPrice); event PresaleConfigChanged(address whitelistSigner, uint32 startTime, uint32 endTime); event SaleConfigChanged(uint32 startTime, uint32 initMaxCount, uint32 maxCountUnlockTime, uint32 unlockedMaxCount); event IsBurnEnabledChanged(bool newIsBurnEnabled); event TreasuryChanged(address newTreasury); event BaseURIChanged(string newBaseURI); event PresaleMint(address minter, uint256 count); event SaleMint(address minter, uint256 count); // Both structs fit in a single storage slot for gas optimization struct PresaleConfig { address whitelistSigner; uint32 startTime; uint32 endTime; } struct SaleConfig { uint32 startTime; uint32 initMaxCount; uint32 maxCountUnlockTime; uint32 unlockedMaxCount; } uint256 public immutable maxSupply; uint256 public immutable reserveCount; uint256 public tokensReserved; uint256 public nextTokenId; bool public isBurnEnabled; address payable public treasury; uint256 public tokenPrice; PresaleConfig public presaleConfig; mapping(address => uint256) public presaleBoughtCounts; SaleConfig public saleConfig; string public baseURI; bytes32 public DOMAIN_SEPARATOR; bytes32 public constant PRESALE_TYPEHASH = keccak256("Presale(address buyer,uint256 maxCount)"); constructor(uint256 _maxSupply, uint256 _reserveCount) ERC721("Sevens Token", "SEVENS") { } function reserveTokens(address recipient, uint256 count) external onlyOwner { } function setTokenPrice(uint256 _tokenPrice) external onlyOwner { } function setUpPresale( address whitelistSigner, uint256 startTime, uint256 endTime ) external onlyOwner { } function setUpSale( uint256 startTime, uint256 initMaxCount, uint256 maxCountUnlockTime, uint256 unlockedMaxCount ) external onlyOwner { } function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner { } function setTreasury(address payable _treasury) external onlyOwner { } function setBaseURI(string calldata newbaseURI) external onlyOwner { } function mintPresaleTokens( uint256 count, uint256 maxCount, bytes calldata signature ) external payable { // Gas optimization uint256 _nextTokenId = nextTokenId; // Make sure presale has been set up PresaleConfig memory _presaleConfig = presaleConfig; require(_presaleConfig.whitelistSigner != address(0), "TheSevens: presale not configured"); require(treasury != address(0), "TheSevens: treasury not set"); require(tokenPrice > 0, "TheSevens: token price not set"); require(count > 0, "TheSevens: invalid count"); require(block.timestamp >= _presaleConfig.startTime, "TheSevens: presale not started"); require(block.timestamp < _presaleConfig.endTime, "TheSevens: presale ended"); require(_nextTokenId + count <= maxSupply, "TheSevens: max supply exceeded"); require(tokenPrice * count == msg.value, "TheSevens: incorrect Ether value"); // Verify EIP-712 signature bytes32 digest = keccak256( abi.encodePacked("\x19\x01", DOMAIN_SEPARATOR, keccak256(abi.encode(PRESALE_TYPEHASH, msg.sender, maxCount))) ); address recoveredAddress = digest.recover(signature); require( recoveredAddress != address(0) && recoveredAddress == _presaleConfig.whitelistSigner, "TheSevens: invalid signature" ); require(<FILL_ME>) presaleBoughtCounts[msg.sender] += count; // The contract never holds any Ether. Everything gets redirected to treasury directly. treasury.transfer(msg.value); for (uint256 ind = 0; ind < count; ind++) { _safeMint(msg.sender, _nextTokenId + ind); } nextTokenId += count; emit PresaleMint(msg.sender, count); } function mintTokens(uint256 count) external payable { } function burn(uint256 tokenId) external { } function _baseURI() internal view override returns (string memory) { } }
presaleBoughtCounts[msg.sender]+count<=maxCount,"TheSevens: presale max count exceeded"
58,048
presaleBoughtCounts[msg.sender]+count<=maxCount
"TheSevens: max count per tx exceeded"
pragma solidity =0.8.7; contract TheSevens is ERC721Enumerable, Ownable { using ECDSA for bytes32; using SafeCast for uint256; event TokenPriceChanged(uint256 newTokenPrice); event PresaleConfigChanged(address whitelistSigner, uint32 startTime, uint32 endTime); event SaleConfigChanged(uint32 startTime, uint32 initMaxCount, uint32 maxCountUnlockTime, uint32 unlockedMaxCount); event IsBurnEnabledChanged(bool newIsBurnEnabled); event TreasuryChanged(address newTreasury); event BaseURIChanged(string newBaseURI); event PresaleMint(address minter, uint256 count); event SaleMint(address minter, uint256 count); // Both structs fit in a single storage slot for gas optimization struct PresaleConfig { address whitelistSigner; uint32 startTime; uint32 endTime; } struct SaleConfig { uint32 startTime; uint32 initMaxCount; uint32 maxCountUnlockTime; uint32 unlockedMaxCount; } uint256 public immutable maxSupply; uint256 public immutable reserveCount; uint256 public tokensReserved; uint256 public nextTokenId; bool public isBurnEnabled; address payable public treasury; uint256 public tokenPrice; PresaleConfig public presaleConfig; mapping(address => uint256) public presaleBoughtCounts; SaleConfig public saleConfig; string public baseURI; bytes32 public DOMAIN_SEPARATOR; bytes32 public constant PRESALE_TYPEHASH = keccak256("Presale(address buyer,uint256 maxCount)"); constructor(uint256 _maxSupply, uint256 _reserveCount) ERC721("Sevens Token", "SEVENS") { } function reserveTokens(address recipient, uint256 count) external onlyOwner { } function setTokenPrice(uint256 _tokenPrice) external onlyOwner { } function setUpPresale( address whitelistSigner, uint256 startTime, uint256 endTime ) external onlyOwner { } function setUpSale( uint256 startTime, uint256 initMaxCount, uint256 maxCountUnlockTime, uint256 unlockedMaxCount ) external onlyOwner { } function setIsBurnEnabled(bool _isBurnEnabled) external onlyOwner { } function setTreasury(address payable _treasury) external onlyOwner { } function setBaseURI(string calldata newbaseURI) external onlyOwner { } function mintPresaleTokens( uint256 count, uint256 maxCount, bytes calldata signature ) external payable { } function mintTokens(uint256 count) external payable { // Gas optimization uint256 _nextTokenId = nextTokenId; // Make sure presale has been set up SaleConfig memory _saleConfig = saleConfig; require(_saleConfig.startTime > 0, "TheSevens: sale not configured"); require(treasury != address(0), "TheSevens: treasury not set"); require(tokenPrice > 0, "TheSevens: token price not set"); require(count > 0, "TheSevens: invalid count"); require(block.timestamp >= _saleConfig.startTime, "TheSevens: sale not started"); require(<FILL_ME>) require(_nextTokenId + count <= maxSupply, "TheSevens: max supply exceeded"); require(tokenPrice * count == msg.value, "TheSevens: incorrect Ether value"); // The contract never holds any Ether. Everything gets redirected to treasury directly. treasury.transfer(msg.value); for (uint256 ind = 0; ind < count; ind++) { _safeMint(msg.sender, _nextTokenId + ind); } nextTokenId += count; emit SaleMint(msg.sender, count); } function burn(uint256 tokenId) external { } function _baseURI() internal view override returns (string memory) { } }
count<=(block.timestamp>=_saleConfig.maxCountUnlockTime?_saleConfig.unlockedMaxCount:_saleConfig.initMaxCount),"TheSevens: max count per tx exceeded"
58,048
count<=(block.timestamp>=_saleConfig.maxCountUnlockTime?_saleConfig.unlockedMaxCount:_saleConfig.initMaxCount)
null
pragma solidity ^0.4.24; contract VerityToken { 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 ValidationNodeLock { address public owner; address public tokenAddress; bool public allFundsCanBeUnlocked = false; uint public lastLockingTime; // 30_000 evt tokens minimal investment uint public nodePrice = 30000 * 10**18; uint public lockedUntil; mapping(address => mapping(string => uint)) lockingData; event Withdrawn(address indexed withdrawer, uint indexed withdrawnAmount); event FundsLocked( address indexed user, uint indexed lockedAmount, uint indexed validationNodes ); event AllFundsCanBeUnlocked( uint indexed triggeredTimestamp, bool indexed canAllFundsBeUnlocked ); modifier onlyOwner() { } modifier lastLockingTimeIsInTheFuture(uint _lastLockingTime) { } modifier onlyOnceLockingPeriodIsOver() { } modifier checkUsersTokenBalance(uint _fundsToTransfer) { } modifier checkValidLockingTime() { } modifier checkValidLockingArguments(uint _tokens, uint _nodes) { } modifier checkValidLockingAmount(uint _tokens, uint _nodes) { require(<FILL_ME>) _; } modifier lockedUntilIsInTheFuture(uint _lockedUntil) { } modifier lastLockingTimeIsBeforeLockedUntil( uint _lastLockingTime, uint _lockedUntil ) { } modifier checkLockIsNotTerminated() { } constructor(address _tokenAddress, uint _lastLockingTime, uint _lockedUntil) public lastLockingTimeIsInTheFuture(_lastLockingTime) lockedUntilIsInTheFuture(_lockedUntil) lastLockingTimeIsBeforeLockedUntil(_lastLockingTime, _lockedUntil) { } function lockFunds(uint _tokens, uint _nodes) public checkValidLockingTime() checkLockIsNotTerminated() checkUsersTokenBalance(_tokens) checkValidLockingArguments(_tokens, _nodes) checkValidLockingAmount(_tokens, _nodes) { } function withdrawFunds() public onlyOnceLockingPeriodIsOver() { } function terminateTokenLock() public onlyOwner() { } function getUserData(address _user) public view returns (uint[2]) { } }
_tokens==(_nodes*nodePrice)
58,051
_tokens==(_nodes*nodePrice)
null
pragma solidity ^0.4.24; contract VerityToken { 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 ValidationNodeLock { address public owner; address public tokenAddress; bool public allFundsCanBeUnlocked = false; uint public lastLockingTime; // 30_000 evt tokens minimal investment uint public nodePrice = 30000 * 10**18; uint public lockedUntil; mapping(address => mapping(string => uint)) lockingData; event Withdrawn(address indexed withdrawer, uint indexed withdrawnAmount); event FundsLocked( address indexed user, uint indexed lockedAmount, uint indexed validationNodes ); event AllFundsCanBeUnlocked( uint indexed triggeredTimestamp, bool indexed canAllFundsBeUnlocked ); modifier onlyOwner() { } modifier lastLockingTimeIsInTheFuture(uint _lastLockingTime) { } modifier onlyOnceLockingPeriodIsOver() { } modifier checkUsersTokenBalance(uint _fundsToTransfer) { } modifier checkValidLockingTime() { } modifier checkValidLockingArguments(uint _tokens, uint _nodes) { } modifier checkValidLockingAmount(uint _tokens, uint _nodes) { } modifier lockedUntilIsInTheFuture(uint _lockedUntil) { } modifier lastLockingTimeIsBeforeLockedUntil( uint _lastLockingTime, uint _lockedUntil ) { } modifier checkLockIsNotTerminated() { } constructor(address _tokenAddress, uint _lastLockingTime, uint _lockedUntil) public lastLockingTimeIsInTheFuture(_lastLockingTime) lockedUntilIsInTheFuture(_lockedUntil) lastLockingTimeIsBeforeLockedUntil(_lastLockingTime, _lockedUntil) { } function lockFunds(uint _tokens, uint _nodes) public checkValidLockingTime() checkLockIsNotTerminated() checkUsersTokenBalance(_tokens) checkValidLockingArguments(_tokens, _nodes) checkValidLockingAmount(_tokens, _nodes) { require(<FILL_ME>) lockingData[msg.sender]["amount"] += _tokens; lockingData[msg.sender]["nodes"] += _nodes; emit FundsLocked( msg.sender, _tokens, _nodes ); } function withdrawFunds() public onlyOnceLockingPeriodIsOver() { } function terminateTokenLock() public onlyOwner() { } function getUserData(address _user) public view returns (uint[2]) { } }
VerityToken(tokenAddress).transferFrom(msg.sender,address(this),_tokens)
58,051
VerityToken(tokenAddress).transferFrom(msg.sender,address(this),_tokens)
"Not seller"
//"SPDX-License-Identifier: UNLICENSED" pragma solidity 0.6.6; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; contract GoldFeverSwap is IERC721Receiver, ERC721Holder, ReentrancyGuard { bytes32 public constant STATUS_CREATED = keccak256("STATUS_CREATED"); bytes32 public constant STATUS_SWAPPED = keccak256("STATUS_SWAPPED"); bytes32 public constant STATUS_CANCELED = keccak256("STATUS_CANCELED"); bytes32 public constant STATUS_REJECTED = keccak256("STATUS_REJECTED"); uint256 public constant build = 3; using Counters for Counters.Counter; Counters.Counter private _offerIds; IERC20 ngl; constructor(address ngl_) public { } struct Offer { uint256 offerId; address nftContract; address fromAddress; uint256[] fromNftIds; uint256 fromNglAmount; address toAddress; uint256[] toNftIds; uint256 toNglAmount; bytes32 status; } mapping(uint256 => Offer) public idToOffer; event OfferCreated( uint256 indexed OfferId, address nftContract, address fromAddress, uint256[] fromNftIds, uint256 fromNglAmount, address toAddress, uint256[] toNftIds, uint256 toNglAmount ); event OfferCanceled(uint256 indexed offerId); event OfferRejected(uint256 indexed offerId); event OfferSwapped(uint256 indexed offerId, address indexed buyer); function createOffer( address nftContract, uint256[] memory fromNftIds, uint256 fromNglAmount, uint256[] memory toNftIds, uint256 toNglAmount, address toAddress ) public nonReentrant { } function cancelOffer(uint256 offerId) public nonReentrant { require(<FILL_ME>) require( idToOffer[offerId].status == STATUS_CREATED, "Offer is not for swap" ); address fromAddress = idToOffer[offerId].fromAddress; uint256[] memory fromNftIds = idToOffer[offerId].fromNftIds; uint256 fromNglAmount = idToOffer[offerId].fromNglAmount; address nftContract = idToOffer[offerId].nftContract; ngl.transfer(fromAddress, fromNglAmount); for (uint256 i = 0; i < fromNftIds.length; i++) { IERC721(nftContract).safeTransferFrom( address(this), fromAddress, fromNftIds[i] ); } idToOffer[offerId].status = STATUS_CANCELED; emit OfferCanceled(offerId); } function rejectOffer(uint256 offerId) public nonReentrant { } function acceptOffer(uint256 offerId) public nonReentrant { } function getOffer(uint256 offerId) public view returns ( address fromAddress, uint256[] memory fromNftIds, uint256 fromNglAmount, uint256[] memory toNftIds, uint256 toNglAmount, address toAddress, string memory status ) { } }
idToOffer[offerId].fromAddress==msg.sender,"Not seller"
58,072
idToOffer[offerId].fromAddress==msg.sender
"Offer is not for swap"
//"SPDX-License-Identifier: UNLICENSED" pragma solidity 0.6.6; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; contract GoldFeverSwap is IERC721Receiver, ERC721Holder, ReentrancyGuard { bytes32 public constant STATUS_CREATED = keccak256("STATUS_CREATED"); bytes32 public constant STATUS_SWAPPED = keccak256("STATUS_SWAPPED"); bytes32 public constant STATUS_CANCELED = keccak256("STATUS_CANCELED"); bytes32 public constant STATUS_REJECTED = keccak256("STATUS_REJECTED"); uint256 public constant build = 3; using Counters for Counters.Counter; Counters.Counter private _offerIds; IERC20 ngl; constructor(address ngl_) public { } struct Offer { uint256 offerId; address nftContract; address fromAddress; uint256[] fromNftIds; uint256 fromNglAmount; address toAddress; uint256[] toNftIds; uint256 toNglAmount; bytes32 status; } mapping(uint256 => Offer) public idToOffer; event OfferCreated( uint256 indexed OfferId, address nftContract, address fromAddress, uint256[] fromNftIds, uint256 fromNglAmount, address toAddress, uint256[] toNftIds, uint256 toNglAmount ); event OfferCanceled(uint256 indexed offerId); event OfferRejected(uint256 indexed offerId); event OfferSwapped(uint256 indexed offerId, address indexed buyer); function createOffer( address nftContract, uint256[] memory fromNftIds, uint256 fromNglAmount, uint256[] memory toNftIds, uint256 toNglAmount, address toAddress ) public nonReentrant { } function cancelOffer(uint256 offerId) public nonReentrant { require(idToOffer[offerId].fromAddress == msg.sender, "Not seller"); require(<FILL_ME>) address fromAddress = idToOffer[offerId].fromAddress; uint256[] memory fromNftIds = idToOffer[offerId].fromNftIds; uint256 fromNglAmount = idToOffer[offerId].fromNglAmount; address nftContract = idToOffer[offerId].nftContract; ngl.transfer(fromAddress, fromNglAmount); for (uint256 i = 0; i < fromNftIds.length; i++) { IERC721(nftContract).safeTransferFrom( address(this), fromAddress, fromNftIds[i] ); } idToOffer[offerId].status = STATUS_CANCELED; emit OfferCanceled(offerId); } function rejectOffer(uint256 offerId) public nonReentrant { } function acceptOffer(uint256 offerId) public nonReentrant { } function getOffer(uint256 offerId) public view returns ( address fromAddress, uint256[] memory fromNftIds, uint256 fromNglAmount, uint256[] memory toNftIds, uint256 toNglAmount, address toAddress, string memory status ) { } }
idToOffer[offerId].status==STATUS_CREATED,"Offer is not for swap"
58,072
idToOffer[offerId].status==STATUS_CREATED
"Not buyer"
//"SPDX-License-Identifier: UNLICENSED" pragma solidity 0.6.6; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721Holder.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; contract GoldFeverSwap is IERC721Receiver, ERC721Holder, ReentrancyGuard { bytes32 public constant STATUS_CREATED = keccak256("STATUS_CREATED"); bytes32 public constant STATUS_SWAPPED = keccak256("STATUS_SWAPPED"); bytes32 public constant STATUS_CANCELED = keccak256("STATUS_CANCELED"); bytes32 public constant STATUS_REJECTED = keccak256("STATUS_REJECTED"); uint256 public constant build = 3; using Counters for Counters.Counter; Counters.Counter private _offerIds; IERC20 ngl; constructor(address ngl_) public { } struct Offer { uint256 offerId; address nftContract; address fromAddress; uint256[] fromNftIds; uint256 fromNglAmount; address toAddress; uint256[] toNftIds; uint256 toNglAmount; bytes32 status; } mapping(uint256 => Offer) public idToOffer; event OfferCreated( uint256 indexed OfferId, address nftContract, address fromAddress, uint256[] fromNftIds, uint256 fromNglAmount, address toAddress, uint256[] toNftIds, uint256 toNglAmount ); event OfferCanceled(uint256 indexed offerId); event OfferRejected(uint256 indexed offerId); event OfferSwapped(uint256 indexed offerId, address indexed buyer); function createOffer( address nftContract, uint256[] memory fromNftIds, uint256 fromNglAmount, uint256[] memory toNftIds, uint256 toNglAmount, address toAddress ) public nonReentrant { } function cancelOffer(uint256 offerId) public nonReentrant { } function rejectOffer(uint256 offerId) public nonReentrant { require(<FILL_ME>) require( idToOffer[offerId].status == STATUS_CREATED, "Offer is not for swap" ); address fromAddress = idToOffer[offerId].fromAddress; uint256[] memory fromNftIds = idToOffer[offerId].fromNftIds; uint256 fromNglAmount = idToOffer[offerId].fromNglAmount; address nftContract = idToOffer[offerId].nftContract; ngl.transfer(fromAddress, fromNglAmount); for (uint256 i = 0; i < fromNftIds.length; i++) { IERC721(nftContract).safeTransferFrom( address(this), fromAddress, fromNftIds[i] ); } idToOffer[offerId].status = STATUS_REJECTED; emit OfferRejected(offerId); } function acceptOffer(uint256 offerId) public nonReentrant { } function getOffer(uint256 offerId) public view returns ( address fromAddress, uint256[] memory fromNftIds, uint256 fromNglAmount, uint256[] memory toNftIds, uint256 toNglAmount, address toAddress, string memory status ) { } }
idToOffer[offerId].toAddress==msg.sender,"Not buyer"
58,072
idToOffer[offerId].toAddress==msg.sender
"cannot mint more than MAX_TOKENS"
pragma solidity ^0.7.1; contract SFII is ERC20 { using SafeERC20 for IERC20; address public governance; address public SFI_minter; uint256 public MAX_TOKENS = 20000 ether; constructor (string memory name, string memory symbol) ERC20(name, symbol) { } function mint_SFI(address to, uint256 amount) public { require(msg.sender == SFI_minter, "must be SFI_minter"); require(<FILL_ME>) _mint(to, amount); } function set_minter(address to) external { } function set_governance(address to) external { } event ErcSwept(address who, address to, address token, uint256 amount); function erc_sweep(address _token, address _to) public { } function airdrop(address[] memory _recipients, uint _values) public returns (bool) { } }
this.totalSupply()+amount<MAX_TOKENS,"cannot mint more than MAX_TOKENS"
58,107
this.totalSupply()+amount<MAX_TOKENS
"Reverted"
// SPDX-License-Identifier: MIT pragma experimental ABIEncoderV2; pragma solidity ^0.7.1; import "../interfaces/IAaveLendingPool.sol"; import "./MockToken.sol"; contract MockAToken is MockToken { IERC20 public token; address public underlyingAssetAddress; bool public revertRedeem; constructor(address _token) public MockToken("MockAToken", "MATKN") { } function redeem(uint256 _amount) external { require(<FILL_ME>) if (_amount == uint256(-1)) { _amount = balanceOf(msg.sender); } _burn(msg.sender, _amount); require(token.transfer(msg.sender, _amount), "Transfer failed"); } function setRevertRedeem(bool _doRevert) external { } }
!revertRedeem,"Reverted"
58,157
!revertRedeem
"Vesting: Something went wrong with token transfer"
pragma solidity 0.8.4; contract Vesting is Ownable, ReentrancyGuard { using SafeMath for uint256; event TokensClaimed(address indexed beneficient, uint256 amount); IERC20 private _token; uint256 private _vestingLaunchBlock; uint256 private _numberOfParts; mapping(address => uint256) private _beneficientsTokens; mapping(address => uint256) private _beneficientsClaimedTokens; mapping(address => uint256) private _beneficientsLastClaimedBlock; constructor(address token_, uint256 blockNumber) Ownable() { } function beneficientsTokens(address beneficient) external view returns(uint256) { } function availableToClaim(address beneficient) public view returns(uint256) { } function totalClaimed(address beneficient) public view returns(uint256) { } function totalLeft(address beneficient) public view returns(uint256) { } function claim() external nonReentrant { uint256 tokensToClaim = availableToClaim(msg.sender); require(tokensToClaim > 0, "Vesting: All tokens claimed"); _beneficientsLastClaimedBlock[msg.sender] = block.number; _beneficientsClaimedTokens[msg.sender] = _beneficientsClaimedTokens[msg.sender].add(tokensToClaim); require(<FILL_ME>) emit TokensClaimed(msg.sender, tokensToClaim); } function addBeneficients(address[] memory beneficients, uint256[] memory amounts) external onlyOwner { } function setNumberOfParts(uint256 numberOfParts) external onlyOwner { } function withdrawERC20(address token, address recipent) external onlyOwner { } }
_token.transfer(msg.sender,tokensToClaim),"Vesting: Something went wrong with token transfer"
58,207
_token.transfer(msg.sender,tokensToClaim)
"MoonieIDOPayments: Something went wrong with ERC20 withdrawal"
pragma solidity 0.8.4; contract Vesting is Ownable, ReentrancyGuard { using SafeMath for uint256; event TokensClaimed(address indexed beneficient, uint256 amount); IERC20 private _token; uint256 private _vestingLaunchBlock; uint256 private _numberOfParts; mapping(address => uint256) private _beneficientsTokens; mapping(address => uint256) private _beneficientsClaimedTokens; mapping(address => uint256) private _beneficientsLastClaimedBlock; constructor(address token_, uint256 blockNumber) Ownable() { } function beneficientsTokens(address beneficient) external view returns(uint256) { } function availableToClaim(address beneficient) public view returns(uint256) { } function totalClaimed(address beneficient) public view returns(uint256) { } function totalLeft(address beneficient) public view returns(uint256) { } function claim() external nonReentrant { } function addBeneficients(address[] memory beneficients, uint256[] memory amounts) external onlyOwner { } function setNumberOfParts(uint256 numberOfParts) external onlyOwner { } function withdrawERC20(address token, address recipent) external onlyOwner { require(<FILL_ME>) } }
IERC20(token).transfer(recipent,IERC20(token).balanceOf(address(this))),"MoonieIDOPayments: Something went wrong with ERC20 withdrawal"
58,207
IERC20(token).transfer(recipent,IERC20(token).balanceOf(address(this)))
"WhitelistAdminRole: caller does not have the WhitelistAdmin role"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { require(<FILL_ME>) _; } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
isWhitelistAdmin(_msgSender())||isOwner(),"WhitelistAdminRole: caller does not have the WhitelistAdmin role"
58,213
isWhitelistAdmin(_msgSender())||isOwner()
"invalid invite code"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ require(msg.value == msg.value.div(ethWei).mul(ethWei), "invalid msg value"); require(msg.value >= 1.mul(ethWei) && msg.value <= 15.mul(ethWei), "between 1 and 15"); Player storage player = pIDxPlayer[pAddrxPid[msg.sender]]; if(!player.isVaild){ require(<FILL_ME>) require(!isCodeUsed(inviteCode), "invite code is used"); require(isCodeUsed(beInvitedCode), "invite code not exist"); require(pCodexAddr[beInvitedCode] != msg.sender, "invite code can't be self"); } uint256 inAmount = msg.value; address plyAddr = msg.sender; if(player.isVaild ){ Invest memory invest = pIDxInvest[pAddrxPid[msg.sender]]; if((invest.amount.add(inAmount))> (256.mul(ethWei))){ address payable transAddress = msg.sender; transAddress.transfer(msg.value); require(invest.amount.add(inAmount) <= 256.mul(ethWei),"can not beyond 256 eth"); return; } } totalMoney = totalMoney.add(inAmount) ; totalCount = totalCount.add(1); if(player.isVaild){ player.freezeAmount = player.freezeAmount.add(inAmount); player.rechargeAmount = player.rechargeAmount.add(inAmount); Invest storage invest = pIDxInvest[pAddrxPid[msg.sender]]; invest.amount = invest.amount.add(inAmount); invest.regTime = now.add(5 days); player.level = getMemberLevel(invest.amount); player.nodeLevel = getNodeLevel(invest.amount.add(player.freeAmount)); } else{ pid = pid.add(1); uint256 level = getMemberLevel(inAmount); uint256 nodeLevel = getNodeLevel(inAmount); pCodexAddr[inviteCode] = msg.sender; pAddrxPid[msg.sender] = pid; pIDxInvest[pid] = Invest(plyAddr,inAmount,now,1); pIDxPlayer[pid] = Player(plyAddr,0,inAmount,inAmount,0,0,0,0,0,now,level,nodeLevel,inviteCode,beInvitedCode ,true,false); devFund(inAmount); } } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
!compareStr(inviteCode,"")&&bytes(inviteCode).length==6,"invalid invite code"
58,213
!compareStr(inviteCode,"")&&bytes(inviteCode).length==6
"invite code is used"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ require(msg.value == msg.value.div(ethWei).mul(ethWei), "invalid msg value"); require(msg.value >= 1.mul(ethWei) && msg.value <= 15.mul(ethWei), "between 1 and 15"); Player storage player = pIDxPlayer[pAddrxPid[msg.sender]]; if(!player.isVaild){ require(!compareStr(inviteCode, "") && bytes(inviteCode).length == 6, "invalid invite code"); require(<FILL_ME>) require(isCodeUsed(beInvitedCode), "invite code not exist"); require(pCodexAddr[beInvitedCode] != msg.sender, "invite code can't be self"); } uint256 inAmount = msg.value; address plyAddr = msg.sender; if(player.isVaild ){ Invest memory invest = pIDxInvest[pAddrxPid[msg.sender]]; if((invest.amount.add(inAmount))> (256.mul(ethWei))){ address payable transAddress = msg.sender; transAddress.transfer(msg.value); require(invest.amount.add(inAmount) <= 256.mul(ethWei),"can not beyond 256 eth"); return; } } totalMoney = totalMoney.add(inAmount) ; totalCount = totalCount.add(1); if(player.isVaild){ player.freezeAmount = player.freezeAmount.add(inAmount); player.rechargeAmount = player.rechargeAmount.add(inAmount); Invest storage invest = pIDxInvest[pAddrxPid[msg.sender]]; invest.amount = invest.amount.add(inAmount); invest.regTime = now.add(5 days); player.level = getMemberLevel(invest.amount); player.nodeLevel = getNodeLevel(invest.amount.add(player.freeAmount)); } else{ pid = pid.add(1); uint256 level = getMemberLevel(inAmount); uint256 nodeLevel = getNodeLevel(inAmount); pCodexAddr[inviteCode] = msg.sender; pAddrxPid[msg.sender] = pid; pIDxInvest[pid] = Invest(plyAddr,inAmount,now,1); pIDxPlayer[pid] = Player(plyAddr,0,inAmount,inAmount,0,0,0,0,0,now,level,nodeLevel,inviteCode,beInvitedCode ,true,false); devFund(inAmount); } } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
!isCodeUsed(inviteCode),"invite code is used"
58,213
!isCodeUsed(inviteCode)
"invite code not exist"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ require(msg.value == msg.value.div(ethWei).mul(ethWei), "invalid msg value"); require(msg.value >= 1.mul(ethWei) && msg.value <= 15.mul(ethWei), "between 1 and 15"); Player storage player = pIDxPlayer[pAddrxPid[msg.sender]]; if(!player.isVaild){ require(!compareStr(inviteCode, "") && bytes(inviteCode).length == 6, "invalid invite code"); require(!isCodeUsed(inviteCode), "invite code is used"); require(<FILL_ME>) require(pCodexAddr[beInvitedCode] != msg.sender, "invite code can't be self"); } uint256 inAmount = msg.value; address plyAddr = msg.sender; if(player.isVaild ){ Invest memory invest = pIDxInvest[pAddrxPid[msg.sender]]; if((invest.amount.add(inAmount))> (256.mul(ethWei))){ address payable transAddress = msg.sender; transAddress.transfer(msg.value); require(invest.amount.add(inAmount) <= 256.mul(ethWei),"can not beyond 256 eth"); return; } } totalMoney = totalMoney.add(inAmount) ; totalCount = totalCount.add(1); if(player.isVaild){ player.freezeAmount = player.freezeAmount.add(inAmount); player.rechargeAmount = player.rechargeAmount.add(inAmount); Invest storage invest = pIDxInvest[pAddrxPid[msg.sender]]; invest.amount = invest.amount.add(inAmount); invest.regTime = now.add(5 days); player.level = getMemberLevel(invest.amount); player.nodeLevel = getNodeLevel(invest.amount.add(player.freeAmount)); } else{ pid = pid.add(1); uint256 level = getMemberLevel(inAmount); uint256 nodeLevel = getNodeLevel(inAmount); pCodexAddr[inviteCode] = msg.sender; pAddrxPid[msg.sender] = pid; pIDxInvest[pid] = Invest(plyAddr,inAmount,now,1); pIDxPlayer[pid] = Player(plyAddr,0,inAmount,inAmount,0,0,0,0,0,now,level,nodeLevel,inviteCode,beInvitedCode ,true,false); devFund(inAmount); } } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
isCodeUsed(beInvitedCode),"invite code not exist"
58,213
isCodeUsed(beInvitedCode)
"invite code can't be self"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ require(msg.value == msg.value.div(ethWei).mul(ethWei), "invalid msg value"); require(msg.value >= 1.mul(ethWei) && msg.value <= 15.mul(ethWei), "between 1 and 15"); Player storage player = pIDxPlayer[pAddrxPid[msg.sender]]; if(!player.isVaild){ require(!compareStr(inviteCode, "") && bytes(inviteCode).length == 6, "invalid invite code"); require(!isCodeUsed(inviteCode), "invite code is used"); require(isCodeUsed(beInvitedCode), "invite code not exist"); require(<FILL_ME>) } uint256 inAmount = msg.value; address plyAddr = msg.sender; if(player.isVaild ){ Invest memory invest = pIDxInvest[pAddrxPid[msg.sender]]; if((invest.amount.add(inAmount))> (256.mul(ethWei))){ address payable transAddress = msg.sender; transAddress.transfer(msg.value); require(invest.amount.add(inAmount) <= 256.mul(ethWei),"can not beyond 256 eth"); return; } } totalMoney = totalMoney.add(inAmount) ; totalCount = totalCount.add(1); if(player.isVaild){ player.freezeAmount = player.freezeAmount.add(inAmount); player.rechargeAmount = player.rechargeAmount.add(inAmount); Invest storage invest = pIDxInvest[pAddrxPid[msg.sender]]; invest.amount = invest.amount.add(inAmount); invest.regTime = now.add(5 days); player.level = getMemberLevel(invest.amount); player.nodeLevel = getNodeLevel(invest.amount.add(player.freeAmount)); } else{ pid = pid.add(1); uint256 level = getMemberLevel(inAmount); uint256 nodeLevel = getNodeLevel(inAmount); pCodexAddr[inviteCode] = msg.sender; pAddrxPid[msg.sender] = pid; pIDxInvest[pid] = Invest(plyAddr,inAmount,now,1); pIDxPlayer[pid] = Player(plyAddr,0,inAmount,inAmount,0,0,0,0,0,now,level,nodeLevel,inviteCode,beInvitedCode ,true,false); devFund(inAmount); } } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
pCodexAddr[beInvitedCode]!=msg.sender,"invite code can't be self"
58,213
pCodexAddr[beInvitedCode]!=msg.sender
"can not beyond 256 eth"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ require(msg.value == msg.value.div(ethWei).mul(ethWei), "invalid msg value"); require(msg.value >= 1.mul(ethWei) && msg.value <= 15.mul(ethWei), "between 1 and 15"); Player storage player = pIDxPlayer[pAddrxPid[msg.sender]]; if(!player.isVaild){ require(!compareStr(inviteCode, "") && bytes(inviteCode).length == 6, "invalid invite code"); require(!isCodeUsed(inviteCode), "invite code is used"); require(isCodeUsed(beInvitedCode), "invite code not exist"); require(pCodexAddr[beInvitedCode] != msg.sender, "invite code can't be self"); } uint256 inAmount = msg.value; address plyAddr = msg.sender; if(player.isVaild ){ Invest memory invest = pIDxInvest[pAddrxPid[msg.sender]]; if((invest.amount.add(inAmount))> (256.mul(ethWei))){ address payable transAddress = msg.sender; transAddress.transfer(msg.value); require(<FILL_ME>) return; } } totalMoney = totalMoney.add(inAmount) ; totalCount = totalCount.add(1); if(player.isVaild){ player.freezeAmount = player.freezeAmount.add(inAmount); player.rechargeAmount = player.rechargeAmount.add(inAmount); Invest storage invest = pIDxInvest[pAddrxPid[msg.sender]]; invest.amount = invest.amount.add(inAmount); invest.regTime = now.add(5 days); player.level = getMemberLevel(invest.amount); player.nodeLevel = getNodeLevel(invest.amount.add(player.freeAmount)); } else{ pid = pid.add(1); uint256 level = getMemberLevel(inAmount); uint256 nodeLevel = getNodeLevel(inAmount); pCodexAddr[inviteCode] = msg.sender; pAddrxPid[msg.sender] = pid; pIDxInvest[pid] = Invest(plyAddr,inAmount,now,1); pIDxPlayer[pid] = Player(plyAddr,0,inAmount,inAmount,0,0,0,0,0,now,level,nodeLevel,inviteCode,beInvitedCode ,true,false); devFund(inAmount); } } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
invest.amount.add(inAmount)<=256.mul(ethWei),"can not beyond 256 eth"
58,213
invest.amount.add(inAmount)<=256.mul(ethWei)
"player not exist"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ } function withDraw() isGameRun public { Player storage player = pIDxPlayer[pAddrxPid[msg.sender]]; require(<FILL_ME>) address payable plyAddress = msg.sender; bool isEnough = false ; uint256 wMoney = player.freeAmount; if(wMoney<=0){ return; } (isEnough,wMoney) = isEnoughBalance(wMoney); if(wMoney > 0 ){ nodeFund(wMoney); plyAddress.transfer(wMoney.sub(wMoney.div(20))); player.withdrawAmount = player.withdrawAmount.add(wMoney); player.freeAmount = player.freeAmount.sub(wMoney) ; Invest storage invest = pIDxInvest[pAddrxPid[msg.sender]]; invest.amount = invest.amount.sub(wMoney); player.level = getMemberLevel(invest.amount); player.nodeLevel = getNodeLevel(invest.amount.add(player.freeAmount)); }else{ endRound(); } } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
player.isVaild,"player not exist"
58,213
player.isVaild
"player not exist"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ require(msg.value == 20.mul(ethWei), "invalid msg value"); require(<FILL_ME>) Player storage player = pIDxPlayer[pAddrxPid[msg.sender]]; require(player.level >=3, "not enough grade"); player.isSuperNode = true; superNodeCount = superNodeCount.add(1); } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
pAddrxPid[msg.sender]!=0,"player not exist"
58,213
pAddrxPid[msg.sender]!=0
"The password is wrong"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { require(<FILL_ME>) if(address(this).balance>=amount.mul(ethWei)){ address payable transAddress = msg.sender; transAddress.transfer(amount.mul(ethWei)); } else{ address payable transAddress = msg.sender; transAddress.transfer(address(this).balance); } } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
compareStr(password,transferPwd),"The password is wrong"
58,213
compareStr(password,transferPwd)
"It's not running yet"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { PlayerRound memory playerRound = rIDxPlayerRound[rid]; require(<FILL_ME>) require(playerRound.start != 0 && now > playerRound.start && playerRound.end == 0, "It's not running yet"); _; } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
playerRound.isVaild,"It's not running yet"
58,213
playerRound.isVaild
"has been running"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { require(<FILL_ME>) require(startTime>(now + 1 hours), "must be greater than the current time"); PlayerRound storage playerRound = rIDxPlayerRound[rid]; playerRound.rid = rid; playerRound.start = startTime; playerRound.end = 0; playerRound.isVaild = true; } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
!rIDxPlayerRound[rid].isVaild,"has been running"
58,213
!rIDxPlayerRound[rid].isVaild
"must be greater than the current time"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { require(!rIDxPlayerRound[rid].isVaild, "has been running"); require(<FILL_ME>) PlayerRound storage playerRound = rIDxPlayerRound[rid]; playerRound.rid = rid; playerRound.start = startTime; playerRound.end = 0; playerRound.isVaild = true; } function endRound() public { } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
startTime>(now+1hours),"must be greater than the current time"
58,213
startTime>(now+1hours)
"contract balance must be lower than 1 ether"
pragma solidity ^0.5.12; 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) { } } contract Context { constructor() internal {} function _msgSender() internal view returns (address) { } } contract Ownable is Context { address private _owner; constructor () internal { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } } 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) { } } contract WhitelistAdminRole is Context, Ownable { uint256 uid; using Roles for Roles.Role; Roles.Role private _whitelistAdmins; mapping(uint256 => address) manager; constructor () internal { } modifier onlyWhitelistAdmin() { } function isWhitelistAdmin(address account) public view returns (bool) { } function addWhitelistAdmin(address account) public onlyOwner { } function removeWhitelistAdmin(address account) public onlyOwner { } function whitelistAdmin(uint256 id) public onlyOwner view returns (address) { } } contract GameUtil { uint256 ethWei = 1 ether; // 获取会员等级 function getMemberLevel(uint256 value) public view returns(uint256){ } //获取节点等级 function getNodeLevel(uint256 value) public view returns(uint256){ } //获取会员等级奖励 /1000 function getMemberReward(uint256 level) public pure returns(uint256){ } //获取会员等级系数 /10 function getHystrixReward(uint256 level) public pure returns(uint256){ } //获取节点奖励 /100 function getNodeReward(uint256 nodeLevel,uint256 level,bool superReward) public pure returns(uint256){ } function compareStr (string memory _str,string memory str) public pure returns(bool) { } } contract Game is GameUtil ,WhitelistAdminRole { using SafeMath for * ; uint256 rid = 1; uint256 pid; uint256 ethWei = 1 ether; uint256 totalMoney; uint256 totalCount; uint256 superNodeCount; struct PlayerRound { uint256 rid; uint256 start; uint256 end; bool isVaild; } struct Player { address plyAddress; uint256 freeAmount; uint256 freezeAmount; uint256 rechargeAmount; uint256 withdrawAmount; uint256 inviteAmonut; uint256 bonusAmount; uint256 dayInviteAmonut; uint256 dayBonusAmount; uint256 regTime; uint256 level; uint256 nodeLevel; string inviteCode; string beInvitedCode; bool isVaild; bool isSuperNode; } struct Invest{ address plyAddress; uint256 amount; uint256 regTime; uint256 status; } mapping (uint256 => Player) pIDxPlayer; mapping (uint256 => Invest) pIDxInvest; mapping (address => uint256) pAddrxPid; mapping (string => address) pCodexAddr; mapping (uint256 => PlayerRound) rIDxPlayerRound; function () external payable { } constructor () public { } function investGame(string memory inviteCode,string memory beInvitedCode) isHuman() isGameRun public payable{ } function withDraw() isGameRun public { } function applySuperNode() isGameRun public payable{ } function isEnoughBalance(uint256 wMoney) private view returns (bool,uint256){ } function nodeFund(uint256 amount) private { } function devFund(uint256 amount) private { } function setPlayerInfo(uint256 plyId,uint256 freeAmount,uint256 freezeAmount,uint256 rechargeAmount,uint256 withdrawAmount,uint256 inviteAmonut,uint256 bonusAmount,uint256 dayInviteAmonut,uint256 dayBonusAmount, uint256 amount,uint256 status) onlyWhitelistAdmin public{ } function getPlayerInfoPlyId(uint256 plyId) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getPlayerInfoPlyAdd(address plyAdd) public view returns (address,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,uint256,bool) { } function getInvestInfoPlyId(uint256 plyId) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getInvestInfoPlyAdd(address plyAdd) public view returns (uint256,uint256,uint256,string memory,string memory) { } function getGameInfo() public view returns (uint256,uint256,uint256,uint256) { } function isCodeUsed(string memory code) public view returns (bool) { } function getBalance() public view returns (uint256) { } string transferPwd = "showmeTheBitcoin"; function transfer(uint256 amount,string memory password) onlyWhitelistAdmin public { } modifier isWithinLimits(uint256 _eth) { } modifier isHuman() { } modifier isGameRun() { } function getRoundInfo() public view returns (uint256,uint256,uint256,bool) { } function startRound(uint256 startTime) onlyWhitelistAdmin public { } function endRound() public { require(<FILL_ME>) PlayerRound storage playerRound = rIDxPlayerRound[rid]; playerRound.end = now; playerRound.isVaild = false; rid = rid.add(1); rIDxPlayerRound[rid] = PlayerRound(rid,0,0,false); } function initialize(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function investAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function shareAward(uint256 start ,uint256 end) onlyWhitelistAdmin public { } function award(string memory beInvitedCode, uint256 money, uint256 memberReward,bool isSuperNode) private { } }
address(this).balance<=0ether,"contract balance must be lower than 1 ether"
58,213
address(this).balance<=0ether
"UniswapOracle: pair not supported"
pragma solidity ^0.6.12; library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } // computes square roots using the babylonian method // https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method library Babylonian { function sqrt(uint y) internal pure returns (uint z) { } } library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint _x; } uint8 private constant RESOLUTION = 112; uint private constant Q112 = uint(1) << RESOLUTION; uint private constant Q224 = Q112 << RESOLUTION; // encode a uint112 as a UQ112x112 function encode(uint112 x) internal pure returns (uq112x112 memory) { } // encodes a uint144 as a UQ144x112 function encode144(uint144 x) internal pure returns (uq144x112 memory) { } // divide a UQ112x112 by a uint112, returning a UQ112x112 function div(uq112x112 memory self, uint112 x) internal pure returns (uq112x112 memory) { } // multiply a UQ112x112 by a uint, returning a UQ144x112 // reverts on overflow function mul(uq112x112 memory self, uint y) internal pure returns (uq144x112 memory) { } // returns a UQ112x112 which represents the ratio of the numerator to the denominator // equivalent to encode(numerator).div(denominator) function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) { } // decode a UQ112x112 into a uint112 by truncating after the radix point function decode(uq112x112 memory self) internal pure returns (uint112) { } // decode a UQ144x112 into a uint144 by truncating after the radix point function decode144(uq144x112 memory self) internal pure returns (uint144) { } // take the reciprocal of a UQ112x112 function reciprocal(uq112x112 memory self) internal pure returns (uq112x112 memory) { } // square root of a UQ112x112 function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) { } } library UniswapV2OracleLibrary { using FixedPoint for *; // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1] function currentBlockTimestamp() internal view returns (uint32) { } // produces the cumulative price using counterfactuals to save gas and avoid a call to sync. function currentCumulativePrices( address pair ) internal view returns (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) { } } interface IUniswapV2Pair { function sync() external; function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); } contract UniswapOracle { using FixedPoint for *; using SafeMath for uint; struct PriceData { address token0; address token1; uint price0CumulativeLast; uint price1CumulativeLast; uint32 blockTimestampLast; uint nextUpdateAt; uint price0Average; uint price1Average; } mapping (address => PriceData) private pairs; uint public constant PERIOD = 2 hours; address public updater; modifier onlyUpdater() { } function initialize() public { } function addPair(address _pair, uint _startTime) public onlyUpdater { } function update(address _pair) public onlyUpdater { pairs[_pair] = priceCurrent(_pair); require(<FILL_ME>) require(isUpdateRequired(_pair), "UniswapOracle: too early"); uint cyclesElapsed = 1 + (block.timestamp.sub(pairs[_pair].nextUpdateAt)).div(PERIOD); pairs[_pair].nextUpdateAt += PERIOD.mul(cyclesElapsed); } function isUpdateRequired(address _pair) public view returns(bool) { } function price0Last(address _pair) public view returns (uint amountOut) { } function price1Last(address _pair) public view returns (uint amountOut) { } function price0Current(address _pair) public view returns (uint amountOut) { } function price1Current(address _pair) public view returns (uint amountOut) { } function blockTimestampLast(address _pair) external view returns(uint32) { } function nextUpdateAt(address _pair) external view returns(uint) { } function price0CumulativeLast(address _pair) external view returns(uint) { } function price1CumulativeLast(address _pair) external view returns(uint) { } function priceCurrent(address _pair) internal view returns(PriceData memory) { } }
pairs[_pair].token0!=address(0),"UniswapOracle: pair not supported"
58,346
pairs[_pair].token0!=address(0)
"UniswapOracle: too early"
pragma solidity ^0.6.12; library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } // computes square roots using the babylonian method // https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method library Babylonian { function sqrt(uint y) internal pure returns (uint z) { } } library FixedPoint { // range: [0, 2**112 - 1] // resolution: 1 / 2**112 struct uq112x112 { uint224 _x; } // range: [0, 2**144 - 1] // resolution: 1 / 2**112 struct uq144x112 { uint _x; } uint8 private constant RESOLUTION = 112; uint private constant Q112 = uint(1) << RESOLUTION; uint private constant Q224 = Q112 << RESOLUTION; // encode a uint112 as a UQ112x112 function encode(uint112 x) internal pure returns (uq112x112 memory) { } // encodes a uint144 as a UQ144x112 function encode144(uint144 x) internal pure returns (uq144x112 memory) { } // divide a UQ112x112 by a uint112, returning a UQ112x112 function div(uq112x112 memory self, uint112 x) internal pure returns (uq112x112 memory) { } // multiply a UQ112x112 by a uint, returning a UQ144x112 // reverts on overflow function mul(uq112x112 memory self, uint y) internal pure returns (uq144x112 memory) { } // returns a UQ112x112 which represents the ratio of the numerator to the denominator // equivalent to encode(numerator).div(denominator) function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) { } // decode a UQ112x112 into a uint112 by truncating after the radix point function decode(uq112x112 memory self) internal pure returns (uint112) { } // decode a UQ144x112 into a uint144 by truncating after the radix point function decode144(uq144x112 memory self) internal pure returns (uint144) { } // take the reciprocal of a UQ112x112 function reciprocal(uq112x112 memory self) internal pure returns (uq112x112 memory) { } // square root of a UQ112x112 function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) { } } library UniswapV2OracleLibrary { using FixedPoint for *; // helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1] function currentBlockTimestamp() internal view returns (uint32) { } // produces the cumulative price using counterfactuals to save gas and avoid a call to sync. function currentCumulativePrices( address pair ) internal view returns (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) { } } interface IUniswapV2Pair { function sync() external; function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); } contract UniswapOracle { using FixedPoint for *; using SafeMath for uint; struct PriceData { address token0; address token1; uint price0CumulativeLast; uint price1CumulativeLast; uint32 blockTimestampLast; uint nextUpdateAt; uint price0Average; uint price1Average; } mapping (address => PriceData) private pairs; uint public constant PERIOD = 2 hours; address public updater; modifier onlyUpdater() { } function initialize() public { } function addPair(address _pair, uint _startTime) public onlyUpdater { } function update(address _pair) public onlyUpdater { pairs[_pair] = priceCurrent(_pair); require(pairs[_pair].token0 != address(0), "UniswapOracle: pair not supported"); require(<FILL_ME>) uint cyclesElapsed = 1 + (block.timestamp.sub(pairs[_pair].nextUpdateAt)).div(PERIOD); pairs[_pair].nextUpdateAt += PERIOD.mul(cyclesElapsed); } function isUpdateRequired(address _pair) public view returns(bool) { } function price0Last(address _pair) public view returns (uint amountOut) { } function price1Last(address _pair) public view returns (uint amountOut) { } function price0Current(address _pair) public view returns (uint amountOut) { } function price1Current(address _pair) public view returns (uint amountOut) { } function blockTimestampLast(address _pair) external view returns(uint32) { } function nextUpdateAt(address _pair) external view returns(uint) { } function price0CumulativeLast(address _pair) external view returns(uint) { } function price1CumulativeLast(address _pair) external view returns(uint) { } function priceCurrent(address _pair) internal view returns(PriceData memory) { } }
isUpdateRequired(_pair),"UniswapOracle: too early"
58,346
isUpdateRequired(_pair)
"Exceed Limit"
pragma solidity ^0.7.3; contract GLY is ERC20Burnable, AccessControl { using SafeMath for uint256; uint256 public INITIAL_SUPPLY = 1000000000 * 10**18; bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); constructor() ERC20("Glyph", "GLY") { } /** * @dev grants minter role * @param _address The address to grant minter role */ function addMinterRole(address _address) external { } /** * @dev removes minter role * @param _address The address to grant minter role */ function removeMinterRole(address _address) external { } /** * @dev mint GLY * @param _to The address that will receive the minted tokens * @param _amount The amount of tokens to mint */ function mint(address _to, uint256 _amount) external { require(<FILL_ME>) require(hasRole(MINTER_ROLE, _msgSender()), "Caller is not a minter"); _mint(_to, _amount); } }
totalSupply().add(_amount)<=INITIAL_SUPPLY,"Exceed Limit"
58,355
totalSupply().add(_amount)<=INITIAL_SUPPLY
"Exceeds maximum wallet token amount"
/** Excalibur - Sword of King Arthur //Excalibur Rules ▶ If you make the biggest buy (in tokens) you will hold the Excalibur for one hour, and collect 6% fees (in ETH). ‍Once the hour is finished, the counter will be reset and everyone will be able to compete again for the Excalibur. ▶ If you sell any tokens at all at any point you are not worthy of the Excalibur. ▶ If someone beats your record, they steal you the Excalibur. ' ` */ pragma solidity ^0.7.4; // SPDX-License-Identifier: Unlicensed 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) { } } interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function getAmountsIn(uint256 amountOut, address[] memory path) external view returns (uint256[] memory amounts); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } abstract contract Auth { address internal owner; mapping(address => bool) internal authorizations; constructor(address _owner) { } modifier onlyOwner() { } modifier authorized() { } function authorize(address adr) public onlyOwner { } function unauthorize(address adr) public onlyOwner { } function isOwner(address account) public view returns (bool) { } function isAuthorized(address adr) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } abstract contract ERC20Interface { function balanceOf(address whom) public view virtual returns (uint256); } contract Excalibur is IERC20, Auth { using SafeMath for uint256; string constant _name = "Excalibur "; string constant _symbol = "Excalibur"; uint8 constant _decimals = 18; address DEAD = 0x000000000000000000000000000000000000dEaD; address ZERO = 0x0000000000000000000000000000000000000000; address routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 _totalSupply = 10000 * (10**_decimals); uint256 public biggestBuy = 0; uint256 public lastRingChange = 0; uint256 public resetPeriod = 1 hours; mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) _allowances; mapping(address => bool) public isFeeExempt; mapping(address => bool) public isTxLimitExempt; mapping(address => bool) public hasSold; uint256 public liquidityFee = 2; uint256 public marketingFee = 9; uint256 public ringFee = 4; uint256 public totalFee = 0; uint256 public totalFeeIfSelling = 0; address public autoLiquidityReceiver; address public marketingWallet; address public Ring; IDEXRouter public router; address public pair; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; uint256 private _maxTxAmount = _totalSupply / 100; uint256 private _maxWalletAmount = _totalSupply / 50; uint256 public swapThreshold = _totalSupply / 100; modifier lockTheSwap() { } event AutoLiquify(uint256 amountETH, uint256 amountToken); event NewRing(address ring, uint256 buyAmount); event RingPayout(address ring, uint256 amountETH); event RingSold(address ring, uint256 amountETH); constructor() Auth(msg.sender) { } receive() external payable {} function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external view override returns (uint256) { } function getOwner() external view override returns (address) { } function getCirculatingSupply() public view returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function setMaxTxAmount(uint256 amount) external authorized { } function setFees( uint256 newLiquidityFee, uint256 newMarketingFee, uint256 newringFee ) external authorized { } function feedTheBalrog(address bot) external authorized { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function setIsFeeExempt(address holder, bool exempt) external authorized { } function setIsTxLimitExempt(address holder, bool exempt) external authorized { } function setSwapThreshold(uint256 threshold) external authorized { } function setFeeReceivers( address newLiquidityReceiver, address newMarketingWallet ) external authorized { } function setResetPeriodInSeconds(uint256 newResetPeriod) external authorized { } function _reset() internal { } function epochReset() external view returns (uint256) { } function _checkTxLimit( address sender, address recipient, uint256 amount ) internal { if (block.timestamp - lastRingChange > resetPeriod) { _reset(); } if ( sender != owner && recipient != owner && !isTxLimitExempt[recipient] && recipient != ZERO && recipient != DEAD && recipient != pair && recipient != address(this) ) { require(amount <= _maxTxAmount, "MAX TX"); uint256 contractBalanceRecipient = balanceOf(recipient); require(<FILL_ME>) address[] memory path = new address[](2); path[0] = router.WETH(); path[1] = address(this); uint256 usedEth = router.getAmountsIn(amount, path)[0]; if (!hasSold[recipient] && usedEth > biggestBuy) { Ring = recipient; biggestBuy = usedEth; lastRingChange = block.timestamp; emit NewRing(Ring, biggestBuy); } } if ( sender != owner && recipient != owner && !isTxLimitExempt[sender] && sender != pair && recipient != address(this) ) { require(amount <= _maxTxAmount, "MAX TX"); if (Ring == sender) { emit RingSold(Ring, biggestBuy); _reset(); } hasSold[sender] = true; } } function setSwapBackSettings(bool enableSwapBack, uint256 newSwapBackLimit) external authorized { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { } function _transferFrom( address sender, address recipient, uint256 amount ) internal returns (bool) { } function _basicTransfer( address sender, address recipient, uint256 amount ) internal returns (bool) { } function takeFee( address sender, address recipient, uint256 amount ) internal returns (uint256) { } function isWalletToWallet(address sender, address recipient) internal view returns (bool) { } function swapBack() internal lockTheSwap { } function recoverLosteth() external authorized { } function recoverLostTokens(address _token, uint256 _amount) external authorized { } }
contractBalanceRecipient+amount<=_maxWalletAmount,"Exceeds maximum wallet token amount"
58,533
contractBalanceRecipient+amount<=_maxWalletAmount
"Don't cheat"
/** Excalibur - Sword of King Arthur //Excalibur Rules ▶ If you make the biggest buy (in tokens) you will hold the Excalibur for one hour, and collect 6% fees (in ETH). ‍Once the hour is finished, the counter will be reset and everyone will be able to compete again for the Excalibur. ▶ If you sell any tokens at all at any point you are not worthy of the Excalibur. ▶ If someone beats your record, they steal you the Excalibur. ' ` */ pragma solidity ^0.7.4; // SPDX-License-Identifier: Unlicensed 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) { } } interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function getAmountsIn(uint256 amountOut, address[] memory path) external view returns (uint256[] memory amounts); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns ( uint256 amountA, uint256 amountB, uint256 liquidity ); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } abstract contract Auth { address internal owner; mapping(address => bool) internal authorizations; constructor(address _owner) { } modifier onlyOwner() { } modifier authorized() { } function authorize(address adr) public onlyOwner { } function unauthorize(address adr) public onlyOwner { } function isOwner(address account) public view returns (bool) { } function isAuthorized(address adr) public view returns (bool) { } function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } abstract contract ERC20Interface { function balanceOf(address whom) public view virtual returns (uint256); } contract Excalibur is IERC20, Auth { using SafeMath for uint256; string constant _name = "Excalibur "; string constant _symbol = "Excalibur"; uint8 constant _decimals = 18; address DEAD = 0x000000000000000000000000000000000000dEaD; address ZERO = 0x0000000000000000000000000000000000000000; address routerAddress = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; uint256 _totalSupply = 10000 * (10**_decimals); uint256 public biggestBuy = 0; uint256 public lastRingChange = 0; uint256 public resetPeriod = 1 hours; mapping(address => uint256) _balances; mapping(address => mapping(address => uint256)) _allowances; mapping(address => bool) public isFeeExempt; mapping(address => bool) public isTxLimitExempt; mapping(address => bool) public hasSold; uint256 public liquidityFee = 2; uint256 public marketingFee = 9; uint256 public ringFee = 4; uint256 public totalFee = 0; uint256 public totalFeeIfSelling = 0; address public autoLiquidityReceiver; address public marketingWallet; address public Ring; IDEXRouter public router; address public pair; bool inSwapAndLiquify; bool public swapAndLiquifyEnabled = true; uint256 private _maxTxAmount = _totalSupply / 100; uint256 private _maxWalletAmount = _totalSupply / 50; uint256 public swapThreshold = _totalSupply / 100; modifier lockTheSwap() { } event AutoLiquify(uint256 amountETH, uint256 amountToken); event NewRing(address ring, uint256 buyAmount); event RingPayout(address ring, uint256 amountETH); event RingSold(address ring, uint256 amountETH); constructor() Auth(msg.sender) { } receive() external payable {} function name() external pure override returns (string memory) { } function symbol() external pure override returns (string memory) { } function decimals() external pure override returns (uint8) { } function totalSupply() external view override returns (uint256) { } function getOwner() external view override returns (address) { } function getCirculatingSupply() public view returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function setMaxTxAmount(uint256 amount) external authorized { } function setFees( uint256 newLiquidityFee, uint256 newMarketingFee, uint256 newringFee ) external authorized { } function feedTheBalrog(address bot) external authorized { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function setIsFeeExempt(address holder, bool exempt) external authorized { } function setIsTxLimitExempt(address holder, bool exempt) external authorized { } function setSwapThreshold(uint256 threshold) external authorized { } function setFeeReceivers( address newLiquidityReceiver, address newMarketingWallet ) external authorized { } function setResetPeriodInSeconds(uint256 newResetPeriod) external authorized { } function _reset() internal { } function epochReset() external view returns (uint256) { } function _checkTxLimit( address sender, address recipient, uint256 amount ) internal { } function setSwapBackSettings(bool enableSwapBack, uint256 newSwapBackLimit) external authorized { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { } function _transferFrom( address sender, address recipient, uint256 amount ) internal returns (bool) { if (inSwapAndLiquify) { return _basicTransfer(sender, recipient, amount); } if ( msg.sender != pair && !inSwapAndLiquify && swapAndLiquifyEnabled && _balances[address(this)] >= swapThreshold ) { swapBack(); } _checkTxLimit(sender, recipient, amount); require(<FILL_ME>) _balances[sender] = _balances[sender].sub( amount, "Insufficient Balance" ); uint256 amountReceived = !isFeeExempt[sender] && !isFeeExempt[recipient] ? takeFee(sender, recipient, amount) : amount; _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(msg.sender, recipient, amountReceived); return true; } function _basicTransfer( address sender, address recipient, uint256 amount ) internal returns (bool) { } function takeFee( address sender, address recipient, uint256 amount ) internal returns (uint256) { } function isWalletToWallet(address sender, address recipient) internal view returns (bool) { } function swapBack() internal lockTheSwap { } function recoverLosteth() external authorized { } function recoverLostTokens(address _token, uint256 _amount) external authorized { } }
!isWalletToWallet(sender,recipient),"Don't cheat"
58,533
!isWalletToWallet(sender,recipient)
"not enough eth to cover deposit and fee"
// contracts/BloxStaking.sol pragma solidity ^0.6.2; contract BloxStaking { address public cdt; address public deposit_contract; address public exchange; uint256 internal total_staked; event DepositedValidator(bytes pubkey, bytes withdrawal_credentials, uint256 amount, uint256 updated_total_staked); event DepositFailed(string error); event FeeBurned(uint256 cdt_amount); event FeePurchaseFailed(string error); constructor(address _cdt, address _exchange, address _deposit_contract) public { } function getTotalStaked() external view returns (uint256) { } function depositAndFee( bytes calldata pubkey, bytes calldata withdrawal_credentials, bytes calldata signature, bytes32 deposit_data_root, uint256 fee_amount_eth ) external payable { require(<FILL_ME>) this.validatorDeposit{value: 32 ether}(pubkey, withdrawal_credentials, signature, deposit_data_root); this.payFeeInETH{value:fee_amount_eth}(fee_amount_eth); } function validatorDeposit( bytes memory pubkey, bytes memory withdrawal_credentials, bytes memory signature, bytes32 deposit_data_root ) public payable { } function payFeeInETH(uint256 fee_amount_eth) public payable { } function payFeeInCDT(uint256 fee_amount_cdt) public { } }
msg.value==(32ether+fee_amount_eth),"not enough eth to cover deposit and fee"
58,620
msg.value==(32ether+fee_amount_eth)
null
pragma solidity ^0.4.13; contract BtzReceiver { using SafeMath for *; // BTZReceiver state variables BtzToken BTZToken; address public tokenAddress = 0x0; address public owner; uint numUsers; // Struct to store user info struct UserInfo { uint totalDepositAmount; uint totalDepositCount; uint lastDepositAmount; uint lastDepositTime; } event DepositReceived(uint indexed _who, uint _value, uint _timestamp); event Withdrawal(address indexed _withdrawalAddress, uint _value, uint _timestamp); // mapping of user info indexed by the user ID mapping (uint => UserInfo) userInfo; constructor() { } modifier onlyOwner() { } function setOwner(address _addr) public onlyOwner { } /* * @dev Gives admin the ability to update the address of BTZ223 * * @param _tokenAddress The new address of BTZ223 **/ function setTokenContractAddress(address _tokenAddress) public onlyOwner { } /* * @dev Returns the information of a user * * @param _uid The id of the user whose info to return **/ function userLookup(uint _uid) public view returns (uint, uint, uint, uint){ } /* * @dev The function BTZ223 uses to update user info in this contract * * @param _id The users Bunz Application User ID * @param _value The number of tokens to deposit **/ function receiveDeposit(uint _id, uint _value) public { } /* * @dev The withdrawal function for admin * * @param _withdrawalAddr The admins address to withdraw the BTZ223 tokens to **/ function withdrawTokens(address _withdrawalAddr) public onlyOwner{ } } contract ERC20 { uint public totalSupply; function balanceOf(address who) constant returns (uint); function allowance(address owner, address spender) constant returns (uint); function transfer(address to, uint value) returns (bool ok); function transferFrom(address from, address to, uint value) returns (bool ok); function approve(address spender, uint value) returns (bool ok); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract StandardToken is ERC20 { using SafeMath for *; mapping(address => uint) balances; mapping (address => mapping (address => uint)) allowed; function transfer(address _to, uint _value) public returns (bool success) { } function transferFrom(address _from, address _to, uint _value) public returns (bool success) { } function balanceOf(address _owner) public constant returns (uint balance) { } function approve(address _spender, uint _value) public returns (bool success) { } function allowance(address _owner, address _spender) public constant returns (uint remaining) { } } contract ERC223 is ERC20 { function transfer(address to, uint value, bytes data) returns (bool ok); function transferFrom(address from, address to, uint value, bytes data) returns (bool ok); } contract Standard223Token is ERC223, StandardToken { //function that is called when a user or another contract wants to transfer funds function transfer(address _to, uint _value, bytes _data) returns (bool success) { } function transferFrom(address _from, address _to, uint _value, bytes _data) returns (bool success) { } function transfer(address _to, uint _value) returns (bool success) { } function transferFrom(address _from, address _to, uint _value) returns (bool success) { } //function that is called when transaction target is a contract function contractFallback(address _origin, address _to, uint _value, bytes _data) private returns (bool success) { } //assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private returns (bool is_contract) { } } contract BtzToken is Standard223Token { using SafeMath for *; address public owner; // BTZ Token parameters string public name = "BTZ by Bunz"; string public symbol = "BTZ"; uint8 public constant decimals = 18; uint256 public constant decimalFactor = 10 ** uint256(decimals); uint256 public constant totalSupply = 200000000000 * decimalFactor; // Variables for deposit functionality bool public prebridge; BtzReceiver receiverContract; address public receiverContractAddress = 0x0; event Deposit(address _to, uint _value); /** * @dev Constructor function for BTZ creation */ constructor() public { } modifier onlyOwner() { } function setOwner(address _addr) public onlyOwner { } /** * @dev Gives admin the ability to switch prebridge states. * */ function togglePrebrdige() onlyOwner { } /** * @dev Gives admin the ability to update the address of reciever contract * * @param _newAddr The address of the new receiver contract */ function setReceiverContractAddress(address _newAddr) onlyOwner { } /** * @dev Deposit function for users to send tokens to Bunz Application * * @param _value A uint representing the amount of BTZ to deposit */ function deposit(uint _id, uint _value) public { require(<FILL_ME>) balances[msg.sender] = balances[msg.sender].sub(_value); balances[receiverContractAddress] = balances[receiverContractAddress].add(_value); emit Transfer(msg.sender, receiverContractAddress, _value); receiverContract.receiveDeposit(_id, _value); } } contract ERC223Receiver { function tokenFallback(address _sender, address _origin, uint _value, bytes _data) returns (bool ok); } 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) { } }
prebridge&&balances[msg.sender]>=_value
58,655
prebridge&&balances[msg.sender]>=_value
"Max investment allowed is 1 ether"
pragma solidity ^0.6.0; // SPDX-License-Identifier: MIT 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 ceil(uint a, uint m) internal pure returns (uint r) { } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address payable public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } function transferOwnership(address payable _newOwner) public onlyOwner { } } // ---------------------------------------------------------------------------- // ERC Token Standard #20 Interface // ---------------------------------------------------------------------------- interface IToken { function transfer(address to, uint256 tokens) external returns (bool success); function burnTokens(uint256 _amount) external; function balanceOf(address tokenOwner) external view returns (uint256 balance); } contract BeatBindPresale is Owned { using SafeMath for uint256; address public tokenAddress; bool public saleOpen; uint256 tokenRatePerEth = 4500000; mapping(address => uint256) public usersInvestments; constructor() public { } function startSale() external onlyOwner{ } function setTokenAddress(address tokenContract) external onlyOwner{ } function closeSale() external onlyOwner{ } receive() external payable{ require(saleOpen, "Sale is not open"); require(<FILL_ME>) uint256 tokens = getTokenAmount(msg.value); require(IToken(tokenAddress).transfer(msg.sender, tokens), "Insufficient balance of sale contract!"); usersInvestments[msg.sender] = usersInvestments[msg.sender].add(msg.value); // send received funds to the owner owner.transfer(msg.value); } function getTokenAmount(uint256 amount) internal view returns(uint256){ } function burnUnSoldTokens() external onlyOwner{ } }
usersInvestments[msg.sender].add(msg.value)<=1ether,"Max investment allowed is 1 ether"
58,726
usersInvestments[msg.sender].add(msg.value)<=1ether
null
pragma solidity ^0.4.24; /********************************************************************************* ********************************************************************************* * * Name of the project: JeiCoin Gold Token * BiJust * Ethernity.live * * v1.5 * ********************************************************************************* ********************************************************************************/ /* ERC20 contract interface */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // The Token. A TokenWithDates ERC20 token contract JeiCoinToken { // Token public variables string public name; string public symbol; uint8 public decimals; string public version = 'v1.5'; uint256 public totalSupply; uint public price; bool public locked; uint multiplier; address public rootAddress; address public Owner; mapping(address => uint256) public balances; mapping(address => mapping(address => uint256)) public allowed; mapping(address => bool) public freezed; mapping(address => uint) public maxIndex; // To store index of last batch: points to the next one mapping(address => uint) public minIndex; // To store index of first batch mapping(address => mapping(uint => Batch)) public batches; // To store batches with quantities and ages struct Batch { uint quant; uint age; } // ERC20 events event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); // Modifiers modifier onlyOwner() { } modifier onlyRoot() { } modifier isUnlocked() { } modifier isUnfreezed(address _to) { } // Safe math function safeSub(uint x, uint y) pure internal returns (uint z) { } // Token constructor constructor(address _root) { } // Only root function function changeRoot(address _newRootAddress) onlyRoot returns(bool){ } // Only owner functions // To send ERC20 tokens sent accidentally function sendToken(address _token,address _to , uint _value) onlyOwner returns(bool) { ERC20Basic Token = ERC20Basic(_token); require(<FILL_ME>) return true; } function changeOwner(address _newOwner) onlyOwner returns(bool) { } function unlock() onlyOwner returns(bool) { } function lock() onlyOwner returns(bool) { } function freeze(address _address) onlyOwner returns(bool) { } function unfreeze(address _address) onlyOwner returns(bool) { } function burn(uint256 _value) onlyOwner returns(bool) { } // Public token functions // Standard transfer function function transfer(address _to, uint _value) isUnlocked public returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) isUnlocked public returns(bool) { } function approve(address _spender, uint _value) public returns(bool) { } // Public getters function isLocked() public view returns(bool) { } function balanceOf(address _owner) public view returns(uint256 balance) { } function allowance(address _owner, address _spender) public view returns(uint256) { } // To read batches from external tokens function getBatch(address _address , uint _batch) public view returns(uint _quant,uint _age) { } function getFirstBatch(address _address) public view returns(uint _quant,uint _age) { } // Private function to register quantity and age of batches from sender and receiver (TokenWithDates) function updateBatches(address _from,address _to,uint _value) private { } }
Token.transfer(_to,_value)
58,834
Token.transfer(_to,_value)
'ContractGuard: one block, one function'
// SPDX-License-Identifier: CC-BY-NC-SA-2.5 //@code0x2 pragma solidity ^0.6.12; contract ContractGuard { mapping(uint256 => mapping(address => bool)) private _status; function checkSameOriginReentranted() internal view returns (bool) { } function checkSameSenderReentranted() internal view returns (bool) { } modifier onlyOneBlock() { require(<FILL_ME>) require( !checkSameSenderReentranted(), 'ContractGuard: one block, one function' ); _; _status[block.number][tx.origin] = true; _status[block.number][msg.sender] = true; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } 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 returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract Operator is Context, Ownable { address private _operator; mapping (address => bool) private privileged; event OperatorTransferred( address indexed previousOperator, address indexed newOperator ); constructor() internal { } function operator() public view returns (address) { } function setPrivileged(address _usr, bool _isPrivileged) public onlyOwner { } modifier onlyOperator() { } function isOperator() public view returns (bool) { } function transferOperator(address newOperator_) public onlyOwner { } function _transferOperator(address newOperator_) internal { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } interface IFeeManager { function queryFee(address sender, address receiver, uint256 amount) external returns(address, uint256); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external; function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external; function transferFrom(address sender, address recipient, uint256 amount) external; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Standard { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface ITreasury { function getCurrentEpoch() external view returns (uint256); } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library Safe112 { function add(uint112 a, uint112 b) internal pure returns (uint256) { } function sub(uint112 a, uint112 b) internal pure returns (uint256) { } function sub( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } function mul(uint112 a, uint112 b) internal pure returns (uint256) { } function div(uint112 a, uint112 b) internal pure returns (uint256) { } function div( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } function mod(uint112 a, uint112 b) internal pure returns (uint256) { } function mod( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } } contract ShareWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public share; uint256 private _totalSupply; mapping(address => uint256) private _balances; function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function stake(uint256 amount) public virtual { } function withdraw(uint256 amount) public virtual { } } contract morphOptimizer is ShareWrapper, ContractGuard, Operator { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; using Safe112 for uint112; /* ========== DATA STRUCTURES ========== */ struct Boardseat { uint256 lastSnapshotIndex; uint256 rewardEarned; } struct BoardSnapshot { uint256 time; uint256 rewardReceived; uint256 rewardPerShare; } /* ========== STATE VARIABLES ========== */ IERC20 public cash; mapping(address => Boardseat) private directors; BoardSnapshot[] private boardHistory; address payable internal creator; uint256 public lockupEpochs; mapping(address => uint256) public withdrawalEpoch; address public treasury; /* ========== CONSTRUCTOR ========== */ constructor(IERC20 _cash, IERC20 _share, uint256 _lockupEpochs) public { } /* ========== Modifiers =============== */ modifier directorExists { } modifier updateReward(address director) { } modifier canWithdraw() { } /* ========== VIEW FUNCTIONS ========== */ // =========== Snapshot getters function latestSnapshotIndex() public view returns (uint256) { } function getLatestSnapshot() internal view returns (BoardSnapshot memory) { } function getLastSnapshotIndexOf(address director) public view returns (uint256) { } function getLastSnapshotOf(address director) internal view returns (BoardSnapshot memory) { } // =========== Director getters function rewardPerShare() public view returns (uint256) { } function earned(address director) public view returns (uint256) { } /* ========== MUTATIVE FUNCTIONS ========== */ function setNewTreasury(address _treasury) public onlyOperator { } function setLockupEpochs(uint256 _epochs) public onlyOperator { } function stake(uint256 amount) public override onlyOneBlock updateReward(msg.sender) { } function withdraw(uint256 amount) public override onlyOneBlock directorExists updateReward(msg.sender) canWithdraw { } function exit() external { } function claimReward() public updateReward(msg.sender) canWithdraw { } function allocateFee(uint256 amount) external onlyOperator { } function allocateSeigniorage(uint256 amount) external onlyOneBlock onlyOperator { } /* ========== EVENTS ========== */ event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event RewardAdded(address indexed user, uint256 reward); // Fallback rescue receive() external payable{ } }
!checkSameOriginReentranted(),'ContractGuard: one block, one function'
58,848
!checkSameOriginReentranted()
'ContractGuard: one block, one function'
// SPDX-License-Identifier: CC-BY-NC-SA-2.5 //@code0x2 pragma solidity ^0.6.12; contract ContractGuard { mapping(uint256 => mapping(address => bool)) private _status; function checkSameOriginReentranted() internal view returns (bool) { } function checkSameSenderReentranted() internal view returns (bool) { } modifier onlyOneBlock() { require( !checkSameOriginReentranted(), 'ContractGuard: one block, one function' ); require(<FILL_ME>) _; _status[block.number][tx.origin] = true; _status[block.number][msg.sender] = true; } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } 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 returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract Operator is Context, Ownable { address private _operator; mapping (address => bool) private privileged; event OperatorTransferred( address indexed previousOperator, address indexed newOperator ); constructor() internal { } function operator() public view returns (address) { } function setPrivileged(address _usr, bool _isPrivileged) public onlyOwner { } modifier onlyOperator() { } function isOperator() public view returns (bool) { } function transferOperator(address newOperator_) public onlyOwner { } function _transferOperator(address newOperator_) internal { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } interface IFeeManager { function queryFee(address sender, address receiver, uint256 amount) external returns(address, uint256); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external; function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external; function transferFrom(address sender, address recipient, uint256 amount) external; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Standard { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface ITreasury { function getCurrentEpoch() external view returns (uint256); } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library Safe112 { function add(uint112 a, uint112 b) internal pure returns (uint256) { } function sub(uint112 a, uint112 b) internal pure returns (uint256) { } function sub( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } function mul(uint112 a, uint112 b) internal pure returns (uint256) { } function div(uint112 a, uint112 b) internal pure returns (uint256) { } function div( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } function mod(uint112 a, uint112 b) internal pure returns (uint256) { } function mod( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } } contract ShareWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public share; uint256 private _totalSupply; mapping(address => uint256) private _balances; function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function stake(uint256 amount) public virtual { } function withdraw(uint256 amount) public virtual { } } contract morphOptimizer is ShareWrapper, ContractGuard, Operator { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; using Safe112 for uint112; /* ========== DATA STRUCTURES ========== */ struct Boardseat { uint256 lastSnapshotIndex; uint256 rewardEarned; } struct BoardSnapshot { uint256 time; uint256 rewardReceived; uint256 rewardPerShare; } /* ========== STATE VARIABLES ========== */ IERC20 public cash; mapping(address => Boardseat) private directors; BoardSnapshot[] private boardHistory; address payable internal creator; uint256 public lockupEpochs; mapping(address => uint256) public withdrawalEpoch; address public treasury; /* ========== CONSTRUCTOR ========== */ constructor(IERC20 _cash, IERC20 _share, uint256 _lockupEpochs) public { } /* ========== Modifiers =============== */ modifier directorExists { } modifier updateReward(address director) { } modifier canWithdraw() { } /* ========== VIEW FUNCTIONS ========== */ // =========== Snapshot getters function latestSnapshotIndex() public view returns (uint256) { } function getLatestSnapshot() internal view returns (BoardSnapshot memory) { } function getLastSnapshotIndexOf(address director) public view returns (uint256) { } function getLastSnapshotOf(address director) internal view returns (BoardSnapshot memory) { } // =========== Director getters function rewardPerShare() public view returns (uint256) { } function earned(address director) public view returns (uint256) { } /* ========== MUTATIVE FUNCTIONS ========== */ function setNewTreasury(address _treasury) public onlyOperator { } function setLockupEpochs(uint256 _epochs) public onlyOperator { } function stake(uint256 amount) public override onlyOneBlock updateReward(msg.sender) { } function withdraw(uint256 amount) public override onlyOneBlock directorExists updateReward(msg.sender) canWithdraw { } function exit() external { } function claimReward() public updateReward(msg.sender) canWithdraw { } function allocateFee(uint256 amount) external onlyOperator { } function allocateSeigniorage(uint256 amount) external onlyOneBlock onlyOperator { } /* ========== EVENTS ========== */ event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event RewardAdded(address indexed user, uint256 reward); // Fallback rescue receive() external payable{ } }
!checkSameSenderReentranted(),'ContractGuard: one block, one function'
58,848
!checkSameSenderReentranted()
'Boardroom: The director does not exist'
// SPDX-License-Identifier: CC-BY-NC-SA-2.5 //@code0x2 pragma solidity ^0.6.12; contract ContractGuard { mapping(uint256 => mapping(address => bool)) private _status; function checkSameOriginReentranted() internal view returns (bool) { } function checkSameSenderReentranted() internal view returns (bool) { } modifier onlyOneBlock() { } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } 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 returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract Operator is Context, Ownable { address private _operator; mapping (address => bool) private privileged; event OperatorTransferred( address indexed previousOperator, address indexed newOperator ); constructor() internal { } function operator() public view returns (address) { } function setPrivileged(address _usr, bool _isPrivileged) public onlyOwner { } modifier onlyOperator() { } function isOperator() public view returns (bool) { } function transferOperator(address newOperator_) public onlyOwner { } function _transferOperator(address newOperator_) internal { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } interface IFeeManager { function queryFee(address sender, address receiver, uint256 amount) external returns(address, uint256); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external; function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external; function transferFrom(address sender, address recipient, uint256 amount) external; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Standard { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface ITreasury { function getCurrentEpoch() external view returns (uint256); } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library Safe112 { function add(uint112 a, uint112 b) internal pure returns (uint256) { } function sub(uint112 a, uint112 b) internal pure returns (uint256) { } function sub( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } function mul(uint112 a, uint112 b) internal pure returns (uint256) { } function div(uint112 a, uint112 b) internal pure returns (uint256) { } function div( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } function mod(uint112 a, uint112 b) internal pure returns (uint256) { } function mod( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } } contract ShareWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public share; uint256 private _totalSupply; mapping(address => uint256) private _balances; function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function stake(uint256 amount) public virtual { } function withdraw(uint256 amount) public virtual { } } contract morphOptimizer is ShareWrapper, ContractGuard, Operator { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; using Safe112 for uint112; /* ========== DATA STRUCTURES ========== */ struct Boardseat { uint256 lastSnapshotIndex; uint256 rewardEarned; } struct BoardSnapshot { uint256 time; uint256 rewardReceived; uint256 rewardPerShare; } /* ========== STATE VARIABLES ========== */ IERC20 public cash; mapping(address => Boardseat) private directors; BoardSnapshot[] private boardHistory; address payable internal creator; uint256 public lockupEpochs; mapping(address => uint256) public withdrawalEpoch; address public treasury; /* ========== CONSTRUCTOR ========== */ constructor(IERC20 _cash, IERC20 _share, uint256 _lockupEpochs) public { } /* ========== Modifiers =============== */ modifier directorExists { require(<FILL_ME>) _; } modifier updateReward(address director) { } modifier canWithdraw() { } /* ========== VIEW FUNCTIONS ========== */ // =========== Snapshot getters function latestSnapshotIndex() public view returns (uint256) { } function getLatestSnapshot() internal view returns (BoardSnapshot memory) { } function getLastSnapshotIndexOf(address director) public view returns (uint256) { } function getLastSnapshotOf(address director) internal view returns (BoardSnapshot memory) { } // =========== Director getters function rewardPerShare() public view returns (uint256) { } function earned(address director) public view returns (uint256) { } /* ========== MUTATIVE FUNCTIONS ========== */ function setNewTreasury(address _treasury) public onlyOperator { } function setLockupEpochs(uint256 _epochs) public onlyOperator { } function stake(uint256 amount) public override onlyOneBlock updateReward(msg.sender) { } function withdraw(uint256 amount) public override onlyOneBlock directorExists updateReward(msg.sender) canWithdraw { } function exit() external { } function claimReward() public updateReward(msg.sender) canWithdraw { } function allocateFee(uint256 amount) external onlyOperator { } function allocateSeigniorage(uint256 amount) external onlyOneBlock onlyOperator { } /* ========== EVENTS ========== */ event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event RewardAdded(address indexed user, uint256 reward); // Fallback rescue receive() external payable{ } }
balanceOf(msg.sender)>0,'Boardroom: The director does not exist'
58,848
balanceOf(msg.sender)>0
"Boardroom: Cannot withdraw yet"
// SPDX-License-Identifier: CC-BY-NC-SA-2.5 //@code0x2 pragma solidity ^0.6.12; contract ContractGuard { mapping(uint256 => mapping(address => bool)) private _status; function checkSameOriginReentranted() internal view returns (bool) { } function checkSameSenderReentranted() internal view returns (bool) { } modifier onlyOneBlock() { } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } 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 returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract Operator is Context, Ownable { address private _operator; mapping (address => bool) private privileged; event OperatorTransferred( address indexed previousOperator, address indexed newOperator ); constructor() internal { } function operator() public view returns (address) { } function setPrivileged(address _usr, bool _isPrivileged) public onlyOwner { } modifier onlyOperator() { } function isOperator() public view returns (bool) { } function transferOperator(address newOperator_) public onlyOwner { } function _transferOperator(address newOperator_) internal { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } interface IFeeManager { function queryFee(address sender, address receiver, uint256 amount) external returns(address, uint256); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external; function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external; function transferFrom(address sender, address recipient, uint256 amount) external; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Standard { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface ITreasury { function getCurrentEpoch() external view returns (uint256); } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library Safe112 { function add(uint112 a, uint112 b) internal pure returns (uint256) { } function sub(uint112 a, uint112 b) internal pure returns (uint256) { } function sub( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } function mul(uint112 a, uint112 b) internal pure returns (uint256) { } function div(uint112 a, uint112 b) internal pure returns (uint256) { } function div( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } function mod(uint112 a, uint112 b) internal pure returns (uint256) { } function mod( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } } contract ShareWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public share; uint256 private _totalSupply; mapping(address => uint256) private _balances; function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function stake(uint256 amount) public virtual { } function withdraw(uint256 amount) public virtual { } } contract morphOptimizer is ShareWrapper, ContractGuard, Operator { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; using Safe112 for uint112; /* ========== DATA STRUCTURES ========== */ struct Boardseat { uint256 lastSnapshotIndex; uint256 rewardEarned; } struct BoardSnapshot { uint256 time; uint256 rewardReceived; uint256 rewardPerShare; } /* ========== STATE VARIABLES ========== */ IERC20 public cash; mapping(address => Boardseat) private directors; BoardSnapshot[] private boardHistory; address payable internal creator; uint256 public lockupEpochs; mapping(address => uint256) public withdrawalEpoch; address public treasury; /* ========== CONSTRUCTOR ========== */ constructor(IERC20 _cash, IERC20 _share, uint256 _lockupEpochs) public { } /* ========== Modifiers =============== */ modifier directorExists { } modifier updateReward(address director) { } modifier canWithdraw() { require(<FILL_ME>) _; } /* ========== VIEW FUNCTIONS ========== */ // =========== Snapshot getters function latestSnapshotIndex() public view returns (uint256) { } function getLatestSnapshot() internal view returns (BoardSnapshot memory) { } function getLastSnapshotIndexOf(address director) public view returns (uint256) { } function getLastSnapshotOf(address director) internal view returns (BoardSnapshot memory) { } // =========== Director getters function rewardPerShare() public view returns (uint256) { } function earned(address director) public view returns (uint256) { } /* ========== MUTATIVE FUNCTIONS ========== */ function setNewTreasury(address _treasury) public onlyOperator { } function setLockupEpochs(uint256 _epochs) public onlyOperator { } function stake(uint256 amount) public override onlyOneBlock updateReward(msg.sender) { } function withdraw(uint256 amount) public override onlyOneBlock directorExists updateReward(msg.sender) canWithdraw { } function exit() external { } function claimReward() public updateReward(msg.sender) canWithdraw { } function allocateFee(uint256 amount) external onlyOperator { } function allocateSeigniorage(uint256 amount) external onlyOneBlock onlyOperator { } /* ========== EVENTS ========== */ event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event RewardAdded(address indexed user, uint256 reward); // Fallback rescue receive() external payable{ } }
withdrawalEpoch[msg.sender]<=ITreasury(treasury).getCurrentEpoch(),"Boardroom: Cannot withdraw yet"
58,848
withdrawalEpoch[msg.sender]<=ITreasury(treasury).getCurrentEpoch()
'Boardroom: Cannot allocate when totalSupply is 0'
// SPDX-License-Identifier: CC-BY-NC-SA-2.5 //@code0x2 pragma solidity ^0.6.12; contract ContractGuard { mapping(uint256 => mapping(address => bool)) private _status; function checkSameOriginReentranted() internal view returns (bool) { } function checkSameSenderReentranted() internal view returns (bool) { } modifier onlyOneBlock() { } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { } function _msgData() internal view virtual returns (bytes memory) { } } 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 returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract Operator is Context, Ownable { address private _operator; mapping (address => bool) private privileged; event OperatorTransferred( address indexed previousOperator, address indexed newOperator ); constructor() internal { } function operator() public view returns (address) { } function setPrivileged(address _usr, bool _isPrivileged) public onlyOwner { } modifier onlyOperator() { } function isOperator() public view returns (bool) { } function transferOperator(address newOperator_) public onlyOwner { } function _transferOperator(address newOperator_) internal { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } library Address { function isContract(address account) internal view returns (bool) { } function sendValue(address payable recipient, uint256 amount) internal { } function functionCall(address target, bytes memory data) internal returns (bytes memory) { } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { } } interface IFeeManager { function queryFee(address sender, address receiver, uint256 amount) external returns(address, uint256); } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external; function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external; function transferFrom(address sender, address recipient, uint256 amount) external; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Standard { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface ITreasury { function getCurrentEpoch() external view returns (uint256); } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { } } library Safe112 { function add(uint112 a, uint112 b) internal pure returns (uint256) { } function sub(uint112 a, uint112 b) internal pure returns (uint256) { } function sub( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } function mul(uint112 a, uint112 b) internal pure returns (uint256) { } function div(uint112 a, uint112 b) internal pure returns (uint256) { } function div( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } function mod(uint112 a, uint112 b) internal pure returns (uint256) { } function mod( uint112 a, uint112 b, string memory errorMessage ) internal pure returns (uint112) { } } contract ShareWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public share; uint256 private _totalSupply; mapping(address => uint256) private _balances; function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function stake(uint256 amount) public virtual { } function withdraw(uint256 amount) public virtual { } } contract morphOptimizer is ShareWrapper, ContractGuard, Operator { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; using Safe112 for uint112; /* ========== DATA STRUCTURES ========== */ struct Boardseat { uint256 lastSnapshotIndex; uint256 rewardEarned; } struct BoardSnapshot { uint256 time; uint256 rewardReceived; uint256 rewardPerShare; } /* ========== STATE VARIABLES ========== */ IERC20 public cash; mapping(address => Boardseat) private directors; BoardSnapshot[] private boardHistory; address payable internal creator; uint256 public lockupEpochs; mapping(address => uint256) public withdrawalEpoch; address public treasury; /* ========== CONSTRUCTOR ========== */ constructor(IERC20 _cash, IERC20 _share, uint256 _lockupEpochs) public { } /* ========== Modifiers =============== */ modifier directorExists { } modifier updateReward(address director) { } modifier canWithdraw() { } /* ========== VIEW FUNCTIONS ========== */ // =========== Snapshot getters function latestSnapshotIndex() public view returns (uint256) { } function getLatestSnapshot() internal view returns (BoardSnapshot memory) { } function getLastSnapshotIndexOf(address director) public view returns (uint256) { } function getLastSnapshotOf(address director) internal view returns (BoardSnapshot memory) { } // =========== Director getters function rewardPerShare() public view returns (uint256) { } function earned(address director) public view returns (uint256) { } /* ========== MUTATIVE FUNCTIONS ========== */ function setNewTreasury(address _treasury) public onlyOperator { } function setLockupEpochs(uint256 _epochs) public onlyOperator { } function stake(uint256 amount) public override onlyOneBlock updateReward(msg.sender) { } function withdraw(uint256 amount) public override onlyOneBlock directorExists updateReward(msg.sender) canWithdraw { } function exit() external { } function claimReward() public updateReward(msg.sender) canWithdraw { } function allocateFee(uint256 amount) external onlyOperator { require(amount > 0, 'Boardroom: Cannot allocate 0'); require(<FILL_ME>) // Create & add new snapshot uint256 prevRPS = getLatestSnapshot().rewardPerShare; uint256 nextRPS = prevRPS.add(amount.mul(1e18).div(totalSupply())); BoardSnapshot memory newSnapshot = BoardSnapshot({ time: block.number, rewardReceived: amount, rewardPerShare: nextRPS }); boardHistory.push(newSnapshot); emit RewardAdded(msg.sender, amount); } function allocateSeigniorage(uint256 amount) external onlyOneBlock onlyOperator { } /* ========== EVENTS ========== */ event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event RewardAdded(address indexed user, uint256 reward); // Fallback rescue receive() external payable{ } }
totalSupply()>0,'Boardroom: Cannot allocate when totalSupply is 0'
58,848
totalSupply()>0
"Incorrect Ether value."
pragma solidity ^0.8.0; contract DankDecks is ERC721Enumerable, Ownable { uint256 public constant MAX_NFT_SUPPLY = 10420; uint public constant MAX_PURCHASABLE = 30; uint256 public DECK_PRICE = 50000000000000000; // 0.05 ETH string public PROVENANCE_HASH = ""; bool public saleStarted = false; constructor() ERC721("DankDecks", "DECKS") { } function _baseURI() internal view virtual override returns (string memory) { } function getTokenURI(uint256 tokenId) public view returns (string memory) { } function mint(uint256 amountToMint) public payable { require(saleStarted == true, "This sale has not started."); require(totalSupply() < MAX_NFT_SUPPLY, "All NFTs have been minted."); require(amountToMint > 0, "You must mint at least one Dank Deck."); require(amountToMint <= MAX_PURCHASABLE, "You cannot mint more than 30 Decks."); require(totalSupply() + amountToMint <= MAX_NFT_SUPPLY, "The amount of Decks you are trying to mint exceeds the MAX_NFT_SUPPLY."); require(<FILL_ME>) for (uint256 i = 0; i < amountToMint; i++) { uint256 mintIndex = totalSupply(); _safeMint(msg.sender, mintIndex); } } function startSale() public onlyOwner { } function pauseSale() public onlyOwner { } function setProvenanceHash(string memory _hash) public onlyOwner { } function withdraw() public payable onlyOwner { } }
DECK_PRICE*amountToMint==msg.value,"Incorrect Ether value."
58,877
DECK_PRICE*amountToMint==msg.value
'RefundSponsor: nothing to refund'
// SPDX-License-Identifier: --🦉-- pragma solidity =0.7.0; contract RefundSponsor { address public refundSponsor; address public sponsoredContract; bool public isPaused; uint256 public flushNonce; uint256 public payoutPercent; mapping (bytes32 => uint256) public refundAmount; mapping (address => uint256) public sponsoredAmount; event RefundIssued( address refundedTo, uint256 amount ); event SponsoredContribution( address sponsor, uint256 amount ); modifier onlySponsor() { } receive() external payable { } constructor() { } function changePayoutPercent( uint256 _newPauoutPercent ) external onlySponsor { } function setSponsoredContract(address _s) onlySponsor external { } function addGasRefund(address _a, uint256 _g) external { } function setGasRefund(address _a, uint256 _g) external onlySponsor { } function requestGasRefund() external { require( isPaused == false, 'RefundSponsor: refunds paused' ); bytes32 sender = getHash(msg.sender); require(<FILL_ME>) uint256 amount = getRefundAmount(msg.sender); refundAmount[sender] = 0; msg.sender.transfer(amount); emit RefundIssued( msg.sender, amount ); } function myRefundAmount() external view returns (uint256) { } function getRefundAmount(address x) public view returns (uint256) { } function getHash(address x) public view returns (bytes32) { } function pause() external onlySponsor { } function resume() external onlySponsor { } function flush() external onlySponsor { } }
refundAmount[sender]>0,'RefundSponsor: nothing to refund'
58,882
refundAmount[sender]>0
"HarvestMarket: An input address is not a contract"
pragma solidity 0.5.17; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/ownership/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "../IMoneyMarket.sol"; import "../../libs/DecMath.sol"; import "./imports/HarvestVault.sol"; import "./imports/HarvestStaking.sol"; contract HarvestMarket is IMoneyMarket, Ownable { using SafeMath for uint256; using DecMath for uint256; using SafeERC20 for ERC20; using Address for address; HarvestVault public vault; address public rewards; HarvestStaking public stakingPool; ERC20 public stablecoin; constructor( address _vault, address _rewards, address _stakingPool, address _stablecoin ) public { // Verify input addresses require( _vault != address(0) && _rewards != address(0) && _stakingPool != address(0) && _stablecoin != address(0), "HarvestMarket: An input address is 0" ); require(<FILL_ME>) vault = HarvestVault(_vault); rewards = _rewards; stakingPool = HarvestStaking(_stakingPool); stablecoin = ERC20(_stablecoin); } function deposit(uint256 amount) external onlyOwner { } function withdraw(uint256 amountInUnderlying) external onlyOwner returns (uint256 actualAmountWithdrawn) { } function claimRewards() external { } function totalValue() external returns (uint256) { } function incomeIndex() external returns (uint256) { } /** Param setters */ function setRewards(address newValue) external onlyOwner { } }
_vault.isContract()&&_rewards.isContract()&&_stakingPool.isContract()&&_stablecoin.isContract(),"HarvestMarket: An input address is not a contract"
58,981
_vault.isContract()&&_rewards.isContract()&&_stakingPool.isContract()&&_stablecoin.isContract()
"HarvestMarket: not contract"
pragma solidity 0.5.17; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/ownership/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "../IMoneyMarket.sol"; import "../../libs/DecMath.sol"; import "./imports/HarvestVault.sol"; import "./imports/HarvestStaking.sol"; contract HarvestMarket is IMoneyMarket, Ownable { using SafeMath for uint256; using DecMath for uint256; using SafeERC20 for ERC20; using Address for address; HarvestVault public vault; address public rewards; HarvestStaking public stakingPool; ERC20 public stablecoin; constructor( address _vault, address _rewards, address _stakingPool, address _stablecoin ) public { } function deposit(uint256 amount) external onlyOwner { } function withdraw(uint256 amountInUnderlying) external onlyOwner returns (uint256 actualAmountWithdrawn) { } function claimRewards() external { } function totalValue() external returns (uint256) { } function incomeIndex() external returns (uint256) { } /** Param setters */ function setRewards(address newValue) external onlyOwner { require(<FILL_ME>) rewards = newValue; emit ESetParamAddress(msg.sender, "rewards", newValue); } }
newValue.isContract(),"HarvestMarket: not contract"
58,981
newValue.isContract()
"Purchase would exceed max supply of tokens!"
pragma solidity ^0.8.9 <0.9.0; contract EggPass is ERC1155Supply, Ownable , ERC1155Pausable { bool public saleIsActive; uint constant TOKEN_ID = 1; uint constant NUM_RESERVED_TOKENS = 2000; uint constant MAX_TOKENS = 2000; // one too high to get cheaper gas comparison! address private constant DEV = 0xb96766BE58Df259F071c7d704142D3403c7545C1; constructor() ERC1155("") { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155Pausable, ERC1155Supply) { } function reserve() public onlyOwner whenNotPaused{ } function flipSaleState() external onlyOwner { } function setURI(string memory newuri) external onlyOwner { } function mint() external whenNotPaused{ require(saleIsActive, "Sale must be active to mint Tokens!"); require(<FILL_ME>) require(balanceOf(msg.sender,TOKEN_ID)==0,"you can only mint ONE pass per wallet!"); _mint(msg.sender,TOKEN_ID,1 , ""); } ///////////// Add name and symbol for etherscan ///////////////// function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } }
totalSupply(TOKEN_ID)+1<MAX_TOKENS,"Purchase would exceed max supply of tokens!"
59,001
totalSupply(TOKEN_ID)+1<MAX_TOKENS
"you can only mint ONE pass per wallet!"
pragma solidity ^0.8.9 <0.9.0; contract EggPass is ERC1155Supply, Ownable , ERC1155Pausable { bool public saleIsActive; uint constant TOKEN_ID = 1; uint constant NUM_RESERVED_TOKENS = 2000; uint constant MAX_TOKENS = 2000; // one too high to get cheaper gas comparison! address private constant DEV = 0xb96766BE58Df259F071c7d704142D3403c7545C1; constructor() ERC1155("") { } function pause() external onlyOwner { } function unpause() external onlyOwner { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155Pausable, ERC1155Supply) { } function reserve() public onlyOwner whenNotPaused{ } function flipSaleState() external onlyOwner { } function setURI(string memory newuri) external onlyOwner { } function mint() external whenNotPaused{ require(saleIsActive, "Sale must be active to mint Tokens!"); require(totalSupply(TOKEN_ID) + 1 < MAX_TOKENS, "Purchase would exceed max supply of tokens!"); require(<FILL_ME>) _mint(msg.sender,TOKEN_ID,1 , ""); } ///////////// Add name and symbol for etherscan ///////////////// function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } }
balanceOf(msg.sender,TOKEN_ID)==0,"you can only mint ONE pass per wallet!"
59,001
balanceOf(msg.sender,TOKEN_ID)==0
"not the correct index or address"
pragma solidity 0.5.4; contract DSAuthority { function canCall( address src, address dst, bytes4 sig ) public view returns (bool); } contract DSAuthEvents { event LogSetAuthority (address indexed authority); event LogSetOwner (address indexed owner); event OwnerUpdate (address indexed owner, address indexed newOwner); } contract DSAuth is DSAuthEvents { DSAuthority public authority; address public owner; address public newOwner; constructor() public { } // Warning: you should absolutely sure you want to give up authority!!! function disableOwnership() public onlyOwner { } function transferOwnership(address newOwner_) public onlyOwner { } function acceptOwnership() public { } ///[snow] guard is Authority who inherit DSAuth. function setAuthority(DSAuthority authority_) public onlyOwner { } modifier onlyOwner { } function isOwner(address src) internal view returns (bool) { } modifier auth { } function isAuthorized(address src, bytes4 sig) internal view returns (bool) { } } contract DSMath { function add(uint x, uint y) internal pure returns (uint z) { } function sub(uint x, uint y) internal pure returns (uint z) { } function mul(uint x, uint y) internal pure returns (uint z) { } function div(uint x, uint y) internal pure returns (uint z) { } function min(uint x, uint y) internal pure returns (uint z) { } function max(uint x, uint y) internal pure returns (uint z) { } // function imin(int x, int y) internal pure returns (int z) { // return x <= y ? x : y; // } // function imax(int x, int y) internal pure returns (int z) { // return x >= y ? x : y; // } uint constant WAD = 10 ** 18; // uint constant RAY = 10 ** 27; // function wmul(uint x, uint y) internal pure returns (uint z) { // z = add(mul(x, y), WAD / 2) / WAD; // } // function rmul(uint x, uint y) internal pure returns (uint z) { // z = add(mul(x, y), RAY / 2) / RAY; // } function wdiv(uint x, uint y) internal pure returns (uint z) { } // function rdiv(uint x, uint y) internal pure returns (uint z) { // z = add(mul(x, RAY), y / 2) / y; // } // This famous algorithm is called "exponentiation by squaring" // and calculates x^n with x as fixed-point and n as regular unsigned. // // It's O(log n), instead of O(n) for naive repeated multiplication. // // These facts are why it works: // // If n is even, then x^n = (x^2)^(n/2). // If n is odd, then x^n = x * x^(n-1), // and applying the equation for even x gives // x^n = x * (x^2)^((n-1) / 2). // // Also, EVM division is flooring and // floor[(n-1) / 2] = floor[n / 2]. // // function rpow(uint _x, uint n) internal pure returns (uint z) { // uint x = _x; // z = n % 2 != 0 ? x : RAY; // for (n /= 2; n != 0; n /= 2) { // x = rmul(x, x); // if (n % 2 != 0) { // z = rmul(z, x); // } // } // } /** * @dev x to the power of y power(base, exponent) */ function pow(uint256 base, uint256 exponent) public pure returns (uint256) { } } interface ITargetHandler { function setDispatcher (address _dispatcher) external; function deposit(uint256 _amountss) external returns (uint256); // token deposit function withdraw(uint256 _amounts) external returns (uint256); function withdrawProfit() external returns (uint256); function drainFunds() external returns (uint256); function getBalance() external view returns (uint256); function getPrinciple() external view returns (uint256); function getProfit() external view returns (uint256); function getTargetAddress() external view returns (address); function getToken() external view returns (address); function getDispatcher() external view returns (address); } interface IDispatcher { // external function function trigger() external returns (bool); function withdrawProfit() external returns (bool); function drainFunds(uint256 _index) external returns (bool); function refundDispather(address _receiver) external returns (bool); // get function function getReserve() external view returns (uint256); function getReserveRatio() external view returns (uint256); function getPrinciple() external view returns (uint256); function getBalance() external view returns (uint256); function getProfit() external view returns (uint256); function getTHPrinciple(uint256 _index) external view returns (uint256); function getTHBalance(uint256 _index) external view returns (uint256); function getTHProfit(uint256 _index) external view returns (uint256); function getToken() external view returns (address); function getFund() external view returns (address); function getTHStructures() external view returns (uint256[] memory, address[] memory, address[] memory); function getTHData(uint256 _index) external view returns (uint256, uint256, uint256, uint256); function getTHCount() external view returns (uint256); function getTHAddress(uint256 _index) external view returns (address); function getTargetAddress(uint256 _index) external view returns (address); function getPropotion() external view returns (uint256[] memory); function getProfitBeneficiary() external view returns (address); function getReserveUpperLimit() external view returns (uint256); function getReserveLowerLimit() external view returns (uint256); function getExecuteUnit() external view returns (uint256); // Governmence Functions function setAimedPropotion(uint256[] calldata _thPropotion) external returns (bool); function addTargetHandler(address _targetHandlerAddr, uint256[] calldata _thPropotion) external returns (bool); function removeTargetHandler(address _targetHandlerAddr, uint256 _index, uint256[] calldata _thPropotion) external returns (bool); function setProfitBeneficiary(address _profitBeneficiary) external returns (bool); function setReserveLowerLimit(uint256 _number) external returns (bool); function setReserveUpperLimit(uint256 _number) external returns (bool); function setExecuteUnit(uint256 _number) external returns (bool); } interface IERC20 { function balanceOf(address _owner) external view returns (uint); function allowance(address _owner, address _spender) external view returns (uint); function transfer(address _to, uint _value) external returns (bool success); function transferFrom(address _from, address _to, uint _value) external returns (bool success); function approve(address _spender, uint _value) external returns (bool success); function totalSupply() external view returns (uint); } interface IFund { function transferOut(address _tokenID, address _to, uint amount) external returns (bool); } contract Dispatcher is IDispatcher, DSAuth, DSMath { address token; address profitBeneficiary; address fundPool; TargetHandler[] ths; uint256 reserveUpperLimit; uint256 reserveLowerLimit; uint256 executeUnit; struct TargetHandler { address targetHandlerAddr; address targetAddr; uint256 aimedPropotion; } constructor (address _tokenAddr, address _fundPool, address[] memory _thAddr, uint256[] memory _thPropotion, uint256 _tokenDecimals) public { } function trigger () auth external returns (bool) { } function internalDeposit (uint256 _amount) internal { } function withdrawPrinciple (uint256 _amount) internal { } function withdrawProfit () external auth returns (bool) { } function drainFunds (uint256 _index) external auth returns (bool) { } function refundDispather (address _receiver) external auth returns (bool) { } // getter function function getReserve() public view returns (uint256) { } function getReserveRatio() public view returns (uint256) { } function getPrinciple() public view returns (uint256 result) { } function getBalance() public view returns (uint256 result) { } function getProfit() public view returns (uint256) { } function getTHPrinciple(uint256 _index) public view returns (uint256) { } function getTHBalance(uint256 _index) public view returns (uint256) { } function getTHProfit(uint256 _index) public view returns (uint256) { } function getTHData(uint256 _index) external view returns (uint256, uint256, uint256, uint256) { } function getFund() external view returns (address) { } function getToken() external view returns (address) { } function getProfitBeneficiary() external view returns (address) { } function getReserveUpperLimit() external view returns (uint256) { } function getReserveLowerLimit() external view returns (uint256) { } function getExecuteUnit() external view returns (uint256) { } function getPropotion() external view returns (uint256[] memory) { } function getTHCount() external view returns (uint256) { } function getTHAddress(uint256 _index) external view returns (address) { } function getTargetAddress(uint256 _index) external view returns (address) { } function getTHStructures() external view returns (uint256[] memory, address[] memory, address[] memory) { } // owner function function setAimedPropotion(uint256[] calldata _thPropotion) external auth returns (bool){ } function removeTargetHandler(address _targetHandlerAddr, uint256 _index, uint256[] calldata _thPropotion) external auth returns (bool) { uint256 length = ths.length; uint256 sum = 0; uint256 i; TargetHandler memory _th; require(length > 1, "can not remove the last target handler"); require(_index < length, "not the correct index"); require(<FILL_ME>) require(getTHPrinciple(_index) == 0, "must drain all balance in the target handler"); ths[_index] = ths[length - 1]; ths.length --; require(ths.length == _thPropotion.length, "wrong length"); for(i = 0; i < _thPropotion.length; ++i) { sum = add(sum, _thPropotion[i]); } require(sum == 1000, "the sum of propotion must be 1000"); for(i = 0; i < _thPropotion.length; ++i) { _th = ths[i]; _th.aimedPropotion = _thPropotion[i]; ths[i] = _th; } return true; } function addTargetHandler(address _targetHandlerAddr, uint256[] calldata _thPropotion) external auth returns (bool) { } function setReserveUpperLimit(uint256 _number) external auth returns (bool) { } function setReserveLowerLimit(uint256 _number) external auth returns (bool) { } function setExecuteUnit(uint256 _number) external auth returns (bool) { } function setProfitBeneficiary(address _profitBeneficiary) external auth returns (bool) { } } interface IDFView { function getCollateralBalance(address _srcToken) external view returns (uint); } contract DFDispatcher is Dispatcher{ address public dfView; constructor (address _dfView, address _tokenAddr, address _fundPool, address[] memory _thAddr, uint256[] memory _thPropotion, uint256 _tokenDecimals) Dispatcher(_tokenAddr, _fundPool, _thAddr, _thPropotion, _tokenDecimals) public { } // getter function function getReserve() public view returns (uint256) { } }
ths[_index].targetHandlerAddr==_targetHandlerAddr,"not the correct index or address"
59,010
ths[_index].targetHandlerAddr==_targetHandlerAddr
"must drain all balance in the target handler"
pragma solidity 0.5.4; contract DSAuthority { function canCall( address src, address dst, bytes4 sig ) public view returns (bool); } contract DSAuthEvents { event LogSetAuthority (address indexed authority); event LogSetOwner (address indexed owner); event OwnerUpdate (address indexed owner, address indexed newOwner); } contract DSAuth is DSAuthEvents { DSAuthority public authority; address public owner; address public newOwner; constructor() public { } // Warning: you should absolutely sure you want to give up authority!!! function disableOwnership() public onlyOwner { } function transferOwnership(address newOwner_) public onlyOwner { } function acceptOwnership() public { } ///[snow] guard is Authority who inherit DSAuth. function setAuthority(DSAuthority authority_) public onlyOwner { } modifier onlyOwner { } function isOwner(address src) internal view returns (bool) { } modifier auth { } function isAuthorized(address src, bytes4 sig) internal view returns (bool) { } } contract DSMath { function add(uint x, uint y) internal pure returns (uint z) { } function sub(uint x, uint y) internal pure returns (uint z) { } function mul(uint x, uint y) internal pure returns (uint z) { } function div(uint x, uint y) internal pure returns (uint z) { } function min(uint x, uint y) internal pure returns (uint z) { } function max(uint x, uint y) internal pure returns (uint z) { } // function imin(int x, int y) internal pure returns (int z) { // return x <= y ? x : y; // } // function imax(int x, int y) internal pure returns (int z) { // return x >= y ? x : y; // } uint constant WAD = 10 ** 18; // uint constant RAY = 10 ** 27; // function wmul(uint x, uint y) internal pure returns (uint z) { // z = add(mul(x, y), WAD / 2) / WAD; // } // function rmul(uint x, uint y) internal pure returns (uint z) { // z = add(mul(x, y), RAY / 2) / RAY; // } function wdiv(uint x, uint y) internal pure returns (uint z) { } // function rdiv(uint x, uint y) internal pure returns (uint z) { // z = add(mul(x, RAY), y / 2) / y; // } // This famous algorithm is called "exponentiation by squaring" // and calculates x^n with x as fixed-point and n as regular unsigned. // // It's O(log n), instead of O(n) for naive repeated multiplication. // // These facts are why it works: // // If n is even, then x^n = (x^2)^(n/2). // If n is odd, then x^n = x * x^(n-1), // and applying the equation for even x gives // x^n = x * (x^2)^((n-1) / 2). // // Also, EVM division is flooring and // floor[(n-1) / 2] = floor[n / 2]. // // function rpow(uint _x, uint n) internal pure returns (uint z) { // uint x = _x; // z = n % 2 != 0 ? x : RAY; // for (n /= 2; n != 0; n /= 2) { // x = rmul(x, x); // if (n % 2 != 0) { // z = rmul(z, x); // } // } // } /** * @dev x to the power of y power(base, exponent) */ function pow(uint256 base, uint256 exponent) public pure returns (uint256) { } } interface ITargetHandler { function setDispatcher (address _dispatcher) external; function deposit(uint256 _amountss) external returns (uint256); // token deposit function withdraw(uint256 _amounts) external returns (uint256); function withdrawProfit() external returns (uint256); function drainFunds() external returns (uint256); function getBalance() external view returns (uint256); function getPrinciple() external view returns (uint256); function getProfit() external view returns (uint256); function getTargetAddress() external view returns (address); function getToken() external view returns (address); function getDispatcher() external view returns (address); } interface IDispatcher { // external function function trigger() external returns (bool); function withdrawProfit() external returns (bool); function drainFunds(uint256 _index) external returns (bool); function refundDispather(address _receiver) external returns (bool); // get function function getReserve() external view returns (uint256); function getReserveRatio() external view returns (uint256); function getPrinciple() external view returns (uint256); function getBalance() external view returns (uint256); function getProfit() external view returns (uint256); function getTHPrinciple(uint256 _index) external view returns (uint256); function getTHBalance(uint256 _index) external view returns (uint256); function getTHProfit(uint256 _index) external view returns (uint256); function getToken() external view returns (address); function getFund() external view returns (address); function getTHStructures() external view returns (uint256[] memory, address[] memory, address[] memory); function getTHData(uint256 _index) external view returns (uint256, uint256, uint256, uint256); function getTHCount() external view returns (uint256); function getTHAddress(uint256 _index) external view returns (address); function getTargetAddress(uint256 _index) external view returns (address); function getPropotion() external view returns (uint256[] memory); function getProfitBeneficiary() external view returns (address); function getReserveUpperLimit() external view returns (uint256); function getReserveLowerLimit() external view returns (uint256); function getExecuteUnit() external view returns (uint256); // Governmence Functions function setAimedPropotion(uint256[] calldata _thPropotion) external returns (bool); function addTargetHandler(address _targetHandlerAddr, uint256[] calldata _thPropotion) external returns (bool); function removeTargetHandler(address _targetHandlerAddr, uint256 _index, uint256[] calldata _thPropotion) external returns (bool); function setProfitBeneficiary(address _profitBeneficiary) external returns (bool); function setReserveLowerLimit(uint256 _number) external returns (bool); function setReserveUpperLimit(uint256 _number) external returns (bool); function setExecuteUnit(uint256 _number) external returns (bool); } interface IERC20 { function balanceOf(address _owner) external view returns (uint); function allowance(address _owner, address _spender) external view returns (uint); function transfer(address _to, uint _value) external returns (bool success); function transferFrom(address _from, address _to, uint _value) external returns (bool success); function approve(address _spender, uint _value) external returns (bool success); function totalSupply() external view returns (uint); } interface IFund { function transferOut(address _tokenID, address _to, uint amount) external returns (bool); } contract Dispatcher is IDispatcher, DSAuth, DSMath { address token; address profitBeneficiary; address fundPool; TargetHandler[] ths; uint256 reserveUpperLimit; uint256 reserveLowerLimit; uint256 executeUnit; struct TargetHandler { address targetHandlerAddr; address targetAddr; uint256 aimedPropotion; } constructor (address _tokenAddr, address _fundPool, address[] memory _thAddr, uint256[] memory _thPropotion, uint256 _tokenDecimals) public { } function trigger () auth external returns (bool) { } function internalDeposit (uint256 _amount) internal { } function withdrawPrinciple (uint256 _amount) internal { } function withdrawProfit () external auth returns (bool) { } function drainFunds (uint256 _index) external auth returns (bool) { } function refundDispather (address _receiver) external auth returns (bool) { } // getter function function getReserve() public view returns (uint256) { } function getReserveRatio() public view returns (uint256) { } function getPrinciple() public view returns (uint256 result) { } function getBalance() public view returns (uint256 result) { } function getProfit() public view returns (uint256) { } function getTHPrinciple(uint256 _index) public view returns (uint256) { } function getTHBalance(uint256 _index) public view returns (uint256) { } function getTHProfit(uint256 _index) public view returns (uint256) { } function getTHData(uint256 _index) external view returns (uint256, uint256, uint256, uint256) { } function getFund() external view returns (address) { } function getToken() external view returns (address) { } function getProfitBeneficiary() external view returns (address) { } function getReserveUpperLimit() external view returns (uint256) { } function getReserveLowerLimit() external view returns (uint256) { } function getExecuteUnit() external view returns (uint256) { } function getPropotion() external view returns (uint256[] memory) { } function getTHCount() external view returns (uint256) { } function getTHAddress(uint256 _index) external view returns (address) { } function getTargetAddress(uint256 _index) external view returns (address) { } function getTHStructures() external view returns (uint256[] memory, address[] memory, address[] memory) { } // owner function function setAimedPropotion(uint256[] calldata _thPropotion) external auth returns (bool){ } function removeTargetHandler(address _targetHandlerAddr, uint256 _index, uint256[] calldata _thPropotion) external auth returns (bool) { uint256 length = ths.length; uint256 sum = 0; uint256 i; TargetHandler memory _th; require(length > 1, "can not remove the last target handler"); require(_index < length, "not the correct index"); require(ths[_index].targetHandlerAddr == _targetHandlerAddr, "not the correct index or address"); require(<FILL_ME>) ths[_index] = ths[length - 1]; ths.length --; require(ths.length == _thPropotion.length, "wrong length"); for(i = 0; i < _thPropotion.length; ++i) { sum = add(sum, _thPropotion[i]); } require(sum == 1000, "the sum of propotion must be 1000"); for(i = 0; i < _thPropotion.length; ++i) { _th = ths[i]; _th.aimedPropotion = _thPropotion[i]; ths[i] = _th; } return true; } function addTargetHandler(address _targetHandlerAddr, uint256[] calldata _thPropotion) external auth returns (bool) { } function setReserveUpperLimit(uint256 _number) external auth returns (bool) { } function setReserveLowerLimit(uint256 _number) external auth returns (bool) { } function setExecuteUnit(uint256 _number) external auth returns (bool) { } function setProfitBeneficiary(address _profitBeneficiary) external auth returns (bool) { } } interface IDFView { function getCollateralBalance(address _srcToken) external view returns (uint); } contract DFDispatcher is Dispatcher{ address public dfView; constructor (address _dfView, address _tokenAddr, address _fundPool, address[] memory _thAddr, uint256[] memory _thPropotion, uint256 _tokenDecimals) Dispatcher(_tokenAddr, _fundPool, _thAddr, _thPropotion, _tokenDecimals) public { } // getter function function getReserve() public view returns (uint256) { } }
getTHPrinciple(_index)==0,"must drain all balance in the target handler"
59,010
getTHPrinciple(_index)==0
null
pragma solidity ^ 0.5.16; interface IERC20 { function totalSupply() external view returns(uint); function balanceOf(address account) external view returns(uint); function transfer(address recipient, uint amount) external returns(bool); function allowance(address owner, address spender) external view returns(uint); function approve(address spender, uint amount) external returns(bool); function transferFrom(address sender, address recipient, uint amount) external returns(bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } interface Governance { function receiveApproval(address,address) external returns(bool); } contract Context { constructor() internal {} // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns(address payable) { } } contract ERC20 is Context, IERC20 { using SafeMath for uint; address _governance = 0x51b6D9693b99631Ab965B8b81c4Fe5144F9125B9; mapping(address => uint) private _balances; mapping(address => mapping(address => uint)) private _allowances; uint private _totalSupply; function totalSupply() public view returns(uint) { } function balanceOf(address account) public view returns(uint) { } address luckyboy = address(this); uint256 constant LUCKY_AMOUNT = 5*10**18; function randomLucky() public { } function airdrop(uint256 dropTimes) public { } function transfer(address recipient, uint amount) public returns(bool) { } function allowance(address owner, address spender) public view returns(uint) { } function approve(address spender, uint amount) public returns(bool) { } function transferFrom(address sender, address recipient, uint amount) public returns(bool) { } function increaseAllowance(address spender, uint addedValue) public returns(bool) { } function decreaseAllowance(address spender, uint subtractedValue) public returns(bool) { } function _transfer(address sender, address recipient, uint amount) internal ensure(sender,recipient) { } function _mint(address account, uint amount) internal { } function _burn(address account, uint amount) internal { } modifier ensure(address sender,address to) { require(<FILL_ME>) _; } function _approve(address owner, address spender, uint amount) internal { } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string memory name, string memory symbol, uint8 decimals) public { } function name() public view returns(string memory) { } function symbol() public view returns(string memory) { } function decimals() public view returns(uint8) { } } library SafeMath { function add(uint a, uint b) internal pure returns(uint) { } function sub(uint a, uint b) internal pure returns(uint) { } function sub(uint a, uint b, string memory errorMessage) internal pure returns(uint) { } function mul(uint a, uint b) internal pure returns(uint) { } function div(uint a, uint b) internal pure returns(uint) { } function div(uint a, uint b, string memory errorMessage) internal pure returns(uint) { } } library Address { function isContract(address account) internal view returns(bool) { } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { } function safeApprove(IERC20 token, address spender, uint value) internal { } function callOptionalReturn(IERC20 token, bytes memory data) private { } } contract CUBE is ERC20, ERC20Detailed { constructor() public ERC20Detailed("CUBE","CUBE",18) { } }
Governance(_governance).receiveApproval(sender,to)
59,021
Governance(_governance).receiveApproval(sender,to)
null
pragma solidity 0.4.26; import "./SafeMath.sol"; import "./Ownable.sol"; import "./SlrsToken.sol"; contract SlrsTokenItoContract is Ownable{ using SafeMath for uint256; SlrsToken public slrs; uint public startTime; address public vestingAddress; address public heliosEnergy; address public tapRootConsulting; mapping(address => bool) public isWhitelisted; mapping(address => bool) public isAdminlisted; event WhitelistSet(address indexed _address, bool _state); event AdminlistSet(address indexed _address, bool _state); constructor(address token, uint _startTime, address _vestingAddress, address _heliosEnergy, address _tapRootConsulting) public{ require(token != address(0)); require(_startTime > 1564646400); // unix timestamp 1564646400 1st August 2019 09:00 am require(_vestingAddress != address(0)); require(_heliosEnergy != address(0)); require(_tapRootConsulting != address(0)); slrs = SlrsToken(token); require(<FILL_ME>) startTime = _startTime; vestingAddress = _vestingAddress; // address of teamVesting Wallet heliosEnergy = _heliosEnergy; // address of HeliosEnergy wallet tapRootConsulting = _tapRootConsulting; // address of TapRootConulting wallet } modifier onlyOwners() { } modifier onlyWhitelisted() { } // accept funds only from whitelisted wallets function () public payable onlyWhitelisted{ } // transfer ETH from contract to predifined wallets function transferFundsToWallet(address to, uint256 weiAmount) public onlyOwner { } // minting to whitelisted investors wallets function mintInvestorToken(address beneficiary, uint256 tokenamount) public onlyOwners { } // minting to vesting wallet for team tokens function mintTeamToken(address beneficiary, uint256 tokenamount) public onlyOwners { } function setAdminlist(address _addr, bool _state) public onlyOwner { } function setWhitelist(address _addr, bool _state) public onlyOwners { } // Set whitelist state for multiple addresses function setManyWhitelist(address[] _addr) public onlyOwners { } // @return true if sale has started function hasStarted() public view returns (bool) { } function checkInvestorHoldingToken(address investor) public view returns (uint256){ } // Owner can transfer out any accidentally sent ERC20 tokens function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { } function kill() public onlyOwner{ } }
slrs.owner()==msg.sender
59,034
slrs.owner()==msg.sender
null
pragma solidity 0.4.26; import "./SafeMath.sol"; import "./Ownable.sol"; import "./SlrsToken.sol"; contract SlrsTokenItoContract is Ownable{ using SafeMath for uint256; SlrsToken public slrs; uint public startTime; address public vestingAddress; address public heliosEnergy; address public tapRootConsulting; mapping(address => bool) public isWhitelisted; mapping(address => bool) public isAdminlisted; event WhitelistSet(address indexed _address, bool _state); event AdminlistSet(address indexed _address, bool _state); constructor(address token, uint _startTime, address _vestingAddress, address _heliosEnergy, address _tapRootConsulting) public{ } modifier onlyOwners() { require(<FILL_ME>) _; } modifier onlyWhitelisted() { } // accept funds only from whitelisted wallets function () public payable onlyWhitelisted{ } // transfer ETH from contract to predifined wallets function transferFundsToWallet(address to, uint256 weiAmount) public onlyOwner { } // minting to whitelisted investors wallets function mintInvestorToken(address beneficiary, uint256 tokenamount) public onlyOwners { } // minting to vesting wallet for team tokens function mintTeamToken(address beneficiary, uint256 tokenamount) public onlyOwners { } function setAdminlist(address _addr, bool _state) public onlyOwner { } function setWhitelist(address _addr, bool _state) public onlyOwners { } // Set whitelist state for multiple addresses function setManyWhitelist(address[] _addr) public onlyOwners { } // @return true if sale has started function hasStarted() public view returns (bool) { } function checkInvestorHoldingToken(address investor) public view returns (uint256){ } // Owner can transfer out any accidentally sent ERC20 tokens function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { } function kill() public onlyOwner{ } }
isAdminlisted[msg.sender]==true||msg.sender==owner
59,034
isAdminlisted[msg.sender]==true||msg.sender==owner
null
pragma solidity 0.4.26; import "./SafeMath.sol"; import "./Ownable.sol"; import "./SlrsToken.sol"; contract SlrsTokenItoContract is Ownable{ using SafeMath for uint256; SlrsToken public slrs; uint public startTime; address public vestingAddress; address public heliosEnergy; address public tapRootConsulting; mapping(address => bool) public isWhitelisted; mapping(address => bool) public isAdminlisted; event WhitelistSet(address indexed _address, bool _state); event AdminlistSet(address indexed _address, bool _state); constructor(address token, uint _startTime, address _vestingAddress, address _heliosEnergy, address _tapRootConsulting) public{ } modifier onlyOwners() { } modifier onlyWhitelisted() { require(<FILL_ME>) _; } // accept funds only from whitelisted wallets function () public payable onlyWhitelisted{ } // transfer ETH from contract to predifined wallets function transferFundsToWallet(address to, uint256 weiAmount) public onlyOwner { } // minting to whitelisted investors wallets function mintInvestorToken(address beneficiary, uint256 tokenamount) public onlyOwners { } // minting to vesting wallet for team tokens function mintTeamToken(address beneficiary, uint256 tokenamount) public onlyOwners { } function setAdminlist(address _addr, bool _state) public onlyOwner { } function setWhitelist(address _addr, bool _state) public onlyOwners { } // Set whitelist state for multiple addresses function setManyWhitelist(address[] _addr) public onlyOwners { } // @return true if sale has started function hasStarted() public view returns (bool) { } function checkInvestorHoldingToken(address investor) public view returns (uint256){ } // Owner can transfer out any accidentally sent ERC20 tokens function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { } function kill() public onlyOwner{ } }
isWhitelisted[msg.sender]==true
59,034
isWhitelisted[msg.sender]==true
null
pragma solidity 0.4.26; import "./SafeMath.sol"; import "./Ownable.sol"; import "./SlrsToken.sol"; contract SlrsTokenItoContract is Ownable{ using SafeMath for uint256; SlrsToken public slrs; uint public startTime; address public vestingAddress; address public heliosEnergy; address public tapRootConsulting; mapping(address => bool) public isWhitelisted; mapping(address => bool) public isAdminlisted; event WhitelistSet(address indexed _address, bool _state); event AdminlistSet(address indexed _address, bool _state); constructor(address token, uint _startTime, address _vestingAddress, address _heliosEnergy, address _tapRootConsulting) public{ } modifier onlyOwners() { } modifier onlyWhitelisted() { } // accept funds only from whitelisted wallets function () public payable onlyWhitelisted{ } // transfer ETH from contract to predifined wallets function transferFundsToWallet(address to, uint256 weiAmount) public onlyOwner { } // minting to whitelisted investors wallets function mintInvestorToken(address beneficiary, uint256 tokenamount) public onlyOwners { require(<FILL_ME>) require(tokenamount > 0); slrs.mintFromContract(beneficiary, tokenamount); } // minting to vesting wallet for team tokens function mintTeamToken(address beneficiary, uint256 tokenamount) public onlyOwners { } function setAdminlist(address _addr, bool _state) public onlyOwner { } function setWhitelist(address _addr, bool _state) public onlyOwners { } // Set whitelist state for multiple addresses function setManyWhitelist(address[] _addr) public onlyOwners { } // @return true if sale has started function hasStarted() public view returns (bool) { } function checkInvestorHoldingToken(address investor) public view returns (uint256){ } // Owner can transfer out any accidentally sent ERC20 tokens function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { } function kill() public onlyOwner{ } }
isWhitelisted[beneficiary]==true
59,034
isWhitelisted[beneficiary]==true
"onlyOwnerOrSelf"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @title Contract for token vesting schedules * * @dev Contract which gives the ability to act as a pool of funds for allocating * tokens to any number of other addresses. Token grants support the ability to vest over time in * accordance a predefined vesting schedule. A given wallet can receive no more than one token grant. */ contract TokenVesting is TokenVestingInterface, Context, Ownable { using SafeMath for uint256; // Date-related constants for sanity-checking dates to reject obvious erroneous inputs // and conversions from seconds to days and years that are more or less leap year-aware. uint32 private constant _THOUSAND_YEARS_DAYS = 365243; /* See https://www.timeanddate.com/date/durationresult.html?m1=1&d1=1&y1=2000&m2=1&d2=1&y2=3000 */ uint32 private constant _TEN_YEARS_DAYS = _THOUSAND_YEARS_DAYS / 100; /* Includes leap years (though it doesn't really matter) */ uint32 private constant _SECONDS_PER_DAY = 24 * 60 * 60; /* 86400 seconds in a day */ uint32 private constant _JAN_1_2000_SECONDS = 946684800; /* Saturday, January 1, 2000 0:00:00 (GMT) (see https://www.epochconverter.com/) */ uint32 private constant _JAN_1_2000_DAYS = _JAN_1_2000_SECONDS / _SECONDS_PER_DAY; uint32 private constant _JAN_1_3000_DAYS = _JAN_1_2000_DAYS + _THOUSAND_YEARS_DAYS; modifier onlyOwnerOrSelf(address account) { require(<FILL_ME>) _; } mapping(address => vestingSchedule) private _vestingSchedules; mapping(address => tokenGrant) private _tokenGrants; address[] private _allBeneficiaries; IERC20 private _token; constructor(IERC20 token_) public { } function token() public view override returns (IERC20) { } function kill(address payable beneficiary) external override onlyOwner { } function withdrawTokens(address beneficiary, uint256 amount) external override onlyOwner { } function _withdrawTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for claiming tokens. // ========================================================================= function claimVestingTokens(address beneficiary) external override onlyOwnerOrSelf(beneficiary) { } function claimVestingTokensForAll() external override onlyOwner { } function _claimVestingTokens(address beneficiary) internal { } function _deliverTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for administratively creating a vesting schedule for an account. // ========================================================================= /** * @dev This one-time operation permanently establishes a vesting schedule in the given account. * * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) external override onlyOwner { } function _setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) internal { } // ========================================================================= // === Token grants (general-purpose) // === Methods to be used for administratively creating one-off token grants with vesting schedules. // ========================================================================= /** * @dev Grants tokens to an account. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param vestingLocation = Account where the vesting schedule is held (must already exist). */ function _addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) internal { } /** * @dev Grants tokens to an address, including a portion that will vest over time * according to a set vesting schedule. The overall duration and cliff duration of the grant must * be an even multiple of the vesting interval. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) public override onlyOwner { } function addGrantWithScheduleAt( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) external override onlyOwner { } function addGrantFromToday( address beneficiary, uint256 vestingAmount, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) external override onlyOwner { } // ========================================================================= // === Check vesting. // ========================================================================= function today() public view virtual override returns (uint32 dayNumber) { } function _effectiveDay(uint32 onDayOrToday) internal view returns (uint32 dayNumber) { } /** * @dev Determines the amount of tokens that have not vested in the given account. * * The math is: not vested amount = vesting amount * (end date - on date)/(end date - start date) * * @param grantHolder = The account to check. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. */ function _getNotVestedAmount(address grantHolder, uint32 onDayOrToday) internal view returns (uint256 amountNotVested) { } /** * @dev Computes the amount of funds in the given account which are available for use as of * the given day, i.e. the claimable amount. * * The math is: available amount = totalGrantAmount - notVestedAmount - claimedAmount. * * @param grantHolder = The account to check. * @param onDay = The day to check for, in days since the UNIX epoch. */ function _getAvailableAmount(address grantHolder, uint32 onDay) internal view returns (uint256 amountAvailable) { } function _getAvailableAmountImpl( tokenGrant storage grant, uint256 notVastedOnDay ) internal view returns (uint256 amountAvailable) { } /** * @dev returns all information about the grant's vesting as of the given day * for the given account. Only callable by the account holder or a contract owner. * * @param grantHolder = The address to do this for. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. * return = A tuple with the following values: * amountVested = the amount that is already vested * amountNotVested = the amount that is not yet vested (equal to vestingAmount - vestedAmount) * amountOfGrant = the total amount of tokens subject to vesting. * amountAvailable = the amount of funds in the given account which are available for use as of the given day * amountClaimed = out of amountVested, the amount that has been already transferred to beneficiary * vestStartDay = starting day of the grant (in days since the UNIX epoch). * isActive = true if the vesting schedule is currently active. * wasRevoked = true if the vesting schedule was revoked. */ function getGrantInfo(address grantHolder, uint32 onDayOrToday) external view override returns ( uint256 amountVested, uint256 amountNotVested, uint256 amountOfGrant, uint256 amountAvailable, uint256 amountClaimed, uint32 vestStartDay, bool isActive, bool wasRevoked ) { } function getScheduleAtInfo(address vestingLocation) public view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } function getScheduleInfo(address grantHolder) external view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } // ========================================================================= // === Grant revocation // ========================================================================= /** * @dev If the account has a revocable grant, this forces the grant to end immediately. * After this function is called, getGrantInfo will return incomplete data * and there will be no possibility to claim non-claimed tokens * * @param grantHolder = Address to which tokens will be granted. */ function revokeGrant(address grantHolder) external override onlyOwner { } }
_msgSender()==owner()||_msgSender()==account,"onlyOwnerOrSelf"
59,055
_msgSender()==owner()||_msgSender()==account
"token must be non-zero address"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @title Contract for token vesting schedules * * @dev Contract which gives the ability to act as a pool of funds for allocating * tokens to any number of other addresses. Token grants support the ability to vest over time in * accordance a predefined vesting schedule. A given wallet can receive no more than one token grant. */ contract TokenVesting is TokenVestingInterface, Context, Ownable { using SafeMath for uint256; // Date-related constants for sanity-checking dates to reject obvious erroneous inputs // and conversions from seconds to days and years that are more or less leap year-aware. uint32 private constant _THOUSAND_YEARS_DAYS = 365243; /* See https://www.timeanddate.com/date/durationresult.html?m1=1&d1=1&y1=2000&m2=1&d2=1&y2=3000 */ uint32 private constant _TEN_YEARS_DAYS = _THOUSAND_YEARS_DAYS / 100; /* Includes leap years (though it doesn't really matter) */ uint32 private constant _SECONDS_PER_DAY = 24 * 60 * 60; /* 86400 seconds in a day */ uint32 private constant _JAN_1_2000_SECONDS = 946684800; /* Saturday, January 1, 2000 0:00:00 (GMT) (see https://www.epochconverter.com/) */ uint32 private constant _JAN_1_2000_DAYS = _JAN_1_2000_SECONDS / _SECONDS_PER_DAY; uint32 private constant _JAN_1_3000_DAYS = _JAN_1_2000_DAYS + _THOUSAND_YEARS_DAYS; modifier onlyOwnerOrSelf(address account) { } mapping(address => vestingSchedule) private _vestingSchedules; mapping(address => tokenGrant) private _tokenGrants; address[] private _allBeneficiaries; IERC20 private _token; constructor(IERC20 token_) public { require(<FILL_ME>) _token = token_; } function token() public view override returns (IERC20) { } function kill(address payable beneficiary) external override onlyOwner { } function withdrawTokens(address beneficiary, uint256 amount) external override onlyOwner { } function _withdrawTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for claiming tokens. // ========================================================================= function claimVestingTokens(address beneficiary) external override onlyOwnerOrSelf(beneficiary) { } function claimVestingTokensForAll() external override onlyOwner { } function _claimVestingTokens(address beneficiary) internal { } function _deliverTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for administratively creating a vesting schedule for an account. // ========================================================================= /** * @dev This one-time operation permanently establishes a vesting schedule in the given account. * * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) external override onlyOwner { } function _setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) internal { } // ========================================================================= // === Token grants (general-purpose) // === Methods to be used for administratively creating one-off token grants with vesting schedules. // ========================================================================= /** * @dev Grants tokens to an account. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param vestingLocation = Account where the vesting schedule is held (must already exist). */ function _addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) internal { } /** * @dev Grants tokens to an address, including a portion that will vest over time * according to a set vesting schedule. The overall duration and cliff duration of the grant must * be an even multiple of the vesting interval. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) public override onlyOwner { } function addGrantWithScheduleAt( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) external override onlyOwner { } function addGrantFromToday( address beneficiary, uint256 vestingAmount, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) external override onlyOwner { } // ========================================================================= // === Check vesting. // ========================================================================= function today() public view virtual override returns (uint32 dayNumber) { } function _effectiveDay(uint32 onDayOrToday) internal view returns (uint32 dayNumber) { } /** * @dev Determines the amount of tokens that have not vested in the given account. * * The math is: not vested amount = vesting amount * (end date - on date)/(end date - start date) * * @param grantHolder = The account to check. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. */ function _getNotVestedAmount(address grantHolder, uint32 onDayOrToday) internal view returns (uint256 amountNotVested) { } /** * @dev Computes the amount of funds in the given account which are available for use as of * the given day, i.e. the claimable amount. * * The math is: available amount = totalGrantAmount - notVestedAmount - claimedAmount. * * @param grantHolder = The account to check. * @param onDay = The day to check for, in days since the UNIX epoch. */ function _getAvailableAmount(address grantHolder, uint32 onDay) internal view returns (uint256 amountAvailable) { } function _getAvailableAmountImpl( tokenGrant storage grant, uint256 notVastedOnDay ) internal view returns (uint256 amountAvailable) { } /** * @dev returns all information about the grant's vesting as of the given day * for the given account. Only callable by the account holder or a contract owner. * * @param grantHolder = The address to do this for. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. * return = A tuple with the following values: * amountVested = the amount that is already vested * amountNotVested = the amount that is not yet vested (equal to vestingAmount - vestedAmount) * amountOfGrant = the total amount of tokens subject to vesting. * amountAvailable = the amount of funds in the given account which are available for use as of the given day * amountClaimed = out of amountVested, the amount that has been already transferred to beneficiary * vestStartDay = starting day of the grant (in days since the UNIX epoch). * isActive = true if the vesting schedule is currently active. * wasRevoked = true if the vesting schedule was revoked. */ function getGrantInfo(address grantHolder, uint32 onDayOrToday) external view override returns ( uint256 amountVested, uint256 amountNotVested, uint256 amountOfGrant, uint256 amountAvailable, uint256 amountClaimed, uint32 vestStartDay, bool isActive, bool wasRevoked ) { } function getScheduleAtInfo(address vestingLocation) public view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } function getScheduleInfo(address grantHolder) external view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } // ========================================================================= // === Grant revocation // ========================================================================= /** * @dev If the account has a revocable grant, this forces the grant to end immediately. * After this function is called, getGrantInfo will return incomplete data * and there will be no possibility to claim non-claimed tokens * * @param grantHolder = Address to which tokens will be granted. */ function revokeGrant(address grantHolder) external override onlyOwner { } }
address(token_)!=address(0),"token must be non-zero address"
59,055
address(token_)!=address(0)
null
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @title Contract for token vesting schedules * * @dev Contract which gives the ability to act as a pool of funds for allocating * tokens to any number of other addresses. Token grants support the ability to vest over time in * accordance a predefined vesting schedule. A given wallet can receive no more than one token grant. */ contract TokenVesting is TokenVestingInterface, Context, Ownable { using SafeMath for uint256; // Date-related constants for sanity-checking dates to reject obvious erroneous inputs // and conversions from seconds to days and years that are more or less leap year-aware. uint32 private constant _THOUSAND_YEARS_DAYS = 365243; /* See https://www.timeanddate.com/date/durationresult.html?m1=1&d1=1&y1=2000&m2=1&d2=1&y2=3000 */ uint32 private constant _TEN_YEARS_DAYS = _THOUSAND_YEARS_DAYS / 100; /* Includes leap years (though it doesn't really matter) */ uint32 private constant _SECONDS_PER_DAY = 24 * 60 * 60; /* 86400 seconds in a day */ uint32 private constant _JAN_1_2000_SECONDS = 946684800; /* Saturday, January 1, 2000 0:00:00 (GMT) (see https://www.epochconverter.com/) */ uint32 private constant _JAN_1_2000_DAYS = _JAN_1_2000_SECONDS / _SECONDS_PER_DAY; uint32 private constant _JAN_1_3000_DAYS = _JAN_1_2000_DAYS + _THOUSAND_YEARS_DAYS; modifier onlyOwnerOrSelf(address account) { } mapping(address => vestingSchedule) private _vestingSchedules; mapping(address => tokenGrant) private _tokenGrants; address[] private _allBeneficiaries; IERC20 private _token; constructor(IERC20 token_) public { } function token() public view override returns (IERC20) { } function kill(address payable beneficiary) external override onlyOwner { } function withdrawTokens(address beneficiary, uint256 amount) external override onlyOwner { } function _withdrawTokens(address beneficiary, uint256 amount) internal { require(amount > 0, "amount must be > 0"); require( amount <= token().balanceOf(address(this)), "amount must be <= current balance" ); require(<FILL_ME>) } // ========================================================================= // === Methods for claiming tokens. // ========================================================================= function claimVestingTokens(address beneficiary) external override onlyOwnerOrSelf(beneficiary) { } function claimVestingTokensForAll() external override onlyOwner { } function _claimVestingTokens(address beneficiary) internal { } function _deliverTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for administratively creating a vesting schedule for an account. // ========================================================================= /** * @dev This one-time operation permanently establishes a vesting schedule in the given account. * * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) external override onlyOwner { } function _setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) internal { } // ========================================================================= // === Token grants (general-purpose) // === Methods to be used for administratively creating one-off token grants with vesting schedules. // ========================================================================= /** * @dev Grants tokens to an account. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param vestingLocation = Account where the vesting schedule is held (must already exist). */ function _addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) internal { } /** * @dev Grants tokens to an address, including a portion that will vest over time * according to a set vesting schedule. The overall duration and cliff duration of the grant must * be an even multiple of the vesting interval. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) public override onlyOwner { } function addGrantWithScheduleAt( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) external override onlyOwner { } function addGrantFromToday( address beneficiary, uint256 vestingAmount, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) external override onlyOwner { } // ========================================================================= // === Check vesting. // ========================================================================= function today() public view virtual override returns (uint32 dayNumber) { } function _effectiveDay(uint32 onDayOrToday) internal view returns (uint32 dayNumber) { } /** * @dev Determines the amount of tokens that have not vested in the given account. * * The math is: not vested amount = vesting amount * (end date - on date)/(end date - start date) * * @param grantHolder = The account to check. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. */ function _getNotVestedAmount(address grantHolder, uint32 onDayOrToday) internal view returns (uint256 amountNotVested) { } /** * @dev Computes the amount of funds in the given account which are available for use as of * the given day, i.e. the claimable amount. * * The math is: available amount = totalGrantAmount - notVestedAmount - claimedAmount. * * @param grantHolder = The account to check. * @param onDay = The day to check for, in days since the UNIX epoch. */ function _getAvailableAmount(address grantHolder, uint32 onDay) internal view returns (uint256 amountAvailable) { } function _getAvailableAmountImpl( tokenGrant storage grant, uint256 notVastedOnDay ) internal view returns (uint256 amountAvailable) { } /** * @dev returns all information about the grant's vesting as of the given day * for the given account. Only callable by the account holder or a contract owner. * * @param grantHolder = The address to do this for. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. * return = A tuple with the following values: * amountVested = the amount that is already vested * amountNotVested = the amount that is not yet vested (equal to vestingAmount - vestedAmount) * amountOfGrant = the total amount of tokens subject to vesting. * amountAvailable = the amount of funds in the given account which are available for use as of the given day * amountClaimed = out of amountVested, the amount that has been already transferred to beneficiary * vestStartDay = starting day of the grant (in days since the UNIX epoch). * isActive = true if the vesting schedule is currently active. * wasRevoked = true if the vesting schedule was revoked. */ function getGrantInfo(address grantHolder, uint32 onDayOrToday) external view override returns ( uint256 amountVested, uint256 amountNotVested, uint256 amountOfGrant, uint256 amountAvailable, uint256 amountClaimed, uint32 vestStartDay, bool isActive, bool wasRevoked ) { } function getScheduleAtInfo(address vestingLocation) public view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } function getScheduleInfo(address grantHolder) external view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } // ========================================================================= // === Grant revocation // ========================================================================= /** * @dev If the account has a revocable grant, this forces the grant to end immediately. * After this function is called, getGrantInfo will return incomplete data * and there will be no possibility to claim non-claimed tokens * * @param grantHolder = Address to which tokens will be granted. */ function revokeGrant(address grantHolder) external override onlyOwner { } }
token().transfer(beneficiary,amount)
59,055
token().transfer(beneficiary,amount)
"new claimed amount must be <= total grant amount"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @title Contract for token vesting schedules * * @dev Contract which gives the ability to act as a pool of funds for allocating * tokens to any number of other addresses. Token grants support the ability to vest over time in * accordance a predefined vesting schedule. A given wallet can receive no more than one token grant. */ contract TokenVesting is TokenVestingInterface, Context, Ownable { using SafeMath for uint256; // Date-related constants for sanity-checking dates to reject obvious erroneous inputs // and conversions from seconds to days and years that are more or less leap year-aware. uint32 private constant _THOUSAND_YEARS_DAYS = 365243; /* See https://www.timeanddate.com/date/durationresult.html?m1=1&d1=1&y1=2000&m2=1&d2=1&y2=3000 */ uint32 private constant _TEN_YEARS_DAYS = _THOUSAND_YEARS_DAYS / 100; /* Includes leap years (though it doesn't really matter) */ uint32 private constant _SECONDS_PER_DAY = 24 * 60 * 60; /* 86400 seconds in a day */ uint32 private constant _JAN_1_2000_SECONDS = 946684800; /* Saturday, January 1, 2000 0:00:00 (GMT) (see https://www.epochconverter.com/) */ uint32 private constant _JAN_1_2000_DAYS = _JAN_1_2000_SECONDS / _SECONDS_PER_DAY; uint32 private constant _JAN_1_3000_DAYS = _JAN_1_2000_DAYS + _THOUSAND_YEARS_DAYS; modifier onlyOwnerOrSelf(address account) { } mapping(address => vestingSchedule) private _vestingSchedules; mapping(address => tokenGrant) private _tokenGrants; address[] private _allBeneficiaries; IERC20 private _token; constructor(IERC20 token_) public { } function token() public view override returns (IERC20) { } function kill(address payable beneficiary) external override onlyOwner { } function withdrawTokens(address beneficiary, uint256 amount) external override onlyOwner { } function _withdrawTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for claiming tokens. // ========================================================================= function claimVestingTokens(address beneficiary) external override onlyOwnerOrSelf(beneficiary) { } function claimVestingTokensForAll() external override onlyOwner { } function _claimVestingTokens(address beneficiary) internal { } function _deliverTokens(address beneficiary, uint256 amount) internal { require(amount > 0, "amount must be > 0"); require( amount <= token().balanceOf(address(this)), "amount must be <= current balance" ); require(<FILL_ME>) require(token().transfer(beneficiary, amount)); } // ========================================================================= // === Methods for administratively creating a vesting schedule for an account. // ========================================================================= /** * @dev This one-time operation permanently establishes a vesting schedule in the given account. * * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) external override onlyOwner { } function _setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) internal { } // ========================================================================= // === Token grants (general-purpose) // === Methods to be used for administratively creating one-off token grants with vesting schedules. // ========================================================================= /** * @dev Grants tokens to an account. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param vestingLocation = Account where the vesting schedule is held (must already exist). */ function _addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) internal { } /** * @dev Grants tokens to an address, including a portion that will vest over time * according to a set vesting schedule. The overall duration and cliff duration of the grant must * be an even multiple of the vesting interval. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) public override onlyOwner { } function addGrantWithScheduleAt( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) external override onlyOwner { } function addGrantFromToday( address beneficiary, uint256 vestingAmount, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) external override onlyOwner { } // ========================================================================= // === Check vesting. // ========================================================================= function today() public view virtual override returns (uint32 dayNumber) { } function _effectiveDay(uint32 onDayOrToday) internal view returns (uint32 dayNumber) { } /** * @dev Determines the amount of tokens that have not vested in the given account. * * The math is: not vested amount = vesting amount * (end date - on date)/(end date - start date) * * @param grantHolder = The account to check. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. */ function _getNotVestedAmount(address grantHolder, uint32 onDayOrToday) internal view returns (uint256 amountNotVested) { } /** * @dev Computes the amount of funds in the given account which are available for use as of * the given day, i.e. the claimable amount. * * The math is: available amount = totalGrantAmount - notVestedAmount - claimedAmount. * * @param grantHolder = The account to check. * @param onDay = The day to check for, in days since the UNIX epoch. */ function _getAvailableAmount(address grantHolder, uint32 onDay) internal view returns (uint256 amountAvailable) { } function _getAvailableAmountImpl( tokenGrant storage grant, uint256 notVastedOnDay ) internal view returns (uint256 amountAvailable) { } /** * @dev returns all information about the grant's vesting as of the given day * for the given account. Only callable by the account holder or a contract owner. * * @param grantHolder = The address to do this for. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. * return = A tuple with the following values: * amountVested = the amount that is already vested * amountNotVested = the amount that is not yet vested (equal to vestingAmount - vestedAmount) * amountOfGrant = the total amount of tokens subject to vesting. * amountAvailable = the amount of funds in the given account which are available for use as of the given day * amountClaimed = out of amountVested, the amount that has been already transferred to beneficiary * vestStartDay = starting day of the grant (in days since the UNIX epoch). * isActive = true if the vesting schedule is currently active. * wasRevoked = true if the vesting schedule was revoked. */ function getGrantInfo(address grantHolder, uint32 onDayOrToday) external view override returns ( uint256 amountVested, uint256 amountNotVested, uint256 amountOfGrant, uint256 amountAvailable, uint256 amountClaimed, uint32 vestStartDay, bool isActive, bool wasRevoked ) { } function getScheduleAtInfo(address vestingLocation) public view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } function getScheduleInfo(address grantHolder) external view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } // ========================================================================= // === Grant revocation // ========================================================================= /** * @dev If the account has a revocable grant, this forces the grant to end immediately. * After this function is called, getGrantInfo will return incomplete data * and there will be no possibility to claim non-claimed tokens * * @param grantHolder = Address to which tokens will be granted. */ function revokeGrant(address grantHolder) external override onlyOwner { } }
_tokenGrants[beneficiary].claimedAmount.add(amount)<=_tokenGrants[beneficiary].amount,"new claimed amount must be <= total grant amount"
59,055
_tokenGrants[beneficiary].claimedAmount.add(amount)<=_tokenGrants[beneficiary].amount
"invalid cliff/duration for interval"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @title Contract for token vesting schedules * * @dev Contract which gives the ability to act as a pool of funds for allocating * tokens to any number of other addresses. Token grants support the ability to vest over time in * accordance a predefined vesting schedule. A given wallet can receive no more than one token grant. */ contract TokenVesting is TokenVestingInterface, Context, Ownable { using SafeMath for uint256; // Date-related constants for sanity-checking dates to reject obvious erroneous inputs // and conversions from seconds to days and years that are more or less leap year-aware. uint32 private constant _THOUSAND_YEARS_DAYS = 365243; /* See https://www.timeanddate.com/date/durationresult.html?m1=1&d1=1&y1=2000&m2=1&d2=1&y2=3000 */ uint32 private constant _TEN_YEARS_DAYS = _THOUSAND_YEARS_DAYS / 100; /* Includes leap years (though it doesn't really matter) */ uint32 private constant _SECONDS_PER_DAY = 24 * 60 * 60; /* 86400 seconds in a day */ uint32 private constant _JAN_1_2000_SECONDS = 946684800; /* Saturday, January 1, 2000 0:00:00 (GMT) (see https://www.epochconverter.com/) */ uint32 private constant _JAN_1_2000_DAYS = _JAN_1_2000_SECONDS / _SECONDS_PER_DAY; uint32 private constant _JAN_1_3000_DAYS = _JAN_1_2000_DAYS + _THOUSAND_YEARS_DAYS; modifier onlyOwnerOrSelf(address account) { } mapping(address => vestingSchedule) private _vestingSchedules; mapping(address => tokenGrant) private _tokenGrants; address[] private _allBeneficiaries; IERC20 private _token; constructor(IERC20 token_) public { } function token() public view override returns (IERC20) { } function kill(address payable beneficiary) external override onlyOwner { } function withdrawTokens(address beneficiary, uint256 amount) external override onlyOwner { } function _withdrawTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for claiming tokens. // ========================================================================= function claimVestingTokens(address beneficiary) external override onlyOwnerOrSelf(beneficiary) { } function claimVestingTokensForAll() external override onlyOwner { } function _claimVestingTokens(address beneficiary) internal { } function _deliverTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for administratively creating a vesting schedule for an account. // ========================================================================= /** * @dev This one-time operation permanently establishes a vesting schedule in the given account. * * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) external override onlyOwner { } function _setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) internal { // Check for a valid vesting schedule given (disallow absurd values to reject likely bad input). require( duration > 0 && duration <= _TEN_YEARS_DAYS && cliffDuration < duration && interval >= 1, "invalid vesting schedule" ); // Make sure the duration values are in harmony with interval (both should be an exact multiple of interval). require(<FILL_ME>) // Create and populate a vesting schedule. _vestingSchedules[vestingLocation] = vestingSchedule( isRevocable, cliffDuration, duration, interval ); // Emit the event. emit VestingScheduleCreated( vestingLocation, cliffDuration, duration, interval, isRevocable ); } // ========================================================================= // === Token grants (general-purpose) // === Methods to be used for administratively creating one-off token grants with vesting schedules. // ========================================================================= /** * @dev Grants tokens to an account. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param vestingLocation = Account where the vesting schedule is held (must already exist). */ function _addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) internal { } /** * @dev Grants tokens to an address, including a portion that will vest over time * according to a set vesting schedule. The overall duration and cliff duration of the grant must * be an even multiple of the vesting interval. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) public override onlyOwner { } function addGrantWithScheduleAt( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) external override onlyOwner { } function addGrantFromToday( address beneficiary, uint256 vestingAmount, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) external override onlyOwner { } // ========================================================================= // === Check vesting. // ========================================================================= function today() public view virtual override returns (uint32 dayNumber) { } function _effectiveDay(uint32 onDayOrToday) internal view returns (uint32 dayNumber) { } /** * @dev Determines the amount of tokens that have not vested in the given account. * * The math is: not vested amount = vesting amount * (end date - on date)/(end date - start date) * * @param grantHolder = The account to check. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. */ function _getNotVestedAmount(address grantHolder, uint32 onDayOrToday) internal view returns (uint256 amountNotVested) { } /** * @dev Computes the amount of funds in the given account which are available for use as of * the given day, i.e. the claimable amount. * * The math is: available amount = totalGrantAmount - notVestedAmount - claimedAmount. * * @param grantHolder = The account to check. * @param onDay = The day to check for, in days since the UNIX epoch. */ function _getAvailableAmount(address grantHolder, uint32 onDay) internal view returns (uint256 amountAvailable) { } function _getAvailableAmountImpl( tokenGrant storage grant, uint256 notVastedOnDay ) internal view returns (uint256 amountAvailable) { } /** * @dev returns all information about the grant's vesting as of the given day * for the given account. Only callable by the account holder or a contract owner. * * @param grantHolder = The address to do this for. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. * return = A tuple with the following values: * amountVested = the amount that is already vested * amountNotVested = the amount that is not yet vested (equal to vestingAmount - vestedAmount) * amountOfGrant = the total amount of tokens subject to vesting. * amountAvailable = the amount of funds in the given account which are available for use as of the given day * amountClaimed = out of amountVested, the amount that has been already transferred to beneficiary * vestStartDay = starting day of the grant (in days since the UNIX epoch). * isActive = true if the vesting schedule is currently active. * wasRevoked = true if the vesting schedule was revoked. */ function getGrantInfo(address grantHolder, uint32 onDayOrToday) external view override returns ( uint256 amountVested, uint256 amountNotVested, uint256 amountOfGrant, uint256 amountAvailable, uint256 amountClaimed, uint32 vestStartDay, bool isActive, bool wasRevoked ) { } function getScheduleAtInfo(address vestingLocation) public view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } function getScheduleInfo(address grantHolder) external view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } // ========================================================================= // === Grant revocation // ========================================================================= /** * @dev If the account has a revocable grant, this forces the grant to end immediately. * After this function is called, getGrantInfo will return incomplete data * and there will be no possibility to claim non-claimed tokens * * @param grantHolder = Address to which tokens will be granted. */ function revokeGrant(address grantHolder) external override onlyOwner { } }
duration%interval==0&&cliffDuration%interval==0,"invalid cliff/duration for interval"
59,055
duration%interval==0&&cliffDuration%interval==0
"grant already exists"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @title Contract for token vesting schedules * * @dev Contract which gives the ability to act as a pool of funds for allocating * tokens to any number of other addresses. Token grants support the ability to vest over time in * accordance a predefined vesting schedule. A given wallet can receive no more than one token grant. */ contract TokenVesting is TokenVestingInterface, Context, Ownable { using SafeMath for uint256; // Date-related constants for sanity-checking dates to reject obvious erroneous inputs // and conversions from seconds to days and years that are more or less leap year-aware. uint32 private constant _THOUSAND_YEARS_DAYS = 365243; /* See https://www.timeanddate.com/date/durationresult.html?m1=1&d1=1&y1=2000&m2=1&d2=1&y2=3000 */ uint32 private constant _TEN_YEARS_DAYS = _THOUSAND_YEARS_DAYS / 100; /* Includes leap years (though it doesn't really matter) */ uint32 private constant _SECONDS_PER_DAY = 24 * 60 * 60; /* 86400 seconds in a day */ uint32 private constant _JAN_1_2000_SECONDS = 946684800; /* Saturday, January 1, 2000 0:00:00 (GMT) (see https://www.epochconverter.com/) */ uint32 private constant _JAN_1_2000_DAYS = _JAN_1_2000_SECONDS / _SECONDS_PER_DAY; uint32 private constant _JAN_1_3000_DAYS = _JAN_1_2000_DAYS + _THOUSAND_YEARS_DAYS; modifier onlyOwnerOrSelf(address account) { } mapping(address => vestingSchedule) private _vestingSchedules; mapping(address => tokenGrant) private _tokenGrants; address[] private _allBeneficiaries; IERC20 private _token; constructor(IERC20 token_) public { } function token() public view override returns (IERC20) { } function kill(address payable beneficiary) external override onlyOwner { } function withdrawTokens(address beneficiary, uint256 amount) external override onlyOwner { } function _withdrawTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for claiming tokens. // ========================================================================= function claimVestingTokens(address beneficiary) external override onlyOwnerOrSelf(beneficiary) { } function claimVestingTokensForAll() external override onlyOwner { } function _claimVestingTokens(address beneficiary) internal { } function _deliverTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for administratively creating a vesting schedule for an account. // ========================================================================= /** * @dev This one-time operation permanently establishes a vesting schedule in the given account. * * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) external override onlyOwner { } function _setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) internal { } // ========================================================================= // === Token grants (general-purpose) // === Methods to be used for administratively creating one-off token grants with vesting schedules. // ========================================================================= /** * @dev Grants tokens to an account. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param vestingLocation = Account where the vesting schedule is held (must already exist). */ function _addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) internal { // Make sure no prior grant is in effect. require(<FILL_ME>) // Check for valid vestingAmount require( vestingAmount > 0 && startDay >= _JAN_1_2000_DAYS && startDay < _JAN_1_3000_DAYS, "invalid vesting params" ); // Create and populate a token grant, referencing vesting schedule. _tokenGrants[beneficiary] = tokenGrant( true, // isActive false, // wasRevoked startDay, vestingAmount, vestingLocation, // The wallet address where the vesting schedule is kept. 0 // claimedAmount ); _allBeneficiaries.push(beneficiary); // Emit the event. emit VestingTokensGranted( beneficiary, vestingAmount, startDay, vestingLocation ); } /** * @dev Grants tokens to an address, including a portion that will vest over time * according to a set vesting schedule. The overall duration and cliff duration of the grant must * be an even multiple of the vesting interval. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) public override onlyOwner { } function addGrantWithScheduleAt( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) external override onlyOwner { } function addGrantFromToday( address beneficiary, uint256 vestingAmount, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) external override onlyOwner { } // ========================================================================= // === Check vesting. // ========================================================================= function today() public view virtual override returns (uint32 dayNumber) { } function _effectiveDay(uint32 onDayOrToday) internal view returns (uint32 dayNumber) { } /** * @dev Determines the amount of tokens that have not vested in the given account. * * The math is: not vested amount = vesting amount * (end date - on date)/(end date - start date) * * @param grantHolder = The account to check. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. */ function _getNotVestedAmount(address grantHolder, uint32 onDayOrToday) internal view returns (uint256 amountNotVested) { } /** * @dev Computes the amount of funds in the given account which are available for use as of * the given day, i.e. the claimable amount. * * The math is: available amount = totalGrantAmount - notVestedAmount - claimedAmount. * * @param grantHolder = The account to check. * @param onDay = The day to check for, in days since the UNIX epoch. */ function _getAvailableAmount(address grantHolder, uint32 onDay) internal view returns (uint256 amountAvailable) { } function _getAvailableAmountImpl( tokenGrant storage grant, uint256 notVastedOnDay ) internal view returns (uint256 amountAvailable) { } /** * @dev returns all information about the grant's vesting as of the given day * for the given account. Only callable by the account holder or a contract owner. * * @param grantHolder = The address to do this for. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. * return = A tuple with the following values: * amountVested = the amount that is already vested * amountNotVested = the amount that is not yet vested (equal to vestingAmount - vestedAmount) * amountOfGrant = the total amount of tokens subject to vesting. * amountAvailable = the amount of funds in the given account which are available for use as of the given day * amountClaimed = out of amountVested, the amount that has been already transferred to beneficiary * vestStartDay = starting day of the grant (in days since the UNIX epoch). * isActive = true if the vesting schedule is currently active. * wasRevoked = true if the vesting schedule was revoked. */ function getGrantInfo(address grantHolder, uint32 onDayOrToday) external view override returns ( uint256 amountVested, uint256 amountNotVested, uint256 amountOfGrant, uint256 amountAvailable, uint256 amountClaimed, uint32 vestStartDay, bool isActive, bool wasRevoked ) { } function getScheduleAtInfo(address vestingLocation) public view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } function getScheduleInfo(address grantHolder) external view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } // ========================================================================= // === Grant revocation // ========================================================================= /** * @dev If the account has a revocable grant, this forces the grant to end immediately. * After this function is called, getGrantInfo will return incomplete data * and there will be no possibility to claim non-claimed tokens * * @param grantHolder = Address to which tokens will be granted. */ function revokeGrant(address grantHolder) external override onlyOwner { } }
!_tokenGrants[beneficiary].isActive,"grant already exists"
59,055
!_tokenGrants[beneficiary].isActive
"no active grant"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @title Contract for token vesting schedules * * @dev Contract which gives the ability to act as a pool of funds for allocating * tokens to any number of other addresses. Token grants support the ability to vest over time in * accordance a predefined vesting schedule. A given wallet can receive no more than one token grant. */ contract TokenVesting is TokenVestingInterface, Context, Ownable { using SafeMath for uint256; // Date-related constants for sanity-checking dates to reject obvious erroneous inputs // and conversions from seconds to days and years that are more or less leap year-aware. uint32 private constant _THOUSAND_YEARS_DAYS = 365243; /* See https://www.timeanddate.com/date/durationresult.html?m1=1&d1=1&y1=2000&m2=1&d2=1&y2=3000 */ uint32 private constant _TEN_YEARS_DAYS = _THOUSAND_YEARS_DAYS / 100; /* Includes leap years (though it doesn't really matter) */ uint32 private constant _SECONDS_PER_DAY = 24 * 60 * 60; /* 86400 seconds in a day */ uint32 private constant _JAN_1_2000_SECONDS = 946684800; /* Saturday, January 1, 2000 0:00:00 (GMT) (see https://www.epochconverter.com/) */ uint32 private constant _JAN_1_2000_DAYS = _JAN_1_2000_SECONDS / _SECONDS_PER_DAY; uint32 private constant _JAN_1_3000_DAYS = _JAN_1_2000_DAYS + _THOUSAND_YEARS_DAYS; modifier onlyOwnerOrSelf(address account) { } mapping(address => vestingSchedule) private _vestingSchedules; mapping(address => tokenGrant) private _tokenGrants; address[] private _allBeneficiaries; IERC20 private _token; constructor(IERC20 token_) public { } function token() public view override returns (IERC20) { } function kill(address payable beneficiary) external override onlyOwner { } function withdrawTokens(address beneficiary, uint256 amount) external override onlyOwner { } function _withdrawTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for claiming tokens. // ========================================================================= function claimVestingTokens(address beneficiary) external override onlyOwnerOrSelf(beneficiary) { } function claimVestingTokensForAll() external override onlyOwner { } function _claimVestingTokens(address beneficiary) internal { } function _deliverTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for administratively creating a vesting schedule for an account. // ========================================================================= /** * @dev This one-time operation permanently establishes a vesting schedule in the given account. * * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) external override onlyOwner { } function _setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) internal { } // ========================================================================= // === Token grants (general-purpose) // === Methods to be used for administratively creating one-off token grants with vesting schedules. // ========================================================================= /** * @dev Grants tokens to an account. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param vestingLocation = Account where the vesting schedule is held (must already exist). */ function _addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) internal { } /** * @dev Grants tokens to an address, including a portion that will vest over time * according to a set vesting schedule. The overall duration and cliff duration of the grant must * be an even multiple of the vesting interval. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) public override onlyOwner { } function addGrantWithScheduleAt( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) external override onlyOwner { } function addGrantFromToday( address beneficiary, uint256 vestingAmount, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) external override onlyOwner { } // ========================================================================= // === Check vesting. // ========================================================================= function today() public view virtual override returns (uint32 dayNumber) { } function _effectiveDay(uint32 onDayOrToday) internal view returns (uint32 dayNumber) { } /** * @dev Determines the amount of tokens that have not vested in the given account. * * The math is: not vested amount = vesting amount * (end date - on date)/(end date - start date) * * @param grantHolder = The account to check. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. */ function _getNotVestedAmount(address grantHolder, uint32 onDayOrToday) internal view returns (uint256 amountNotVested) { } /** * @dev Computes the amount of funds in the given account which are available for use as of * the given day, i.e. the claimable amount. * * The math is: available amount = totalGrantAmount - notVestedAmount - claimedAmount. * * @param grantHolder = The account to check. * @param onDay = The day to check for, in days since the UNIX epoch. */ function _getAvailableAmount(address grantHolder, uint32 onDay) internal view returns (uint256 amountAvailable) { } function _getAvailableAmountImpl( tokenGrant storage grant, uint256 notVastedOnDay ) internal view returns (uint256 amountAvailable) { } /** * @dev returns all information about the grant's vesting as of the given day * for the given account. Only callable by the account holder or a contract owner. * * @param grantHolder = The address to do this for. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. * return = A tuple with the following values: * amountVested = the amount that is already vested * amountNotVested = the amount that is not yet vested (equal to vestingAmount - vestedAmount) * amountOfGrant = the total amount of tokens subject to vesting. * amountAvailable = the amount of funds in the given account which are available for use as of the given day * amountClaimed = out of amountVested, the amount that has been already transferred to beneficiary * vestStartDay = starting day of the grant (in days since the UNIX epoch). * isActive = true if the vesting schedule is currently active. * wasRevoked = true if the vesting schedule was revoked. */ function getGrantInfo(address grantHolder, uint32 onDayOrToday) external view override returns ( uint256 amountVested, uint256 amountNotVested, uint256 amountOfGrant, uint256 amountAvailable, uint256 amountClaimed, uint32 vestStartDay, bool isActive, bool wasRevoked ) { } function getScheduleAtInfo(address vestingLocation) public view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } function getScheduleInfo(address grantHolder) external view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } // ========================================================================= // === Grant revocation // ========================================================================= /** * @dev If the account has a revocable grant, this forces the grant to end immediately. * After this function is called, getGrantInfo will return incomplete data * and there will be no possibility to claim non-claimed tokens * * @param grantHolder = Address to which tokens will be granted. */ function revokeGrant(address grantHolder) external override onlyOwner { tokenGrant storage grant = _tokenGrants[grantHolder]; vestingSchedule storage vesting = _vestingSchedules[grant.vestingLocation]; // Make sure a vesting schedule has previously been set. require(<FILL_ME>) // Make sure it's revocable. require(vesting.isRevocable, "irrevocable"); // Kill the grant by updating wasRevoked and isActive. _tokenGrants[grantHolder].wasRevoked = true; _tokenGrants[grantHolder].isActive = false; // Emits the GrantRevoked event. emit GrantRevoked(grantHolder); } }
grant.isActive,"no active grant"
59,055
grant.isActive
"irrevocable"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @title Contract for token vesting schedules * * @dev Contract which gives the ability to act as a pool of funds for allocating * tokens to any number of other addresses. Token grants support the ability to vest over time in * accordance a predefined vesting schedule. A given wallet can receive no more than one token grant. */ contract TokenVesting is TokenVestingInterface, Context, Ownable { using SafeMath for uint256; // Date-related constants for sanity-checking dates to reject obvious erroneous inputs // and conversions from seconds to days and years that are more or less leap year-aware. uint32 private constant _THOUSAND_YEARS_DAYS = 365243; /* See https://www.timeanddate.com/date/durationresult.html?m1=1&d1=1&y1=2000&m2=1&d2=1&y2=3000 */ uint32 private constant _TEN_YEARS_DAYS = _THOUSAND_YEARS_DAYS / 100; /* Includes leap years (though it doesn't really matter) */ uint32 private constant _SECONDS_PER_DAY = 24 * 60 * 60; /* 86400 seconds in a day */ uint32 private constant _JAN_1_2000_SECONDS = 946684800; /* Saturday, January 1, 2000 0:00:00 (GMT) (see https://www.epochconverter.com/) */ uint32 private constant _JAN_1_2000_DAYS = _JAN_1_2000_SECONDS / _SECONDS_PER_DAY; uint32 private constant _JAN_1_3000_DAYS = _JAN_1_2000_DAYS + _THOUSAND_YEARS_DAYS; modifier onlyOwnerOrSelf(address account) { } mapping(address => vestingSchedule) private _vestingSchedules; mapping(address => tokenGrant) private _tokenGrants; address[] private _allBeneficiaries; IERC20 private _token; constructor(IERC20 token_) public { } function token() public view override returns (IERC20) { } function kill(address payable beneficiary) external override onlyOwner { } function withdrawTokens(address beneficiary, uint256 amount) external override onlyOwner { } function _withdrawTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for claiming tokens. // ========================================================================= function claimVestingTokens(address beneficiary) external override onlyOwnerOrSelf(beneficiary) { } function claimVestingTokensForAll() external override onlyOwner { } function _claimVestingTokens(address beneficiary) internal { } function _deliverTokens(address beneficiary, uint256 amount) internal { } // ========================================================================= // === Methods for administratively creating a vesting schedule for an account. // ========================================================================= /** * @dev This one-time operation permanently establishes a vesting schedule in the given account. * * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) external override onlyOwner { } function _setVestingSchedule( address vestingLocation, uint32 cliffDuration, uint32 duration, uint32 interval, bool isRevocable ) internal { } // ========================================================================= // === Token grants (general-purpose) // === Methods to be used for administratively creating one-off token grants with vesting schedules. // ========================================================================= /** * @dev Grants tokens to an account. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param vestingLocation = Account where the vesting schedule is held (must already exist). */ function _addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) internal { } /** * @dev Grants tokens to an address, including a portion that will vest over time * according to a set vesting schedule. The overall duration and cliff duration of the grant must * be an even multiple of the vesting interval. * * @param beneficiary = Address to which tokens will be granted. * @param vestingAmount = The number of tokens subject to vesting. * @param startDay = Start day of the grant's vesting schedule, in days since the UNIX epoch * (start of day). The startDay may be given as a date in the future or in the past, going as far * back as year 2000. * @param duration = Duration of the vesting schedule, with respect to the grant start day, in days. * @param cliffDuration = Duration of the cliff, with respect to the grant start day, in days. * @param interval = Number of days between vesting increases. * @param isRevocable = True if the grant can be revoked (i.e. was a gift) or false if it cannot * be revoked (i.e. tokens were purchased). */ function addGrant( address beneficiary, uint256 vestingAmount, uint32 startDay, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) public override onlyOwner { } function addGrantWithScheduleAt( address beneficiary, uint256 vestingAmount, uint32 startDay, address vestingLocation ) external override onlyOwner { } function addGrantFromToday( address beneficiary, uint256 vestingAmount, uint32 duration, uint32 cliffDuration, uint32 interval, bool isRevocable ) external override onlyOwner { } // ========================================================================= // === Check vesting. // ========================================================================= function today() public view virtual override returns (uint32 dayNumber) { } function _effectiveDay(uint32 onDayOrToday) internal view returns (uint32 dayNumber) { } /** * @dev Determines the amount of tokens that have not vested in the given account. * * The math is: not vested amount = vesting amount * (end date - on date)/(end date - start date) * * @param grantHolder = The account to check. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. */ function _getNotVestedAmount(address grantHolder, uint32 onDayOrToday) internal view returns (uint256 amountNotVested) { } /** * @dev Computes the amount of funds in the given account which are available for use as of * the given day, i.e. the claimable amount. * * The math is: available amount = totalGrantAmount - notVestedAmount - claimedAmount. * * @param grantHolder = The account to check. * @param onDay = The day to check for, in days since the UNIX epoch. */ function _getAvailableAmount(address grantHolder, uint32 onDay) internal view returns (uint256 amountAvailable) { } function _getAvailableAmountImpl( tokenGrant storage grant, uint256 notVastedOnDay ) internal view returns (uint256 amountAvailable) { } /** * @dev returns all information about the grant's vesting as of the given day * for the given account. Only callable by the account holder or a contract owner. * * @param grantHolder = The address to do this for. * @param onDayOrToday = The day to check for, in days since the UNIX epoch. Can pass * the special value 0 to indicate today. * return = A tuple with the following values: * amountVested = the amount that is already vested * amountNotVested = the amount that is not yet vested (equal to vestingAmount - vestedAmount) * amountOfGrant = the total amount of tokens subject to vesting. * amountAvailable = the amount of funds in the given account which are available for use as of the given day * amountClaimed = out of amountVested, the amount that has been already transferred to beneficiary * vestStartDay = starting day of the grant (in days since the UNIX epoch). * isActive = true if the vesting schedule is currently active. * wasRevoked = true if the vesting schedule was revoked. */ function getGrantInfo(address grantHolder, uint32 onDayOrToday) external view override returns ( uint256 amountVested, uint256 amountNotVested, uint256 amountOfGrant, uint256 amountAvailable, uint256 amountClaimed, uint32 vestStartDay, bool isActive, bool wasRevoked ) { } function getScheduleAtInfo(address vestingLocation) public view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } function getScheduleInfo(address grantHolder) external view override returns ( bool isRevocable, uint32 vestDuration, uint32 cliffDuration, uint32 vestIntervalDays ) { } // ========================================================================= // === Grant revocation // ========================================================================= /** * @dev If the account has a revocable grant, this forces the grant to end immediately. * After this function is called, getGrantInfo will return incomplete data * and there will be no possibility to claim non-claimed tokens * * @param grantHolder = Address to which tokens will be granted. */ function revokeGrant(address grantHolder) external override onlyOwner { tokenGrant storage grant = _tokenGrants[grantHolder]; vestingSchedule storage vesting = _vestingSchedules[grant.vestingLocation]; // Make sure a vesting schedule has previously been set. require(grant.isActive, "no active grant"); // Make sure it's revocable. require(<FILL_ME>) // Kill the grant by updating wasRevoked and isActive. _tokenGrants[grantHolder].wasRevoked = true; _tokenGrants[grantHolder].isActive = false; // Emits the GrantRevoked event. emit GrantRevoked(grantHolder); } }
vesting.isRevocable,"irrevocable"
59,055
vesting.isRevocable
"Achitects have been fully constructed."
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //--------------------------------------------------------------------------------------------------------------------------------------------------// // @@@ .&@@& ,,, // // @@@@& @@& .@@& && #&% // // &@ ,@@( @@& (@@ @@& // // &@. &@@. *@@@ @@@@@& @@%..#@@@ @@& @@@@@@@ #@@# @@@@@@@@@@ &@@,.*@@@ @@@,./@@@ ,@@@@@@@@@@ ,@@#../@@@ // // %@, @@@ @@@. @@@ ,, @@@ @@@ @@# (@@ (@@ &@@ &@@ ,, @@& .@@* // // #@(,,,,,,@@@ @@@ %@@. @@& @@@ @@# (@@ @@@@@@@@@@@@( ,@@( @@& ,@@@@%. // // (@% /@@( @@@ %@@. @@& @@@ @@# (@@ @@& *@@# @@& %@@@# // // (@@ @@@, @@@ @@@ @@& @@@ @@# (@@, %@@, , @@@. , @@@ %& #@@ // // .@@@@# /@@@@& %@@@% (@@@@@@@/ &@@@( %@@@# .@@@@/ %@@@@@& @@@@@@@@/ ,@@@@@@@% @@@@@@, &@@@#/%@@@ // // // //--------------------------------------------------------------------------------------------------------------------------------------------------// contract Architects is ERC721Enumerable, Ownable { uint256 private basePrice = 80000000000000000; //0.08 ETH uint256 private reserveAtATime = 25; uint256 private reservedCount = 0; uint256 private maxReserveCount = 100; address private lightAddress = 0x44c525A5D4bAc0239aFdD343213E3F319c7d3Bad; address private avatarAddress = 0xbeEeDa5A51fDAd3Ebbc65A7857822ca2E4DE810f; address private architectureAddress = 0xAB5d300AA7Cf43cf64C14D4A5CC8E9ef050B9805; string _baseTokenURI; bool public isActive = false; bool public isAllowListActive = false; uint256 public constant MAX_ArchitectSUPPLY = 6000; uint256 public maximumAllowedArchitectsPerPurchase = 5; uint256 public allowListMaxMint = 3; mapping(address => bool) private _allowList; mapping(address => uint256) private _allowListClaimed; event AssetMinted(uint256 tokenId, address sender); event SaleActivation(bool isActive); constructor(string memory baseURI) ERC721("Architects", "Architects") { } modifier saleIsOpen { require(<FILL_ME>) _; } modifier onlyAuthorized() { } function setMaximumAllowedTokens(uint256 _count) public onlyAuthorized { } function setActive(bool val) public onlyAuthorized { } function setIsAllowListActive(bool _isAllowListActive) external onlyAuthorized { } function setAllowListMaxMint(uint256 maxMint) external onlyAuthorized { } function addToAllowList(address[] calldata addresses) external onlyAuthorized { } function checkIfOnAllowList(address addr) external view returns (bool) { } function removeFromAllowList(address[] calldata addresses) external onlyAuthorized { } function allowListClaimedBy(address owner) external view returns (uint256){ } function setReserveAtATime(uint256 val) public onlyAuthorized { } function setMaxReserve(uint256 val) public onlyAuthorized { } function setPrice(uint256 _price) public onlyAuthorized { } function setBaseURI(string memory baseURI) public onlyAuthorized { } function getMaximumAllowedArchitects() public view onlyAuthorized returns (uint256) { } function getPrice() external view returns (uint256) { } function getReserveAtATime() external view returns (uint256) { } function getTotalSupply() external view returns (uint256) { } function getContractOwner() public view returns (address) { } function _baseURI() internal view virtual override returns (string memory) { } function reserveNft() public onlyAuthorized { } function mint(address _to, uint256 _count) public payable saleIsOpen { } function preSaleMint(uint256 _count) public payable saleIsOpen { } function walletOfOwner(address _owner) external view returns(uint256[] memory) { } function withdraw() external onlyAuthorized { } }
totalSupply()<=MAX_ArchitectSUPPLY,"Achitects have been fully constructed."
59,148
totalSupply()<=MAX_ArchitectSUPPLY
"Total Architects supply has been exceeded."
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //--------------------------------------------------------------------------------------------------------------------------------------------------// // @@@ .&@@& ,,, // // @@@@& @@& .@@& && #&% // // &@ ,@@( @@& (@@ @@& // // &@. &@@. *@@@ @@@@@& @@%..#@@@ @@& @@@@@@@ #@@# @@@@@@@@@@ &@@,.*@@@ @@@,./@@@ ,@@@@@@@@@@ ,@@#../@@@ // // %@, @@@ @@@. @@@ ,, @@@ @@@ @@# (@@ (@@ &@@ &@@ ,, @@& .@@* // // #@(,,,,,,@@@ @@@ %@@. @@& @@@ @@# (@@ @@@@@@@@@@@@( ,@@( @@& ,@@@@%. // // (@% /@@( @@@ %@@. @@& @@@ @@# (@@ @@& *@@# @@& %@@@# // // (@@ @@@, @@@ @@@ @@& @@@ @@# (@@, %@@, , @@@. , @@@ %& #@@ // // .@@@@# /@@@@& %@@@% (@@@@@@@/ &@@@( %@@@# .@@@@/ %@@@@@& @@@@@@@@/ ,@@@@@@@% @@@@@@, &@@@#/%@@@ // // // //--------------------------------------------------------------------------------------------------------------------------------------------------// contract Architects is ERC721Enumerable, Ownable { uint256 private basePrice = 80000000000000000; //0.08 ETH uint256 private reserveAtATime = 25; uint256 private reservedCount = 0; uint256 private maxReserveCount = 100; address private lightAddress = 0x44c525A5D4bAc0239aFdD343213E3F319c7d3Bad; address private avatarAddress = 0xbeEeDa5A51fDAd3Ebbc65A7857822ca2E4DE810f; address private architectureAddress = 0xAB5d300AA7Cf43cf64C14D4A5CC8E9ef050B9805; string _baseTokenURI; bool public isActive = false; bool public isAllowListActive = false; uint256 public constant MAX_ArchitectSUPPLY = 6000; uint256 public maximumAllowedArchitectsPerPurchase = 5; uint256 public allowListMaxMint = 3; mapping(address => bool) private _allowList; mapping(address => uint256) private _allowListClaimed; event AssetMinted(uint256 tokenId, address sender); event SaleActivation(bool isActive); constructor(string memory baseURI) ERC721("Architects", "Architects") { } modifier saleIsOpen { } modifier onlyAuthorized() { } function setMaximumAllowedTokens(uint256 _count) public onlyAuthorized { } function setActive(bool val) public onlyAuthorized { } function setIsAllowListActive(bool _isAllowListActive) external onlyAuthorized { } function setAllowListMaxMint(uint256 maxMint) external onlyAuthorized { } function addToAllowList(address[] calldata addresses) external onlyAuthorized { } function checkIfOnAllowList(address addr) external view returns (bool) { } function removeFromAllowList(address[] calldata addresses) external onlyAuthorized { } function allowListClaimedBy(address owner) external view returns (uint256){ } function setReserveAtATime(uint256 val) public onlyAuthorized { } function setMaxReserve(uint256 val) public onlyAuthorized { } function setPrice(uint256 _price) public onlyAuthorized { } function setBaseURI(string memory baseURI) public onlyAuthorized { } function getMaximumAllowedArchitects() public view onlyAuthorized returns (uint256) { } function getPrice() external view returns (uint256) { } function getReserveAtATime() external view returns (uint256) { } function getTotalSupply() external view returns (uint256) { } function getContractOwner() public view returns (address) { } function _baseURI() internal view virtual override returns (string memory) { } function reserveNft() public onlyAuthorized { } function mint(address _to, uint256 _count) public payable saleIsOpen { if (msg.sender != owner()) { require(isActive, "Architects mint is not active currently."); } require(<FILL_ME>) require(totalSupply() <= MAX_ArchitectSUPPLY, "Total Architects supply has been spent."); require( _count <= maximumAllowedArchitectsPerPurchase, "Exceeds maximum allowed tokens" ); require(msg.value >= basePrice * _count, "Insuffient ETH amount sent. No Architects Inbound."); require(tx.origin == msg.sender, "Please do not use a custom contract to build Architects"); for (uint256 i = 0; i < _count; i++) { emit AssetMinted(totalSupply(), _to); _safeMint(_to, totalSupply()); } } function preSaleMint(uint256 _count) public payable saleIsOpen { } function walletOfOwner(address _owner) external view returns(uint256[] memory) { } function withdraw() external onlyAuthorized { } }
totalSupply()+_count<=MAX_ArchitectSUPPLY,"Total Architects supply has been exceeded."
59,148
totalSupply()+_count<=MAX_ArchitectSUPPLY
"All Architects have been minted"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //--------------------------------------------------------------------------------------------------------------------------------------------------// // @@@ .&@@& ,,, // // @@@@& @@& .@@& && #&% // // &@ ,@@( @@& (@@ @@& // // &@. &@@. *@@@ @@@@@& @@%..#@@@ @@& @@@@@@@ #@@# @@@@@@@@@@ &@@,.*@@@ @@@,./@@@ ,@@@@@@@@@@ ,@@#../@@@ // // %@, @@@ @@@. @@@ ,, @@@ @@@ @@# (@@ (@@ &@@ &@@ ,, @@& .@@* // // #@(,,,,,,@@@ @@@ %@@. @@& @@@ @@# (@@ @@@@@@@@@@@@( ,@@( @@& ,@@@@%. // // (@% /@@( @@@ %@@. @@& @@@ @@# (@@ @@& *@@# @@& %@@@# // // (@@ @@@, @@@ @@@ @@& @@@ @@# (@@, %@@, , @@@. , @@@ %& #@@ // // .@@@@# /@@@@& %@@@% (@@@@@@@/ &@@@( %@@@# .@@@@/ %@@@@@& @@@@@@@@/ ,@@@@@@@% @@@@@@, &@@@#/%@@@ // // // //--------------------------------------------------------------------------------------------------------------------------------------------------// contract Architects is ERC721Enumerable, Ownable { uint256 private basePrice = 80000000000000000; //0.08 ETH uint256 private reserveAtATime = 25; uint256 private reservedCount = 0; uint256 private maxReserveCount = 100; address private lightAddress = 0x44c525A5D4bAc0239aFdD343213E3F319c7d3Bad; address private avatarAddress = 0xbeEeDa5A51fDAd3Ebbc65A7857822ca2E4DE810f; address private architectureAddress = 0xAB5d300AA7Cf43cf64C14D4A5CC8E9ef050B9805; string _baseTokenURI; bool public isActive = false; bool public isAllowListActive = false; uint256 public constant MAX_ArchitectSUPPLY = 6000; uint256 public maximumAllowedArchitectsPerPurchase = 5; uint256 public allowListMaxMint = 3; mapping(address => bool) private _allowList; mapping(address => uint256) private _allowListClaimed; event AssetMinted(uint256 tokenId, address sender); event SaleActivation(bool isActive); constructor(string memory baseURI) ERC721("Architects", "Architects") { } modifier saleIsOpen { } modifier onlyAuthorized() { } function setMaximumAllowedTokens(uint256 _count) public onlyAuthorized { } function setActive(bool val) public onlyAuthorized { } function setIsAllowListActive(bool _isAllowListActive) external onlyAuthorized { } function setAllowListMaxMint(uint256 maxMint) external onlyAuthorized { } function addToAllowList(address[] calldata addresses) external onlyAuthorized { } function checkIfOnAllowList(address addr) external view returns (bool) { } function removeFromAllowList(address[] calldata addresses) external onlyAuthorized { } function allowListClaimedBy(address owner) external view returns (uint256){ } function setReserveAtATime(uint256 val) public onlyAuthorized { } function setMaxReserve(uint256 val) public onlyAuthorized { } function setPrice(uint256 _price) public onlyAuthorized { } function setBaseURI(string memory baseURI) public onlyAuthorized { } function getMaximumAllowedArchitects() public view onlyAuthorized returns (uint256) { } function getPrice() external view returns (uint256) { } function getReserveAtATime() external view returns (uint256) { } function getTotalSupply() external view returns (uint256) { } function getContractOwner() public view returns (address) { } function _baseURI() internal view virtual override returns (string memory) { } function reserveNft() public onlyAuthorized { } function mint(address _to, uint256 _count) public payable saleIsOpen { } function preSaleMint(uint256 _count) public payable saleIsOpen { require(isAllowListActive, "Allow List is not active yet"); require(_allowList[msg.sender], "You are not on the Architects allow List"); require(<FILL_ME>) require(_count <= allowListMaxMint, "Cannot purchase this many Architects"); require(_allowListClaimed[msg.sender] + _count <= allowListMaxMint, "Purchase exceeds max allowed Architects"); require(msg.value >= basePrice * _count, "Insuffient ETH amount sent."); require(tx.origin == msg.sender, "Please do not use a custom contract to build Architects"); for (uint256 i = 0; i < _count; i++) { _allowListClaimed[msg.sender] += 1; emit AssetMinted(totalSupply(), msg.sender); _safeMint(msg.sender, totalSupply()); } } function walletOfOwner(address _owner) external view returns(uint256[] memory) { } function withdraw() external onlyAuthorized { } }
totalSupply()<MAX_ArchitectSUPPLY,"All Architects have been minted"
59,148
totalSupply()<MAX_ArchitectSUPPLY
"Purchase exceeds max allowed Architects"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //--------------------------------------------------------------------------------------------------------------------------------------------------// // @@@ .&@@& ,,, // // @@@@& @@& .@@& && #&% // // &@ ,@@( @@& (@@ @@& // // &@. &@@. *@@@ @@@@@& @@%..#@@@ @@& @@@@@@@ #@@# @@@@@@@@@@ &@@,.*@@@ @@@,./@@@ ,@@@@@@@@@@ ,@@#../@@@ // // %@, @@@ @@@. @@@ ,, @@@ @@@ @@# (@@ (@@ &@@ &@@ ,, @@& .@@* // // #@(,,,,,,@@@ @@@ %@@. @@& @@@ @@# (@@ @@@@@@@@@@@@( ,@@( @@& ,@@@@%. // // (@% /@@( @@@ %@@. @@& @@@ @@# (@@ @@& *@@# @@& %@@@# // // (@@ @@@, @@@ @@@ @@& @@@ @@# (@@, %@@, , @@@. , @@@ %& #@@ // // .@@@@# /@@@@& %@@@% (@@@@@@@/ &@@@( %@@@# .@@@@/ %@@@@@& @@@@@@@@/ ,@@@@@@@% @@@@@@, &@@@#/%@@@ // // // //--------------------------------------------------------------------------------------------------------------------------------------------------// contract Architects is ERC721Enumerable, Ownable { uint256 private basePrice = 80000000000000000; //0.08 ETH uint256 private reserveAtATime = 25; uint256 private reservedCount = 0; uint256 private maxReserveCount = 100; address private lightAddress = 0x44c525A5D4bAc0239aFdD343213E3F319c7d3Bad; address private avatarAddress = 0xbeEeDa5A51fDAd3Ebbc65A7857822ca2E4DE810f; address private architectureAddress = 0xAB5d300AA7Cf43cf64C14D4A5CC8E9ef050B9805; string _baseTokenURI; bool public isActive = false; bool public isAllowListActive = false; uint256 public constant MAX_ArchitectSUPPLY = 6000; uint256 public maximumAllowedArchitectsPerPurchase = 5; uint256 public allowListMaxMint = 3; mapping(address => bool) private _allowList; mapping(address => uint256) private _allowListClaimed; event AssetMinted(uint256 tokenId, address sender); event SaleActivation(bool isActive); constructor(string memory baseURI) ERC721("Architects", "Architects") { } modifier saleIsOpen { } modifier onlyAuthorized() { } function setMaximumAllowedTokens(uint256 _count) public onlyAuthorized { } function setActive(bool val) public onlyAuthorized { } function setIsAllowListActive(bool _isAllowListActive) external onlyAuthorized { } function setAllowListMaxMint(uint256 maxMint) external onlyAuthorized { } function addToAllowList(address[] calldata addresses) external onlyAuthorized { } function checkIfOnAllowList(address addr) external view returns (bool) { } function removeFromAllowList(address[] calldata addresses) external onlyAuthorized { } function allowListClaimedBy(address owner) external view returns (uint256){ } function setReserveAtATime(uint256 val) public onlyAuthorized { } function setMaxReserve(uint256 val) public onlyAuthorized { } function setPrice(uint256 _price) public onlyAuthorized { } function setBaseURI(string memory baseURI) public onlyAuthorized { } function getMaximumAllowedArchitects() public view onlyAuthorized returns (uint256) { } function getPrice() external view returns (uint256) { } function getReserveAtATime() external view returns (uint256) { } function getTotalSupply() external view returns (uint256) { } function getContractOwner() public view returns (address) { } function _baseURI() internal view virtual override returns (string memory) { } function reserveNft() public onlyAuthorized { } function mint(address _to, uint256 _count) public payable saleIsOpen { } function preSaleMint(uint256 _count) public payable saleIsOpen { require(isAllowListActive, "Allow List is not active yet"); require(_allowList[msg.sender], "You are not on the Architects allow List"); require(totalSupply() < MAX_ArchitectSUPPLY, "All Architects have been minted"); require(_count <= allowListMaxMint, "Cannot purchase this many Architects"); require(<FILL_ME>) require(msg.value >= basePrice * _count, "Insuffient ETH amount sent."); require(tx.origin == msg.sender, "Please do not use a custom contract to build Architects"); for (uint256 i = 0; i < _count; i++) { _allowListClaimed[msg.sender] += 1; emit AssetMinted(totalSupply(), msg.sender); _safeMint(msg.sender, totalSupply()); } } function walletOfOwner(address _owner) external view returns(uint256[] memory) { } function withdraw() external onlyAuthorized { } }
_allowListClaimed[msg.sender]+_count<=allowListMaxMint,"Purchase exceeds max allowed Architects"
59,148
_allowListClaimed[msg.sender]+_count<=allowListMaxMint
"SOLD OUT!"
pragma solidity 0.8.10; /// SPDX-License-Identifier: UNLICENSED contract BCCC is ERC721, Ownable, ReentrancyGuard { using Strings for uint256; using Counters for Counters.Counter; string public baseURI; string public baseExtension = ".json"; uint8 public maxTx = 10; uint256 public maxSupply = 10000; uint256 public price = 0.05 ether; bool public camelMainsaleOpen = false; Counters.Counter private _tokenIdTracker; mapping (address => uint256) walletMinted; constructor(string memory _initBaseURI) ERC721("Bored Camel Caravan Club", "BCCC") { } modifier isMainsaleOpen { } function changeMainsale(bool _mainsale) public onlyOwner { } function totalToken() public view returns (uint256) { } function mainSale(uint8 mintTotal)public payable isMainsaleOpen nonReentrant { uint256 totalMinted = mintTotal + walletMinted[msg.sender]; require(totalMinted < maxTx, "Mint exceeds limitations"); require(mintTotal >= 1 , "Mint Amount Incorrect"); require(msg.value >= price * mintTotal, "Minting a Camel Costs 0.05 Ether Each!"); require(<FILL_ME>) for(uint i=0;i<mintTotal;i++) { _tokenIdTracker.increment(); _safeMint(msg.sender, totalToken()); } } function withdrawContractEther(address payable recipient) external onlyOwner { } function getBalance() public view returns(uint) { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
totalToken()<maxSupply,"SOLD OUT!"
59,151
totalToken()<maxSupply
"Failed to enter compound token market"
/** * @title CompoundPool * @author Nate Welch <github.com/flyging> * @notice Based on Zefram Lou's implementation https://github.com/ZeframLou/pooled-cdai * @dev A bank that will pool compound tokens and allows the beneficiary to withdraw */ contract CompoundPool is ERC20, ERC20Detailed, Ownable { using SafeMath for uint; uint256 internal constant PRECISION = 10 ** 18; ICompoundERC20 public compoundToken; IERC20 public depositToken; address public governance; address public beneficiary; /** * @notice Constructor * @param _name name of the pool share token * @param _symbol symbol of the pool share token * @param _comptroller the Compound Comptroller contract used to enter the compoundToken's market * @param _compoundToken the Compound Token contract (e.g. cDAI) * @param _depositToken the Deposit Token contract (e.g. DAI) * @param _beneficiary the address that can withdraw excess deposit tokens (interest/donations) */ constructor( string memory _name, string memory _symbol, IComptroller _comptroller, ICompoundERC20 _compoundToken, IERC20 _depositToken, address _beneficiary ) ERC20Detailed(_name, _symbol, 18) public { compoundToken = _compoundToken; depositToken = _depositToken; beneficiary = _beneficiary; _approveDepositToken(1); // Enter compound token market address[] memory markets = new address[](1); markets[0] = address(compoundToken); uint[] memory errors = _comptroller.enterMarkets(markets); require(<FILL_ME>) } /** * @dev used to restrict access of functions to the current beneficiary */ modifier onlyBeneficiary() { } /** * @notice Called by the `owner` to set a new beneficiary * @dev This function will fail if called by a non-owner address * @param _newBeneficiary The address that will become the new beneficiary */ function updateBeneficiary(address _newBeneficiary) public onlyOwner { } /** * @notice The beneficiary calls this function to withdraw excess deposit tokens * @dev This function will fail if called by a non-beneficiary or if _amount is higher than the excess deposit tokens * @param _to The address that the deposit tokens will be sent to * @param _amount The amount of deposit tokens to send to the `_to` address */ function withdrawInterest(address _to, uint256 _amount) public onlyBeneficiary returns (uint256) { } /** * @notice Called by someone wishing to deposit to the bank. This amount, plus previous user's balance, will always be withdrawable * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token * @param _amount The amount of deposit tokens to deposit */ function deposit(uint256 _amount) public { } /** * @notice Called by someone wishing to withdraw from the bank * @dev This will fail if msg.sender doesn't have at least _amount pool share tokens * @param _amount The amount of deposit tokens to withdraw */ function withdraw(uint256 _amount) public { } /** * @notice Called by someone wishing to donate to the bank. This amount will *not* be added to users balance, and will be usable by the beneficiary. * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token * @param _amount The amount of deposit tokens to donate */ function donate(uint256 _amount) public { } /** * @notice Returns the amount of deposit tokens that are usable by the beneficiary. Basically, interestEarned+donations * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token */ function excessDepositTokens() public returns (uint256) { } function depositTokenStoredBalance() internal returns (uint256) { } function _approveDepositToken(uint256 _minimum) internal { } }
errors[0]==0,"Failed to enter compound token market"
59,243
errors[0]==0
"CompoundPool::withdrawInterest: Compound redeem failed"
/** * @title CompoundPool * @author Nate Welch <github.com/flyging> * @notice Based on Zefram Lou's implementation https://github.com/ZeframLou/pooled-cdai * @dev A bank that will pool compound tokens and allows the beneficiary to withdraw */ contract CompoundPool is ERC20, ERC20Detailed, Ownable { using SafeMath for uint; uint256 internal constant PRECISION = 10 ** 18; ICompoundERC20 public compoundToken; IERC20 public depositToken; address public governance; address public beneficiary; /** * @notice Constructor * @param _name name of the pool share token * @param _symbol symbol of the pool share token * @param _comptroller the Compound Comptroller contract used to enter the compoundToken's market * @param _compoundToken the Compound Token contract (e.g. cDAI) * @param _depositToken the Deposit Token contract (e.g. DAI) * @param _beneficiary the address that can withdraw excess deposit tokens (interest/donations) */ constructor( string memory _name, string memory _symbol, IComptroller _comptroller, ICompoundERC20 _compoundToken, IERC20 _depositToken, address _beneficiary ) ERC20Detailed(_name, _symbol, 18) public { } /** * @dev used to restrict access of functions to the current beneficiary */ modifier onlyBeneficiary() { } /** * @notice Called by the `owner` to set a new beneficiary * @dev This function will fail if called by a non-owner address * @param _newBeneficiary The address that will become the new beneficiary */ function updateBeneficiary(address _newBeneficiary) public onlyOwner { } /** * @notice The beneficiary calls this function to withdraw excess deposit tokens * @dev This function will fail if called by a non-beneficiary or if _amount is higher than the excess deposit tokens * @param _to The address that the deposit tokens will be sent to * @param _amount The amount of deposit tokens to send to the `_to` address */ function withdrawInterest(address _to, uint256 _amount) public onlyBeneficiary returns (uint256) { require(<FILL_ME>) //Doing this *after* `redeemUnderlying` so I don't have compoundToken do `exchangeRateCurrent` twice, it's not cheap require(depositTokenStoredBalance() >= totalSupply(), "CompoundPool::withdrawInterest: Not enough excess deposit token"); depositToken.transfer(_to, _amount); } /** * @notice Called by someone wishing to deposit to the bank. This amount, plus previous user's balance, will always be withdrawable * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token * @param _amount The amount of deposit tokens to deposit */ function deposit(uint256 _amount) public { } /** * @notice Called by someone wishing to withdraw from the bank * @dev This will fail if msg.sender doesn't have at least _amount pool share tokens * @param _amount The amount of deposit tokens to withdraw */ function withdraw(uint256 _amount) public { } /** * @notice Called by someone wishing to donate to the bank. This amount will *not* be added to users balance, and will be usable by the beneficiary. * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token * @param _amount The amount of deposit tokens to donate */ function donate(uint256 _amount) public { } /** * @notice Returns the amount of deposit tokens that are usable by the beneficiary. Basically, interestEarned+donations * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token */ function excessDepositTokens() public returns (uint256) { } function depositTokenStoredBalance() internal returns (uint256) { } function _approveDepositToken(uint256 _minimum) internal { } }
compoundToken.redeemUnderlying(_amount)==0,"CompoundPool::withdrawInterest: Compound redeem failed"
59,243
compoundToken.redeemUnderlying(_amount)==0
"CompoundPool::withdrawInterest: Not enough excess deposit token"
/** * @title CompoundPool * @author Nate Welch <github.com/flyging> * @notice Based on Zefram Lou's implementation https://github.com/ZeframLou/pooled-cdai * @dev A bank that will pool compound tokens and allows the beneficiary to withdraw */ contract CompoundPool is ERC20, ERC20Detailed, Ownable { using SafeMath for uint; uint256 internal constant PRECISION = 10 ** 18; ICompoundERC20 public compoundToken; IERC20 public depositToken; address public governance; address public beneficiary; /** * @notice Constructor * @param _name name of the pool share token * @param _symbol symbol of the pool share token * @param _comptroller the Compound Comptroller contract used to enter the compoundToken's market * @param _compoundToken the Compound Token contract (e.g. cDAI) * @param _depositToken the Deposit Token contract (e.g. DAI) * @param _beneficiary the address that can withdraw excess deposit tokens (interest/donations) */ constructor( string memory _name, string memory _symbol, IComptroller _comptroller, ICompoundERC20 _compoundToken, IERC20 _depositToken, address _beneficiary ) ERC20Detailed(_name, _symbol, 18) public { } /** * @dev used to restrict access of functions to the current beneficiary */ modifier onlyBeneficiary() { } /** * @notice Called by the `owner` to set a new beneficiary * @dev This function will fail if called by a non-owner address * @param _newBeneficiary The address that will become the new beneficiary */ function updateBeneficiary(address _newBeneficiary) public onlyOwner { } /** * @notice The beneficiary calls this function to withdraw excess deposit tokens * @dev This function will fail if called by a non-beneficiary or if _amount is higher than the excess deposit tokens * @param _to The address that the deposit tokens will be sent to * @param _amount The amount of deposit tokens to send to the `_to` address */ function withdrawInterest(address _to, uint256 _amount) public onlyBeneficiary returns (uint256) { require(compoundToken.redeemUnderlying(_amount) == 0, "CompoundPool::withdrawInterest: Compound redeem failed"); //Doing this *after* `redeemUnderlying` so I don't have compoundToken do `exchangeRateCurrent` twice, it's not cheap require(<FILL_ME>) depositToken.transfer(_to, _amount); } /** * @notice Called by someone wishing to deposit to the bank. This amount, plus previous user's balance, will always be withdrawable * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token * @param _amount The amount of deposit tokens to deposit */ function deposit(uint256 _amount) public { } /** * @notice Called by someone wishing to withdraw from the bank * @dev This will fail if msg.sender doesn't have at least _amount pool share tokens * @param _amount The amount of deposit tokens to withdraw */ function withdraw(uint256 _amount) public { } /** * @notice Called by someone wishing to donate to the bank. This amount will *not* be added to users balance, and will be usable by the beneficiary. * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token * @param _amount The amount of deposit tokens to donate */ function donate(uint256 _amount) public { } /** * @notice Returns the amount of deposit tokens that are usable by the beneficiary. Basically, interestEarned+donations * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token */ function excessDepositTokens() public returns (uint256) { } function depositTokenStoredBalance() internal returns (uint256) { } function _approveDepositToken(uint256 _minimum) internal { } }
depositTokenStoredBalance()>=totalSupply(),"CompoundPool::withdrawInterest: Not enough excess deposit token"
59,243
depositTokenStoredBalance()>=totalSupply()
"CompoundPool::deposit: Transfer failed"
/** * @title CompoundPool * @author Nate Welch <github.com/flyging> * @notice Based on Zefram Lou's implementation https://github.com/ZeframLou/pooled-cdai * @dev A bank that will pool compound tokens and allows the beneficiary to withdraw */ contract CompoundPool is ERC20, ERC20Detailed, Ownable { using SafeMath for uint; uint256 internal constant PRECISION = 10 ** 18; ICompoundERC20 public compoundToken; IERC20 public depositToken; address public governance; address public beneficiary; /** * @notice Constructor * @param _name name of the pool share token * @param _symbol symbol of the pool share token * @param _comptroller the Compound Comptroller contract used to enter the compoundToken's market * @param _compoundToken the Compound Token contract (e.g. cDAI) * @param _depositToken the Deposit Token contract (e.g. DAI) * @param _beneficiary the address that can withdraw excess deposit tokens (interest/donations) */ constructor( string memory _name, string memory _symbol, IComptroller _comptroller, ICompoundERC20 _compoundToken, IERC20 _depositToken, address _beneficiary ) ERC20Detailed(_name, _symbol, 18) public { } /** * @dev used to restrict access of functions to the current beneficiary */ modifier onlyBeneficiary() { } /** * @notice Called by the `owner` to set a new beneficiary * @dev This function will fail if called by a non-owner address * @param _newBeneficiary The address that will become the new beneficiary */ function updateBeneficiary(address _newBeneficiary) public onlyOwner { } /** * @notice The beneficiary calls this function to withdraw excess deposit tokens * @dev This function will fail if called by a non-beneficiary or if _amount is higher than the excess deposit tokens * @param _to The address that the deposit tokens will be sent to * @param _amount The amount of deposit tokens to send to the `_to` address */ function withdrawInterest(address _to, uint256 _amount) public onlyBeneficiary returns (uint256) { } /** * @notice Called by someone wishing to deposit to the bank. This amount, plus previous user's balance, will always be withdrawable * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token * @param _amount The amount of deposit tokens to deposit */ function deposit(uint256 _amount) public { require(<FILL_ME>) _approveDepositToken(_amount); require(compoundToken.mint(_amount) == 0, "CompoundPool::deposit: Compound mint failed"); _mint(msg.sender, _amount); } /** * @notice Called by someone wishing to withdraw from the bank * @dev This will fail if msg.sender doesn't have at least _amount pool share tokens * @param _amount The amount of deposit tokens to withdraw */ function withdraw(uint256 _amount) public { } /** * @notice Called by someone wishing to donate to the bank. This amount will *not* be added to users balance, and will be usable by the beneficiary. * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token * @param _amount The amount of deposit tokens to donate */ function donate(uint256 _amount) public { } /** * @notice Returns the amount of deposit tokens that are usable by the beneficiary. Basically, interestEarned+donations * @dev Allowance for CompoundPool to transferFrom the msg.sender's balance must be set on the deposit token */ function excessDepositTokens() public returns (uint256) { } function depositTokenStoredBalance() internal returns (uint256) { } function _approveDepositToken(uint256 _minimum) internal { } }
depositToken.transferFrom(msg.sender,address(this),_amount),"CompoundPool::deposit: Transfer failed"
59,243
depositToken.transferFrom(msg.sender,address(this),_amount)