comment
stringlengths
1
211
โŒ€
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"block already stored"
/*********************************************************** * This file is part of the Slock.it IoT Layer. * * The Slock.it IoT Layer contains: * * - USN (Universal Sharing Network) * * - INCUBED (Trustless INcentivized remote Node Network) * ************************************************************ * Copyright (C) 2016 - 2018 Slock.it GmbH * * All Rights Reserved. * ************************************************************ * You may use, distribute and modify this code under the * * terms of the license contract you have concluded with * * Slock.it GmbH. * * For information about liability, maintenance etc. also * * refer to the contract concluded with Slock.it GmbH. * ************************************************************ * For more information, please refer to https://slock.it * * For questions, please contact [email protected] * ***********************************************************/ pragma solidity 0.5.10; pragma experimental ABIEncoderV2; /// @title Registry for blockhashes contract BlockhashRegistry { /// a new blockhash and its number has been added to the contract event LogBlockhashAdded(uint indexed blockNr, bytes32 indexed bhash); /// maps the blocknumber to its blockhash mapping(uint => bytes32) public blockhashMapping; /// constructor, calls snapshot-function when contract get deployed as entry point /// @dev cannot be deployed in a genesis block constructor() public { } /// @notice searches for an already existing snapshot /// @param _startNumber the blocknumber to start searching /// @param _numBlocks the number of blocks to search for /// @return the closes snapshot of found within the given range, 0 else function searchForAvailableBlock(uint _startNumber, uint _numBlocks) external view returns (uint) { } /// @notice starts with a given blocknumber and its header and tries to recreate a (reverse) chain of blocks /// @notice only usable when the given blocknumber is already in the smart contract /// @notice it will be checked whether the provided chain is correct by using the reCalculateBlockheaders function /// @notice if successfull the last blockhash of the header will be added to the smart contract /// @param _blockNumber the block number to start recreation from /// @param _blockheaders array with serialized blockheaders in reverse order (youngest -> oldest) => (e.g. 100, 99, 98) /// @dev reverts when there is not parent block already stored in the contract /// @dev reverts when the chain of headers is incorrect /// @dev function is public due to the usage of a dynamic bytes array (not yet supported for external functions) function recreateBlockheaders(uint _blockNumber, bytes[] memory _blockheaders) public { } /// @notice stores a certain blockhash to the state /// @param _blockNumber the blocknumber to be stored /// @dev reverts if the block can't be found inside the evm function saveBlockNumber(uint _blockNumber) public { require(<FILL_ME>) bytes32 bHash = blockhash(_blockNumber); require(bHash != 0x0, "block not available"); blockhashMapping[_blockNumber] = bHash; emit LogBlockhashAdded(_blockNumber, bHash); } /// @notice stores the currentBlock-1 in the smart contract function snapshot() public { } /// @notice returns the value from rlp encoded data. /// This function is limited to only value up to 32 bytes length! /// @param _data rlp encoded data /// @param _offset the offset /// @return the value function getRlpUint(bytes memory _data, uint _offset) public pure returns (uint value) { } /// @notice returns the blockhash and the parent blockhash from the provided blockheader /// @param _blockheader a serialized (rlp-encoded) blockheader /// @return the parent blockhash and the keccak256 of the provided blockheader (= the corresponding blockhash) function getParentAndBlockhash(bytes memory _blockheader) public pure returns (bytes32 parentHash, bytes32 bhash, uint blockNumber) { } /// @notice starts with a given blockhash and its header and tries to recreate a (reverse) chain of blocks /// @notice the array of the blockheaders have to be in reverse order (e.g. [100,99,98,97]) /// @param _blockheaders array with serialized blockheaders in reverse order, i.e. from youngest to oldest /// @param _bHash blockhash of the 1st element of the _blockheaders-array /// @param _blockNumber blocknumber of the 1st element of the _blockheaders-array. This is only needed to verify the blockheader /// @return 0x0 if the functions detects a wrong chaining of blocks, blockhash of the last element of the array otherwhise function reCalculateBlockheaders(bytes[] memory _blockheaders, bytes32 _bHash, uint _blockNumber) public view returns (bytes32 bhash) { } }
blockhashMapping[_blockNumber]==0x0,"block already stored"
11,984
blockhashMapping[_blockNumber]==0x0
"invalid offset"
/*********************************************************** * This file is part of the Slock.it IoT Layer. * * The Slock.it IoT Layer contains: * * - USN (Universal Sharing Network) * * - INCUBED (Trustless INcentivized remote Node Network) * ************************************************************ * Copyright (C) 2016 - 2018 Slock.it GmbH * * All Rights Reserved. * ************************************************************ * You may use, distribute and modify this code under the * * terms of the license contract you have concluded with * * Slock.it GmbH. * * For information about liability, maintenance etc. also * * refer to the contract concluded with Slock.it GmbH. * ************************************************************ * For more information, please refer to https://slock.it * * For questions, please contact [email protected] * ***********************************************************/ pragma solidity 0.5.10; pragma experimental ABIEncoderV2; /// @title Registry for blockhashes contract BlockhashRegistry { /// a new blockhash and its number has been added to the contract event LogBlockhashAdded(uint indexed blockNr, bytes32 indexed bhash); /// maps the blocknumber to its blockhash mapping(uint => bytes32) public blockhashMapping; /// constructor, calls snapshot-function when contract get deployed as entry point /// @dev cannot be deployed in a genesis block constructor() public { } /// @notice searches for an already existing snapshot /// @param _startNumber the blocknumber to start searching /// @param _numBlocks the number of blocks to search for /// @return the closes snapshot of found within the given range, 0 else function searchForAvailableBlock(uint _startNumber, uint _numBlocks) external view returns (uint) { } /// @notice starts with a given blocknumber and its header and tries to recreate a (reverse) chain of blocks /// @notice only usable when the given blocknumber is already in the smart contract /// @notice it will be checked whether the provided chain is correct by using the reCalculateBlockheaders function /// @notice if successfull the last blockhash of the header will be added to the smart contract /// @param _blockNumber the block number to start recreation from /// @param _blockheaders array with serialized blockheaders in reverse order (youngest -> oldest) => (e.g. 100, 99, 98) /// @dev reverts when there is not parent block already stored in the contract /// @dev reverts when the chain of headers is incorrect /// @dev function is public due to the usage of a dynamic bytes array (not yet supported for external functions) function recreateBlockheaders(uint _blockNumber, bytes[] memory _blockheaders) public { } /// @notice stores a certain blockhash to the state /// @param _blockNumber the blocknumber to be stored /// @dev reverts if the block can't be found inside the evm function saveBlockNumber(uint _blockNumber) public { } /// @notice stores the currentBlock-1 in the smart contract function snapshot() public { } /// @notice returns the value from rlp encoded data. /// This function is limited to only value up to 32 bytes length! /// @param _data rlp encoded data /// @param _offset the offset /// @return the value function getRlpUint(bytes memory _data, uint _offset) public pure returns (uint value) { /// get the byte at offset to figure out the length of the value uint8 c = uint8(_data[_offset]); /// we will not accept values above 0xa0, since this would mean we either have a list /// or we have a value with a length greater 32 bytes /// for the use cases (getting the blockNumber or difficulty) we can accept these limits. require(c < 0xa1, "lists or long fields are not supported"); if (c < 0x80) // single byte-item return uint(c); // value = byte // length of the value uint len = c - 0x80; // we skip the first 32 bytes since they contain the legth and add 1 because this byte contains the length of the value. uint dataOffset = _offset + 33; /// check the range require(<FILL_ME>) /// we are using assembly because we need to get the value of the next `len` bytes /// This is done by copying the bytes in the "scratch space" so we can take the first 32 bytes as value afterwards. // solium-disable-next-line security/no-inline-assembly assembly { // solhint-disable-line no-inline-assembly mstore(0x0, 0) // clean memory in the "scratch space" mstore( sub (0x20, len), // we move the position so the first bytes from rlp are the last bytes within the 32 bytes mload( add ( _data, dataOffset ) // load the data from rlp-data ) ) value:=mload(0x0) } return value; } /// @notice returns the blockhash and the parent blockhash from the provided blockheader /// @param _blockheader a serialized (rlp-encoded) blockheader /// @return the parent blockhash and the keccak256 of the provided blockheader (= the corresponding blockhash) function getParentAndBlockhash(bytes memory _blockheader) public pure returns (bytes32 parentHash, bytes32 bhash, uint blockNumber) { } /// @notice starts with a given blockhash and its header and tries to recreate a (reverse) chain of blocks /// @notice the array of the blockheaders have to be in reverse order (e.g. [100,99,98,97]) /// @param _blockheaders array with serialized blockheaders in reverse order, i.e. from youngest to oldest /// @param _bHash blockhash of the 1st element of the _blockheaders-array /// @param _blockNumber blocknumber of the 1st element of the _blockheaders-array. This is only needed to verify the blockheader /// @return 0x0 if the functions detects a wrong chaining of blocks, blockhash of the last element of the array otherwhise function reCalculateBlockheaders(bytes[] memory _blockheaders, bytes32 _bHash, uint _blockNumber) public view returns (bytes32 bhash) { } }
_offset+len<=_data.length,"invalid offset"
11,984
_offset+len<=_data.length
"invalid length"
/*********************************************************** * This file is part of the Slock.it IoT Layer. * * The Slock.it IoT Layer contains: * * - USN (Universal Sharing Network) * * - INCUBED (Trustless INcentivized remote Node Network) * ************************************************************ * Copyright (C) 2016 - 2018 Slock.it GmbH * * All Rights Reserved. * ************************************************************ * You may use, distribute and modify this code under the * * terms of the license contract you have concluded with * * Slock.it GmbH. * * For information about liability, maintenance etc. also * * refer to the contract concluded with Slock.it GmbH. * ************************************************************ * For more information, please refer to https://slock.it * * For questions, please contact [email protected] * ***********************************************************/ pragma solidity 0.5.10; pragma experimental ABIEncoderV2; /// @title Registry for blockhashes contract BlockhashRegistry { /// a new blockhash and its number has been added to the contract event LogBlockhashAdded(uint indexed blockNr, bytes32 indexed bhash); /// maps the blocknumber to its blockhash mapping(uint => bytes32) public blockhashMapping; /// constructor, calls snapshot-function when contract get deployed as entry point /// @dev cannot be deployed in a genesis block constructor() public { } /// @notice searches for an already existing snapshot /// @param _startNumber the blocknumber to start searching /// @param _numBlocks the number of blocks to search for /// @return the closes snapshot of found within the given range, 0 else function searchForAvailableBlock(uint _startNumber, uint _numBlocks) external view returns (uint) { } /// @notice starts with a given blocknumber and its header and tries to recreate a (reverse) chain of blocks /// @notice only usable when the given blocknumber is already in the smart contract /// @notice it will be checked whether the provided chain is correct by using the reCalculateBlockheaders function /// @notice if successfull the last blockhash of the header will be added to the smart contract /// @param _blockNumber the block number to start recreation from /// @param _blockheaders array with serialized blockheaders in reverse order (youngest -> oldest) => (e.g. 100, 99, 98) /// @dev reverts when there is not parent block already stored in the contract /// @dev reverts when the chain of headers is incorrect /// @dev function is public due to the usage of a dynamic bytes array (not yet supported for external functions) function recreateBlockheaders(uint _blockNumber, bytes[] memory _blockheaders) public { } /// @notice stores a certain blockhash to the state /// @param _blockNumber the blocknumber to be stored /// @dev reverts if the block can't be found inside the evm function saveBlockNumber(uint _blockNumber) public { } /// @notice stores the currentBlock-1 in the smart contract function snapshot() public { } /// @notice returns the value from rlp encoded data. /// This function is limited to only value up to 32 bytes length! /// @param _data rlp encoded data /// @param _offset the offset /// @return the value function getRlpUint(bytes memory _data, uint _offset) public pure returns (uint value) { } /// @notice returns the blockhash and the parent blockhash from the provided blockheader /// @param _blockheader a serialized (rlp-encoded) blockheader /// @return the parent blockhash and the keccak256 of the provided blockheader (= the corresponding blockhash) function getParentAndBlockhash(bytes memory _blockheader) public pure returns (bytes32 parentHash, bytes32 bhash, uint blockNumber) { /// we need the 1st byte of the blockheader to calculate the position of the parentHash uint8 first = uint8(_blockheader[0]); /// calculates the offset /// by using the 1st byte (usually f9) and substracting f7 to get the start point of the parentHash information require(first > 0xf7, "invalid offset"); /// we also have to add "2" = 1 byte to it to skip the length-information uint offset = first - 0xf7 + 2; require(<FILL_ME>) /// we are using assembly because it's the most efficent way to access the parent blockhash within the rlp-encoded blockheader // solium-disable-next-line security/no-inline-assembly assembly { // solhint-disable-line no-inline-assembly // we load the provided blockheader // then we add 0x20 (32 bytes) to get to the start of the blockheader // then we add the offset we calculated // and load it to the parentHash variable parentHash :=mload( add( add( _blockheader, 0x20 ), offset) ) } // verify parentHash require(parentHash != 0x0, "invalid parentHash"); bhash = keccak256(_blockheader); // get the blockNumber // we set the offset to the difficulty field which is fixed since all fields between them have a fixed length. offset += 444; // we get the first byte for the difficulty field ( which is a field with a dynamic length) // and calculate the length, because the next field is the blockNumber uint8 c = uint8(_blockheader[offset]); require(c < 0xa1, "lists or long fields are not supported for difficulty"); offset += c < 0x80 ? 1 : (c - 0x80 + 1); // we fetch the blockNumber from the calculated offset blockNumber = getRlpUint(_blockheader, offset); } /// @notice starts with a given blockhash and its header and tries to recreate a (reverse) chain of blocks /// @notice the array of the blockheaders have to be in reverse order (e.g. [100,99,98,97]) /// @param _blockheaders array with serialized blockheaders in reverse order, i.e. from youngest to oldest /// @param _bHash blockhash of the 1st element of the _blockheaders-array /// @param _blockNumber blocknumber of the 1st element of the _blockheaders-array. This is only needed to verify the blockheader /// @return 0x0 if the functions detects a wrong chaining of blocks, blockhash of the last element of the array otherwhise function reCalculateBlockheaders(bytes[] memory _blockheaders, bytes32 _bHash, uint _blockNumber) public view returns (bytes32 bhash) { } }
offset+32<_blockheader.length,"invalid length"
11,984
offset+32<_blockheader.length
null
pragma solidity ^0.4.12; contract Token{ // tokenๆ€ป้‡๏ผŒ้ป˜่ฎคไผšไธบpublicๅ˜้‡็”Ÿๆˆไธ€ไธชgetterๅ‡ฝๆ•ฐๆŽฅๅฃ๏ผŒๅ็งฐไธบtotalSupply(). uint256 public totalSupply; /// ่Žทๅ–่ดฆๆˆท_ownerๆ‹ฅๆœ‰token็š„ๆ•ฐ้‡ function balanceOf(address _owner) constant returns (uint256 balance); //ไปŽๆถˆๆฏๅ‘้€่€…่ดฆๆˆทไธญๅพ€_to่ดฆๆˆท่ฝฌๆ•ฐ้‡ไธบ_value็š„token function transfer(address _to, uint256 _value) returns (bool success); //ไปŽ่ดฆๆˆท_fromไธญๅพ€่ดฆๆˆท_to่ฝฌๆ•ฐ้‡ไธบ_value็š„token๏ผŒไธŽapproveๆ–นๆณ•้…ๅˆไฝฟ็”จ function transferFrom(address _from, address _to, uint256 _value) returns (bool success); //ๆถˆๆฏๅ‘้€่ดฆๆˆท่ฎพ็ฝฎ่ดฆๆˆท_spender่ƒฝไปŽๅ‘้€่ดฆๆˆทไธญ่ฝฌๅ‡บๆ•ฐ้‡ไธบ_value็š„token function approve(address _spender, uint256 _value) returns (bool success); //่Žทๅ–่ดฆๆˆท_spenderๅฏไปฅไปŽ่ดฆๆˆท_ownerไธญ่ฝฌๅ‡บtoken็š„ๆ•ฐ้‡ function allowance(address _owner, address _spender) constant returns (uint256 remaining); //ๅ‘็”Ÿ่ฝฌ่ดฆๆ—ถๅฟ…้กป่ฆ่งฆๅ‘็š„ไบ‹ไปถ event Transfer(address indexed _from, address indexed _to, uint256 _value); //ๅฝ“ๅ‡ฝๆ•ฐapprove(address _spender, uint256 _value)ๆˆๅŠŸๆ‰ง่กŒๆ—ถๅฟ…้กป่งฆๅ‘็š„ไบ‹ไปถ event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract QFBToken is Token { address manager; // mapping(address => bool) accountFrozen; mapping(address => uint) frozenTime; modifier onlyManager() { } function freeze(address account, bool frozen) public onlyManager { } function transfer(address _to, uint256 _value) returns (bool success) { } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { require(<FILL_ME>) if(balances[_from] >= _value && _value > 0) { balances[_to] += _value; balances[_from] -= _value; Transfer(_from, _to, _value); return true; } else { return false; } } function balanceOf(address _owner) constant returns (uint256 balance) { } function approve(address _spender, uint256 _value) returns (bool success) { } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; string public constant name = "QFBCOIN"; //ๅ็งฐ: eg Simon Bucks uint256 public constant decimals = 18; //ๆœ€ๅคš็š„ๅฐๆ•ฐไฝๆ•ฐ๏ผŒHow many decimals to show. ie. There could 1000 base units with 3 decimals. Meaning 0.980 SBX = 980 base units. It's like comparing 1 wei to 1 ether. string public constant symbol = "QFB"; //token็ฎ€็งฐ: eg SBX string public version = 'QF1.0'; //็‰ˆๆœฌ // contracts address public ethFundDeposit; // ETHๅญ˜ๆ”พๅœฐๅ€ address public newContractAddr; // tokenๆ›ดๆ–ฐๅœฐๅ€ // crowdsale parameters bool public isFunding; // ็Šถๆ€ๅˆ‡ๆขๅˆฐtrue uint256 public fundingStartBlock; uint256 public fundingStopBlock; uint256 public currentSupply; // ๆญฃๅœจๅ”ฎๅ–ไธญ็š„tokensๆ•ฐ้‡ uint256 public tokenRaised = 0; // ๆ€ป็š„ๅ”ฎๅ–ๆ•ฐ้‡token uint256 public tokenMigrated = 0; // ๆ€ป็š„ๅทฒ็ปไบคๆ˜“็š„ token uint256 public tokenExchangeRate = 625; // 625 BILIBILI ๅ…‘ๆข 1 ETH // events event AllocateToken(address indexed _to, uint256 _value); // ๅˆ†้…็š„็งๆœ‰ไบคๆ˜“token; event IssueToken(address indexed _to, uint256 _value); // ๅ…ฌๅผ€ๅ‘่กŒๅ”ฎๅ–็š„token; event IncreaseSupply(uint256 _value); event DecreaseSupply(uint256 _value); event Migrate(address indexed _to, uint256 _value); // ่ฝฌๆข function formatDecimals(uint256 _value) internal returns (uint256) { } // constructor function QFBToken( address _ethFundDeposit, uint256 _currentSupply) { } }
frozenTime[_from]<=now
12,043
frozenTime[_from]<=now
"Not enough mints remaining to mint"
//SPDX-License-Identifier: MIT //Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) pragma solidity ^0.8.0; contract EllaOrtenDAO is ERC721A, IERC2981, Ownable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private tokenCounter; string private baseURI = "ipfs://QmPVtr16Mnt28EBc6wUaA9ckaRyG1Gbz1MiCh7C5Pc5eNd"; address private openSeaProxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; bool private isOpenSeaProxyActive = true; uint256 public constant MAX_MINTS_PER_TX = 10; uint256 public maxSupply = 888; uint256 public constant PUBLIC_SALE_PRICE = 0.01 ether; uint256 public NUM_FREE_MINTS = 288; bool public isPublicSaleActive = true; // ============ ACCESS CONTROL/SANITY MODIFIERS ============ modifier publicSaleActive() { } modifier maxMintsPerTX(uint256 numberOfTokens) { } modifier canMintNFTs(uint256 numberOfTokens) { require(<FILL_ME>) _; } modifier freeMintsAvailable() { } modifier isCorrectPayment(uint256 price, uint256 numberOfTokens) { } constructor( ) ERC721A("EllaOrtenDAO", "ELLA", 100, maxSupply) { } // ============ PUBLIC FUNCTIONS FOR MINTING ============ function mint(uint256 numberOfTokens) external payable nonReentrant isCorrectPayment(PUBLIC_SALE_PRICE, numberOfTokens) publicSaleActive canMintNFTs(numberOfTokens) { } //A simple free mint function to avoid confusion function freeMint() external nonReentrant publicSaleActive canMintNFTs(1) maxMintsPerTX(1) freeMintsAvailable() { } // ============ PUBLIC READ-ONLY FUNCTIONS ============ function getBaseURI() external view returns (string memory) { } // ============ OWNER-ONLY ADMIN FUNCTIONS ============ function setBaseURI(string memory _baseURI) external onlyOwner { } // function to disable gasless listings for security in case // opensea ever shuts down or is compromised function setIsOpenSeaProxyActive(bool _isOpenSeaProxyActive) external onlyOwner { } function setIsPublicSaleActive(bool _isPublicSaleActive) external onlyOwner { } function setNumFreeMints(uint256 _numfreemints) external onlyOwner { } function withdraw() public onlyOwner { } function withdrawTokens(IERC20 token) public onlyOwner { } // ============ SUPPORTING FUNCTIONS ============ function nextTokenId() private returns (uint256) { } // ============ FUNCTION OVERRIDES ============ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC165) returns (bool) { } /** * @dev Override isApprovedForAll to allowlist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev See {IERC165-royaltyInfo}. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view override returns (address receiver, uint256 royaltyAmount) { } } // These contract definitions are used to create a reference to the OpenSea // ProxyRegistry contract by using the registry's address (see isApprovedForAll). contract OwnableDelegateProxy { } contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
totalSupply()+numberOfTokens<=maxSupply,"Not enough mints remaining to mint"
12,052
totalSupply()+numberOfTokens<=maxSupply
"Not enough free mints remain"
//SPDX-License-Identifier: MIT //Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) pragma solidity ^0.8.0; contract EllaOrtenDAO is ERC721A, IERC2981, Ownable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private tokenCounter; string private baseURI = "ipfs://QmPVtr16Mnt28EBc6wUaA9ckaRyG1Gbz1MiCh7C5Pc5eNd"; address private openSeaProxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; bool private isOpenSeaProxyActive = true; uint256 public constant MAX_MINTS_PER_TX = 10; uint256 public maxSupply = 888; uint256 public constant PUBLIC_SALE_PRICE = 0.01 ether; uint256 public NUM_FREE_MINTS = 288; bool public isPublicSaleActive = true; // ============ ACCESS CONTROL/SANITY MODIFIERS ============ modifier publicSaleActive() { } modifier maxMintsPerTX(uint256 numberOfTokens) { } modifier canMintNFTs(uint256 numberOfTokens) { } modifier freeMintsAvailable() { require(<FILL_ME>) _; } modifier isCorrectPayment(uint256 price, uint256 numberOfTokens) { } constructor( ) ERC721A("EllaOrtenDAO", "ELLA", 100, maxSupply) { } // ============ PUBLIC FUNCTIONS FOR MINTING ============ function mint(uint256 numberOfTokens) external payable nonReentrant isCorrectPayment(PUBLIC_SALE_PRICE, numberOfTokens) publicSaleActive canMintNFTs(numberOfTokens) { } //A simple free mint function to avoid confusion function freeMint() external nonReentrant publicSaleActive canMintNFTs(1) maxMintsPerTX(1) freeMintsAvailable() { } // ============ PUBLIC READ-ONLY FUNCTIONS ============ function getBaseURI() external view returns (string memory) { } // ============ OWNER-ONLY ADMIN FUNCTIONS ============ function setBaseURI(string memory _baseURI) external onlyOwner { } // function to disable gasless listings for security in case // opensea ever shuts down or is compromised function setIsOpenSeaProxyActive(bool _isOpenSeaProxyActive) external onlyOwner { } function setIsPublicSaleActive(bool _isPublicSaleActive) external onlyOwner { } function setNumFreeMints(uint256 _numfreemints) external onlyOwner { } function withdraw() public onlyOwner { } function withdrawTokens(IERC20 token) public onlyOwner { } // ============ SUPPORTING FUNCTIONS ============ function nextTokenId() private returns (uint256) { } // ============ FUNCTION OVERRIDES ============ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC165) returns (bool) { } /** * @dev Override isApprovedForAll to allowlist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev See {IERC165-royaltyInfo}. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view override returns (address receiver, uint256 royaltyAmount) { } } // These contract definitions are used to create a reference to the OpenSea // ProxyRegistry contract by using the registry's address (see isApprovedForAll). contract OwnableDelegateProxy { } contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
totalSupply()<=NUM_FREE_MINTS,"Not enough free mints remain"
12,052
totalSupply()<=NUM_FREE_MINTS
"Incorrect ETH value sent"
//SPDX-License-Identifier: MIT //Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) pragma solidity ^0.8.0; contract EllaOrtenDAO is ERC721A, IERC2981, Ownable, ReentrancyGuard { using Counters for Counters.Counter; using Strings for uint256; Counters.Counter private tokenCounter; string private baseURI = "ipfs://QmPVtr16Mnt28EBc6wUaA9ckaRyG1Gbz1MiCh7C5Pc5eNd"; address private openSeaProxyRegistryAddress = 0xa5409ec958C83C3f309868babACA7c86DCB077c1; bool private isOpenSeaProxyActive = true; uint256 public constant MAX_MINTS_PER_TX = 10; uint256 public maxSupply = 888; uint256 public constant PUBLIC_SALE_PRICE = 0.01 ether; uint256 public NUM_FREE_MINTS = 288; bool public isPublicSaleActive = true; // ============ ACCESS CONTROL/SANITY MODIFIERS ============ modifier publicSaleActive() { } modifier maxMintsPerTX(uint256 numberOfTokens) { } modifier canMintNFTs(uint256 numberOfTokens) { } modifier freeMintsAvailable() { } modifier isCorrectPayment(uint256 price, uint256 numberOfTokens) { if(totalSupply()>NUM_FREE_MINTS){ require(<FILL_ME>) } _; } constructor( ) ERC721A("EllaOrtenDAO", "ELLA", 100, maxSupply) { } // ============ PUBLIC FUNCTIONS FOR MINTING ============ function mint(uint256 numberOfTokens) external payable nonReentrant isCorrectPayment(PUBLIC_SALE_PRICE, numberOfTokens) publicSaleActive canMintNFTs(numberOfTokens) { } //A simple free mint function to avoid confusion function freeMint() external nonReentrant publicSaleActive canMintNFTs(1) maxMintsPerTX(1) freeMintsAvailable() { } // ============ PUBLIC READ-ONLY FUNCTIONS ============ function getBaseURI() external view returns (string memory) { } // ============ OWNER-ONLY ADMIN FUNCTIONS ============ function setBaseURI(string memory _baseURI) external onlyOwner { } // function to disable gasless listings for security in case // opensea ever shuts down or is compromised function setIsOpenSeaProxyActive(bool _isOpenSeaProxyActive) external onlyOwner { } function setIsPublicSaleActive(bool _isPublicSaleActive) external onlyOwner { } function setNumFreeMints(uint256 _numfreemints) external onlyOwner { } function withdraw() public onlyOwner { } function withdrawTokens(IERC20 token) public onlyOwner { } // ============ SUPPORTING FUNCTIONS ============ function nextTokenId() private returns (uint256) { } // ============ FUNCTION OVERRIDES ============ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, IERC165) returns (bool) { } /** * @dev Override isApprovedForAll to allowlist user's OpenSea proxy accounts to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev See {IERC165-royaltyInfo}. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view override returns (address receiver, uint256 royaltyAmount) { } } // These contract definitions are used to create a reference to the OpenSea // ProxyRegistry contract by using the registry's address (see isApprovedForAll). contract OwnableDelegateProxy { } contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; }
(price*numberOfTokens)==msg.value,"Incorrect ETH value sent"
12,052
(price*numberOfTokens)==msg.value
"TokenController: An amount of tokens is already locked"
/* Copyright (C) 2020 NexusMutual.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ pragma solidity ^0.5.0; import "@openzeppelin/contracts/math/SafeMath.sol"; import "../../abstract/Iupgradable.sol"; import "../../interfaces/IPooledStaking.sol"; import "../claims/ClaimsData.sol"; import "./NXMToken.sol"; import "./external/LockHandler.sol"; contract TokenController is LockHandler, Iupgradable { using SafeMath for uint256; struct CoverInfo { uint16 claimCount; bool hasOpenClaim; bool hasAcceptedClaim; // note: still 224 bits available here, can be used later } NXMToken public token; IPooledStaking public pooledStaking; uint public minCALockTime; uint public claimSubmissionGracePeriod; // coverId => CoverInfo mapping(uint => CoverInfo) public coverInfo; event Locked(address indexed _of, bytes32 indexed _reason, uint256 _amount, uint256 _validity); event Unlocked(address indexed _of, bytes32 indexed _reason, uint256 _amount); event Burned(address indexed member, bytes32 lockedUnder, uint256 amount); modifier onlyGovernance { } /** * @dev Just for interface */ function changeDependentContractAddress() public { } function markCoverClaimOpen(uint coverId) external onlyInternal { } /** * @param coverId cover id (careful, not claim id!) * @param isAccepted claim verdict */ function markCoverClaimClosed(uint coverId, bool isAccepted) external onlyInternal { } /** * @dev to change the operator address * @param _newOperator is the new address of operator */ function changeOperator(address _newOperator) public onlyInternal { } /** * @dev Proxies token transfer through this contract to allow staking when members are locked for voting * @param _from Source address * @param _to Destination address * @param _value Amount to transfer */ function operatorTransfer(address _from, address _to, uint _value) external onlyInternal returns (bool) { } /** * @dev Locks a specified amount of tokens, * for CLA reason and for a specified time * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function lockClaimAssessmentTokens(uint256 _amount, uint256 _time) external checkPause { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds * @param _of address whose tokens are to be locked */ function lockOf(address _of, bytes32 _reason, uint256 _amount, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Mints and locks a specified amount of tokens against an address, * for a CN reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function mintCoverNote( address _of, bytes32 _reason, uint256 _amount, uint256 _time ) external onlyInternal { require(<FILL_ME>) require(_amount != 0, "TokenController: Amount shouldn't be zero"); if (locked[_of][_reason].amount == 0) { lockReason[_of].push(_reason); } token.mint(address(this), _amount); uint256 lockedUntil = now.add(_time); locked[_of][_reason] = LockToken(_amount, lockedUntil, false); emit Locked(_of, _reason, _amount, lockedUntil); } /** * @dev Extends lock for reason CLA for a specified time * @param _time Lock extension time in seconds */ function extendClaimAssessmentLock(uint256 _time) external checkPause { } /** * @dev Extends lock for a specified reason and time * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function extendLockOf(address _of, bytes32 _reason, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Increase number of tokens locked for a CLA reason * @param _amount Number of tokens to be increased */ function increaseClaimAssessmentLock(uint256 _amount) external checkPause { } /** * @dev burns tokens of an address * @param _of is the address to burn tokens of * @param amount is the amount to burn * @return the boolean status of the burning process */ function burnFrom(address _of, uint amount) public onlyInternal returns (bool) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function reduceLock(address _of, bytes32 _reason, uint256 _time) public onlyInternal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev Adds an address to whitelist maintained in the contract * @param _member address to add to whitelist */ function addToWhitelist(address _member) public onlyInternal { } /** * @dev Removes an address from the whitelist in the token * @param _member address to remove */ function removeFromWhitelist(address _member) public onlyInternal { } /** * @dev Mints new token for an address * @param _member address to reward the minted tokens * @param _amount number of tokens to mint */ function mint(address _member, uint _amount) public onlyInternal { } /** * @dev Lock the user's tokens * @param _of user's address. */ function lockForMemberVote(address _of, uint _days) public onlyInternal { } /** * @dev Unlocks the withdrawable tokens against CLA of a specified address * @param _of Address of user, claiming back withdrawable tokens against CLA */ function withdrawClaimAssessmentTokens(address _of) external checkPause { } /** * @dev Updates Uint Parameters of a code * @param code whose details we want to update * @param value value to set */ function updateUintParameters(bytes8 code, uint value) external onlyGovernance { } function getLockReasons(address _of) external view returns (bytes32[] memory reasons) { } /** * @dev Gets the validity of locked tokens of a specified address * @param _of The address to query the validity * @param reason reason for which tokens were locked */ function getLockedTokensValidity(address _of, bytes32 reason) public view returns (uint256 validity) { } /** * @dev Gets the unlockable tokens of a specified address * @param _of The address to query the the unlockable token count of */ function getUnlockableTokens(address _of) public view returns (uint256 unlockableTokens) { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLocked(address _of, bytes32 _reason) public view returns (uint256 amount) { } /** * @dev Returns tokens locked and validity for a specified address and reason * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLockedWithValidity(address _of, bytes32 _reason) public view returns (uint256 amount, uint256 validity) { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function tokensUnlockable(address _of, bytes32 _reason) public view returns (uint256 amount) { } function totalSupply() public view returns (uint256) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) public view returns (uint256 amount) { } /** * @dev Returns the total amount of tokens held by an address: * transferable + locked + staked for pooled staking - pending burns. * Used by Claims and Governance in member voting to calculate the user's vote weight. * * @param _of The address to query the total balance of * @param _of The address to query the total balance of */ function totalBalanceOf(address _of) public view returns (uint256 amount) { } /** * @dev Returns the total amount of locked and staked tokens. * Used by MemberRoles to check eligibility for withdraw / switch membership. * Includes tokens locked for claim assessment, tokens staked for risk assessment, and locked cover notes * Does not take into account pending burns. * @param _of member whose locked tokens are to be calculate */ function totalLockedBalance(address _of) public view returns (uint256 amount) { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function _lock(address _of, bytes32 _reason, uint256 _amount, uint256 _time) internal { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function _tokensLocked(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function _tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) internal view returns (uint256 amount) { } /** * @dev Extends lock for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function _extendLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function _reduceLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function _tokensUnlockable(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function _burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function _releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } function withdrawCoverNote( address _of, uint[] calldata _coverIds, uint[] calldata _indexes ) external onlyInternal { } function removeEmptyReason(address _of, bytes32 _reason, uint _index) external { } function removeMultipleEmptyReasons( address[] calldata _members, bytes32[] calldata _reasons, uint[] calldata _indexes ) external { } function _removeEmptyReason(address _of, bytes32 _reason, uint _index) internal { } function initialize() external { } function migrate() internal { } }
_tokensLocked(_of,_reason)==0,"TokenController: An amount of tokens is already locked"
12,175
_tokensLocked(_of,_reason)==0
"TokenController: Tokens can be locked for 180 days maximum"
/* Copyright (C) 2020 NexusMutual.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ pragma solidity ^0.5.0; import "@openzeppelin/contracts/math/SafeMath.sol"; import "../../abstract/Iupgradable.sol"; import "../../interfaces/IPooledStaking.sol"; import "../claims/ClaimsData.sol"; import "./NXMToken.sol"; import "./external/LockHandler.sol"; contract TokenController is LockHandler, Iupgradable { using SafeMath for uint256; struct CoverInfo { uint16 claimCount; bool hasOpenClaim; bool hasAcceptedClaim; // note: still 224 bits available here, can be used later } NXMToken public token; IPooledStaking public pooledStaking; uint public minCALockTime; uint public claimSubmissionGracePeriod; // coverId => CoverInfo mapping(uint => CoverInfo) public coverInfo; event Locked(address indexed _of, bytes32 indexed _reason, uint256 _amount, uint256 _validity); event Unlocked(address indexed _of, bytes32 indexed _reason, uint256 _amount); event Burned(address indexed member, bytes32 lockedUnder, uint256 amount); modifier onlyGovernance { } /** * @dev Just for interface */ function changeDependentContractAddress() public { } function markCoverClaimOpen(uint coverId) external onlyInternal { } /** * @param coverId cover id (careful, not claim id!) * @param isAccepted claim verdict */ function markCoverClaimClosed(uint coverId, bool isAccepted) external onlyInternal { } /** * @dev to change the operator address * @param _newOperator is the new address of operator */ function changeOperator(address _newOperator) public onlyInternal { } /** * @dev Proxies token transfer through this contract to allow staking when members are locked for voting * @param _from Source address * @param _to Destination address * @param _value Amount to transfer */ function operatorTransfer(address _from, address _to, uint _value) external onlyInternal returns (bool) { } /** * @dev Locks a specified amount of tokens, * for CLA reason and for a specified time * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function lockClaimAssessmentTokens(uint256 _amount, uint256 _time) external checkPause { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds * @param _of address whose tokens are to be locked */ function lockOf(address _of, bytes32 _reason, uint256 _amount, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Mints and locks a specified amount of tokens against an address, * for a CN reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function mintCoverNote( address _of, bytes32 _reason, uint256 _amount, uint256 _time ) external onlyInternal { } /** * @dev Extends lock for reason CLA for a specified time * @param _time Lock extension time in seconds */ function extendClaimAssessmentLock(uint256 _time) external checkPause { uint256 validity = getLockedTokensValidity(msg.sender, "CLA"); require(<FILL_ME>) _extendLock(msg.sender, "CLA", _time); } /** * @dev Extends lock for a specified reason and time * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function extendLockOf(address _of, bytes32 _reason, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Increase number of tokens locked for a CLA reason * @param _amount Number of tokens to be increased */ function increaseClaimAssessmentLock(uint256 _amount) external checkPause { } /** * @dev burns tokens of an address * @param _of is the address to burn tokens of * @param amount is the amount to burn * @return the boolean status of the burning process */ function burnFrom(address _of, uint amount) public onlyInternal returns (bool) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function reduceLock(address _of, bytes32 _reason, uint256 _time) public onlyInternal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev Adds an address to whitelist maintained in the contract * @param _member address to add to whitelist */ function addToWhitelist(address _member) public onlyInternal { } /** * @dev Removes an address from the whitelist in the token * @param _member address to remove */ function removeFromWhitelist(address _member) public onlyInternal { } /** * @dev Mints new token for an address * @param _member address to reward the minted tokens * @param _amount number of tokens to mint */ function mint(address _member, uint _amount) public onlyInternal { } /** * @dev Lock the user's tokens * @param _of user's address. */ function lockForMemberVote(address _of, uint _days) public onlyInternal { } /** * @dev Unlocks the withdrawable tokens against CLA of a specified address * @param _of Address of user, claiming back withdrawable tokens against CLA */ function withdrawClaimAssessmentTokens(address _of) external checkPause { } /** * @dev Updates Uint Parameters of a code * @param code whose details we want to update * @param value value to set */ function updateUintParameters(bytes8 code, uint value) external onlyGovernance { } function getLockReasons(address _of) external view returns (bytes32[] memory reasons) { } /** * @dev Gets the validity of locked tokens of a specified address * @param _of The address to query the validity * @param reason reason for which tokens were locked */ function getLockedTokensValidity(address _of, bytes32 reason) public view returns (uint256 validity) { } /** * @dev Gets the unlockable tokens of a specified address * @param _of The address to query the the unlockable token count of */ function getUnlockableTokens(address _of) public view returns (uint256 unlockableTokens) { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLocked(address _of, bytes32 _reason) public view returns (uint256 amount) { } /** * @dev Returns tokens locked and validity for a specified address and reason * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLockedWithValidity(address _of, bytes32 _reason) public view returns (uint256 amount, uint256 validity) { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function tokensUnlockable(address _of, bytes32 _reason) public view returns (uint256 amount) { } function totalSupply() public view returns (uint256) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) public view returns (uint256 amount) { } /** * @dev Returns the total amount of tokens held by an address: * transferable + locked + staked for pooled staking - pending burns. * Used by Claims and Governance in member voting to calculate the user's vote weight. * * @param _of The address to query the total balance of * @param _of The address to query the total balance of */ function totalBalanceOf(address _of) public view returns (uint256 amount) { } /** * @dev Returns the total amount of locked and staked tokens. * Used by MemberRoles to check eligibility for withdraw / switch membership. * Includes tokens locked for claim assessment, tokens staked for risk assessment, and locked cover notes * Does not take into account pending burns. * @param _of member whose locked tokens are to be calculate */ function totalLockedBalance(address _of) public view returns (uint256 amount) { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function _lock(address _of, bytes32 _reason, uint256 _amount, uint256 _time) internal { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function _tokensLocked(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function _tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) internal view returns (uint256 amount) { } /** * @dev Extends lock for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function _extendLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function _reduceLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function _tokensUnlockable(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function _burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function _releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } function withdrawCoverNote( address _of, uint[] calldata _coverIds, uint[] calldata _indexes ) external onlyInternal { } function removeEmptyReason(address _of, bytes32 _reason, uint _index) external { } function removeMultipleEmptyReasons( address[] calldata _members, bytes32[] calldata _reasons, uint[] calldata _indexes ) external { } function _removeEmptyReason(address _of, bytes32 _reason, uint _index) internal { } function initialize() external { } function migrate() internal { } }
validity.add(_time).sub(block.timestamp)<=180days,"TokenController: Tokens can be locked for 180 days maximum"
12,175
validity.add(_time).sub(block.timestamp)<=180days
"TokenController: No tokens locked"
/* Copyright (C) 2020 NexusMutual.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ pragma solidity ^0.5.0; import "@openzeppelin/contracts/math/SafeMath.sol"; import "../../abstract/Iupgradable.sol"; import "../../interfaces/IPooledStaking.sol"; import "../claims/ClaimsData.sol"; import "./NXMToken.sol"; import "./external/LockHandler.sol"; contract TokenController is LockHandler, Iupgradable { using SafeMath for uint256; struct CoverInfo { uint16 claimCount; bool hasOpenClaim; bool hasAcceptedClaim; // note: still 224 bits available here, can be used later } NXMToken public token; IPooledStaking public pooledStaking; uint public minCALockTime; uint public claimSubmissionGracePeriod; // coverId => CoverInfo mapping(uint => CoverInfo) public coverInfo; event Locked(address indexed _of, bytes32 indexed _reason, uint256 _amount, uint256 _validity); event Unlocked(address indexed _of, bytes32 indexed _reason, uint256 _amount); event Burned(address indexed member, bytes32 lockedUnder, uint256 amount); modifier onlyGovernance { } /** * @dev Just for interface */ function changeDependentContractAddress() public { } function markCoverClaimOpen(uint coverId) external onlyInternal { } /** * @param coverId cover id (careful, not claim id!) * @param isAccepted claim verdict */ function markCoverClaimClosed(uint coverId, bool isAccepted) external onlyInternal { } /** * @dev to change the operator address * @param _newOperator is the new address of operator */ function changeOperator(address _newOperator) public onlyInternal { } /** * @dev Proxies token transfer through this contract to allow staking when members are locked for voting * @param _from Source address * @param _to Destination address * @param _value Amount to transfer */ function operatorTransfer(address _from, address _to, uint _value) external onlyInternal returns (bool) { } /** * @dev Locks a specified amount of tokens, * for CLA reason and for a specified time * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function lockClaimAssessmentTokens(uint256 _amount, uint256 _time) external checkPause { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds * @param _of address whose tokens are to be locked */ function lockOf(address _of, bytes32 _reason, uint256 _amount, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Mints and locks a specified amount of tokens against an address, * for a CN reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function mintCoverNote( address _of, bytes32 _reason, uint256 _amount, uint256 _time ) external onlyInternal { } /** * @dev Extends lock for reason CLA for a specified time * @param _time Lock extension time in seconds */ function extendClaimAssessmentLock(uint256 _time) external checkPause { } /** * @dev Extends lock for a specified reason and time * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function extendLockOf(address _of, bytes32 _reason, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Increase number of tokens locked for a CLA reason * @param _amount Number of tokens to be increased */ function increaseClaimAssessmentLock(uint256 _amount) external checkPause { require(<FILL_ME>) token.operatorTransfer(msg.sender, _amount); locked[msg.sender]["CLA"].amount = locked[msg.sender]["CLA"].amount.add(_amount); emit Locked(msg.sender, "CLA", _amount, locked[msg.sender]["CLA"].validity); } /** * @dev burns tokens of an address * @param _of is the address to burn tokens of * @param amount is the amount to burn * @return the boolean status of the burning process */ function burnFrom(address _of, uint amount) public onlyInternal returns (bool) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function reduceLock(address _of, bytes32 _reason, uint256 _time) public onlyInternal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev Adds an address to whitelist maintained in the contract * @param _member address to add to whitelist */ function addToWhitelist(address _member) public onlyInternal { } /** * @dev Removes an address from the whitelist in the token * @param _member address to remove */ function removeFromWhitelist(address _member) public onlyInternal { } /** * @dev Mints new token for an address * @param _member address to reward the minted tokens * @param _amount number of tokens to mint */ function mint(address _member, uint _amount) public onlyInternal { } /** * @dev Lock the user's tokens * @param _of user's address. */ function lockForMemberVote(address _of, uint _days) public onlyInternal { } /** * @dev Unlocks the withdrawable tokens against CLA of a specified address * @param _of Address of user, claiming back withdrawable tokens against CLA */ function withdrawClaimAssessmentTokens(address _of) external checkPause { } /** * @dev Updates Uint Parameters of a code * @param code whose details we want to update * @param value value to set */ function updateUintParameters(bytes8 code, uint value) external onlyGovernance { } function getLockReasons(address _of) external view returns (bytes32[] memory reasons) { } /** * @dev Gets the validity of locked tokens of a specified address * @param _of The address to query the validity * @param reason reason for which tokens were locked */ function getLockedTokensValidity(address _of, bytes32 reason) public view returns (uint256 validity) { } /** * @dev Gets the unlockable tokens of a specified address * @param _of The address to query the the unlockable token count of */ function getUnlockableTokens(address _of) public view returns (uint256 unlockableTokens) { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLocked(address _of, bytes32 _reason) public view returns (uint256 amount) { } /** * @dev Returns tokens locked and validity for a specified address and reason * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLockedWithValidity(address _of, bytes32 _reason) public view returns (uint256 amount, uint256 validity) { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function tokensUnlockable(address _of, bytes32 _reason) public view returns (uint256 amount) { } function totalSupply() public view returns (uint256) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) public view returns (uint256 amount) { } /** * @dev Returns the total amount of tokens held by an address: * transferable + locked + staked for pooled staking - pending burns. * Used by Claims and Governance in member voting to calculate the user's vote weight. * * @param _of The address to query the total balance of * @param _of The address to query the total balance of */ function totalBalanceOf(address _of) public view returns (uint256 amount) { } /** * @dev Returns the total amount of locked and staked tokens. * Used by MemberRoles to check eligibility for withdraw / switch membership. * Includes tokens locked for claim assessment, tokens staked for risk assessment, and locked cover notes * Does not take into account pending burns. * @param _of member whose locked tokens are to be calculate */ function totalLockedBalance(address _of) public view returns (uint256 amount) { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function _lock(address _of, bytes32 _reason, uint256 _amount, uint256 _time) internal { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function _tokensLocked(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function _tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) internal view returns (uint256 amount) { } /** * @dev Extends lock for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function _extendLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function _reduceLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function _tokensUnlockable(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function _burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function _releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } function withdrawCoverNote( address _of, uint[] calldata _coverIds, uint[] calldata _indexes ) external onlyInternal { } function removeEmptyReason(address _of, bytes32 _reason, uint _index) external { } function removeMultipleEmptyReasons( address[] calldata _members, bytes32[] calldata _reasons, uint[] calldata _indexes ) external { } function _removeEmptyReason(address _of, bytes32 _reason, uint _index) internal { } function initialize() external { } function migrate() internal { } }
_tokensLocked(msg.sender,"CLA")>0,"TokenController: No tokens locked"
12,175
_tokensLocked(msg.sender,"CLA")>0
"TokenController: No tokens locked"
/* Copyright (C) 2020 NexusMutual.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ pragma solidity ^0.5.0; import "@openzeppelin/contracts/math/SafeMath.sol"; import "../../abstract/Iupgradable.sol"; import "../../interfaces/IPooledStaking.sol"; import "../claims/ClaimsData.sol"; import "./NXMToken.sol"; import "./external/LockHandler.sol"; contract TokenController is LockHandler, Iupgradable { using SafeMath for uint256; struct CoverInfo { uint16 claimCount; bool hasOpenClaim; bool hasAcceptedClaim; // note: still 224 bits available here, can be used later } NXMToken public token; IPooledStaking public pooledStaking; uint public minCALockTime; uint public claimSubmissionGracePeriod; // coverId => CoverInfo mapping(uint => CoverInfo) public coverInfo; event Locked(address indexed _of, bytes32 indexed _reason, uint256 _amount, uint256 _validity); event Unlocked(address indexed _of, bytes32 indexed _reason, uint256 _amount); event Burned(address indexed member, bytes32 lockedUnder, uint256 amount); modifier onlyGovernance { } /** * @dev Just for interface */ function changeDependentContractAddress() public { } function markCoverClaimOpen(uint coverId) external onlyInternal { } /** * @param coverId cover id (careful, not claim id!) * @param isAccepted claim verdict */ function markCoverClaimClosed(uint coverId, bool isAccepted) external onlyInternal { } /** * @dev to change the operator address * @param _newOperator is the new address of operator */ function changeOperator(address _newOperator) public onlyInternal { } /** * @dev Proxies token transfer through this contract to allow staking when members are locked for voting * @param _from Source address * @param _to Destination address * @param _value Amount to transfer */ function operatorTransfer(address _from, address _to, uint _value) external onlyInternal returns (bool) { } /** * @dev Locks a specified amount of tokens, * for CLA reason and for a specified time * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function lockClaimAssessmentTokens(uint256 _amount, uint256 _time) external checkPause { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds * @param _of address whose tokens are to be locked */ function lockOf(address _of, bytes32 _reason, uint256 _amount, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Mints and locks a specified amount of tokens against an address, * for a CN reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function mintCoverNote( address _of, bytes32 _reason, uint256 _amount, uint256 _time ) external onlyInternal { } /** * @dev Extends lock for reason CLA for a specified time * @param _time Lock extension time in seconds */ function extendClaimAssessmentLock(uint256 _time) external checkPause { } /** * @dev Extends lock for a specified reason and time * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function extendLockOf(address _of, bytes32 _reason, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Increase number of tokens locked for a CLA reason * @param _amount Number of tokens to be increased */ function increaseClaimAssessmentLock(uint256 _amount) external checkPause { } /** * @dev burns tokens of an address * @param _of is the address to burn tokens of * @param amount is the amount to burn * @return the boolean status of the burning process */ function burnFrom(address _of, uint amount) public onlyInternal returns (bool) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function reduceLock(address _of, bytes32 _reason, uint256 _time) public onlyInternal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev Adds an address to whitelist maintained in the contract * @param _member address to add to whitelist */ function addToWhitelist(address _member) public onlyInternal { } /** * @dev Removes an address from the whitelist in the token * @param _member address to remove */ function removeFromWhitelist(address _member) public onlyInternal { } /** * @dev Mints new token for an address * @param _member address to reward the minted tokens * @param _amount number of tokens to mint */ function mint(address _member, uint _amount) public onlyInternal { } /** * @dev Lock the user's tokens * @param _of user's address. */ function lockForMemberVote(address _of, uint _days) public onlyInternal { } /** * @dev Unlocks the withdrawable tokens against CLA of a specified address * @param _of Address of user, claiming back withdrawable tokens against CLA */ function withdrawClaimAssessmentTokens(address _of) external checkPause { } /** * @dev Updates Uint Parameters of a code * @param code whose details we want to update * @param value value to set */ function updateUintParameters(bytes8 code, uint value) external onlyGovernance { } function getLockReasons(address _of) external view returns (bytes32[] memory reasons) { } /** * @dev Gets the validity of locked tokens of a specified address * @param _of The address to query the validity * @param reason reason for which tokens were locked */ function getLockedTokensValidity(address _of, bytes32 reason) public view returns (uint256 validity) { } /** * @dev Gets the unlockable tokens of a specified address * @param _of The address to query the the unlockable token count of */ function getUnlockableTokens(address _of) public view returns (uint256 unlockableTokens) { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLocked(address _of, bytes32 _reason) public view returns (uint256 amount) { } /** * @dev Returns tokens locked and validity for a specified address and reason * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLockedWithValidity(address _of, bytes32 _reason) public view returns (uint256 amount, uint256 validity) { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function tokensUnlockable(address _of, bytes32 _reason) public view returns (uint256 amount) { } function totalSupply() public view returns (uint256) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) public view returns (uint256 amount) { } /** * @dev Returns the total amount of tokens held by an address: * transferable + locked + staked for pooled staking - pending burns. * Used by Claims and Governance in member voting to calculate the user's vote weight. * * @param _of The address to query the total balance of * @param _of The address to query the total balance of */ function totalBalanceOf(address _of) public view returns (uint256 amount) { } /** * @dev Returns the total amount of locked and staked tokens. * Used by MemberRoles to check eligibility for withdraw / switch membership. * Includes tokens locked for claim assessment, tokens staked for risk assessment, and locked cover notes * Does not take into account pending burns. * @param _of member whose locked tokens are to be calculate */ function totalLockedBalance(address _of) public view returns (uint256 amount) { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function _lock(address _of, bytes32 _reason, uint256 _amount, uint256 _time) internal { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function _tokensLocked(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function _tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) internal view returns (uint256 amount) { } /** * @dev Extends lock for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function _extendLock(address _of, bytes32 _reason, uint256 _time) internal { require(<FILL_ME>) emit Unlocked(_of, _reason, locked[_of][_reason].amount); locked[_of][_reason].validity = locked[_of][_reason].validity.add(_time); emit Locked(_of, _reason, locked[_of][_reason].amount, locked[_of][_reason].validity); } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function _reduceLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function _tokensUnlockable(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function _burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function _releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } function withdrawCoverNote( address _of, uint[] calldata _coverIds, uint[] calldata _indexes ) external onlyInternal { } function removeEmptyReason(address _of, bytes32 _reason, uint _index) external { } function removeMultipleEmptyReasons( address[] calldata _members, bytes32[] calldata _reasons, uint[] calldata _indexes ) external { } function _removeEmptyReason(address _of, bytes32 _reason, uint _index) internal { } function initialize() external { } function migrate() internal { } }
_tokensLocked(_of,_reason)>0,"TokenController: No tokens locked"
12,175
_tokensLocked(_of,_reason)>0
"TokenController: Bad reason index"
/* Copyright (C) 2020 NexusMutual.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ pragma solidity ^0.5.0; import "@openzeppelin/contracts/math/SafeMath.sol"; import "../../abstract/Iupgradable.sol"; import "../../interfaces/IPooledStaking.sol"; import "../claims/ClaimsData.sol"; import "./NXMToken.sol"; import "./external/LockHandler.sol"; contract TokenController is LockHandler, Iupgradable { using SafeMath for uint256; struct CoverInfo { uint16 claimCount; bool hasOpenClaim; bool hasAcceptedClaim; // note: still 224 bits available here, can be used later } NXMToken public token; IPooledStaking public pooledStaking; uint public minCALockTime; uint public claimSubmissionGracePeriod; // coverId => CoverInfo mapping(uint => CoverInfo) public coverInfo; event Locked(address indexed _of, bytes32 indexed _reason, uint256 _amount, uint256 _validity); event Unlocked(address indexed _of, bytes32 indexed _reason, uint256 _amount); event Burned(address indexed member, bytes32 lockedUnder, uint256 amount); modifier onlyGovernance { } /** * @dev Just for interface */ function changeDependentContractAddress() public { } function markCoverClaimOpen(uint coverId) external onlyInternal { } /** * @param coverId cover id (careful, not claim id!) * @param isAccepted claim verdict */ function markCoverClaimClosed(uint coverId, bool isAccepted) external onlyInternal { } /** * @dev to change the operator address * @param _newOperator is the new address of operator */ function changeOperator(address _newOperator) public onlyInternal { } /** * @dev Proxies token transfer through this contract to allow staking when members are locked for voting * @param _from Source address * @param _to Destination address * @param _value Amount to transfer */ function operatorTransfer(address _from, address _to, uint _value) external onlyInternal returns (bool) { } /** * @dev Locks a specified amount of tokens, * for CLA reason and for a specified time * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function lockClaimAssessmentTokens(uint256 _amount, uint256 _time) external checkPause { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds * @param _of address whose tokens are to be locked */ function lockOf(address _of, bytes32 _reason, uint256 _amount, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Mints and locks a specified amount of tokens against an address, * for a CN reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function mintCoverNote( address _of, bytes32 _reason, uint256 _amount, uint256 _time ) external onlyInternal { } /** * @dev Extends lock for reason CLA for a specified time * @param _time Lock extension time in seconds */ function extendClaimAssessmentLock(uint256 _time) external checkPause { } /** * @dev Extends lock for a specified reason and time * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function extendLockOf(address _of, bytes32 _reason, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Increase number of tokens locked for a CLA reason * @param _amount Number of tokens to be increased */ function increaseClaimAssessmentLock(uint256 _amount) external checkPause { } /** * @dev burns tokens of an address * @param _of is the address to burn tokens of * @param amount is the amount to burn * @return the boolean status of the burning process */ function burnFrom(address _of, uint amount) public onlyInternal returns (bool) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function reduceLock(address _of, bytes32 _reason, uint256 _time) public onlyInternal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev Adds an address to whitelist maintained in the contract * @param _member address to add to whitelist */ function addToWhitelist(address _member) public onlyInternal { } /** * @dev Removes an address from the whitelist in the token * @param _member address to remove */ function removeFromWhitelist(address _member) public onlyInternal { } /** * @dev Mints new token for an address * @param _member address to reward the minted tokens * @param _amount number of tokens to mint */ function mint(address _member, uint _amount) public onlyInternal { } /** * @dev Lock the user's tokens * @param _of user's address. */ function lockForMemberVote(address _of, uint _days) public onlyInternal { } /** * @dev Unlocks the withdrawable tokens against CLA of a specified address * @param _of Address of user, claiming back withdrawable tokens against CLA */ function withdrawClaimAssessmentTokens(address _of) external checkPause { } /** * @dev Updates Uint Parameters of a code * @param code whose details we want to update * @param value value to set */ function updateUintParameters(bytes8 code, uint value) external onlyGovernance { } function getLockReasons(address _of) external view returns (bytes32[] memory reasons) { } /** * @dev Gets the validity of locked tokens of a specified address * @param _of The address to query the validity * @param reason reason for which tokens were locked */ function getLockedTokensValidity(address _of, bytes32 reason) public view returns (uint256 validity) { } /** * @dev Gets the unlockable tokens of a specified address * @param _of The address to query the the unlockable token count of */ function getUnlockableTokens(address _of) public view returns (uint256 unlockableTokens) { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLocked(address _of, bytes32 _reason) public view returns (uint256 amount) { } /** * @dev Returns tokens locked and validity for a specified address and reason * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLockedWithValidity(address _of, bytes32 _reason) public view returns (uint256 amount, uint256 validity) { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function tokensUnlockable(address _of, bytes32 _reason) public view returns (uint256 amount) { } function totalSupply() public view returns (uint256) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) public view returns (uint256 amount) { } /** * @dev Returns the total amount of tokens held by an address: * transferable + locked + staked for pooled staking - pending burns. * Used by Claims and Governance in member voting to calculate the user's vote weight. * * @param _of The address to query the total balance of * @param _of The address to query the total balance of */ function totalBalanceOf(address _of) public view returns (uint256 amount) { } /** * @dev Returns the total amount of locked and staked tokens. * Used by MemberRoles to check eligibility for withdraw / switch membership. * Includes tokens locked for claim assessment, tokens staked for risk assessment, and locked cover notes * Does not take into account pending burns. * @param _of member whose locked tokens are to be calculate */ function totalLockedBalance(address _of) public view returns (uint256 amount) { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function _lock(address _of, bytes32 _reason, uint256 _amount, uint256 _time) internal { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function _tokensLocked(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function _tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) internal view returns (uint256 amount) { } /** * @dev Extends lock for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function _extendLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function _reduceLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function _tokensUnlockable(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function _burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function _releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } function withdrawCoverNote( address _of, uint[] calldata _coverIds, uint[] calldata _indexes ) external onlyInternal { uint reasonCount = lockReason[_of].length; uint lastReasonIndex = reasonCount.sub(1, "TokenController: No locked cover notes found"); uint totalAmount = 0; // The iteration is done from the last to first to prevent reason indexes from // changing due to the way we delete the items (copy last to current and pop last). // The provided indexes array must be ordered, otherwise reason index checks will fail. for (uint i = _coverIds.length; i > 0; i--) { bool hasOpenClaim = coverInfo[_coverIds[i - 1]].hasOpenClaim; require(hasOpenClaim == false, "TokenController: Cannot withdraw for cover with an open claim"); // note: cover owner is implicitly checked using the reason hash bytes32 _reason = keccak256(abi.encodePacked("CN", _of, _coverIds[i - 1])); uint _reasonIndex = _indexes[i - 1]; require(<FILL_ME>) uint amount = locked[_of][_reason].amount; totalAmount = totalAmount.add(amount); delete locked[_of][_reason]; if (lastReasonIndex != _reasonIndex) { lockReason[_of][_reasonIndex] = lockReason[_of][lastReasonIndex]; } lockReason[_of].pop(); emit Unlocked(_of, _reason, amount); if (lastReasonIndex > 0) { lastReasonIndex = lastReasonIndex.sub(1, "TokenController: Reason count mismatch"); } } token.transfer(_of, totalAmount); } function removeEmptyReason(address _of, bytes32 _reason, uint _index) external { } function removeMultipleEmptyReasons( address[] calldata _members, bytes32[] calldata _reasons, uint[] calldata _indexes ) external { } function _removeEmptyReason(address _of, bytes32 _reason, uint _index) internal { } function initialize() external { } function migrate() internal { } }
lockReason[_of][_reasonIndex]==_reason,"TokenController: Bad reason index"
12,175
lockReason[_of][_reasonIndex]==_reason
"TokenController: bad reason index"
/* Copyright (C) 2020 NexusMutual.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ pragma solidity ^0.5.0; import "@openzeppelin/contracts/math/SafeMath.sol"; import "../../abstract/Iupgradable.sol"; import "../../interfaces/IPooledStaking.sol"; import "../claims/ClaimsData.sol"; import "./NXMToken.sol"; import "./external/LockHandler.sol"; contract TokenController is LockHandler, Iupgradable { using SafeMath for uint256; struct CoverInfo { uint16 claimCount; bool hasOpenClaim; bool hasAcceptedClaim; // note: still 224 bits available here, can be used later } NXMToken public token; IPooledStaking public pooledStaking; uint public minCALockTime; uint public claimSubmissionGracePeriod; // coverId => CoverInfo mapping(uint => CoverInfo) public coverInfo; event Locked(address indexed _of, bytes32 indexed _reason, uint256 _amount, uint256 _validity); event Unlocked(address indexed _of, bytes32 indexed _reason, uint256 _amount); event Burned(address indexed member, bytes32 lockedUnder, uint256 amount); modifier onlyGovernance { } /** * @dev Just for interface */ function changeDependentContractAddress() public { } function markCoverClaimOpen(uint coverId) external onlyInternal { } /** * @param coverId cover id (careful, not claim id!) * @param isAccepted claim verdict */ function markCoverClaimClosed(uint coverId, bool isAccepted) external onlyInternal { } /** * @dev to change the operator address * @param _newOperator is the new address of operator */ function changeOperator(address _newOperator) public onlyInternal { } /** * @dev Proxies token transfer through this contract to allow staking when members are locked for voting * @param _from Source address * @param _to Destination address * @param _value Amount to transfer */ function operatorTransfer(address _from, address _to, uint _value) external onlyInternal returns (bool) { } /** * @dev Locks a specified amount of tokens, * for CLA reason and for a specified time * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function lockClaimAssessmentTokens(uint256 _amount, uint256 _time) external checkPause { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds * @param _of address whose tokens are to be locked */ function lockOf(address _of, bytes32 _reason, uint256 _amount, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Mints and locks a specified amount of tokens against an address, * for a CN reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function mintCoverNote( address _of, bytes32 _reason, uint256 _amount, uint256 _time ) external onlyInternal { } /** * @dev Extends lock for reason CLA for a specified time * @param _time Lock extension time in seconds */ function extendClaimAssessmentLock(uint256 _time) external checkPause { } /** * @dev Extends lock for a specified reason and time * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function extendLockOf(address _of, bytes32 _reason, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Increase number of tokens locked for a CLA reason * @param _amount Number of tokens to be increased */ function increaseClaimAssessmentLock(uint256 _amount) external checkPause { } /** * @dev burns tokens of an address * @param _of is the address to burn tokens of * @param amount is the amount to burn * @return the boolean status of the burning process */ function burnFrom(address _of, uint amount) public onlyInternal returns (bool) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function reduceLock(address _of, bytes32 _reason, uint256 _time) public onlyInternal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev Adds an address to whitelist maintained in the contract * @param _member address to add to whitelist */ function addToWhitelist(address _member) public onlyInternal { } /** * @dev Removes an address from the whitelist in the token * @param _member address to remove */ function removeFromWhitelist(address _member) public onlyInternal { } /** * @dev Mints new token for an address * @param _member address to reward the minted tokens * @param _amount number of tokens to mint */ function mint(address _member, uint _amount) public onlyInternal { } /** * @dev Lock the user's tokens * @param _of user's address. */ function lockForMemberVote(address _of, uint _days) public onlyInternal { } /** * @dev Unlocks the withdrawable tokens against CLA of a specified address * @param _of Address of user, claiming back withdrawable tokens against CLA */ function withdrawClaimAssessmentTokens(address _of) external checkPause { } /** * @dev Updates Uint Parameters of a code * @param code whose details we want to update * @param value value to set */ function updateUintParameters(bytes8 code, uint value) external onlyGovernance { } function getLockReasons(address _of) external view returns (bytes32[] memory reasons) { } /** * @dev Gets the validity of locked tokens of a specified address * @param _of The address to query the validity * @param reason reason for which tokens were locked */ function getLockedTokensValidity(address _of, bytes32 reason) public view returns (uint256 validity) { } /** * @dev Gets the unlockable tokens of a specified address * @param _of The address to query the the unlockable token count of */ function getUnlockableTokens(address _of) public view returns (uint256 unlockableTokens) { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLocked(address _of, bytes32 _reason) public view returns (uint256 amount) { } /** * @dev Returns tokens locked and validity for a specified address and reason * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLockedWithValidity(address _of, bytes32 _reason) public view returns (uint256 amount, uint256 validity) { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function tokensUnlockable(address _of, bytes32 _reason) public view returns (uint256 amount) { } function totalSupply() public view returns (uint256) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) public view returns (uint256 amount) { } /** * @dev Returns the total amount of tokens held by an address: * transferable + locked + staked for pooled staking - pending burns. * Used by Claims and Governance in member voting to calculate the user's vote weight. * * @param _of The address to query the total balance of * @param _of The address to query the total balance of */ function totalBalanceOf(address _of) public view returns (uint256 amount) { } /** * @dev Returns the total amount of locked and staked tokens. * Used by MemberRoles to check eligibility for withdraw / switch membership. * Includes tokens locked for claim assessment, tokens staked for risk assessment, and locked cover notes * Does not take into account pending burns. * @param _of member whose locked tokens are to be calculate */ function totalLockedBalance(address _of) public view returns (uint256 amount) { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function _lock(address _of, bytes32 _reason, uint256 _amount, uint256 _time) internal { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function _tokensLocked(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function _tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) internal view returns (uint256 amount) { } /** * @dev Extends lock for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function _extendLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function _reduceLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function _tokensUnlockable(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function _burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function _releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } function withdrawCoverNote( address _of, uint[] calldata _coverIds, uint[] calldata _indexes ) external onlyInternal { } function removeEmptyReason(address _of, bytes32 _reason, uint _index) external { } function removeMultipleEmptyReasons( address[] calldata _members, bytes32[] calldata _reasons, uint[] calldata _indexes ) external { } function _removeEmptyReason(address _of, bytes32 _reason, uint _index) internal { uint lastReasonIndex = lockReason[_of].length.sub(1, "TokenController: lockReason is empty"); require(<FILL_ME>) require(locked[_of][_reason].amount == 0, "TokenController: reason amount is not zero"); if (lastReasonIndex != _index) { lockReason[_of][_index] = lockReason[_of][lastReasonIndex]; } lockReason[_of].pop(); } function initialize() external { } function migrate() internal { } }
lockReason[_of][_index]==_reason,"TokenController: bad reason index"
12,175
lockReason[_of][_index]==_reason
"TokenController: reason amount is not zero"
/* Copyright (C) 2020 NexusMutual.io This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/ */ pragma solidity ^0.5.0; import "@openzeppelin/contracts/math/SafeMath.sol"; import "../../abstract/Iupgradable.sol"; import "../../interfaces/IPooledStaking.sol"; import "../claims/ClaimsData.sol"; import "./NXMToken.sol"; import "./external/LockHandler.sol"; contract TokenController is LockHandler, Iupgradable { using SafeMath for uint256; struct CoverInfo { uint16 claimCount; bool hasOpenClaim; bool hasAcceptedClaim; // note: still 224 bits available here, can be used later } NXMToken public token; IPooledStaking public pooledStaking; uint public minCALockTime; uint public claimSubmissionGracePeriod; // coverId => CoverInfo mapping(uint => CoverInfo) public coverInfo; event Locked(address indexed _of, bytes32 indexed _reason, uint256 _amount, uint256 _validity); event Unlocked(address indexed _of, bytes32 indexed _reason, uint256 _amount); event Burned(address indexed member, bytes32 lockedUnder, uint256 amount); modifier onlyGovernance { } /** * @dev Just for interface */ function changeDependentContractAddress() public { } function markCoverClaimOpen(uint coverId) external onlyInternal { } /** * @param coverId cover id (careful, not claim id!) * @param isAccepted claim verdict */ function markCoverClaimClosed(uint coverId, bool isAccepted) external onlyInternal { } /** * @dev to change the operator address * @param _newOperator is the new address of operator */ function changeOperator(address _newOperator) public onlyInternal { } /** * @dev Proxies token transfer through this contract to allow staking when members are locked for voting * @param _from Source address * @param _to Destination address * @param _value Amount to transfer */ function operatorTransfer(address _from, address _to, uint _value) external onlyInternal returns (bool) { } /** * @dev Locks a specified amount of tokens, * for CLA reason and for a specified time * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function lockClaimAssessmentTokens(uint256 _amount, uint256 _time) external checkPause { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds * @param _of address whose tokens are to be locked */ function lockOf(address _of, bytes32 _reason, uint256 _amount, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Mints and locks a specified amount of tokens against an address, * for a CN reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function mintCoverNote( address _of, bytes32 _reason, uint256 _amount, uint256 _time ) external onlyInternal { } /** * @dev Extends lock for reason CLA for a specified time * @param _time Lock extension time in seconds */ function extendClaimAssessmentLock(uint256 _time) external checkPause { } /** * @dev Extends lock for a specified reason and time * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function extendLockOf(address _of, bytes32 _reason, uint256 _time) public onlyInternal returns (bool) { } /** * @dev Increase number of tokens locked for a CLA reason * @param _amount Number of tokens to be increased */ function increaseClaimAssessmentLock(uint256 _amount) external checkPause { } /** * @dev burns tokens of an address * @param _of is the address to burn tokens of * @param amount is the amount to burn * @return the boolean status of the burning process */ function burnFrom(address _of, uint amount) public onlyInternal returns (bool) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function reduceLock(address _of, bytes32 _reason, uint256 _time) public onlyInternal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) public onlyInternal { } /** * @dev Adds an address to whitelist maintained in the contract * @param _member address to add to whitelist */ function addToWhitelist(address _member) public onlyInternal { } /** * @dev Removes an address from the whitelist in the token * @param _member address to remove */ function removeFromWhitelist(address _member) public onlyInternal { } /** * @dev Mints new token for an address * @param _member address to reward the minted tokens * @param _amount number of tokens to mint */ function mint(address _member, uint _amount) public onlyInternal { } /** * @dev Lock the user's tokens * @param _of user's address. */ function lockForMemberVote(address _of, uint _days) public onlyInternal { } /** * @dev Unlocks the withdrawable tokens against CLA of a specified address * @param _of Address of user, claiming back withdrawable tokens against CLA */ function withdrawClaimAssessmentTokens(address _of) external checkPause { } /** * @dev Updates Uint Parameters of a code * @param code whose details we want to update * @param value value to set */ function updateUintParameters(bytes8 code, uint value) external onlyGovernance { } function getLockReasons(address _of) external view returns (bytes32[] memory reasons) { } /** * @dev Gets the validity of locked tokens of a specified address * @param _of The address to query the validity * @param reason reason for which tokens were locked */ function getLockedTokensValidity(address _of, bytes32 reason) public view returns (uint256 validity) { } /** * @dev Gets the unlockable tokens of a specified address * @param _of The address to query the the unlockable token count of */ function getUnlockableTokens(address _of) public view returns (uint256 unlockableTokens) { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLocked(address _of, bytes32 _reason) public view returns (uint256 amount) { } /** * @dev Returns tokens locked and validity for a specified address and reason * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function tokensLockedWithValidity(address _of, bytes32 _reason) public view returns (uint256 amount, uint256 validity) { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function tokensUnlockable(address _of, bytes32 _reason) public view returns (uint256 amount) { } function totalSupply() public view returns (uint256) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) public view returns (uint256 amount) { } /** * @dev Returns the total amount of tokens held by an address: * transferable + locked + staked for pooled staking - pending burns. * Used by Claims and Governance in member voting to calculate the user's vote weight. * * @param _of The address to query the total balance of * @param _of The address to query the total balance of */ function totalBalanceOf(address _of) public view returns (uint256 amount) { } /** * @dev Returns the total amount of locked and staked tokens. * Used by MemberRoles to check eligibility for withdraw / switch membership. * Includes tokens locked for claim assessment, tokens staked for risk assessment, and locked cover notes * Does not take into account pending burns. * @param _of member whose locked tokens are to be calculate */ function totalLockedBalance(address _of) public view returns (uint256 amount) { } /** * @dev Locks a specified amount of tokens against an address, * for a specified reason and time * @param _of address whose tokens are to be locked * @param _reason The reason to lock tokens * @param _amount Number of tokens to be locked * @param _time Lock time in seconds */ function _lock(address _of, bytes32 _reason, uint256 _amount, uint256 _time) internal { } /** * @dev Returns tokens locked for a specified address for a * specified reason * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for */ function _tokensLocked(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Returns tokens locked for a specified address for a * specified reason at a specific time * * @param _of The address whose tokens are locked * @param _reason The reason to query the lock tokens for * @param _time The timestamp to query the lock tokens for */ function _tokensLockedAtTime(address _of, bytes32 _reason, uint256 _time) internal view returns (uint256 amount) { } /** * @dev Extends lock for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock extension time in seconds */ function _extendLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev reduce lock duration for a specified reason and time * @param _of The address whose tokens are locked * @param _reason The reason to lock tokens * @param _time Lock reduction time in seconds */ function _reduceLock(address _of, bytes32 _reason, uint256 _time) internal { } /** * @dev Returns unlockable tokens for a specified address for a specified reason * @param _of The address to query the the unlockable token count of * @param _reason The reason to query the unlockable tokens for */ function _tokensUnlockable(address _of, bytes32 _reason) internal view returns (uint256 amount) { } /** * @dev Burns locked tokens of a user * @param _of address whose tokens are to be burned * @param _reason lock reason for which tokens are to be burned * @param _amount amount of tokens to burn */ function _burnLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } /** * @dev Released locked tokens of an address locked for a specific reason * @param _of address whose tokens are to be released from lock * @param _reason reason of the lock * @param _amount amount of tokens to release */ function _releaseLockedTokens(address _of, bytes32 _reason, uint256 _amount) internal { } function withdrawCoverNote( address _of, uint[] calldata _coverIds, uint[] calldata _indexes ) external onlyInternal { } function removeEmptyReason(address _of, bytes32 _reason, uint _index) external { } function removeMultipleEmptyReasons( address[] calldata _members, bytes32[] calldata _reasons, uint[] calldata _indexes ) external { } function _removeEmptyReason(address _of, bytes32 _reason, uint _index) internal { uint lastReasonIndex = lockReason[_of].length.sub(1, "TokenController: lockReason is empty"); require(lockReason[_of][_index] == _reason, "TokenController: bad reason index"); require(<FILL_ME>) if (lastReasonIndex != _index) { lockReason[_of][_index] = lockReason[_of][lastReasonIndex]; } lockReason[_of].pop(); } function initialize() external { } function migrate() internal { } }
locked[_of][_reason].amount==0,"TokenController: reason amount is not zero"
12,175
locked[_of][_reason].amount==0
null
pragma solidity >=0.4.22 <0.6.0; interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { } function owner() public view returns (address) { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function renounceOwnership() public onlyOwner { } function transferOwnership(address newOwner) public onlyOwner { } function _transferOwnership(address newOwner) internal { } } contract SafeMath { function safeMul(uint256 a, uint256 b) internal pure returns (uint256) { } function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { } } contract GreenToken is Ownable, SafeMath, IERC20{ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); constructor() public { } function transfer(address _to, uint256 _value) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool success) { require(<FILL_ME>) allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } }
(_value==0)||(allowance[msg.sender][_spender]==0)
12,200
(_value==0)||(allowance[msg.sender][_spender]==0)
"Free token already claimed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { require(isFreeActive, "Free minting is not active"); require(<FILL_ME>) require(totalSupply() < MAX_SUPPLY, "All tokens minted"); require(totalPublicSupply < MAX_PUBLIC_SUPPLY, "Over max public limit"); totalPublicSupply += 1; _claimed[msg.sender] += 1; _safeMint(msg.sender, MAX_PRIVATE_SUPPLY + totalPublicSupply); } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function setActive(bool val) external onlyOwner { } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { } function withdraw() public payable onlyOwner { } }
_claimed[msg.sender]==0,"Free token already claimed"
12,327
_claimed[msg.sender]==0
"All tokens minted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { require(isFreeActive, "Free minting is not active"); require(_claimed[msg.sender] == 0, "Free token already claimed"); require(<FILL_ME>) require(totalPublicSupply < MAX_PUBLIC_SUPPLY, "Over max public limit"); totalPublicSupply += 1; _claimed[msg.sender] += 1; _safeMint(msg.sender, MAX_PRIVATE_SUPPLY + totalPublicSupply); } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function setActive(bool val) external onlyOwner { } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { } function withdraw() public payable onlyOwner { } }
totalSupply()<MAX_SUPPLY,"All tokens minted"
12,327
totalSupply()<MAX_SUPPLY
"All tokens minted"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { require(<FILL_ME>) require( totalPrivateSupply + num < MAX_PRIVATE_SUPPLY + 1, "Exceeds private supply" ); for (uint256 i; i < num; i++) { totalPrivateSupply += 1; _safeMint(to, totalPrivateSupply); } } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function setActive(bool val) external onlyOwner { } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { } function withdraw() public payable onlyOwner { } }
totalSupply()<MAX_SUPPLY+1,"All tokens minted"
12,327
totalSupply()<MAX_SUPPLY+1
"Exceeds private supply"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { require(totalSupply() < MAX_SUPPLY + 1, "All tokens minted"); require(<FILL_ME>) for (uint256 i; i < num; i++) { totalPrivateSupply += 1; _safeMint(to, totalPrivateSupply); } } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function setActive(bool val) external onlyOwner { } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { } function withdraw() public payable onlyOwner { } }
totalPrivateSupply+num<MAX_PRIVATE_SUPPLY+1,"Exceeds private supply"
12,327
totalPrivateSupply+num<MAX_PRIVATE_SUPPLY+1
"Can't remove the null address"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { for (uint256 i = 0; i < addresses.length; i++) { require(<FILL_ME>) _whitelist[addresses[i]] = false; } } function setActive(bool val) external onlyOwner { } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { } function withdraw() public payable onlyOwner { } }
addresses[i]!=address(0),"Can't remove the null address"
12,327
addresses[i]!=address(0)
"Set Base URI before activating"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function setActive(bool val) external onlyOwner { require(<FILL_ME>) isActive = val; } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { } function withdraw() public payable onlyOwner { } }
bytes(_baseTokenURI).length!=0,"Set Base URI before activating"
12,327
bytes(_baseTokenURI).length!=0
"You are not on the Whitelist"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function setActive(bool val) external onlyOwner { } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { require(isWhitelistActive, "Whitelist is not active"); require(<FILL_ME>) require(num < whitelistMaxMint + 1, "Over max limit"); require( _whitelistClaimed[msg.sender] + num < whitelistMaxMint + 1, "Whitelist tokens already claimed" ); require(totalSupply() < MAX_SUPPLY, "All tokens minted"); require(totalPublicSupply < MAX_PUBLIC_SUPPLY, "Over max public limit"); require(whitelistCost * num <= msg.value, "ETH amount is not correct"); for (uint256 i = 0; i < num; i++) { totalPublicSupply += 1; if (whitelistCost == 0) { _claimed[msg.sender] += 1; } _whitelistClaimed[msg.sender] += 1; _safeMint(msg.sender, MAX_PRIVATE_SUPPLY + totalPublicSupply); } } function withdraw() public payable onlyOwner { } }
_whitelist[msg.sender],"You are not on the Whitelist"
12,327
_whitelist[msg.sender]
"Whitelist tokens already claimed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function setActive(bool val) external onlyOwner { } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { require(isWhitelistActive, "Whitelist is not active"); require(_whitelist[msg.sender], "You are not on the Whitelist"); require(num < whitelistMaxMint + 1, "Over max limit"); require(<FILL_ME>) require(totalSupply() < MAX_SUPPLY, "All tokens minted"); require(totalPublicSupply < MAX_PUBLIC_SUPPLY, "Over max public limit"); require(whitelistCost * num <= msg.value, "ETH amount is not correct"); for (uint256 i = 0; i < num; i++) { totalPublicSupply += 1; if (whitelistCost == 0) { _claimed[msg.sender] += 1; } _whitelistClaimed[msg.sender] += 1; _safeMint(msg.sender, MAX_PRIVATE_SUPPLY + totalPublicSupply); } } function withdraw() public payable onlyOwner { } }
_whitelistClaimed[msg.sender]+num<whitelistMaxMint+1,"Whitelist tokens already claimed"
12,327
_whitelistClaimed[msg.sender]+num<whitelistMaxMint+1
"ETH amount is not correct"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function setActive(bool val) external onlyOwner { } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { require(isWhitelistActive, "Whitelist is not active"); require(_whitelist[msg.sender], "You are not on the Whitelist"); require(num < whitelistMaxMint + 1, "Over max limit"); require( _whitelistClaimed[msg.sender] + num < whitelistMaxMint + 1, "Whitelist tokens already claimed" ); require(totalSupply() < MAX_SUPPLY, "All tokens minted"); require(totalPublicSupply < MAX_PUBLIC_SUPPLY, "Over max public limit"); require(<FILL_ME>) for (uint256 i = 0; i < num; i++) { totalPublicSupply += 1; if (whitelistCost == 0) { _claimed[msg.sender] += 1; } _whitelistClaimed[msg.sender] += 1; _safeMint(msg.sender, MAX_PRIVATE_SUPPLY + totalPublicSupply); } } function withdraw() public payable onlyOwner { } }
whitelistCost*num<=msg.value,"ETH amount is not correct"
12,327
whitelistCost*num<=msg.value
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function setActive(bool val) external onlyOwner { } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { } function withdraw() public payable onlyOwner { uint256 balance = address(this).balance; uint256 split = (balance / 1000) * 475; uint256 operating = (balance / 100) * 5; require(<FILL_ME>) require(payable(ADDRESS_2).send(split)); require(payable(ADDRESS_3).send(operating)); } }
payable(ADDRESS_1).send(split)
12,327
payable(ADDRESS_1).send(split)
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function setActive(bool val) external onlyOwner { } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { } function withdraw() public payable onlyOwner { uint256 balance = address(this).balance; uint256 split = (balance / 1000) * 475; uint256 operating = (balance / 100) * 5; require(payable(ADDRESS_1).send(split)); require(<FILL_ME>) require(payable(ADDRESS_3).send(operating)); } }
payable(ADDRESS_2).send(split)
12,327
payable(ADDRESS_2).send(split)
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract NFT is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public constant COST_ONE = 0.1 ether; uint256 public constant COST_FIVE = 0.09 ether; uint256 public constant COST_TEN = 0.08 ether; uint256 public constant MAX_MINT = 10; uint256 public constant MAX_PRIVATE_SUPPLY = 60; uint256 public constant MAX_PUBLIC_SUPPLY = 9945; uint256 public constant MAX_SUPPLY = MAX_PRIVATE_SUPPLY + MAX_PUBLIC_SUPPLY; address constant ADDRESS_1 = 0x3d83F297EE5135eAc26f3A864e84D5dcBeDCA546; address constant ADDRESS_2 = 0xbD9Cc35D60fc5F55B46dB2154da964Ff1240B2A6; address constant ADDRESS_3 = 0x646162C7f336Cd6B20Ba982B2628f9Bb76344264; uint256 public whitelistCost = 0.0 ether; uint256 public whitelistMaxMint = 1; bool public isActive = false; bool public isFreeActive = false; bool public isWhitelistActive = false; uint256 public totalPrivateSupply; uint256 public totalPublicSupply; string private _baseTokenURI = ""; mapping(address => uint256) private _claimed; mapping(address => bool) private _whitelist; mapping(address => uint256) private _whitelistClaimed; constructor( string memory name, string memory symbol, string memory baseURI ) ERC721(name, symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function addToWhitelist(address[] calldata addresses) external onlyOwner { } function claimedBy(address owner) external view returns (uint256) { } function freeMint() external payable { } function getCost(uint256 num) public pure returns (uint256) { } function gift(address to, uint256 num) external onlyOwner { } function mint(uint256 num) external payable { } function isOnWhitelist(address addr) external view returns (bool) { } function removeFromWhitelist(address[] calldata addresses) external onlyOwner { } function setActive(bool val) external onlyOwner { } function setBaseURI(string memory val) public onlyOwner { } function setFreeActive(bool val) external onlyOwner { } function setWhitelistActive(bool val) external onlyOwner { } function setWhitelistMaxMint(uint256 val) external onlyOwner { } function setWhitelistPrice(uint256 val) external onlyOwner { } function whitelistClaimedBy(address owner) external view returns (uint256) { } function whitelistMint(uint256 num) external payable { } function withdraw() public payable onlyOwner { uint256 balance = address(this).balance; uint256 split = (balance / 1000) * 475; uint256 operating = (balance / 100) * 5; require(payable(ADDRESS_1).send(split)); require(payable(ADDRESS_2).send(split)); require(<FILL_ME>) } }
payable(ADDRESS_3).send(operating)
12,327
payable(ADDRESS_3).send(operating)
"Ethereum value sent is not correct"
// Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract HillbillyHoller721LG is ERC721, Ownable { using Strings for uint256; using SafeMath for uint256; using Counters for Counters.Counter; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public constant hillbillyPrice = 50000000000000000; //0.05 ETH uint256 public maxSupply = 3500; uint256 public maxMintAmount = 5; uint256 public whitelistedPerAddressLimit = 2; uint256 public standardPerAddressLimit = 5; bytes32 public merkleRoot; bool public revealed = false; bool public onlyWhitelisted = true; bool public paused = true; mapping(address => uint256) public addressMintedBalance; Counters.Counter private _tokenIdCounter; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } // Internal function _baseURI() internal view virtual override returns (string memory) { } // Public function mint(bytes32[] calldata _merkleProof, uint256 _mintAmount) public payable { uint256 userMintedCount = addressMintedBalance[msg.sender]; uint256 supply = _tokenIdCounter.current(); require(!paused, "Contract is paused"); require(_mintAmount <= maxMintAmount, "Don't be greedy- Hillbilly limit exceeded"); require(<FILL_ME>) require(_mintAmount > 0, "You need to Mint at least 1 Hillbilly"); require(supply.add(_mintAmount) <= maxSupply, "Not enough Hillbillies for request"); require(userMintedCount + _mintAmount <= standardPerAddressLimit, "No more Hillbillies :("); if (msg.sender != owner()) { if(onlyWhitelisted == true) { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "You are not whitelisted, please wait for public minting"); uint256 whitelistedMintedCount = addressMintedBalance[msg.sender]; require(whitelistedMintedCount + _mintAmount <= whitelistedPerAddressLimit, "Exceeded 2 Hillbillies per whitelisted address"); } if(onlyWhitelisted == false) { require (msg.value >= hillbillyPrice * _mintAmount, "insufficient funds"); } } for(uint256 i = 0; i < _mintAmount; i++) { uint256 mintIndex = _tokenIdCounter.current(); if (mintIndex < maxSupply) { addressMintedBalance[msg.sender]++; _tokenIdCounter.increment(); uint256 newTokenId = _tokenIdCounter.current(); _safeMint(msg.sender, newTokenId); } } } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Support functions function reserveBillies(uint256 _amount) public onlyOwner { } function getTokenCount() public view returns (uint256) { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner() { } function setMaxSupply(uint256 _maxSupply) public onlyOwner() { } function setRevealed(bool _revealed) public onlyOwner() { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function setStandardPerAddressLimit(uint256 _limit) public onlyOwner() { } function setWhitelistedPerAddressLimit(uint256 _limit) public onlyOwner() { } function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function withdraw() public payable onlyOwner { } }
hillbillyPrice.mul(_mintAmount)<=msg.value,"Ethereum value sent is not correct"
12,355
hillbillyPrice.mul(_mintAmount)<=msg.value
"Not enough Hillbillies for request"
// Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract HillbillyHoller721LG is ERC721, Ownable { using Strings for uint256; using SafeMath for uint256; using Counters for Counters.Counter; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public constant hillbillyPrice = 50000000000000000; //0.05 ETH uint256 public maxSupply = 3500; uint256 public maxMintAmount = 5; uint256 public whitelistedPerAddressLimit = 2; uint256 public standardPerAddressLimit = 5; bytes32 public merkleRoot; bool public revealed = false; bool public onlyWhitelisted = true; bool public paused = true; mapping(address => uint256) public addressMintedBalance; Counters.Counter private _tokenIdCounter; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } // Internal function _baseURI() internal view virtual override returns (string memory) { } // Public function mint(bytes32[] calldata _merkleProof, uint256 _mintAmount) public payable { uint256 userMintedCount = addressMintedBalance[msg.sender]; uint256 supply = _tokenIdCounter.current(); require(!paused, "Contract is paused"); require(_mintAmount <= maxMintAmount, "Don't be greedy- Hillbilly limit exceeded"); require(hillbillyPrice.mul(_mintAmount) <= msg.value, "Ethereum value sent is not correct"); require(_mintAmount > 0, "You need to Mint at least 1 Hillbilly"); require(<FILL_ME>) require(userMintedCount + _mintAmount <= standardPerAddressLimit, "No more Hillbillies :("); if (msg.sender != owner()) { if(onlyWhitelisted == true) { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "You are not whitelisted, please wait for public minting"); uint256 whitelistedMintedCount = addressMintedBalance[msg.sender]; require(whitelistedMintedCount + _mintAmount <= whitelistedPerAddressLimit, "Exceeded 2 Hillbillies per whitelisted address"); } if(onlyWhitelisted == false) { require (msg.value >= hillbillyPrice * _mintAmount, "insufficient funds"); } } for(uint256 i = 0; i < _mintAmount; i++) { uint256 mintIndex = _tokenIdCounter.current(); if (mintIndex < maxSupply) { addressMintedBalance[msg.sender]++; _tokenIdCounter.increment(); uint256 newTokenId = _tokenIdCounter.current(); _safeMint(msg.sender, newTokenId); } } } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Support functions function reserveBillies(uint256 _amount) public onlyOwner { } function getTokenCount() public view returns (uint256) { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner() { } function setMaxSupply(uint256 _maxSupply) public onlyOwner() { } function setRevealed(bool _revealed) public onlyOwner() { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function setStandardPerAddressLimit(uint256 _limit) public onlyOwner() { } function setWhitelistedPerAddressLimit(uint256 _limit) public onlyOwner() { } function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function withdraw() public payable onlyOwner { } }
supply.add(_mintAmount)<=maxSupply,"Not enough Hillbillies for request"
12,355
supply.add(_mintAmount)<=maxSupply
"No more Hillbillies :("
// Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract HillbillyHoller721LG is ERC721, Ownable { using Strings for uint256; using SafeMath for uint256; using Counters for Counters.Counter; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public constant hillbillyPrice = 50000000000000000; //0.05 ETH uint256 public maxSupply = 3500; uint256 public maxMintAmount = 5; uint256 public whitelistedPerAddressLimit = 2; uint256 public standardPerAddressLimit = 5; bytes32 public merkleRoot; bool public revealed = false; bool public onlyWhitelisted = true; bool public paused = true; mapping(address => uint256) public addressMintedBalance; Counters.Counter private _tokenIdCounter; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } // Internal function _baseURI() internal view virtual override returns (string memory) { } // Public function mint(bytes32[] calldata _merkleProof, uint256 _mintAmount) public payable { uint256 userMintedCount = addressMintedBalance[msg.sender]; uint256 supply = _tokenIdCounter.current(); require(!paused, "Contract is paused"); require(_mintAmount <= maxMintAmount, "Don't be greedy- Hillbilly limit exceeded"); require(hillbillyPrice.mul(_mintAmount) <= msg.value, "Ethereum value sent is not correct"); require(_mintAmount > 0, "You need to Mint at least 1 Hillbilly"); require(supply.add(_mintAmount) <= maxSupply, "Not enough Hillbillies for request"); require(<FILL_ME>) if (msg.sender != owner()) { if(onlyWhitelisted == true) { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "You are not whitelisted, please wait for public minting"); uint256 whitelistedMintedCount = addressMintedBalance[msg.sender]; require(whitelistedMintedCount + _mintAmount <= whitelistedPerAddressLimit, "Exceeded 2 Hillbillies per whitelisted address"); } if(onlyWhitelisted == false) { require (msg.value >= hillbillyPrice * _mintAmount, "insufficient funds"); } } for(uint256 i = 0; i < _mintAmount; i++) { uint256 mintIndex = _tokenIdCounter.current(); if (mintIndex < maxSupply) { addressMintedBalance[msg.sender]++; _tokenIdCounter.increment(); uint256 newTokenId = _tokenIdCounter.current(); _safeMint(msg.sender, newTokenId); } } } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Support functions function reserveBillies(uint256 _amount) public onlyOwner { } function getTokenCount() public view returns (uint256) { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner() { } function setMaxSupply(uint256 _maxSupply) public onlyOwner() { } function setRevealed(bool _revealed) public onlyOwner() { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function setStandardPerAddressLimit(uint256 _limit) public onlyOwner() { } function setWhitelistedPerAddressLimit(uint256 _limit) public onlyOwner() { } function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function withdraw() public payable onlyOwner { } }
userMintedCount+_mintAmount<=standardPerAddressLimit,"No more Hillbillies :("
12,355
userMintedCount+_mintAmount<=standardPerAddressLimit
"You are not whitelisted, please wait for public minting"
// Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract HillbillyHoller721LG is ERC721, Ownable { using Strings for uint256; using SafeMath for uint256; using Counters for Counters.Counter; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public constant hillbillyPrice = 50000000000000000; //0.05 ETH uint256 public maxSupply = 3500; uint256 public maxMintAmount = 5; uint256 public whitelistedPerAddressLimit = 2; uint256 public standardPerAddressLimit = 5; bytes32 public merkleRoot; bool public revealed = false; bool public onlyWhitelisted = true; bool public paused = true; mapping(address => uint256) public addressMintedBalance; Counters.Counter private _tokenIdCounter; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } // Internal function _baseURI() internal view virtual override returns (string memory) { } // Public function mint(bytes32[] calldata _merkleProof, uint256 _mintAmount) public payable { uint256 userMintedCount = addressMintedBalance[msg.sender]; uint256 supply = _tokenIdCounter.current(); require(!paused, "Contract is paused"); require(_mintAmount <= maxMintAmount, "Don't be greedy- Hillbilly limit exceeded"); require(hillbillyPrice.mul(_mintAmount) <= msg.value, "Ethereum value sent is not correct"); require(_mintAmount > 0, "You need to Mint at least 1 Hillbilly"); require(supply.add(_mintAmount) <= maxSupply, "Not enough Hillbillies for request"); require(userMintedCount + _mintAmount <= standardPerAddressLimit, "No more Hillbillies :("); if (msg.sender != owner()) { if(onlyWhitelisted == true) { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(<FILL_ME>) uint256 whitelistedMintedCount = addressMintedBalance[msg.sender]; require(whitelistedMintedCount + _mintAmount <= whitelistedPerAddressLimit, "Exceeded 2 Hillbillies per whitelisted address"); } if(onlyWhitelisted == false) { require (msg.value >= hillbillyPrice * _mintAmount, "insufficient funds"); } } for(uint256 i = 0; i < _mintAmount; i++) { uint256 mintIndex = _tokenIdCounter.current(); if (mintIndex < maxSupply) { addressMintedBalance[msg.sender]++; _tokenIdCounter.increment(); uint256 newTokenId = _tokenIdCounter.current(); _safeMint(msg.sender, newTokenId); } } } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Support functions function reserveBillies(uint256 _amount) public onlyOwner { } function getTokenCount() public view returns (uint256) { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner() { } function setMaxSupply(uint256 _maxSupply) public onlyOwner() { } function setRevealed(bool _revealed) public onlyOwner() { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function setStandardPerAddressLimit(uint256 _limit) public onlyOwner() { } function setWhitelistedPerAddressLimit(uint256 _limit) public onlyOwner() { } function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function withdraw() public payable onlyOwner { } }
MerkleProof.verify(_merkleProof,merkleRoot,leaf),"You are not whitelisted, please wait for public minting"
12,355
MerkleProof.verify(_merkleProof,merkleRoot,leaf)
"Exceeded 2 Hillbillies per whitelisted address"
// Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract HillbillyHoller721LG is ERC721, Ownable { using Strings for uint256; using SafeMath for uint256; using Counters for Counters.Counter; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public constant hillbillyPrice = 50000000000000000; //0.05 ETH uint256 public maxSupply = 3500; uint256 public maxMintAmount = 5; uint256 public whitelistedPerAddressLimit = 2; uint256 public standardPerAddressLimit = 5; bytes32 public merkleRoot; bool public revealed = false; bool public onlyWhitelisted = true; bool public paused = true; mapping(address => uint256) public addressMintedBalance; Counters.Counter private _tokenIdCounter; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } // Internal function _baseURI() internal view virtual override returns (string memory) { } // Public function mint(bytes32[] calldata _merkleProof, uint256 _mintAmount) public payable { uint256 userMintedCount = addressMintedBalance[msg.sender]; uint256 supply = _tokenIdCounter.current(); require(!paused, "Contract is paused"); require(_mintAmount <= maxMintAmount, "Don't be greedy- Hillbilly limit exceeded"); require(hillbillyPrice.mul(_mintAmount) <= msg.value, "Ethereum value sent is not correct"); require(_mintAmount > 0, "You need to Mint at least 1 Hillbilly"); require(supply.add(_mintAmount) <= maxSupply, "Not enough Hillbillies for request"); require(userMintedCount + _mintAmount <= standardPerAddressLimit, "No more Hillbillies :("); if (msg.sender != owner()) { if(onlyWhitelisted == true) { bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, merkleRoot, leaf), "You are not whitelisted, please wait for public minting"); uint256 whitelistedMintedCount = addressMintedBalance[msg.sender]; require(<FILL_ME>) } if(onlyWhitelisted == false) { require (msg.value >= hillbillyPrice * _mintAmount, "insufficient funds"); } } for(uint256 i = 0; i < _mintAmount; i++) { uint256 mintIndex = _tokenIdCounter.current(); if (mintIndex < maxSupply) { addressMintedBalance[msg.sender]++; _tokenIdCounter.increment(); uint256 newTokenId = _tokenIdCounter.current(); _safeMint(msg.sender, newTokenId); } } } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Support functions function reserveBillies(uint256 _amount) public onlyOwner { } function getTokenCount() public view returns (uint256) { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner() { } function setMaxSupply(uint256 _maxSupply) public onlyOwner() { } function setRevealed(bool _revealed) public onlyOwner() { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function setStandardPerAddressLimit(uint256 _limit) public onlyOwner() { } function setWhitelistedPerAddressLimit(uint256 _limit) public onlyOwner() { } function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function withdraw() public payable onlyOwner { } }
whitelistedMintedCount+_mintAmount<=whitelistedPerAddressLimit,"Exceeded 2 Hillbillies per whitelisted address"
12,355
whitelistedMintedCount+_mintAmount<=whitelistedPerAddressLimit
"Not enough Hillbillies for request"
// Contract based on [https://docs.openzeppelin.com/contracts/3.x/erc721](https://docs.openzeppelin.com/contracts/3.x/erc721) // SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract HillbillyHoller721LG is ERC721, Ownable { using Strings for uint256; using SafeMath for uint256; using Counters for Counters.Counter; string public baseURI; string public baseExtension = ".json"; string public notRevealedUri; uint256 public constant hillbillyPrice = 50000000000000000; //0.05 ETH uint256 public maxSupply = 3500; uint256 public maxMintAmount = 5; uint256 public whitelistedPerAddressLimit = 2; uint256 public standardPerAddressLimit = 5; bytes32 public merkleRoot; bool public revealed = false; bool public onlyWhitelisted = true; bool public paused = true; mapping(address => uint256) public addressMintedBalance; Counters.Counter private _tokenIdCounter; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } // Internal function _baseURI() internal view virtual override returns (string memory) { } // Public function mint(bytes32[] calldata _merkleProof, uint256 _mintAmount) public payable { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } // Support functions function reserveBillies(uint256 _amount) public onlyOwner { uint256 supply = _tokenIdCounter.current(); require(<FILL_ME>) for(uint256 i = 0; i < _amount; i++) { uint256 mintIndex = _tokenIdCounter.current(); if (mintIndex < maxSupply) { _tokenIdCounter.increment(); uint256 newTokenId = _tokenIdCounter.current(); _safeMint(msg.sender, newTokenId); } } } function getTokenCount() public view returns (uint256) { } function setMerkleRoot(bytes32 _merkleRoot) public onlyOwner() { } function setMaxSupply(uint256 _maxSupply) public onlyOwner() { } function setRevealed(bool _revealed) public onlyOwner() { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function setStandardPerAddressLimit(uint256 _limit) public onlyOwner() { } function setWhitelistedPerAddressLimit(uint256 _limit) public onlyOwner() { } function setMaxMintAmount(uint256 _newMaxMintAmount) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause() public onlyOwner { } function unpause() public onlyOwner { } function withdraw() public payable onlyOwner { } }
supply.add(_amount)<=maxSupply,"Not enough Hillbillies for request"
12,355
supply.add(_amount)<=maxSupply
null
pragma solidity 0.5.12; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } } contract ERC20Basic { uint256 public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); } contract ERC20 is ERC20Basic { event Approval(address indexed owner, address indexed spender, uint256 value); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); } contract BasicToken is ERC20Basic { using SafeMath for uint256; struct WalletData { uint256 tokensAmount; //Tokens amount on wallet uint256 freezedAmount; //Freezed tokens amount on wallet. bool canFreezeTokens; //Is wallet can freeze tokens or not. uint unfreezeDate; // Date when we can unfreeze tokens on wallet. } mapping(address => WalletData) wallets; function transfer(address _to, uint256 _value) public notSender(_to) returns(bool) { } function balanceOf(address _owner) public view returns(uint256 balance) { } // Check wallet on unfreeze tokens amount function checkIfCanUseTokens(address _owner, uint256 _amount) internal view returns(bool) { } // Prevents user to send transaction on his own address modifier notSender(address _owner) { } } contract StandartToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) allowed; function approve(address _spender, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256 remaining) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } contract Ownable { constructor() public { } event TransferOwnership(address indexed _previousOwner, address indexed _newOwner); address public owner; function transferOwnership(address _newOwner) public returns(bool); modifier onlyOwner() { } } contract FreezableToken is StandartToken, Ownable { event ChangeFreezePermission(address indexed _owner, bool _permission); event FreezeTokens(address indexed _owner, uint256 _freezeAmount); event UnfreezeTokens(address indexed _owner, uint256 _unfreezeAmount); // Give\deprive permission to a wallet for freeze tokens. function giveFreezePermission(address[] memory _owners, bool _permission) public onlyOwner returns(bool) { } function freezeAllowance(address _owner) public view returns(bool) { } // Freeze tokens on sender wallet if have permission. function freezeTokens(uint256 _amount, uint _unfreezeDate) public isFreezeAllowed returns(bool) { //We can freeze tokens only if there are no frozen tokens on the wallet. require(<FILL_ME>) wallets[msg.sender].freezedAmount = _amount; wallets[msg.sender].unfreezeDate = _unfreezeDate; emit FreezeTokens(msg.sender, _amount); return true; } function showFreezedTokensAmount(address _owner) public view returns(uint256) { } function unfreezeTokens() public returns(bool) { } //Show date in UNIX time format. function showTokensUnfreezeDate(address _owner) public view returns(uint) { } function getUnfreezedTokens(address _owner) internal view returns(uint256) { } modifier isFreezeAllowed() { } } contract RIWIGO is FreezableToken { event Burn(address indexed _from, uint256 _value); string constant public name = "RIWIGO"; string constant public symbol = "RIWI"; uint constant public decimals = 18; uint256 constant public START_TOKENS = 150000000 * 10 ** decimals; //150M start constructor() public { } function burn(uint256 value) public onlyOwner returns(bool) { } function transferOwnership(address _newOwner) public notSender(_newOwner) onlyOwner returns(bool) { } function() payable external { } }
wallets[msg.sender].freezedAmount==0&&wallets[msg.sender].tokensAmount>=_amount&&_amount>0
12,359
wallets[msg.sender].freezedAmount==0&&wallets[msg.sender].tokensAmount>=_amount&&_amount>0
null
pragma solidity 0.5.12; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } } contract ERC20Basic { uint256 public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); } contract ERC20 is ERC20Basic { event Approval(address indexed owner, address indexed spender, uint256 value); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); } contract BasicToken is ERC20Basic { using SafeMath for uint256; struct WalletData { uint256 tokensAmount; //Tokens amount on wallet uint256 freezedAmount; //Freezed tokens amount on wallet. bool canFreezeTokens; //Is wallet can freeze tokens or not. uint unfreezeDate; // Date when we can unfreeze tokens on wallet. } mapping(address => WalletData) wallets; function transfer(address _to, uint256 _value) public notSender(_to) returns(bool) { } function balanceOf(address _owner) public view returns(uint256 balance) { } // Check wallet on unfreeze tokens amount function checkIfCanUseTokens(address _owner, uint256 _amount) internal view returns(bool) { } // Prevents user to send transaction on his own address modifier notSender(address _owner) { } } contract StandartToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) allowed; function approve(address _spender, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256 remaining) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } contract Ownable { constructor() public { } event TransferOwnership(address indexed _previousOwner, address indexed _newOwner); address public owner; function transferOwnership(address _newOwner) public returns(bool); modifier onlyOwner() { } } contract FreezableToken is StandartToken, Ownable { event ChangeFreezePermission(address indexed _owner, bool _permission); event FreezeTokens(address indexed _owner, uint256 _freezeAmount); event UnfreezeTokens(address indexed _owner, uint256 _unfreezeAmount); // Give\deprive permission to a wallet for freeze tokens. function giveFreezePermission(address[] memory _owners, bool _permission) public onlyOwner returns(bool) { } function freezeAllowance(address _owner) public view returns(bool) { } // Freeze tokens on sender wallet if have permission. function freezeTokens(uint256 _amount, uint _unfreezeDate) public isFreezeAllowed returns(bool) { } function showFreezedTokensAmount(address _owner) public view returns(uint256) { } function unfreezeTokens() public returns(bool) { require(<FILL_ME>) emit UnfreezeTokens(msg.sender, wallets[msg.sender].freezedAmount); wallets[msg.sender].freezedAmount = 0; // Unfreeze all tokens. wallets[msg.sender].unfreezeDate = 0; return true; } //Show date in UNIX time format. function showTokensUnfreezeDate(address _owner) public view returns(uint) { } function getUnfreezedTokens(address _owner) internal view returns(uint256) { } modifier isFreezeAllowed() { } } contract RIWIGO is FreezableToken { event Burn(address indexed _from, uint256 _value); string constant public name = "RIWIGO"; string constant public symbol = "RIWI"; uint constant public decimals = 18; uint256 constant public START_TOKENS = 150000000 * 10 ** decimals; //150M start constructor() public { } function burn(uint256 value) public onlyOwner returns(bool) { } function transferOwnership(address _newOwner) public notSender(_newOwner) onlyOwner returns(bool) { } function() payable external { } }
wallets[msg.sender].freezedAmount>0&&now>=wallets[msg.sender].unfreezeDate
12,359
wallets[msg.sender].freezedAmount>0&&now>=wallets[msg.sender].unfreezeDate
null
pragma solidity 0.5.12; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } } contract ERC20Basic { uint256 public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); } contract ERC20 is ERC20Basic { event Approval(address indexed owner, address indexed spender, uint256 value); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); } contract BasicToken is ERC20Basic { using SafeMath for uint256; struct WalletData { uint256 tokensAmount; //Tokens amount on wallet uint256 freezedAmount; //Freezed tokens amount on wallet. bool canFreezeTokens; //Is wallet can freeze tokens or not. uint unfreezeDate; // Date when we can unfreeze tokens on wallet. } mapping(address => WalletData) wallets; function transfer(address _to, uint256 _value) public notSender(_to) returns(bool) { } function balanceOf(address _owner) public view returns(uint256 balance) { } // Check wallet on unfreeze tokens amount function checkIfCanUseTokens(address _owner, uint256 _amount) internal view returns(bool) { } // Prevents user to send transaction on his own address modifier notSender(address _owner) { } } contract StandartToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) allowed; function approve(address _spender, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256 remaining) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } contract Ownable { constructor() public { } event TransferOwnership(address indexed _previousOwner, address indexed _newOwner); address public owner; function transferOwnership(address _newOwner) public returns(bool); modifier onlyOwner() { } } contract FreezableToken is StandartToken, Ownable { event ChangeFreezePermission(address indexed _owner, bool _permission); event FreezeTokens(address indexed _owner, uint256 _freezeAmount); event UnfreezeTokens(address indexed _owner, uint256 _unfreezeAmount); // Give\deprive permission to a wallet for freeze tokens. function giveFreezePermission(address[] memory _owners, bool _permission) public onlyOwner returns(bool) { } function freezeAllowance(address _owner) public view returns(bool) { } // Freeze tokens on sender wallet if have permission. function freezeTokens(uint256 _amount, uint _unfreezeDate) public isFreezeAllowed returns(bool) { } function showFreezedTokensAmount(address _owner) public view returns(uint256) { } function unfreezeTokens() public returns(bool) { } //Show date in UNIX time format. function showTokensUnfreezeDate(address _owner) public view returns(uint) { } function getUnfreezedTokens(address _owner) internal view returns(uint256) { } modifier isFreezeAllowed() { require(<FILL_ME>) _; } } contract RIWIGO is FreezableToken { event Burn(address indexed _from, uint256 _value); string constant public name = "RIWIGO"; string constant public symbol = "RIWI"; uint constant public decimals = 18; uint256 constant public START_TOKENS = 150000000 * 10 ** decimals; //150M start constructor() public { } function burn(uint256 value) public onlyOwner returns(bool) { } function transferOwnership(address _newOwner) public notSender(_newOwner) onlyOwner returns(bool) { } function() payable external { } }
freezeAllowance(msg.sender)
12,359
freezeAllowance(msg.sender)
null
pragma solidity 0.5.12; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns(uint256) { } function div(uint256 a, uint256 b) internal pure returns(uint256) { } function sub(uint256 a, uint256 b) internal pure returns(uint256) { } function add(uint256 a, uint256 b) internal pure returns(uint256) { } } contract ERC20Basic { uint256 public totalSupply; event Transfer(address indexed from, address indexed to, uint256 value); function balanceOf(address who) public view returns(uint256); function transfer(address to, uint256 value) public returns(bool); } contract ERC20 is ERC20Basic { event Approval(address indexed owner, address indexed spender, uint256 value); function allowance(address owner, address spender) public view returns(uint256); function approve(address spender, uint256 value) public returns(bool); function transferFrom(address from, address to, uint256 value) public returns(bool); } contract BasicToken is ERC20Basic { using SafeMath for uint256; struct WalletData { uint256 tokensAmount; //Tokens amount on wallet uint256 freezedAmount; //Freezed tokens amount on wallet. bool canFreezeTokens; //Is wallet can freeze tokens or not. uint unfreezeDate; // Date when we can unfreeze tokens on wallet. } mapping(address => WalletData) wallets; function transfer(address _to, uint256 _value) public notSender(_to) returns(bool) { } function balanceOf(address _owner) public view returns(uint256 balance) { } // Check wallet on unfreeze tokens amount function checkIfCanUseTokens(address _owner, uint256 _amount) internal view returns(bool) { } // Prevents user to send transaction on his own address modifier notSender(address _owner) { } } contract StandartToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) allowed; function approve(address _spender, uint256 _value) public returns(bool) { } function allowance(address _owner, address _spender) public view returns(uint256 remaining) { } function transferFrom(address _from, address _to, uint256 _value) public returns(bool) { } } contract Ownable { constructor() public { } event TransferOwnership(address indexed _previousOwner, address indexed _newOwner); address public owner; function transferOwnership(address _newOwner) public returns(bool); modifier onlyOwner() { } } contract FreezableToken is StandartToken, Ownable { event ChangeFreezePermission(address indexed _owner, bool _permission); event FreezeTokens(address indexed _owner, uint256 _freezeAmount); event UnfreezeTokens(address indexed _owner, uint256 _unfreezeAmount); // Give\deprive permission to a wallet for freeze tokens. function giveFreezePermission(address[] memory _owners, bool _permission) public onlyOwner returns(bool) { } function freezeAllowance(address _owner) public view returns(bool) { } // Freeze tokens on sender wallet if have permission. function freezeTokens(uint256 _amount, uint _unfreezeDate) public isFreezeAllowed returns(bool) { } function showFreezedTokensAmount(address _owner) public view returns(uint256) { } function unfreezeTokens() public returns(bool) { } //Show date in UNIX time format. function showTokensUnfreezeDate(address _owner) public view returns(uint) { } function getUnfreezedTokens(address _owner) internal view returns(uint256) { } modifier isFreezeAllowed() { } } contract RIWIGO is FreezableToken { event Burn(address indexed _from, uint256 _value); string constant public name = "RIWIGO"; string constant public symbol = "RIWI"; uint constant public decimals = 18; uint256 constant public START_TOKENS = 150000000 * 10 ** decimals; //150M start constructor() public { } function burn(uint256 value) public onlyOwner returns(bool) { require(<FILL_ME>) wallets[owner].tokensAmount = wallets[owner]. tokensAmount.sub(value); totalSupply = totalSupply.sub(value); emit Burn(owner, value); return true; } function transferOwnership(address _newOwner) public notSender(_newOwner) onlyOwner returns(bool) { } function() payable external { } }
checkIfCanUseTokens(owner,value)&&wallets[owner].tokensAmount>=value
12,359
checkIfCanUseTokens(owner,value)&&wallets[owner].tokensAmount>=value
"Mint would exceed max supply of NFT"
pragma solidity ^0.7.0; /** * @title contract * @dev Extends ERC721 Non-Fungible Token Standard basic implementation * @dev copy from bayc */ contract SpaceOutStation is ERC721, Ownable { using SafeMath for uint256; uint public constant maxNFTPurchase = 10; bool public saleIsActive = false; uint256 public nftPrice; uint256 public maxSupply; uint256 public initialFreeSupply; uint256 public openForSaleSupply; constructor( string memory name, string memory symbol, uint256 _nftPrice, uint256 _maxSupply, uint256 _initialFreeSupply, uint256 _openForSaleSupply ) ERC721(name, symbol) { } function withdraw() public onlyOwner { } function setBaseURI(string memory baseURI) public onlyOwner { } function setNftPrice(uint newPrice) public onlyOwner { } function setOpenForSaleSupply(uint newSaleSupply) public onlyOwner { } /* * Pause sale if active, make active if paused */ function flipSaleState() public onlyOwner { } /** * Mint NFT */ function mintNFT(uint numberOfTokens) public payable { } /** * for airdropping or reserve to owner */ function mintForOwner(address to, uint numberOfTokens) public onlyOwner { require(saleIsActive, "Sale must be active to mint"); require(<FILL_ME>) for(uint i = 0; i < numberOfTokens; i++) { uint mintIndex = totalSupply(); if (totalSupply() < maxSupply) { _safeMint(to, mintIndex); } } } }
totalSupply().add(numberOfTokens)<=maxSupply,"Mint would exceed max supply of NFT"
12,401
totalSupply().add(numberOfTokens)<=maxSupply
'SuniswapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
pragma solidity =0.6.12; contract SuniswapRouter02 is ISuniswapRouter02 { using SafeMathSuniswap for uint; address public immutable override factory; address public immutable override WETH; modifier ensure(uint deadline) { } constructor(address _factory, address _WETH) public { } receive() external payable { } // **** ADD LIQUIDITY **** function _addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin ) internal virtual returns (uint amountA, uint amountB) { } function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external virtual override ensure(deadline) returns (uint amountA, uint amountB, uint liquidity) { } function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountETH, uint liquidity) { } // **** REMOVE LIQUIDITY **** function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountA, uint amountB) { } function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountToken, uint amountETH) { } function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountA, uint amountB) { } function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountToken, uint amountETH) { } // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) **** function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountETH) { } function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountETH) { } // **** SWAP **** // requires the initial amount to have already been sent to the first pair function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual { } function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { amounts = SuniswapLibrary.getAmountsOut(factory, amountIn, path); require(<FILL_ME>) TransferHelper.safeTransferFrom( path[0], msg.sender, SuniswapLibrary.pairFor(factory, path[0], path[1]), amounts[0] ); _swap(amounts, path, to); } function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { } function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { } // **** SWAP (supporting fee-on-transfer tokens) **** // requires the initial amount to have already been sent to the first pair function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual { } function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { } function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override payable ensure(deadline) { } function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { } // **** LIBRARY FUNCTIONS **** function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) { } function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountOut) { } function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountIn) { } function getAmountsOut(uint amountIn, address[] memory path) public view virtual override returns (uint[] memory amounts) { } function getAmountsIn(uint amountOut, address[] memory path) public view virtual override returns (uint[] memory amounts) { } }
amounts[amounts.length-1]>=amountOutMin,'SuniswapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
12,432
amounts[amounts.length-1]>=amountOutMin
'SuniswapRouter: EXCESSIVE_INPUT_AMOUNT'
pragma solidity =0.6.12; contract SuniswapRouter02 is ISuniswapRouter02 { using SafeMathSuniswap for uint; address public immutable override factory; address public immutable override WETH; modifier ensure(uint deadline) { } constructor(address _factory, address _WETH) public { } receive() external payable { } // **** ADD LIQUIDITY **** function _addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin ) internal virtual returns (uint amountA, uint amountB) { } function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external virtual override ensure(deadline) returns (uint amountA, uint amountB, uint liquidity) { } function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountETH, uint liquidity) { } // **** REMOVE LIQUIDITY **** function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountA, uint amountB) { } function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountToken, uint amountETH) { } function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountA, uint amountB) { } function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountToken, uint amountETH) { } // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) **** function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountETH) { } function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountETH) { } // **** SWAP **** // requires the initial amount to have already been sent to the first pair function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual { } function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { amounts = SuniswapLibrary.getAmountsIn(factory, amountOut, path); require(<FILL_ME>) TransferHelper.safeTransferFrom( path[0], msg.sender, SuniswapLibrary.pairFor(factory, path[0], path[1]), amounts[0] ); _swap(amounts, path, to); } function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { } function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { } // **** SWAP (supporting fee-on-transfer tokens) **** // requires the initial amount to have already been sent to the first pair function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual { } function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { } function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override payable ensure(deadline) { } function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { } // **** LIBRARY FUNCTIONS **** function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) { } function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountOut) { } function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountIn) { } function getAmountsOut(uint amountIn, address[] memory path) public view virtual override returns (uint[] memory amounts) { } function getAmountsIn(uint amountOut, address[] memory path) public view virtual override returns (uint[] memory amounts) { } }
amounts[0]<=amountInMax,'SuniswapRouter: EXCESSIVE_INPUT_AMOUNT'
12,432
amounts[0]<=amountInMax
'SuniswapRouter: INVALID_PATH'
pragma solidity =0.6.12; contract SuniswapRouter02 is ISuniswapRouter02 { using SafeMathSuniswap for uint; address public immutable override factory; address public immutable override WETH; modifier ensure(uint deadline) { } constructor(address _factory, address _WETH) public { } receive() external payable { } // **** ADD LIQUIDITY **** function _addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin ) internal virtual returns (uint amountA, uint amountB) { } function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external virtual override ensure(deadline) returns (uint amountA, uint amountB, uint liquidity) { } function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountETH, uint liquidity) { } // **** REMOVE LIQUIDITY **** function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountA, uint amountB) { } function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountToken, uint amountETH) { } function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountA, uint amountB) { } function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountToken, uint amountETH) { } // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) **** function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountETH) { } function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountETH) { } // **** SWAP **** // requires the initial amount to have already been sent to the first pair function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual { } function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { require(<FILL_ME>) amounts = SuniswapLibrary.getAmountsOut(factory, msg.value, path); require(amounts[amounts.length - 1] >= amountOutMin, 'SuniswapRouter: INSUFFICIENT_OUTPUT_AMOUNT'); IWETH(WETH).deposit{value: amounts[0]}(); assert(IWETH(WETH).transfer(SuniswapLibrary.pairFor(factory, path[0], path[1]), amounts[0])); _swap(amounts, path, to); } function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { } // **** SWAP (supporting fee-on-transfer tokens) **** // requires the initial amount to have already been sent to the first pair function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual { } function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { } function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override payable ensure(deadline) { } function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { } // **** LIBRARY FUNCTIONS **** function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) { } function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountOut) { } function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountIn) { } function getAmountsOut(uint amountIn, address[] memory path) public view virtual override returns (uint[] memory amounts) { } function getAmountsIn(uint amountOut, address[] memory path) public view virtual override returns (uint[] memory amounts) { } }
path[0]==WETH,'SuniswapRouter: INVALID_PATH'
12,432
path[0]==WETH
'SuniswapRouter: INVALID_PATH'
pragma solidity =0.6.12; contract SuniswapRouter02 is ISuniswapRouter02 { using SafeMathSuniswap for uint; address public immutable override factory; address public immutable override WETH; modifier ensure(uint deadline) { } constructor(address _factory, address _WETH) public { } receive() external payable { } // **** ADD LIQUIDITY **** function _addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin ) internal virtual returns (uint amountA, uint amountB) { } function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external virtual override ensure(deadline) returns (uint amountA, uint amountB, uint liquidity) { } function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountETH, uint liquidity) { } // **** REMOVE LIQUIDITY **** function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountA, uint amountB) { } function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountToken, uint amountETH) { } function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountA, uint amountB) { } function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountToken, uint amountETH) { } // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) **** function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountETH) { } function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountETH) { } // **** SWAP **** // requires the initial amount to have already been sent to the first pair function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual { } function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { } function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { require(<FILL_ME>) amounts = SuniswapLibrary.getAmountsIn(factory, amountOut, path); require(amounts[0] <= amountInMax, 'SuniswapRouter: EXCESSIVE_INPUT_AMOUNT'); TransferHelper.safeTransferFrom( path[0], msg.sender, SuniswapLibrary.pairFor(factory, path[0], path[1]), amounts[0] ); _swap(amounts, path, address(this)); IWETH(WETH).withdraw(amounts[amounts.length - 1]); TransferHelper.safeTransferETH(to, amounts[amounts.length - 1]); } function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { } // **** SWAP (supporting fee-on-transfer tokens) **** // requires the initial amount to have already been sent to the first pair function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual { } function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { } function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override payable ensure(deadline) { } function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { } // **** LIBRARY FUNCTIONS **** function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) { } function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountOut) { } function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountIn) { } function getAmountsOut(uint amountIn, address[] memory path) public view virtual override returns (uint[] memory amounts) { } function getAmountsIn(uint amountOut, address[] memory path) public view virtual override returns (uint[] memory amounts) { } }
path[path.length-1]==WETH,'SuniswapRouter: INVALID_PATH'
12,432
path[path.length-1]==WETH
'SuniswapRouter: EXCESSIVE_INPUT_AMOUNT'
pragma solidity =0.6.12; contract SuniswapRouter02 is ISuniswapRouter02 { using SafeMathSuniswap for uint; address public immutable override factory; address public immutable override WETH; modifier ensure(uint deadline) { } constructor(address _factory, address _WETH) public { } receive() external payable { } // **** ADD LIQUIDITY **** function _addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin ) internal virtual returns (uint amountA, uint amountB) { } function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external virtual override ensure(deadline) returns (uint amountA, uint amountB, uint liquidity) { } function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountETH, uint liquidity) { } // **** REMOVE LIQUIDITY **** function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountA, uint amountB) { } function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountToken, uint amountETH) { } function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountA, uint amountB) { } function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountToken, uint amountETH) { } // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) **** function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountETH) { } function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountETH) { } // **** SWAP **** // requires the initial amount to have already been sent to the first pair function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual { } function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { } function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { require(path[0] == WETH, 'SuniswapRouter: INVALID_PATH'); amounts = SuniswapLibrary.getAmountsIn(factory, amountOut, path); require(<FILL_ME>) IWETH(WETH).deposit{value: amounts[0]}(); assert(IWETH(WETH).transfer(SuniswapLibrary.pairFor(factory, path[0], path[1]), amounts[0])); _swap(amounts, path, to); // refund dust eth, if any if (msg.value > amounts[0]) TransferHelper.safeTransferETH(msg.sender, msg.value - amounts[0]); } // **** SWAP (supporting fee-on-transfer tokens) **** // requires the initial amount to have already been sent to the first pair function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual { } function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { } function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override payable ensure(deadline) { } function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { } // **** LIBRARY FUNCTIONS **** function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) { } function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountOut) { } function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountIn) { } function getAmountsOut(uint amountIn, address[] memory path) public view virtual override returns (uint[] memory amounts) { } function getAmountsIn(uint amountOut, address[] memory path) public view virtual override returns (uint[] memory amounts) { } }
amounts[0]<=msg.value,'SuniswapRouter: EXCESSIVE_INPUT_AMOUNT'
12,432
amounts[0]<=msg.value
'SuniswapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
pragma solidity =0.6.12; contract SuniswapRouter02 is ISuniswapRouter02 { using SafeMathSuniswap for uint; address public immutable override factory; address public immutable override WETH; modifier ensure(uint deadline) { } constructor(address _factory, address _WETH) public { } receive() external payable { } // **** ADD LIQUIDITY **** function _addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin ) internal virtual returns (uint amountA, uint amountB) { } function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external virtual override ensure(deadline) returns (uint amountA, uint amountB, uint liquidity) { } function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external virtual override payable ensure(deadline) returns (uint amountToken, uint amountETH, uint liquidity) { } // **** REMOVE LIQUIDITY **** function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountA, uint amountB) { } function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountToken, uint amountETH) { } function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountA, uint amountB) { } function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountToken, uint amountETH) { } // **** REMOVE LIQUIDITY (supporting fee-on-transfer tokens) **** function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) public virtual override ensure(deadline) returns (uint amountETH) { } function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external virtual override returns (uint amountETH) { } // **** SWAP **** // requires the initial amount to have already been sent to the first pair function _swap(uint[] memory amounts, address[] memory path, address _to) internal virtual { } function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { } function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external virtual override ensure(deadline) returns (uint[] memory amounts) { } function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external virtual override payable ensure(deadline) returns (uint[] memory amounts) { } // **** SWAP (supporting fee-on-transfer tokens) **** // requires the initial amount to have already been sent to the first pair function _swapSupportingFeeOnTransferTokens(address[] memory path, address _to) internal virtual { } function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { TransferHelper.safeTransferFrom( path[0], msg.sender, SuniswapLibrary.pairFor(factory, path[0], path[1]), amountIn ); uint balanceBefore = IERC20Uniswap(path[path.length - 1]).balanceOf(to); _swapSupportingFeeOnTransferTokens(path, to); require(<FILL_ME>) } function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override payable ensure(deadline) { } function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external virtual override ensure(deadline) { } // **** LIBRARY FUNCTIONS **** function quote(uint amountA, uint reserveA, uint reserveB) public pure virtual override returns (uint amountB) { } function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountOut) { } function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) public pure virtual override returns (uint amountIn) { } function getAmountsOut(uint amountIn, address[] memory path) public view virtual override returns (uint[] memory amounts) { } function getAmountsIn(uint amountOut, address[] memory path) public view virtual override returns (uint[] memory amounts) { } }
IERC20Uniswap(path[path.length-1]).balanceOf(to).sub(balanceBefore)>=amountOutMin,'SuniswapRouter: INSUFFICIENT_OUTPUT_AMOUNT'
12,432
IERC20Uniswap(path[path.length-1]).balanceOf(to).sub(balanceBefore)>=amountOutMin
"migrate: no migrator"
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/utils/EnumerableSet.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./SengokuToken.sol"; interface IMigratorChef { // Perform LP token migration from legacy UniswapV2 to SushiSwap. // Take the current LP token address and return the new LP token address. // Migrator should have full access to the caller's LP token. // Return the new LP token address. // // XXX Migrator must have allowance access to UniswapV2 LP tokens. // SushiSwap must mint EXACTLY the same amount of SushiSwap LP tokens or // else something bad will happen. Traditional UniswapV2 does not // do that so be careful! function migrate(IERC20 token) external returns (IERC20); } // SSFV2LPT is the master of Sushi. He can make Sushi and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once SUSHI is sufficiently // distributed and the community can show to govern itself. // // Have fun reading it. Hopefully it's bug-free. God bless. contract SSFV2LPT is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do some fancy math here. Basically, any point in time, the amount of SUSHIs // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accSushiPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: // 1. The pool's `accSushiPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives the pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { IERC20 lpToken; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. SUSHIs to distribute per block. uint256 lastRewardBlock; // Last block number that SUSHIs distribution occurs. uint256 accSushiPerShare; // Accumulated SUSHIs per share, times 1e12. See below. } // The SUSHI TOKEN! SengokuToken public sushi; // Dev address. address public devaddr; // Block number when bonus SUSHI period ends. uint256 public bonusEndBlock; // SUSHI tokens created per block. uint256 public sushiPerBlock; // Bonus muliplier for early sushi makers. uint256 public constant BONUS_MULTIPLIER = 10; // The migrator contract. It has a lot of power. Can only be set through governance (owner). IMigratorChef public migrator; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Total allocation poitns. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The block number when SUSHI mining starts. uint256 public startBlock; event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event EmergencyWithdraw( address indexed user, uint256 indexed pid, uint256 amount ); constructor( SengokuToken _sushi, address _devaddr, uint256 _sushiPerBlock, uint256 _startBlock, uint256 _bonusEndBlock ) public { } function poolLength() external view returns (uint256) { } // Add a new lp to the pool. Can only be called by the owner. // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. function add( uint256 _allocPoint, IERC20 _lpToken, bool _withUpdate ) public onlyOwner { } // Update the given pool's SUSHI allocation point. Can only be called by the owner. function set( uint256 _pid, uint256 _allocPoint, bool _withUpdate ) public onlyOwner { } // Set the migrator contract. Can only be called by the owner. function setMigrator(IMigratorChef _migrator) public onlyOwner { } // Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good. function migrate(uint256 _pid) public { require(<FILL_ME>) PoolInfo storage pool = poolInfo[_pid]; IERC20 lpToken = pool.lpToken; uint256 bal = lpToken.balanceOf(address(this)); lpToken.safeApprove(address(migrator), bal); IERC20 newLpToken = migrator.migrate(lpToken); require(bal == newLpToken.balanceOf(address(this)), "migrate: bad"); pool.lpToken = newLpToken; } // Return reward multiplier over the given _from to _to block. function getMultiplier(uint256 _from, uint256 _to) public view returns (uint256) { } // View function to see pending SUSHIs on frontend. function pendingSushi(uint256 _pid, address _user) external view returns (uint256) { } // Update reward vairables for all pools. Be careful of gas spending! function massUpdatePools() public { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public { } // Deposit LP tokens to SSFV2LPT for SUSHI allocation. function deposit(uint256 _pid, uint256 _amount) public { } // Withdraw LP tokens from SSFV2LPT. function withdraw(uint256 _pid, uint256 _amount) public { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public { } // Safe sushi transfer function, just in case if rounding error causes pool to not have enough SUSHIs. function safeSushiTransfer(address _to, uint256 _amount) internal { } // Update dev address by the previous dev. function dev(address _devaddr) public { } }
address(migrator)!=address(0),"migrate: no migrator"
12,462
address(migrator)!=address(0)
'ETH_AMOUNT is higher than balance'
/** *Submitted for verification at Etherscan.io on 2020-10-27 */ pragma solidity ^0.6.6; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface UNISWAPv2 { function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); } contract MultiSendSell { address payable public owner; address public token_address; uint256 public eth_amount; uint256 public min_tokens; address WETHAddress = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; constructor() public { } receive() external payable { } function conf(address config_token_address, uint256 config_eth_amount, uint256 config_min_tokens) public payable returns (bool) { require(msg.sender == owner, 'ERR: ONLY OWNER ALLOWED'); require(<FILL_ME>) token_address = config_token_address; eth_amount = config_eth_amount; min_tokens = config_min_tokens; return true; } function tokenApprove(uint256 tokens) public returns (bool) { } function sellTokens(uint256 amountOutMin) public returns (bool) { } function withdrawETH() public returns (bool) { } function widthdrawToken(address token_contract_addr) public returns (bool){ } function runtx() public returns (bool) { } }
address(this).balance>=config_eth_amount,'ETH_AMOUNT is higher than balance'
12,470
address(this).balance>=config_eth_amount
"Tokens cannot be transferred from user account"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.6; // ---------------------------------------------------------------------------- // CocktailBar Stake COCETH to earn MOJITO // Enter our universe : cocktailbar.finance // // Come join the disscussion: https://t.me/cocktailbar_discussion // // Sincerely, Mr. Martini // ---------------------------------------------------------------------------- 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) { } function ceil(uint a, uint m) internal pure returns (uint r) { } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() { } modifier onlyOwner { } function transferOwnership(address _newOwner) external onlyOwner { } } // ---------------------------------------------------------------------------- // TRC Token Standard #20 Interface // ---------------------------------------------------------------------------- interface COC { function balanceOf(address _owner) view external returns (uint256 balance); function allowance(address _owner, address _spender) view external returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _amount) external returns (bool success); function transferFrom(address _from,address _to,uint256 _amount) external returns (bool success); function approve(address _to, uint256 _amount) external returns (bool success); } interface MOJITO { function balanceOf(address _owner) view external returns (uint256 balance); function allowance(address _owner, address _spender) view external returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _amount) external returns (bool success); function transferFrom(address _from,address _to,uint256 _amount) external returns (bool success); function approve(address _to, uint256 _amount) external returns (bool success); } contract ReentrancyGuard { bool private _notEntered; constructor () { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract StakeCOCETH is Owned, ReentrancyGuard { using SafeMath for uint256; uint256 private TotalMRewards; uint256 public WeekRewardPercent = 100; uint256 public TotalStakedETH = 0; uint256 StakingFee = 10; // 1.0% uint256 UnstakingFee = 30; // 3.0% uint256 private TeamFeesCollector = 0; address public stakeTokenAdd = 0x39FB7AF42ef12D92A0d577ca44cd54a0f24c4915; address constant public rewardToken = 0xda579367c6ca7854009133D1B3739020ba350C23; uint256 public creationTimeContract; struct USER{ uint256 stakedAmount; uint256 creationTime; uint256 TotalMRewarded; uint256 lastClaim; uint256 MyTotalStaked; } mapping(address => USER) public stakers; mapping(address=>uint256) public amounts; // keeps record of each reward payout uint256[] private rewardperday = [51063829790000000000,51063829790000000000,51063829790000000000,51063829790000000000,51063829790000000000,44680851060000000000,44680851060000000000,44680851060000000000,44680851060000000000,44680851060000000000,38297872340000000000,38297872340000000000,38297872340000000000,38297872340000000000,38297872340000000000,31914893620000000000,31914893620000000000,31914893620000000000,31914893620000000000,31914893620000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,6382978723000000000,6382978723000000000,6382978723000000000,6382978723000000000,6382978723000000000]; event STAKED(address staker, uint256 tokens, uint256 StakingFee); event UNSTAKED(address staker, uint256 tokens, uint256 UnstakingFee); event CLAIMEDREWARD(address staker, uint256 reward); event PERCENTCHANGED(address operator, uint256 percent); event FkTake(uint256 amount); event JkTake(uint256 amount); constructor() { } // ------------------------------------------------------------------------ // Token holders can stake their tokens using this function // @param tokens number of tokens to stake // ------------------------------------------------------------------------ function STAKE(uint256 tokens) external nonReentrant returns(bool){ require(<FILL_ME>) uint256 _stakingFee = (onePercentofTokens(tokens).mul(StakingFee)).div(10); stakers[msg.sender].stakedAmount = (tokens.sub(_stakingFee)).add(stakers[msg.sender].stakedAmount); TeamFeesCollector = TeamFeesCollector.add(_stakingFee); stakers[msg.sender].creationTime = block.timestamp; stakers[msg.sender].lastClaim = stakers[msg.sender].creationTime; stakers[msg.sender].MyTotalStaked = stakers[msg.sender].MyTotalStaked.add((tokens.sub(_stakingFee)).add(stakers[msg.sender].stakedAmount)); TotalStakedETH = TotalStakedETH.add((tokens).sub(_stakingFee)); emit STAKED(msg.sender, (tokens).sub(_stakingFee), _stakingFee); return true; } // ------------------------------------------------------------------------ // Stakers can claim their pending rewards using this function // ------------------------------------------------------------------------ function WITHDRAW(uint256 tokens) external nonReentrant { } // ------------------------------------------------------------------------ // Private function to calculate 1% percentage // ------------------------------------------------------------------------ function onePercentofTokens(uint256 _tokens) private pure returns (uint256){ } function calPercentofTokens(uint256 _tokens, uint256 cust) private pure returns (uint256){ } // ------------------------------------------------------------------------ // Get the number of tokens staked by a staker // param _staker the address of the staker // ------------------------------------------------------------------------ function yourStakedToken(address staker) external view returns(uint256 stakedT){ } // ------------------------------------------------------------------------ // Get the TOKEN balance of the token holder // @param user the address of the token holder // ------------------------------------------------------------------------ function yourTokenBalance(address user) external view returns(uint256 TBalance){ } function setPercent(uint256 percent) external onlyOwner { } function OwnerTeamFeesCollectorRead() external view returns(uint256 jKeeper) { } function yourDailyReward(address user) external view returns(uint256 RewardBalance){ } function MyTotalRewards(address user) external view returns(uint256 poolreward) { } function CLAIMREWARD() external { } function calculateReward(uint timeday, address user) private view returns(uint256 rew){ } function TotalPoolRewards() external pure returns(uint256 tpreward) { } function MyTotalStaked(address user) external view returns(uint256 totalstaked) { } function CurrentTokenReward() external view returns(uint256 crrtr) { } function TotalClaimedReward() external view returns (uint256 TotalM) { } function SetStakeFee(uint256 percent) external onlyOwner { } function SetUNStakeFee(uint256 percent) external onlyOwner { } }
COC(stakeTokenAdd).transferFrom(msg.sender,address(this),tokens),"Tokens cannot be transferred from user account"
12,500
COC(stakeTokenAdd).transferFrom(msg.sender,address(this),tokens)
"Invalid token amount to withdraw"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.6; // ---------------------------------------------------------------------------- // CocktailBar Stake COCETH to earn MOJITO // Enter our universe : cocktailbar.finance // // Come join the disscussion: https://t.me/cocktailbar_discussion // // Sincerely, Mr. Martini // ---------------------------------------------------------------------------- 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) { } function ceil(uint a, uint m) internal pure returns (uint r) { } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() { } modifier onlyOwner { } function transferOwnership(address _newOwner) external onlyOwner { } } // ---------------------------------------------------------------------------- // TRC Token Standard #20 Interface // ---------------------------------------------------------------------------- interface COC { function balanceOf(address _owner) view external returns (uint256 balance); function allowance(address _owner, address _spender) view external returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _amount) external returns (bool success); function transferFrom(address _from,address _to,uint256 _amount) external returns (bool success); function approve(address _to, uint256 _amount) external returns (bool success); } interface MOJITO { function balanceOf(address _owner) view external returns (uint256 balance); function allowance(address _owner, address _spender) view external returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _amount) external returns (bool success); function transferFrom(address _from,address _to,uint256 _amount) external returns (bool success); function approve(address _to, uint256 _amount) external returns (bool success); } contract ReentrancyGuard { bool private _notEntered; constructor () { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract StakeCOCETH is Owned, ReentrancyGuard { using SafeMath for uint256; uint256 private TotalMRewards; uint256 public WeekRewardPercent = 100; uint256 public TotalStakedETH = 0; uint256 StakingFee = 10; // 1.0% uint256 UnstakingFee = 30; // 3.0% uint256 private TeamFeesCollector = 0; address public stakeTokenAdd = 0x39FB7AF42ef12D92A0d577ca44cd54a0f24c4915; address constant public rewardToken = 0xda579367c6ca7854009133D1B3739020ba350C23; uint256 public creationTimeContract; struct USER{ uint256 stakedAmount; uint256 creationTime; uint256 TotalMRewarded; uint256 lastClaim; uint256 MyTotalStaked; } mapping(address => USER) public stakers; mapping(address=>uint256) public amounts; // keeps record of each reward payout uint256[] private rewardperday = [51063829790000000000,51063829790000000000,51063829790000000000,51063829790000000000,51063829790000000000,44680851060000000000,44680851060000000000,44680851060000000000,44680851060000000000,44680851060000000000,38297872340000000000,38297872340000000000,38297872340000000000,38297872340000000000,38297872340000000000,31914893620000000000,31914893620000000000,31914893620000000000,31914893620000000000,31914893620000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,6382978723000000000,6382978723000000000,6382978723000000000,6382978723000000000,6382978723000000000]; event STAKED(address staker, uint256 tokens, uint256 StakingFee); event UNSTAKED(address staker, uint256 tokens, uint256 UnstakingFee); event CLAIMEDREWARD(address staker, uint256 reward); event PERCENTCHANGED(address operator, uint256 percent); event FkTake(uint256 amount); event JkTake(uint256 amount); constructor() { } // ------------------------------------------------------------------------ // Token holders can stake their tokens using this function // @param tokens number of tokens to stake // ------------------------------------------------------------------------ function STAKE(uint256 tokens) external nonReentrant returns(bool){ } // ------------------------------------------------------------------------ // Stakers can claim their pending rewards using this function // ------------------------------------------------------------------------ function WITHDRAW(uint256 tokens) external nonReentrant { require(<FILL_ME>) uint256 _unstakingFee = (onePercentofTokens(tokens).mul(UnstakingFee)).div(10); TeamFeesCollector= TeamFeesCollector.add(_unstakingFee); uint256 owing = 0; require(COC(stakeTokenAdd).transfer(msg.sender, tokens.sub(_unstakingFee)), "Error in un-staking tokens"); stakers[msg.sender].stakedAmount = (stakers[msg.sender].stakedAmount).sub(tokens); owing = TotalStakedETH; TotalStakedETH = owing.sub(tokens); stakers[msg.sender].creationTime = block.timestamp; stakers[msg.sender].lastClaim = stakers[msg.sender].creationTime; emit UNSTAKED(msg.sender, tokens.sub(_unstakingFee), _unstakingFee); } // ------------------------------------------------------------------------ // Private function to calculate 1% percentage // ------------------------------------------------------------------------ function onePercentofTokens(uint256 _tokens) private pure returns (uint256){ } function calPercentofTokens(uint256 _tokens, uint256 cust) private pure returns (uint256){ } // ------------------------------------------------------------------------ // Get the number of tokens staked by a staker // param _staker the address of the staker // ------------------------------------------------------------------------ function yourStakedToken(address staker) external view returns(uint256 stakedT){ } // ------------------------------------------------------------------------ // Get the TOKEN balance of the token holder // @param user the address of the token holder // ------------------------------------------------------------------------ function yourTokenBalance(address user) external view returns(uint256 TBalance){ } function setPercent(uint256 percent) external onlyOwner { } function OwnerTeamFeesCollectorRead() external view returns(uint256 jKeeper) { } function yourDailyReward(address user) external view returns(uint256 RewardBalance){ } function MyTotalRewards(address user) external view returns(uint256 poolreward) { } function CLAIMREWARD() external { } function calculateReward(uint timeday, address user) private view returns(uint256 rew){ } function TotalPoolRewards() external pure returns(uint256 tpreward) { } function MyTotalStaked(address user) external view returns(uint256 totalstaked) { } function CurrentTokenReward() external view returns(uint256 crrtr) { } function TotalClaimedReward() external view returns (uint256 TotalM) { } function SetStakeFee(uint256 percent) external onlyOwner { } function SetUNStakeFee(uint256 percent) external onlyOwner { } }
stakers[msg.sender].stakedAmount>=tokens&&tokens>0,"Invalid token amount to withdraw"
12,500
stakers[msg.sender].stakedAmount>=tokens&&tokens>0
"Error in un-staking tokens"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.6; // ---------------------------------------------------------------------------- // CocktailBar Stake COCETH to earn MOJITO // Enter our universe : cocktailbar.finance // // Come join the disscussion: https://t.me/cocktailbar_discussion // // Sincerely, Mr. Martini // ---------------------------------------------------------------------------- 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) { } function ceil(uint a, uint m) internal pure returns (uint r) { } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() { } modifier onlyOwner { } function transferOwnership(address _newOwner) external onlyOwner { } } // ---------------------------------------------------------------------------- // TRC Token Standard #20 Interface // ---------------------------------------------------------------------------- interface COC { function balanceOf(address _owner) view external returns (uint256 balance); function allowance(address _owner, address _spender) view external returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _amount) external returns (bool success); function transferFrom(address _from,address _to,uint256 _amount) external returns (bool success); function approve(address _to, uint256 _amount) external returns (bool success); } interface MOJITO { function balanceOf(address _owner) view external returns (uint256 balance); function allowance(address _owner, address _spender) view external returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _amount) external returns (bool success); function transferFrom(address _from,address _to,uint256 _amount) external returns (bool success); function approve(address _to, uint256 _amount) external returns (bool success); } contract ReentrancyGuard { bool private _notEntered; constructor () { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract StakeCOCETH is Owned, ReentrancyGuard { using SafeMath for uint256; uint256 private TotalMRewards; uint256 public WeekRewardPercent = 100; uint256 public TotalStakedETH = 0; uint256 StakingFee = 10; // 1.0% uint256 UnstakingFee = 30; // 3.0% uint256 private TeamFeesCollector = 0; address public stakeTokenAdd = 0x39FB7AF42ef12D92A0d577ca44cd54a0f24c4915; address constant public rewardToken = 0xda579367c6ca7854009133D1B3739020ba350C23; uint256 public creationTimeContract; struct USER{ uint256 stakedAmount; uint256 creationTime; uint256 TotalMRewarded; uint256 lastClaim; uint256 MyTotalStaked; } mapping(address => USER) public stakers; mapping(address=>uint256) public amounts; // keeps record of each reward payout uint256[] private rewardperday = [51063829790000000000,51063829790000000000,51063829790000000000,51063829790000000000,51063829790000000000,44680851060000000000,44680851060000000000,44680851060000000000,44680851060000000000,44680851060000000000,38297872340000000000,38297872340000000000,38297872340000000000,38297872340000000000,38297872340000000000,31914893620000000000,31914893620000000000,31914893620000000000,31914893620000000000,31914893620000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,6382978723000000000,6382978723000000000,6382978723000000000,6382978723000000000,6382978723000000000]; event STAKED(address staker, uint256 tokens, uint256 StakingFee); event UNSTAKED(address staker, uint256 tokens, uint256 UnstakingFee); event CLAIMEDREWARD(address staker, uint256 reward); event PERCENTCHANGED(address operator, uint256 percent); event FkTake(uint256 amount); event JkTake(uint256 amount); constructor() { } // ------------------------------------------------------------------------ // Token holders can stake their tokens using this function // @param tokens number of tokens to stake // ------------------------------------------------------------------------ function STAKE(uint256 tokens) external nonReentrant returns(bool){ } // ------------------------------------------------------------------------ // Stakers can claim their pending rewards using this function // ------------------------------------------------------------------------ function WITHDRAW(uint256 tokens) external nonReentrant { require(stakers[msg.sender].stakedAmount >= tokens && tokens > 0, "Invalid token amount to withdraw"); uint256 _unstakingFee = (onePercentofTokens(tokens).mul(UnstakingFee)).div(10); TeamFeesCollector= TeamFeesCollector.add(_unstakingFee); uint256 owing = 0; require(<FILL_ME>) stakers[msg.sender].stakedAmount = (stakers[msg.sender].stakedAmount).sub(tokens); owing = TotalStakedETH; TotalStakedETH = owing.sub(tokens); stakers[msg.sender].creationTime = block.timestamp; stakers[msg.sender].lastClaim = stakers[msg.sender].creationTime; emit UNSTAKED(msg.sender, tokens.sub(_unstakingFee), _unstakingFee); } // ------------------------------------------------------------------------ // Private function to calculate 1% percentage // ------------------------------------------------------------------------ function onePercentofTokens(uint256 _tokens) private pure returns (uint256){ } function calPercentofTokens(uint256 _tokens, uint256 cust) private pure returns (uint256){ } // ------------------------------------------------------------------------ // Get the number of tokens staked by a staker // param _staker the address of the staker // ------------------------------------------------------------------------ function yourStakedToken(address staker) external view returns(uint256 stakedT){ } // ------------------------------------------------------------------------ // Get the TOKEN balance of the token holder // @param user the address of the token holder // ------------------------------------------------------------------------ function yourTokenBalance(address user) external view returns(uint256 TBalance){ } function setPercent(uint256 percent) external onlyOwner { } function OwnerTeamFeesCollectorRead() external view returns(uint256 jKeeper) { } function yourDailyReward(address user) external view returns(uint256 RewardBalance){ } function MyTotalRewards(address user) external view returns(uint256 poolreward) { } function CLAIMREWARD() external { } function calculateReward(uint timeday, address user) private view returns(uint256 rew){ } function TotalPoolRewards() external pure returns(uint256 tpreward) { } function MyTotalStaked(address user) external view returns(uint256 totalstaked) { } function CurrentTokenReward() external view returns(uint256 crrtr) { } function TotalClaimedReward() external view returns (uint256 TotalM) { } function SetStakeFee(uint256 percent) external onlyOwner { } function SetUNStakeFee(uint256 percent) external onlyOwner { } }
COC(stakeTokenAdd).transfer(msg.sender,tokens.sub(_unstakingFee)),"Error in un-staking tokens"
12,500
COC(stakeTokenAdd).transfer(msg.sender,tokens.sub(_unstakingFee))
"you need to stake some coins"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.6; // ---------------------------------------------------------------------------- // CocktailBar Stake COCETH to earn MOJITO // Enter our universe : cocktailbar.finance // // Come join the disscussion: https://t.me/cocktailbar_discussion // // Sincerely, Mr. Martini // ---------------------------------------------------------------------------- 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) { } function ceil(uint a, uint m) internal pure returns (uint r) { } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() { } modifier onlyOwner { } function transferOwnership(address _newOwner) external onlyOwner { } } // ---------------------------------------------------------------------------- // TRC Token Standard #20 Interface // ---------------------------------------------------------------------------- interface COC { function balanceOf(address _owner) view external returns (uint256 balance); function allowance(address _owner, address _spender) view external returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _amount) external returns (bool success); function transferFrom(address _from,address _to,uint256 _amount) external returns (bool success); function approve(address _to, uint256 _amount) external returns (bool success); } interface MOJITO { function balanceOf(address _owner) view external returns (uint256 balance); function allowance(address _owner, address _spender) view external returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _amount) external returns (bool success); function transferFrom(address _from,address _to,uint256 _amount) external returns (bool success); function approve(address _to, uint256 _amount) external returns (bool success); } contract ReentrancyGuard { bool private _notEntered; constructor () { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract StakeCOCETH is Owned, ReentrancyGuard { using SafeMath for uint256; uint256 private TotalMRewards; uint256 public WeekRewardPercent = 100; uint256 public TotalStakedETH = 0; uint256 StakingFee = 10; // 1.0% uint256 UnstakingFee = 30; // 3.0% uint256 private TeamFeesCollector = 0; address public stakeTokenAdd = 0x39FB7AF42ef12D92A0d577ca44cd54a0f24c4915; address constant public rewardToken = 0xda579367c6ca7854009133D1B3739020ba350C23; uint256 public creationTimeContract; struct USER{ uint256 stakedAmount; uint256 creationTime; uint256 TotalMRewarded; uint256 lastClaim; uint256 MyTotalStaked; } mapping(address => USER) public stakers; mapping(address=>uint256) public amounts; // keeps record of each reward payout uint256[] private rewardperday = [51063829790000000000,51063829790000000000,51063829790000000000,51063829790000000000,51063829790000000000,44680851060000000000,44680851060000000000,44680851060000000000,44680851060000000000,44680851060000000000,38297872340000000000,38297872340000000000,38297872340000000000,38297872340000000000,38297872340000000000,31914893620000000000,31914893620000000000,31914893620000000000,31914893620000000000,31914893620000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,6382978723000000000,6382978723000000000,6382978723000000000,6382978723000000000,6382978723000000000]; event STAKED(address staker, uint256 tokens, uint256 StakingFee); event UNSTAKED(address staker, uint256 tokens, uint256 UnstakingFee); event CLAIMEDREWARD(address staker, uint256 reward); event PERCENTCHANGED(address operator, uint256 percent); event FkTake(uint256 amount); event JkTake(uint256 amount); constructor() { } // ------------------------------------------------------------------------ // Token holders can stake their tokens using this function // @param tokens number of tokens to stake // ------------------------------------------------------------------------ function STAKE(uint256 tokens) external nonReentrant returns(bool){ } // ------------------------------------------------------------------------ // Stakers can claim their pending rewards using this function // ------------------------------------------------------------------------ function WITHDRAW(uint256 tokens) external nonReentrant { } // ------------------------------------------------------------------------ // Private function to calculate 1% percentage // ------------------------------------------------------------------------ function onePercentofTokens(uint256 _tokens) private pure returns (uint256){ } function calPercentofTokens(uint256 _tokens, uint256 cust) private pure returns (uint256){ } // ------------------------------------------------------------------------ // Get the number of tokens staked by a staker // param _staker the address of the staker // ------------------------------------------------------------------------ function yourStakedToken(address staker) external view returns(uint256 stakedT){ } // ------------------------------------------------------------------------ // Get the TOKEN balance of the token holder // @param user the address of the token holder // ------------------------------------------------------------------------ function yourTokenBalance(address user) external view returns(uint256 TBalance){ } function setPercent(uint256 percent) external onlyOwner { } function OwnerTeamFeesCollectorRead() external view returns(uint256 jKeeper) { } function yourDailyReward(address user) external view returns(uint256 RewardBalance){ } function MyTotalRewards(address user) external view returns(uint256 poolreward) { } function CLAIMREWARD() external { uint256 timeToday = block.timestamp - creationTimeContract; //what day it is uint256 timeT = timeToday.div(86400); require(<FILL_ME>) //require(timeT > 0,"Claim Time has not started yet"); uint256 rewardToGive = calculateReward(timeT,msg.sender); require(MOJITO(rewardToken).transfer(msg.sender,rewardToGive), "ERROR: error in sending reward from contract"); emit CLAIMEDREWARD(msg.sender, rewardToGive); stakers[msg.sender].TotalMRewarded = (stakers[msg.sender].TotalMRewarded).add(rewardToGive); stakers[msg.sender].lastClaim = block.timestamp; TotalMRewards = TotalMRewards.add(rewardToGive); } function calculateReward(uint timeday, address user) private view returns(uint256 rew){ } function TotalPoolRewards() external pure returns(uint256 tpreward) { } function MyTotalStaked(address user) external view returns(uint256 totalstaked) { } function CurrentTokenReward() external view returns(uint256 crrtr) { } function TotalClaimedReward() external view returns (uint256 TotalM) { } function SetStakeFee(uint256 percent) external onlyOwner { } function SetUNStakeFee(uint256 percent) external onlyOwner { } }
stakers[msg.sender].stakedAmount>0,"you need to stake some coins"
12,500
stakers[msg.sender].stakedAmount>0
"ERROR: error in sending reward from contract"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.7.6; // ---------------------------------------------------------------------------- // CocktailBar Stake COCETH to earn MOJITO // Enter our universe : cocktailbar.finance // // Come join the disscussion: https://t.me/cocktailbar_discussion // // Sincerely, Mr. Martini // ---------------------------------------------------------------------------- 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) { } function ceil(uint a, uint m) internal pure returns (uint r) { } } // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() { } modifier onlyOwner { } function transferOwnership(address _newOwner) external onlyOwner { } } // ---------------------------------------------------------------------------- // TRC Token Standard #20 Interface // ---------------------------------------------------------------------------- interface COC { function balanceOf(address _owner) view external returns (uint256 balance); function allowance(address _owner, address _spender) view external returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _amount) external returns (bool success); function transferFrom(address _from,address _to,uint256 _amount) external returns (bool success); function approve(address _to, uint256 _amount) external returns (bool success); } interface MOJITO { function balanceOf(address _owner) view external returns (uint256 balance); function allowance(address _owner, address _spender) view external returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _amount) external returns (bool success); function transferFrom(address _from,address _to,uint256 _amount) external returns (bool success); function approve(address _to, uint256 _amount) external returns (bool success); } contract ReentrancyGuard { bool private _notEntered; constructor () { } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { } } // ---------------------------------------------------------------------------- // ERC20 Token, with the addition of symbol, name and decimals and assisted // token transfers // ---------------------------------------------------------------------------- contract StakeCOCETH is Owned, ReentrancyGuard { using SafeMath for uint256; uint256 private TotalMRewards; uint256 public WeekRewardPercent = 100; uint256 public TotalStakedETH = 0; uint256 StakingFee = 10; // 1.0% uint256 UnstakingFee = 30; // 3.0% uint256 private TeamFeesCollector = 0; address public stakeTokenAdd = 0x39FB7AF42ef12D92A0d577ca44cd54a0f24c4915; address constant public rewardToken = 0xda579367c6ca7854009133D1B3739020ba350C23; uint256 public creationTimeContract; struct USER{ uint256 stakedAmount; uint256 creationTime; uint256 TotalMRewarded; uint256 lastClaim; uint256 MyTotalStaked; } mapping(address => USER) public stakers; mapping(address=>uint256) public amounts; // keeps record of each reward payout uint256[] private rewardperday = [51063829790000000000,51063829790000000000,51063829790000000000,51063829790000000000,51063829790000000000,44680851060000000000,44680851060000000000,44680851060000000000,44680851060000000000,44680851060000000000,38297872340000000000,38297872340000000000,38297872340000000000,38297872340000000000,38297872340000000000,31914893620000000000,31914893620000000000,31914893620000000000,31914893620000000000,31914893620000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,25531914890000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,19148936170000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,12765957450000000000,6382978723000000000,6382978723000000000,6382978723000000000,6382978723000000000,6382978723000000000]; event STAKED(address staker, uint256 tokens, uint256 StakingFee); event UNSTAKED(address staker, uint256 tokens, uint256 UnstakingFee); event CLAIMEDREWARD(address staker, uint256 reward); event PERCENTCHANGED(address operator, uint256 percent); event FkTake(uint256 amount); event JkTake(uint256 amount); constructor() { } // ------------------------------------------------------------------------ // Token holders can stake their tokens using this function // @param tokens number of tokens to stake // ------------------------------------------------------------------------ function STAKE(uint256 tokens) external nonReentrant returns(bool){ } // ------------------------------------------------------------------------ // Stakers can claim their pending rewards using this function // ------------------------------------------------------------------------ function WITHDRAW(uint256 tokens) external nonReentrant { } // ------------------------------------------------------------------------ // Private function to calculate 1% percentage // ------------------------------------------------------------------------ function onePercentofTokens(uint256 _tokens) private pure returns (uint256){ } function calPercentofTokens(uint256 _tokens, uint256 cust) private pure returns (uint256){ } // ------------------------------------------------------------------------ // Get the number of tokens staked by a staker // param _staker the address of the staker // ------------------------------------------------------------------------ function yourStakedToken(address staker) external view returns(uint256 stakedT){ } // ------------------------------------------------------------------------ // Get the TOKEN balance of the token holder // @param user the address of the token holder // ------------------------------------------------------------------------ function yourTokenBalance(address user) external view returns(uint256 TBalance){ } function setPercent(uint256 percent) external onlyOwner { } function OwnerTeamFeesCollectorRead() external view returns(uint256 jKeeper) { } function yourDailyReward(address user) external view returns(uint256 RewardBalance){ } function MyTotalRewards(address user) external view returns(uint256 poolreward) { } function CLAIMREWARD() external { uint256 timeToday = block.timestamp - creationTimeContract; //what day it is uint256 timeT = timeToday.div(86400); require(stakers[msg.sender].stakedAmount > 0,"you need to stake some coins"); //require(timeT > 0,"Claim Time has not started yet"); uint256 rewardToGive = calculateReward(timeT,msg.sender); require(<FILL_ME>) emit CLAIMEDREWARD(msg.sender, rewardToGive); stakers[msg.sender].TotalMRewarded = (stakers[msg.sender].TotalMRewarded).add(rewardToGive); stakers[msg.sender].lastClaim = block.timestamp; TotalMRewards = TotalMRewards.add(rewardToGive); } function calculateReward(uint timeday, address user) private view returns(uint256 rew){ } function TotalPoolRewards() external pure returns(uint256 tpreward) { } function MyTotalStaked(address user) external view returns(uint256 totalstaked) { } function CurrentTokenReward() external view returns(uint256 crrtr) { } function TotalClaimedReward() external view returns (uint256 TotalM) { } function SetStakeFee(uint256 percent) external onlyOwner { } function SetUNStakeFee(uint256 percent) external onlyOwner { } }
MOJITO(rewardToken).transfer(msg.sender,rewardToGive),"ERROR: error in sending reward from contract"
12,500
MOJITO(rewardToken).transfer(msg.sender,rewardToGive)
"It is not an existing administrator wallet, and it must not be the owner wallet of the token."
pragma solidity 0.4.25; contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { } } contract BasicToken is ERC20Basic { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => uint256) balances; uint256 _totalSupply; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } } contract ERC20Token is BasicToken, ERC20 { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping (address => mapping (address => uint256)) allowed; mapping (address => uint256) public freezeOf; function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } function increaseApproval(address _spender, uint256 _addedValue) public returns (bool success) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool success) { } } contract Ownable { address public owner; mapping (address => bool) public admin; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrAdmin() { } function transferOwnership(address newOwner) onlyOwner public { } function setAdmin(address newAdmin) onlyOwner public { require(<FILL_ME>) admin[newAdmin] = true; } function unsetAdmin(address Admin) onlyOwner public { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract BurnableToken is BasicToken, Ownable { event Burn(address indexed burner, uint256 amount); function burn(uint256 _value) onlyOwner public { } } contract FreezeToken is BasicToken, Ownable { event Freezen(address indexed freezer, uint256 amount); event UnFreezen(address indexed freezer, uint256 amount); mapping (address => uint256) freezeOf; function freeze(uint256 _value) onlyOwner public { } function unfreeze(uint256 _value) onlyOwner public { } } contract KonaSummitPlatformCoin is BurnableToken,FreezeToken, DetailedERC20, ERC20Token,Pausable{ using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); event LockerChanged(address indexed owner, uint256 amount); mapping(address => uint) locker; string private _symbol = "KSPC"; string private _name = "Kona Summit Platform Coin"; uint8 private _decimals = 18; uint256 private TOTAL_SUPPLY = 10*(10**8)*(10**uint256(_decimals)); constructor() DetailedERC20(_name, _symbol, _decimals) public { } function lockOf(address _address) public view returns (uint256 _locker) { } function transfer(address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function setLock(address _address, uint256 _value) public onlyOwnerOrAdmin { } function setLockList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function() public payable { } }
admin[newAdmin]!=true&&owner!=newAdmin,"It is not an existing administrator wallet, and it must not be the owner wallet of the token."
12,529
admin[newAdmin]!=true&&owner!=newAdmin
"This is an existing admin wallet, it must not be a token holder wallet."
pragma solidity 0.4.25; contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { } } contract BasicToken is ERC20Basic { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => uint256) balances; uint256 _totalSupply; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } } contract ERC20Token is BasicToken, ERC20 { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping (address => mapping (address => uint256)) allowed; mapping (address => uint256) public freezeOf; function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } function increaseApproval(address _spender, uint256 _addedValue) public returns (bool success) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool success) { } } contract Ownable { address public owner; mapping (address => bool) public admin; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrAdmin() { } function transferOwnership(address newOwner) onlyOwner public { } function setAdmin(address newAdmin) onlyOwner public { } function unsetAdmin(address Admin) onlyOwner public { require(<FILL_ME>) admin[Admin] = false; } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract BurnableToken is BasicToken, Ownable { event Burn(address indexed burner, uint256 amount); function burn(uint256 _value) onlyOwner public { } } contract FreezeToken is BasicToken, Ownable { event Freezen(address indexed freezer, uint256 amount); event UnFreezen(address indexed freezer, uint256 amount); mapping (address => uint256) freezeOf; function freeze(uint256 _value) onlyOwner public { } function unfreeze(uint256 _value) onlyOwner public { } } contract KonaSummitPlatformCoin is BurnableToken,FreezeToken, DetailedERC20, ERC20Token,Pausable{ using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); event LockerChanged(address indexed owner, uint256 amount); mapping(address => uint) locker; string private _symbol = "KSPC"; string private _name = "Kona Summit Platform Coin"; uint8 private _decimals = 18; uint256 private TOTAL_SUPPLY = 10*(10**8)*(10**uint256(_decimals)); constructor() DetailedERC20(_name, _symbol, _decimals) public { } function lockOf(address _address) public view returns (uint256 _locker) { } function transfer(address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function setLock(address _address, uint256 _value) public onlyOwnerOrAdmin { } function setLockList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function() public payable { } }
admin[Admin]!=false&&owner!=Admin,"This is an existing admin wallet, it must not be a token holder wallet."
12,529
admin[Admin]!=false&&owner!=Admin
"An error occurred in the calculation process"
pragma solidity 0.4.25; contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { } } contract BasicToken is ERC20Basic { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => uint256) balances; uint256 _totalSupply; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } } contract ERC20Token is BasicToken, ERC20 { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping (address => mapping (address => uint256)) allowed; mapping (address => uint256) public freezeOf; function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } function increaseApproval(address _spender, uint256 _addedValue) public returns (bool success) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool success) { } } contract Ownable { address public owner; mapping (address => bool) public admin; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrAdmin() { } function transferOwnership(address newOwner) onlyOwner public { } function setAdmin(address newAdmin) onlyOwner public { } function unsetAdmin(address Admin) onlyOwner public { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b !=0,"The number you want to divide must be non-zero."); uint256 c = a / b; require(<FILL_ME>) return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract BurnableToken is BasicToken, Ownable { event Burn(address indexed burner, uint256 amount); function burn(uint256 _value) onlyOwner public { } } contract FreezeToken is BasicToken, Ownable { event Freezen(address indexed freezer, uint256 amount); event UnFreezen(address indexed freezer, uint256 amount); mapping (address => uint256) freezeOf; function freeze(uint256 _value) onlyOwner public { } function unfreeze(uint256 _value) onlyOwner public { } } contract KonaSummitPlatformCoin is BurnableToken,FreezeToken, DetailedERC20, ERC20Token,Pausable{ using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); event LockerChanged(address indexed owner, uint256 amount); mapping(address => uint) locker; string private _symbol = "KSPC"; string private _name = "Kona Summit Platform Coin"; uint8 private _decimals = 18; uint256 private TOTAL_SUPPLY = 10*(10**8)*(10**uint256(_decimals)); constructor() DetailedERC20(_name, _symbol, _decimals) public { } function lockOf(address _address) public view returns (uint256 _locker) { } function transfer(address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function setLock(address _address, uint256 _value) public onlyOwnerOrAdmin { } function setLockList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function() public payable { } }
c*b==a,"An error occurred in the calculation process"
12,529
c*b==a
"The number to be processed is more than the total amount and the number currently frozen."
pragma solidity 0.4.25; contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { } } contract BasicToken is ERC20Basic { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => uint256) balances; uint256 _totalSupply; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } } contract ERC20Token is BasicToken, ERC20 { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping (address => mapping (address => uint256)) allowed; mapping (address => uint256) public freezeOf; function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } function increaseApproval(address _spender, uint256 _addedValue) public returns (bool success) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool success) { } } contract Ownable { address public owner; mapping (address => bool) public admin; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrAdmin() { } function transferOwnership(address newOwner) onlyOwner public { } function setAdmin(address newAdmin) onlyOwner public { } function unsetAdmin(address Admin) onlyOwner public { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract BurnableToken is BasicToken, Ownable { event Burn(address indexed burner, uint256 amount); function burn(uint256 _value) onlyOwner public { } } contract FreezeToken is BasicToken, Ownable { event Freezen(address indexed freezer, uint256 amount); event UnFreezen(address indexed freezer, uint256 amount); mapping (address => uint256) freezeOf; function freeze(uint256 _value) onlyOwner public { } function unfreeze(uint256 _value) onlyOwner public { require(<FILL_ME>) balances[msg.sender] = balances[msg.sender].add(_value); freezeOf[msg.sender] = freezeOf[msg.sender].sub(_value); _totalSupply = _totalSupply.add(_value); emit Freezen(msg.sender, _value); } } contract KonaSummitPlatformCoin is BurnableToken,FreezeToken, DetailedERC20, ERC20Token,Pausable{ using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); event LockerChanged(address indexed owner, uint256 amount); mapping(address => uint) locker; string private _symbol = "KSPC"; string private _name = "Kona Summit Platform Coin"; uint8 private _decimals = 18; uint256 private TOTAL_SUPPLY = 10*(10**8)*(10**uint256(_decimals)); constructor() DetailedERC20(_name, _symbol, _decimals) public { } function lockOf(address _address) public view returns (uint256 _locker) { } function transfer(address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function setLock(address _address, uint256 _value) public onlyOwnerOrAdmin { } function setLockList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function() public payable { } }
freezeOf[msg.sender]>=_value,"The number to be processed is more than the total amount and the number currently frozen."
12,529
freezeOf[msg.sender]>=_value
"Attempting to send more than the locked number"
pragma solidity 0.4.25; contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { } } contract BasicToken is ERC20Basic { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => uint256) balances; uint256 _totalSupply; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } } contract ERC20Token is BasicToken, ERC20 { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping (address => mapping (address => uint256)) allowed; mapping (address => uint256) public freezeOf; function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } function increaseApproval(address _spender, uint256 _addedValue) public returns (bool success) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool success) { } } contract Ownable { address public owner; mapping (address => bool) public admin; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrAdmin() { } function transferOwnership(address newOwner) onlyOwner public { } function setAdmin(address newAdmin) onlyOwner public { } function unsetAdmin(address Admin) onlyOwner public { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract BurnableToken is BasicToken, Ownable { event Burn(address indexed burner, uint256 amount); function burn(uint256 _value) onlyOwner public { } } contract FreezeToken is BasicToken, Ownable { event Freezen(address indexed freezer, uint256 amount); event UnFreezen(address indexed freezer, uint256 amount); mapping (address => uint256) freezeOf; function freeze(uint256 _value) onlyOwner public { } function unfreeze(uint256 _value) onlyOwner public { } } contract KonaSummitPlatformCoin is BurnableToken,FreezeToken, DetailedERC20, ERC20Token,Pausable{ using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); event LockerChanged(address indexed owner, uint256 amount); mapping(address => uint) locker; string private _symbol = "KSPC"; string private _name = "Kona Summit Platform Coin"; uint8 private _decimals = 18; uint256 private TOTAL_SUPPLY = 10*(10**8)*(10**uint256(_decimals)); constructor() DetailedERC20(_name, _symbol, _decimals) public { } function lockOf(address _address) public view returns (uint256 _locker) { } function transfer(address _to, uint256 _value) public whenNotPaused returns (bool){ require(<FILL_ME>) return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function setLock(address _address, uint256 _value) public onlyOwnerOrAdmin { } function setLockList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function() public payable { } }
balances[msg.sender].sub(_value)>=locker[msg.sender],"Attempting to send more than the locked number"
12,529
balances[msg.sender].sub(_value)>=locker[msg.sender]
"Attempting to send more than the locked number"
pragma solidity 0.4.25; contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { } } contract BasicToken is ERC20Basic { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => uint256) balances; uint256 _totalSupply; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } } contract ERC20Token is BasicToken, ERC20 { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping (address => mapping (address => uint256)) allowed; mapping (address => uint256) public freezeOf; function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } function increaseApproval(address _spender, uint256 _addedValue) public returns (bool success) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool success) { } } contract Ownable { address public owner; mapping (address => bool) public admin; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrAdmin() { } function transferOwnership(address newOwner) onlyOwner public { } function setAdmin(address newAdmin) onlyOwner public { } function unsetAdmin(address Admin) onlyOwner public { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract BurnableToken is BasicToken, Ownable { event Burn(address indexed burner, uint256 amount); function burn(uint256 _value) onlyOwner public { } } contract FreezeToken is BasicToken, Ownable { event Freezen(address indexed freezer, uint256 amount); event UnFreezen(address indexed freezer, uint256 amount); mapping (address => uint256) freezeOf; function freeze(uint256 _value) onlyOwner public { } function unfreeze(uint256 _value) onlyOwner public { } } contract KonaSummitPlatformCoin is BurnableToken,FreezeToken, DetailedERC20, ERC20Token,Pausable{ using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); event LockerChanged(address indexed owner, uint256 amount); mapping(address => uint) locker; string private _symbol = "KSPC"; string private _name = "Kona Summit Platform Coin"; uint8 private _decimals = 18; uint256 private TOTAL_SUPPLY = 10*(10**8)*(10**uint256(_decimals)); constructor() DetailedERC20(_name, _symbol, _decimals) public { } function lockOf(address _address) public view returns (uint256 _locker) { } function transfer(address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool){ require(_to > address(0) && _from > address(0),"Please check the address" ); require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value,"Please check the amount of transmission error and the amount you send."); require(<FILL_ME>) balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } function transferList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function setLock(address _address, uint256 _value) public onlyOwnerOrAdmin { } function setLockList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function() public payable { } }
balances[_from].sub(_value)>=locker[_from],"Attempting to send more than the locked number"
12,529
balances[_from].sub(_value)>=locker[_from]
'Please check the address'
pragma solidity 0.4.25; contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { } } contract BasicToken is ERC20Basic { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => uint256) balances; uint256 _totalSupply; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256 balance) { } } contract ERC20Token is BasicToken, ERC20 { using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); mapping (address => mapping (address => uint256)) allowed; mapping (address => uint256) public freezeOf; function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } function increaseApproval(address _spender, uint256 _addedValue) public returns (bool success) { } function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool success) { } } contract Ownable { address public owner; mapping (address => bool) public admin; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { } modifier onlyOwner() { } modifier onlyOwnerOrAdmin() { } function transferOwnership(address newOwner) onlyOwner public { } function setAdmin(address newAdmin) onlyOwner public { } function unsetAdmin(address Admin) onlyOwner public { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract BurnableToken is BasicToken, Ownable { event Burn(address indexed burner, uint256 amount); function burn(uint256 _value) onlyOwner public { } } contract FreezeToken is BasicToken, Ownable { event Freezen(address indexed freezer, uint256 amount); event UnFreezen(address indexed freezer, uint256 amount); mapping (address => uint256) freezeOf; function freeze(uint256 _value) onlyOwner public { } function unfreeze(uint256 _value) onlyOwner public { } } contract KonaSummitPlatformCoin is BurnableToken,FreezeToken, DetailedERC20, ERC20Token,Pausable{ using SafeMath for uint256; event Approval(address indexed owner, address indexed spender, uint256 value); event LockerChanged(address indexed owner, uint256 amount); mapping(address => uint) locker; string private _symbol = "KSPC"; string private _name = "Kona Summit Platform Coin"; uint8 private _decimals = 18; uint256 private TOTAL_SUPPLY = 10*(10**8)*(10**uint256(_decimals)); constructor() DetailedERC20(_name, _symbol, _decimals) public { } function lockOf(address _address) public view returns (uint256 _locker) { } function transfer(address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool){ } function transferList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ } function setLock(address _address, uint256 _value) public onlyOwnerOrAdmin { } function setLockList(address[] _recipients, uint256[] _balances) public onlyOwnerOrAdmin{ require(_recipients.length == _balances.length,"The number of wallet arrangements and the number of amounts are different."); for (uint i=0; i < _recipients.length; i++) { require(<FILL_ME>) locker[_recipients[i]] = _balances[i]; emit LockerChanged(_recipients[i], _balances[i]); } } function() public payable { } }
_recipients[i]!=address(0),'Please check the address'
12,529
_recipients[i]!=address(0)
"ERC1155: balance query for nonexistent token"
pragma solidity ^0.6.0; /** * @title Standard ERC1155 token * * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 */ contract ERC1155 is ERC165, IERC1155 { using SafeMath for uint256; using Address for address; // Mapping from token ID to account balances mapping (uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping (address => mapping(address => bool)) private _operatorApprovals; // Mapping token ID to that token being registered as existing mapping (uint256 => bool) private _tokenExists; /* * bytes4(keccak256('balanceOf(address,uint256)')) == 0x00fdd58e * bytes4(keccak256('balanceOfBatch(address[],uint256[])')) == 0x4e1273f4 * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('safeTransferFrom(address,address,uint256,uint256,bytes)')) == 0xf242432a * bytes4(keccak256('safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)')) == 0x2eb2c2d6 * * => 0x00fdd58e ^ 0x4e1273f4 ^ 0xa22cb465 ^ * 0xe985e9c5 ^ 0xf242432a ^ 0x2eb2c2d6 == 0xd9b67a26 */ bytes4 private constant _INTERFACE_ID_ERC1155 = 0xd9b67a26; constructor() public { } /** @dev Get the specified address' balance for token with specified ID. Attempting to query the zero account for a balance will result in a revert. @param account The address of the token holder @param id ID of the token @return The account's balance of the token type requested */ function balanceOf(address account, uint256 id) public view override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); require(<FILL_ME>) return _balances[id][account]; } /** @dev Get the balance of multiple account/token pairs. If any of the query accounts is the zero account, this query will revert. @param accounts The addresses of the token holders @param ids IDs of the tokens @return Balances for each account and token id pair */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view override returns (uint256[] memory) { } /** * @dev Sets or unsets the approval of a given operator. * * An operator is allowed to transfer all tokens of the sender on their behalf. * * Because an account already has operator privileges for itself, this function will revert * if the account attempts to set the approval status for itself. * * @param operator address to set the approval * @param approved representing the status of the approval to be set */ function setApprovalForAll(address operator, bool approved) external override virtual { } /** @notice Queries the approval status of an operator for a given account. @param account The account of the Tokens @param operator Address of authorized operator @return True if the operator is approved, false if not */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** @dev Transfers `value` amount of an `id` from the `from` address to the `to` address specified. Caller must be approved to manage the tokens being transferred out of the `from` account. If `to` is a smart contract, will call `onERC1155Received` on `to` and act appropriately. @param from Source address @param to Target address @param id ID of the token type @param value Transfer amount @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function safeTransferFrom( address from, address to, uint256 id, uint256 value, bytes calldata data ) external override virtual { } /** @dev Transfers `values` amount(s) of `ids` from the `from` address to the `to` address specified. Caller must be approved to manage the tokens being transferred out of the `from` account. If `to` is a smart contract, will call `onERC1155BatchReceived` on `to` and act appropriately. @param from Source address @param to Target address @param ids IDs of each token type @param values Transfer amounts per token type @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external override virtual { } /** * @dev Register a token ID so other contract functionality knows this token * actually exists and this ID is valid. Minting will automatically call this. * @param id uint256 ID of the token to register */ function _registerToken(uint256 id) internal virtual { } /** * @dev Returns whether the specified token exists. Use {_registerTokenID} to set this flag. * @param id uint256 ID of the token to query the existence of * @return bool whether the token exists */ function _exists(uint256 id) internal view returns (bool) { } /** * @dev Internal function to mint an amount of a token with the given ID * @param to The address that will own the minted token * @param id ID of the token to be minted * @param value Amount of the token to be minted * @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function _mint(address to, uint256 id, uint256 value, bytes memory data) internal virtual { } /** * @dev Internal function to batch mint amounts of tokens with the given IDs * @param to The address that will own the minted token * @param ids IDs of the tokens to be minted * @param values Amounts of the tokens to be minted * @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal virtual { } /** * @dev Internal function to burn an amount of a token with the given ID * @param account Account which owns the token to be burnt * @param id ID of the token to be burnt * @param value Amount of the token to be burnt */ function _burn(address account, uint256 id, uint256 value) internal virtual { } /** * @dev Internal function to batch burn an amounts of tokens with the given IDs * @param account Account which owns the token to be burnt * @param ids IDs of the tokens to be burnt * @param values Amounts of the tokens to be burnt */ function _burnBatch(address account, uint256[] memory ids, uint256[] memory values) internal virtual { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 value, bytes memory data ) internal virtual { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal virtual { } }
_exists(id),"ERC1155: balance query for nonexistent token"
12,557
_exists(id)
"ERC1155: some token in batch balance query does not exist"
pragma solidity ^0.6.0; /** * @title Standard ERC1155 token * * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 */ contract ERC1155 is ERC165, IERC1155 { using SafeMath for uint256; using Address for address; // Mapping from token ID to account balances mapping (uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping (address => mapping(address => bool)) private _operatorApprovals; // Mapping token ID to that token being registered as existing mapping (uint256 => bool) private _tokenExists; /* * bytes4(keccak256('balanceOf(address,uint256)')) == 0x00fdd58e * bytes4(keccak256('balanceOfBatch(address[],uint256[])')) == 0x4e1273f4 * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('safeTransferFrom(address,address,uint256,uint256,bytes)')) == 0xf242432a * bytes4(keccak256('safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)')) == 0x2eb2c2d6 * * => 0x00fdd58e ^ 0x4e1273f4 ^ 0xa22cb465 ^ * 0xe985e9c5 ^ 0xf242432a ^ 0x2eb2c2d6 == 0xd9b67a26 */ bytes4 private constant _INTERFACE_ID_ERC1155 = 0xd9b67a26; constructor() public { } /** @dev Get the specified address' balance for token with specified ID. Attempting to query the zero account for a balance will result in a revert. @param account The address of the token holder @param id ID of the token @return The account's balance of the token type requested */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** @dev Get the balance of multiple account/token pairs. If any of the query accounts is the zero account, this query will revert. @param accounts The addresses of the token holders @param ids IDs of the tokens @return Balances for each account and token id pair */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and IDs must have same lengths"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { require(accounts[i] != address(0), "ERC1155: some address in batch balance query is zero"); require(<FILL_ME>) batchBalances[i] = _balances[ids[i]][accounts[i]]; } return batchBalances; } /** * @dev Sets or unsets the approval of a given operator. * * An operator is allowed to transfer all tokens of the sender on their behalf. * * Because an account already has operator privileges for itself, this function will revert * if the account attempts to set the approval status for itself. * * @param operator address to set the approval * @param approved representing the status of the approval to be set */ function setApprovalForAll(address operator, bool approved) external override virtual { } /** @notice Queries the approval status of an operator for a given account. @param account The account of the Tokens @param operator Address of authorized operator @return True if the operator is approved, false if not */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** @dev Transfers `value` amount of an `id` from the `from` address to the `to` address specified. Caller must be approved to manage the tokens being transferred out of the `from` account. If `to` is a smart contract, will call `onERC1155Received` on `to` and act appropriately. @param from Source address @param to Target address @param id ID of the token type @param value Transfer amount @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function safeTransferFrom( address from, address to, uint256 id, uint256 value, bytes calldata data ) external override virtual { } /** @dev Transfers `values` amount(s) of `ids` from the `from` address to the `to` address specified. Caller must be approved to manage the tokens being transferred out of the `from` account. If `to` is a smart contract, will call `onERC1155BatchReceived` on `to` and act appropriately. @param from Source address @param to Target address @param ids IDs of each token type @param values Transfer amounts per token type @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external override virtual { } /** * @dev Register a token ID so other contract functionality knows this token * actually exists and this ID is valid. Minting will automatically call this. * @param id uint256 ID of the token to register */ function _registerToken(uint256 id) internal virtual { } /** * @dev Returns whether the specified token exists. Use {_registerTokenID} to set this flag. * @param id uint256 ID of the token to query the existence of * @return bool whether the token exists */ function _exists(uint256 id) internal view returns (bool) { } /** * @dev Internal function to mint an amount of a token with the given ID * @param to The address that will own the minted token * @param id ID of the token to be minted * @param value Amount of the token to be minted * @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function _mint(address to, uint256 id, uint256 value, bytes memory data) internal virtual { } /** * @dev Internal function to batch mint amounts of tokens with the given IDs * @param to The address that will own the minted token * @param ids IDs of the tokens to be minted * @param values Amounts of the tokens to be minted * @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal virtual { } /** * @dev Internal function to burn an amount of a token with the given ID * @param account Account which owns the token to be burnt * @param id ID of the token to be burnt * @param value Amount of the token to be burnt */ function _burn(address account, uint256 id, uint256 value) internal virtual { } /** * @dev Internal function to batch burn an amounts of tokens with the given IDs * @param account Account which owns the token to be burnt * @param ids IDs of the tokens to be burnt * @param values Amounts of the tokens to be burnt */ function _burnBatch(address account, uint256[] memory ids, uint256[] memory values) internal virtual { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 value, bytes memory data ) internal virtual { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal virtual { } }
_exists(ids[i]),"ERC1155: some token in batch balance query does not exist"
12,557
_exists(ids[i])
"ERC1155: got unknown value from onERC1155Received"
pragma solidity ^0.6.0; /** * @title Standard ERC1155 token * * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 */ contract ERC1155 is ERC165, IERC1155 { using SafeMath for uint256; using Address for address; // Mapping from token ID to account balances mapping (uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping (address => mapping(address => bool)) private _operatorApprovals; // Mapping token ID to that token being registered as existing mapping (uint256 => bool) private _tokenExists; /* * bytes4(keccak256('balanceOf(address,uint256)')) == 0x00fdd58e * bytes4(keccak256('balanceOfBatch(address[],uint256[])')) == 0x4e1273f4 * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('safeTransferFrom(address,address,uint256,uint256,bytes)')) == 0xf242432a * bytes4(keccak256('safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)')) == 0x2eb2c2d6 * * => 0x00fdd58e ^ 0x4e1273f4 ^ 0xa22cb465 ^ * 0xe985e9c5 ^ 0xf242432a ^ 0x2eb2c2d6 == 0xd9b67a26 */ bytes4 private constant _INTERFACE_ID_ERC1155 = 0xd9b67a26; constructor() public { } /** @dev Get the specified address' balance for token with specified ID. Attempting to query the zero account for a balance will result in a revert. @param account The address of the token holder @param id ID of the token @return The account's balance of the token type requested */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** @dev Get the balance of multiple account/token pairs. If any of the query accounts is the zero account, this query will revert. @param accounts The addresses of the token holders @param ids IDs of the tokens @return Balances for each account and token id pair */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view override returns (uint256[] memory) { } /** * @dev Sets or unsets the approval of a given operator. * * An operator is allowed to transfer all tokens of the sender on their behalf. * * Because an account already has operator privileges for itself, this function will revert * if the account attempts to set the approval status for itself. * * @param operator address to set the approval * @param approved representing the status of the approval to be set */ function setApprovalForAll(address operator, bool approved) external override virtual { } /** @notice Queries the approval status of an operator for a given account. @param account The account of the Tokens @param operator Address of authorized operator @return True if the operator is approved, false if not */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** @dev Transfers `value` amount of an `id` from the `from` address to the `to` address specified. Caller must be approved to manage the tokens being transferred out of the `from` account. If `to` is a smart contract, will call `onERC1155Received` on `to` and act appropriately. @param from Source address @param to Target address @param id ID of the token type @param value Transfer amount @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function safeTransferFrom( address from, address to, uint256 id, uint256 value, bytes calldata data ) external override virtual { } /** @dev Transfers `values` amount(s) of `ids` from the `from` address to the `to` address specified. Caller must be approved to manage the tokens being transferred out of the `from` account. If `to` is a smart contract, will call `onERC1155BatchReceived` on `to` and act appropriately. @param from Source address @param to Target address @param ids IDs of each token type @param values Transfer amounts per token type @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external override virtual { } /** * @dev Register a token ID so other contract functionality knows this token * actually exists and this ID is valid. Minting will automatically call this. * @param id uint256 ID of the token to register */ function _registerToken(uint256 id) internal virtual { } /** * @dev Returns whether the specified token exists. Use {_registerTokenID} to set this flag. * @param id uint256 ID of the token to query the existence of * @return bool whether the token exists */ function _exists(uint256 id) internal view returns (bool) { } /** * @dev Internal function to mint an amount of a token with the given ID * @param to The address that will own the minted token * @param id ID of the token to be minted * @param value Amount of the token to be minted * @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function _mint(address to, uint256 id, uint256 value, bytes memory data) internal virtual { } /** * @dev Internal function to batch mint amounts of tokens with the given IDs * @param to The address that will own the minted token * @param ids IDs of the tokens to be minted * @param values Amounts of the tokens to be minted * @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal virtual { } /** * @dev Internal function to burn an amount of a token with the given ID * @param account Account which owns the token to be burnt * @param id ID of the token to be burnt * @param value Amount of the token to be burnt */ function _burn(address account, uint256 id, uint256 value) internal virtual { } /** * @dev Internal function to batch burn an amounts of tokens with the given IDs * @param account Account which owns the token to be burnt * @param ids IDs of the tokens to be burnt * @param values Amounts of the tokens to be burnt */ function _burnBatch(address account, uint256[] memory ids, uint256[] memory values) internal virtual { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 value, bytes memory data ) internal virtual { if(to.isContract()) { require(<FILL_ME>) } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal virtual { } }
IERC1155Receiver(to).onERC1155Received(operator,from,id,value,data)==IERC1155Receiver(to).onERC1155Received.selector,"ERC1155: got unknown value from onERC1155Received"
12,557
IERC1155Receiver(to).onERC1155Received(operator,from,id,value,data)==IERC1155Receiver(to).onERC1155Received.selector
"ERC1155: got unknown value from onERC1155BatchReceived"
pragma solidity ^0.6.0; /** * @title Standard ERC1155 token * * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 */ contract ERC1155 is ERC165, IERC1155 { using SafeMath for uint256; using Address for address; // Mapping from token ID to account balances mapping (uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping (address => mapping(address => bool)) private _operatorApprovals; // Mapping token ID to that token being registered as existing mapping (uint256 => bool) private _tokenExists; /* * bytes4(keccak256('balanceOf(address,uint256)')) == 0x00fdd58e * bytes4(keccak256('balanceOfBatch(address[],uint256[])')) == 0x4e1273f4 * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('safeTransferFrom(address,address,uint256,uint256,bytes)')) == 0xf242432a * bytes4(keccak256('safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)')) == 0x2eb2c2d6 * * => 0x00fdd58e ^ 0x4e1273f4 ^ 0xa22cb465 ^ * 0xe985e9c5 ^ 0xf242432a ^ 0x2eb2c2d6 == 0xd9b67a26 */ bytes4 private constant _INTERFACE_ID_ERC1155 = 0xd9b67a26; constructor() public { } /** @dev Get the specified address' balance for token with specified ID. Attempting to query the zero account for a balance will result in a revert. @param account The address of the token holder @param id ID of the token @return The account's balance of the token type requested */ function balanceOf(address account, uint256 id) public view override returns (uint256) { } /** @dev Get the balance of multiple account/token pairs. If any of the query accounts is the zero account, this query will revert. @param accounts The addresses of the token holders @param ids IDs of the tokens @return Balances for each account and token id pair */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view override returns (uint256[] memory) { } /** * @dev Sets or unsets the approval of a given operator. * * An operator is allowed to transfer all tokens of the sender on their behalf. * * Because an account already has operator privileges for itself, this function will revert * if the account attempts to set the approval status for itself. * * @param operator address to set the approval * @param approved representing the status of the approval to be set */ function setApprovalForAll(address operator, bool approved) external override virtual { } /** @notice Queries the approval status of an operator for a given account. @param account The account of the Tokens @param operator Address of authorized operator @return True if the operator is approved, false if not */ function isApprovedForAll(address account, address operator) public view override returns (bool) { } /** @dev Transfers `value` amount of an `id` from the `from` address to the `to` address specified. Caller must be approved to manage the tokens being transferred out of the `from` account. If `to` is a smart contract, will call `onERC1155Received` on `to` and act appropriately. @param from Source address @param to Target address @param id ID of the token type @param value Transfer amount @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function safeTransferFrom( address from, address to, uint256 id, uint256 value, bytes calldata data ) external override virtual { } /** @dev Transfers `values` amount(s) of `ids` from the `from` address to the `to` address specified. Caller must be approved to manage the tokens being transferred out of the `from` account. If `to` is a smart contract, will call `onERC1155BatchReceived` on `to` and act appropriately. @param from Source address @param to Target address @param ids IDs of each token type @param values Transfer amounts per token type @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external override virtual { } /** * @dev Register a token ID so other contract functionality knows this token * actually exists and this ID is valid. Minting will automatically call this. * @param id uint256 ID of the token to register */ function _registerToken(uint256 id) internal virtual { } /** * @dev Returns whether the specified token exists. Use {_registerTokenID} to set this flag. * @param id uint256 ID of the token to query the existence of * @return bool whether the token exists */ function _exists(uint256 id) internal view returns (bool) { } /** * @dev Internal function to mint an amount of a token with the given ID * @param to The address that will own the minted token * @param id ID of the token to be minted * @param value Amount of the token to be minted * @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function _mint(address to, uint256 id, uint256 value, bytes memory data) internal virtual { } /** * @dev Internal function to batch mint amounts of tokens with the given IDs * @param to The address that will own the minted token * @param ids IDs of the tokens to be minted * @param values Amounts of the tokens to be minted * @param data Data forwarded to `onERC1155Received` if `to` is a contract receiver */ function _mintBatch(address to, uint256[] memory ids, uint256[] memory values, bytes memory data) internal virtual { } /** * @dev Internal function to burn an amount of a token with the given ID * @param account Account which owns the token to be burnt * @param id ID of the token to be burnt * @param value Amount of the token to be burnt */ function _burn(address account, uint256 id, uint256 value) internal virtual { } /** * @dev Internal function to batch burn an amounts of tokens with the given IDs * @param account Account which owns the token to be burnt * @param ids IDs of the tokens to be burnt * @param values Amounts of the tokens to be burnt */ function _burnBatch(address account, uint256[] memory ids, uint256[] memory values) internal virtual { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 value, bytes memory data ) internal virtual { } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory values, bytes memory data ) internal virtual { if(to.isContract()) { require(<FILL_ME>) } } }
IERC1155Receiver(to).onERC1155BatchReceived(operator,from,ids,values,data)==IERC1155Receiver(to).onERC1155BatchReceived.selector,"ERC1155: got unknown value from onERC1155BatchReceived"
12,557
IERC1155Receiver(to).onERC1155BatchReceived(operator,from,ids,values,data)==IERC1155Receiver(to).onERC1155BatchReceived.selector
null
// https://www.howeycoins.com/index.html // // Participate in the ICO by sending ETH to this contract. 1 ETH = 10 HOW // // // DON'T MISS THIS EXCLUSIVE OPPORTUNITY TO PARTICIPATE IN // HOWEYCOINS TRAVEL NETWORK NOW! // // // Combining the two most growth-oriented segments of the digital economy โ€“ // blockchain technology and travel, HoweyCoin is the newest and only coin offering // that captures the magic of coin trading profits AND the excitement and // guaranteed returns of the travel industry. HoweyCoins will partner with all // segments of the travel industry (air, hotel, car rental, and luxury segments), // earning coins you can trade for profit instead of points. Massive potential // upside benefits like: // // HoweyCoins are officially registered with the U.S. government; // HoweyCoins will trade on an SEC-compliant exchange where you can buy and sell // them for profit; // HoweyCoins can be used with existing points programs; // HoweyCoins can be exchanged for cryptocurrencies and cash; // HoweyCoins can be spent at any participating airline or hotel; // HoweyCoins can also be redeemed for merchandise. // // Beware of scams. This is the real HoweyCoin ICO. pragma solidity ^0.4.24; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } interface ERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function transfer(address _to, uint256 _value) external returns (bool success); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success); function balanceOf(address _owner) external view returns (uint256 balance); function approve(address _spender, uint256 _value) external returns (bool success); function allowance(address _owner, address _spender) external view returns (uint256 remaining); } contract ERC223Receiver { function tokenFallback(address _sender, address _origin, uint _value, bytes _data) external returns (bool ok); } // HoweyCoins are the cryptocurrency for the travel industry at exactly the right time. // // To participate in the ICO, simply send ETH to this contract, or call // buyAtPrice with the current price. contract HoweyCoin is ERC20 { using SafeMath for uint256; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; address public owner; uint256 public tokensPerWei; string public name; string public symbol; uint256 public totalSupply; function decimals() public pure returns (uint8) { } constructor(string _name, string _symbol, uint256 _totalSupplyTokens) public { } function () public payable { } // Buy the tokens at the expected price or fail. // This prevents the owner from changing the price during a purchase. function buyAtPrice(uint256 _tokensPerWei) public payable returns (bool success) { } function transfer(address _to, uint256 _value) external returns (bool success) { } function transfer(address _to, uint _value, bytes _data) external returns (bool success) { } function transferFrom(address _from, address _to, uint _value, bytes _data) external returns (bool success) { } function transferFrom(address _from, address _to, uint _value) external returns (bool success) { } function balanceOf(address _owner) external view returns (uint256 balance) { } function approve(address _spender, uint256 _value) external returns (bool success) { } function allowance(address _owner, address _spender) external view returns (uint256 remaining) { } function increaseApproval(address _spender, uint _addedValue) external returns (bool success) { } function decreaseApproval(address _spender, uint _subtractedValue) external returns (bool success) { } function transferMany(address [] _dests, uint256 [] _amounts) public { require(_dests.length == _amounts.length); for (uint i = 0; i < _dests.length; ++i) { require(<FILL_ME>) } } function setPrice(uint256 _tokensPerWei) public { } function withdrawTokens(address tokenAddress) public { } function _isContract(address _addr) internal view returns (bool is_contract) { } function _contractFallback(address _origin, address _to, uint _value, bytes _data) internal returns (bool success) { } function _transferFrom(address _from, address _to, uint256 _value) internal returns (bool success) { } function _transfer(address _to, uint256 _value) internal returns (bool success) { } }
_transfer(_dests[i],_amounts[i])
12,625
_transfer(_dests[i],_amounts[i])
null
pragma solidity ^0.5.8; contract ERC20_Coin{ string public name;//ๅ็งฐ string public symbol;//็ผฉๅ†™ uint8 public decimals = 18;//็ฒพ็กฎ็š„ๅฐๆ•ฐไฝๆ•ฐ uint256 public totalSupply;//ๆ€ปๅ‘่กŒ้‡ address internal admin;//็ฎก็†ๅ‘˜ mapping (address => uint256) public balanceOf;//ๅฎขๆˆท็พคไฝ“ bool public isAct = true;//ๅˆ็บฆๆดปๅŠจๆ ‡่ฎฐ bool public openRaise = false;//ๅผ€ๅฏๅ‹Ÿ้›†่ต„้‡‘ๅŠŸ่ƒฝ uint256 public raisePrice = 0;//ๅ‹Ÿ้›†ๅ…‘ๆขๆฏ”ไพ‹ address payable internal finance;//่ดขๅŠก็ฎก็† //่ฝฌ่ดฆ้€š็Ÿฅ event Transfer(address indexed from, address indexed to, uint256 value); //ไปฅๅคช่ฝฌๅ‡บ้€š็Ÿฅ event SendEth(address indexed to, uint256 value); constructor( uint256 initialSupply,//ๅ‘่กŒ้‡ string memory tokenName,//ๅ็งฐ string memory tokenSymbol//็ผฉๅ†™ ) public { } // ๅชๆœ‰็ฎก็†ๅ‘˜่ƒฝ่ฐƒ็”จ็š„ modifier onlyAdmin() { } // ๅˆคๆ–ญๅˆ็บฆๆ˜ฏๅฆๆš‚ๅœๆœๅŠก modifier isActivity() { } // ๆ˜ฏๅฆๅค„ไบŽๅ‹Ÿ้›†่ต„้‡‘็Šถๆ€ modifier isOpenRaise() { } //ๅชๆœ‰ๅœจๆดปๅŠจไธญๅนถไธ”ๅผ€ๅฏไบ†ๅ‹Ÿ้›†ๆ ‡่ฎฐๆ‰ไผšๆŽฅๆ”ถETH function () external payable isActivity isOpenRaise{ } //ๆ™ฎ้€š็š„่ฝฌ่ดฆๅŠŸ่ƒฝ๏ผŒๅชๅˆคๆ–ญๆดปๅŠจ็Šถๆ€ //ๅฏไปฅๅœจๅ„็ง็ฌฌไธ‰ๆ–น้’ฑๅŒ…่ฐƒ็”จ๏ผŒๅฆ‚๏ผšimtokenใ€MetaMask function transfer(address _to, uint256 _value) public isActivity{ } //ๅ‡บ็บณ่ฝฌ่ดฆ๏ผŒๆ‰น้‡ๆ“ไฝœ function transferList(address[] memory _tos, uint[] memory _values) public isActivity { require(_tos.length == _values.length); uint256 _total = 0; for(uint256 i;i<_values.length;i++){ _total += _values[i]; } require(<FILL_ME>) for(uint256 i;i<_tos.length;i++){ _transfer(msg.sender,_tos[i],_values[i]); } } //ๅ†…้ƒจ่ฝฌ่ดฆๅฐ่ฃ… function _transfer(address _from, address _to, uint _value) internal { } //่ฎพ็ฝฎๅ‹Ÿ้›†่ต„้‡‘็š„ๅ…‘ๆขๆฏ”ไพ‹ function setRaisePrice(uint256 _price)public onlyAdmin{ } //ๅผ€ๅฏๅ‹Ÿ้›†้€š้“๏ผŒๅš้ข„็•™๏ผŒ้ป˜่ฎค้ƒฝๆ˜ฏๅ…ณ้—ญ็š„ function setOpenRaise(bool _open) public onlyAdmin{ } //่ฎพ็ฝฎๆดปๅŠจ็Šถๆ€๏ผŒๅค„็†ๅบ”ๆ€ฅ็Šถๅ†ต function setActivity(bool _isAct) public onlyAdmin{ } //่ฝฌ่ฎฉ็ฎก็†ๅ‘˜ๆƒ้™ function setAdmin(address _address) public onlyAdmin{ } //่ฎพ็ฝฎ่ต„้‡‘็ฎก็†ๅ‘˜ function setMagage(address payable _address) public onlyAdmin{ } //้”€ๆฏๅˆ็บฆ function killYourself()public onlyAdmin{ } }
balanceOf[msg.sender]>=_total
12,658
balanceOf[msg.sender]>=_total
"AaveRewardToken: aave address provider cannot be zero address"
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.6.12; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "./interfaces/AaveInterfaces.sol"; import "../ContinuousRewardToken.sol"; /** * @title AaveRewardToken contract * @notice ERC20 token which wraps underlying (eg USDC) into CB-CY-aUSDC, rewards going to delegatee * @dev Initially set to only get Interest Rewards. Can then register potential AAVE Liquidity mining Contract. */ contract AaveRewardToken is ContinuousRewardToken { using SafeMath for uint256; using SafeERC20 for IERC20; // Used to convert between WAD (1e18) and RAY (1e27), based on // https://github.com/aave/protocol-v2/blob/1.0.1/contracts/protocol/libraries/math/WadRayMath.sol uint256 internal constant WAD_RAY_RATIO = 1e9; // Code used to register the integrator originating the operation, for potential rewards. // 0 if the action is executed directly by the user, without any middle-man // https://github.com/aave/protocol-v2/blob/1.0.1/contracts/interfaces/ILendingPool.sol#L170 uint16 internal constant REFERRAL_CODE = 0; uint256 internal constant REWARD_RATE_DECIMAL_PRECISION = 1e18; IAToken public aToken; ILendingPoolAddressesProvider public aaveAddressProvider; /** * @notice Construct a new Aave reward token * @param _name ERC-20 name of this token * @param _symbol ERC-20 symbol of this token * @param _aToken Aave's Protocol aToken, (eg aUSDC for underlying USDC) * @param _aaveAddressProvider Aave's Address Provider: data source for Aave smart contracts addresses * @param _delegate The address of reward owner */ constructor( string memory _name, string memory _symbol, IAToken _aToken, ILendingPoolAddressesProvider _aaveAddressProvider, address _delegate ) ERC20(_name, _symbol) ContinuousRewardToken(_aToken.UNDERLYING_ASSET_ADDRESS(), _delegate) public { require(<FILL_ME>) aToken = _aToken; aaveAddressProvider = _aaveAddressProvider; IERC20(underlying).approve(address(ILendingPool(aaveAddressProvider.getLendingPool())), type(uint256).max); } /** * @notice Annual Percentage Reward for the specific reward token. In Reward Token per Locked underlying per year. (eg AAVE/ (USDC locked per year)) * @param token Reward token address * @dev When reward Token = underlying (eg AAVE mining on aAAVE), rate is the addition of deposit rate and reward rate. * @return times 10^18. E.g. 150000000000000000 => 0.15 RewardToken per Locked underlying per year. */ function _rate(address token) override internal view returns (uint256) { } /** * @notice get the addresses of an underlying incentivized campaign. The incentives contract and the rewarded token. * @return address of the IncentivesController and address of the token given as reward. */ function getIncentivesAddresses() public view returns (address, address) { } /** * @notice Get the interest rate per year (ie 0.10 USDC per USDC locked for 1 year) * @return the deposit rate */ function getDepositRate() public view returns (uint256) { } /** * @notice Get the incentives rate per year (ie 0.0010 AAVE rewarder per USDC locked for 1 year) * @return the reward rate */ function getRewardRate() external view returns (uint256) { } function _getRewardRate(address rewardContract, address rewardToken) internal view returns (uint256) { } function _getDepositRate() internal view returns (uint256) { } function _supply(uint256 amount) override internal { } function _redeem(uint256 amount) override internal { } function _claim(address claimToken, uint256 amount) override internal { } function _balanceOfReward(address token) override internal view returns (uint256) { } function _rewardTokens() override internal view returns (address[] memory) { } }
address(_aaveAddressProvider)!=address(0),"AaveRewardToken: aave address provider cannot be zero address"
12,675
address(_aaveAddressProvider)!=address(0)
"Token is already staked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "./EggToken.sol"; import "./DenOfDragons.sol"; contract StakingOfDragons is ERC721Holder { address public developer; address public stakingContract = address(this); mapping(address => bool) internal contractManager; mapping(address => bool) internal burnerAddress; mapping(uint256 => address) public originalOwner; //remebers who's nft this is mapping(address => uint256) public stakedNFTCount; //stake counter mapping(address => uint256[]) internal stakedNFTs; string public _name = "StakingOfDragons"; //beautiful branding built right in string public _symbol = "SOD"; DenOfDragons public denOfDragons; EggToken public eggToken; //events event Stake(address indexed from, uint256 amount); event Unstake(address indexed from, uint256 amount); constructor(DenOfDragons _denOfDragons, EggToken _eggToken) { } //function burnTokenAfterNftTransfer(uint256 _nftId) public { // require(burnerAddress[msg.sender] == true); // uint256 token = eggToken.linkedNft(_nftId); // eggToken.burn(token); //} //function setAutoBurnerAddress(address _address) public { // require(contractManager[msg.sender] == true || msg.sender == developer); // burnerAddress[_address] = true; //} /// Core functions function stake(uint256 _nftId) public { require(<FILL_ME>) //cant double stake silly ;) address nftOwner = denOfDragons.ownerOf(_nftId); //calls the club for owner require(nftOwner == msg.sender); denOfDragons.safeTransferFrom(msg.sender, address(this), _nftId); //transfers token from user to stake contract originalOwner[_nftId] = msg.sender; //makes sure it knows who to give back to stakedNFTCount[msg.sender] ++; //adds 1 to the tally emit Stake(msg.sender, _nftId); //WOOO you did it! stakedNFTs[msg.sender].push(_nftId); startTimer(_nftId); } function unstake(uint256 _nftId) public { } function mintTokenInternal(uint256 _reward) internal { } function getStakedNFTs(address _address) public view returns(uint256[] memory) { } function viewTrueTokenBalance(address _address) public view returns (uint256) { } //Timer mapping(address => bool) internal timerManager; mapping(uint256 => uint) public startTime; //for calculating rewards mapping(uint256 => uint) public endTime; mapping(uint256 => uint) internal stakedTime; mapping(uint256 => bool) public isStaked; mapping(uint256 => bool) public hasBeenStaked; function startTimer (uint256 _tokenId) internal { } function endTimer (uint256 _tokenId) internal { } function math (uint256 _tokenId) internal { } function viewStakedTime (uint256 _tokenId) public view returns (uint) { } //End of timer function supplyOfReward () public view returns (uint256) { } function rewardOwned(address _address) public view returns (uint256) { } function resetTokenStats (uint256 _tokenId) public { } function addContractManager (address _address) public { } function removeContractManager (address _address) public { } function transferControl (address _newDeveloper) public { } }
!isStaked[_nftId],"Token is already staked"
12,788
!isStaked[_nftId]
"Token is not staked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "./EggToken.sol"; import "./DenOfDragons.sol"; contract StakingOfDragons is ERC721Holder { address public developer; address public stakingContract = address(this); mapping(address => bool) internal contractManager; mapping(address => bool) internal burnerAddress; mapping(uint256 => address) public originalOwner; //remebers who's nft this is mapping(address => uint256) public stakedNFTCount; //stake counter mapping(address => uint256[]) internal stakedNFTs; string public _name = "StakingOfDragons"; //beautiful branding built right in string public _symbol = "SOD"; DenOfDragons public denOfDragons; EggToken public eggToken; //events event Stake(address indexed from, uint256 amount); event Unstake(address indexed from, uint256 amount); constructor(DenOfDragons _denOfDragons, EggToken _eggToken) { } //function burnTokenAfterNftTransfer(uint256 _nftId) public { // require(burnerAddress[msg.sender] == true); // uint256 token = eggToken.linkedNft(_nftId); // eggToken.burn(token); //} //function setAutoBurnerAddress(address _address) public { // require(contractManager[msg.sender] == true || msg.sender == developer); // burnerAddress[_address] = true; //} /// Core functions function stake(uint256 _nftId) public { } function unstake(uint256 _nftId) public { require(<FILL_ME>) //uh oh, you forgot to stake :O require(originalOwner[_nftId] == msg.sender, "You dont own this NFT"); //...nice try endTimer(_nftId); denOfDragons.safeTransferFrom(address(this), msg.sender, _nftId); //heres your NFT back homie! stakedNFTCount[msg.sender] --; mintTokenInternal((stakedTime[_nftId] * (10 ** 18)) / 86400); for (uint256 i = 0; i < stakedNFTs[msg.sender].length; i++) { uint256 id = stakedNFTs[msg.sender][i]; if (id == _nftId) { stakedNFTs[msg.sender][i] = stakedNFTs[msg.sender][stakedNFTs[msg.sender].length - 1]; stakedNFTs[msg.sender].pop(); break; } } emit Unstake(msg.sender, _nftId); } function mintTokenInternal(uint256 _reward) internal { } function getStakedNFTs(address _address) public view returns(uint256[] memory) { } function viewTrueTokenBalance(address _address) public view returns (uint256) { } //Timer mapping(address => bool) internal timerManager; mapping(uint256 => uint) public startTime; //for calculating rewards mapping(uint256 => uint) public endTime; mapping(uint256 => uint) internal stakedTime; mapping(uint256 => bool) public isStaked; mapping(uint256 => bool) public hasBeenStaked; function startTimer (uint256 _tokenId) internal { } function endTimer (uint256 _tokenId) internal { } function math (uint256 _tokenId) internal { } function viewStakedTime (uint256 _tokenId) public view returns (uint) { } //End of timer function supplyOfReward () public view returns (uint256) { } function rewardOwned(address _address) public view returns (uint256) { } function resetTokenStats (uint256 _tokenId) public { } function addContractManager (address _address) public { } function removeContractManager (address _address) public { } function transferControl (address _newDeveloper) public { } }
isStaked[_nftId],"Token is not staked"
12,788
isStaked[_nftId]
"You dont own this NFT"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "./EggToken.sol"; import "./DenOfDragons.sol"; contract StakingOfDragons is ERC721Holder { address public developer; address public stakingContract = address(this); mapping(address => bool) internal contractManager; mapping(address => bool) internal burnerAddress; mapping(uint256 => address) public originalOwner; //remebers who's nft this is mapping(address => uint256) public stakedNFTCount; //stake counter mapping(address => uint256[]) internal stakedNFTs; string public _name = "StakingOfDragons"; //beautiful branding built right in string public _symbol = "SOD"; DenOfDragons public denOfDragons; EggToken public eggToken; //events event Stake(address indexed from, uint256 amount); event Unstake(address indexed from, uint256 amount); constructor(DenOfDragons _denOfDragons, EggToken _eggToken) { } //function burnTokenAfterNftTransfer(uint256 _nftId) public { // require(burnerAddress[msg.sender] == true); // uint256 token = eggToken.linkedNft(_nftId); // eggToken.burn(token); //} //function setAutoBurnerAddress(address _address) public { // require(contractManager[msg.sender] == true || msg.sender == developer); // burnerAddress[_address] = true; //} /// Core functions function stake(uint256 _nftId) public { } function unstake(uint256 _nftId) public { require(isStaked[_nftId], "Token is not staked"); //uh oh, you forgot to stake :O require(<FILL_ME>) //...nice try endTimer(_nftId); denOfDragons.safeTransferFrom(address(this), msg.sender, _nftId); //heres your NFT back homie! stakedNFTCount[msg.sender] --; mintTokenInternal((stakedTime[_nftId] * (10 ** 18)) / 86400); for (uint256 i = 0; i < stakedNFTs[msg.sender].length; i++) { uint256 id = stakedNFTs[msg.sender][i]; if (id == _nftId) { stakedNFTs[msg.sender][i] = stakedNFTs[msg.sender][stakedNFTs[msg.sender].length - 1]; stakedNFTs[msg.sender].pop(); break; } } emit Unstake(msg.sender, _nftId); } function mintTokenInternal(uint256 _reward) internal { } function getStakedNFTs(address _address) public view returns(uint256[] memory) { } function viewTrueTokenBalance(address _address) public view returns (uint256) { } //Timer mapping(address => bool) internal timerManager; mapping(uint256 => uint) public startTime; //for calculating rewards mapping(uint256 => uint) public endTime; mapping(uint256 => uint) internal stakedTime; mapping(uint256 => bool) public isStaked; mapping(uint256 => bool) public hasBeenStaked; function startTimer (uint256 _tokenId) internal { } function endTimer (uint256 _tokenId) internal { } function math (uint256 _tokenId) internal { } function viewStakedTime (uint256 _tokenId) public view returns (uint) { } //End of timer function supplyOfReward () public view returns (uint256) { } function rewardOwned(address _address) public view returns (uint256) { } function resetTokenStats (uint256 _tokenId) public { } function addContractManager (address _address) public { } function removeContractManager (address _address) public { } function transferControl (address _newDeveloper) public { } }
originalOwner[_nftId]==msg.sender,"You dont own this NFT"
12,788
originalOwner[_nftId]==msg.sender
"Token is already staked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "./EggToken.sol"; import "./DenOfDragons.sol"; contract StakingOfDragons is ERC721Holder { address public developer; address public stakingContract = address(this); mapping(address => bool) internal contractManager; mapping(address => bool) internal burnerAddress; mapping(uint256 => address) public originalOwner; //remebers who's nft this is mapping(address => uint256) public stakedNFTCount; //stake counter mapping(address => uint256[]) internal stakedNFTs; string public _name = "StakingOfDragons"; //beautiful branding built right in string public _symbol = "SOD"; DenOfDragons public denOfDragons; EggToken public eggToken; //events event Stake(address indexed from, uint256 amount); event Unstake(address indexed from, uint256 amount); constructor(DenOfDragons _denOfDragons, EggToken _eggToken) { } //function burnTokenAfterNftTransfer(uint256 _nftId) public { // require(burnerAddress[msg.sender] == true); // uint256 token = eggToken.linkedNft(_nftId); // eggToken.burn(token); //} //function setAutoBurnerAddress(address _address) public { // require(contractManager[msg.sender] == true || msg.sender == developer); // burnerAddress[_address] = true; //} /// Core functions function stake(uint256 _nftId) public { } function unstake(uint256 _nftId) public { } function mintTokenInternal(uint256 _reward) internal { } function getStakedNFTs(address _address) public view returns(uint256[] memory) { } function viewTrueTokenBalance(address _address) public view returns (uint256) { } //Timer mapping(address => bool) internal timerManager; mapping(uint256 => uint) public startTime; //for calculating rewards mapping(uint256 => uint) public endTime; mapping(uint256 => uint) internal stakedTime; mapping(uint256 => bool) public isStaked; mapping(uint256 => bool) public hasBeenStaked; function startTimer (uint256 _tokenId) internal { require(<FILL_ME>) startTime[_tokenId] = block.timestamp; isStaked[_tokenId] = true; hasBeenStaked[_tokenId] = true; } function endTimer (uint256 _tokenId) internal { } function math (uint256 _tokenId) internal { } function viewStakedTime (uint256 _tokenId) public view returns (uint) { } //End of timer function supplyOfReward () public view returns (uint256) { } function rewardOwned(address _address) public view returns (uint256) { } function resetTokenStats (uint256 _tokenId) public { } function addContractManager (address _address) public { } function removeContractManager (address _address) public { } function transferControl (address _newDeveloper) public { } }
isStaked[_tokenId]==false,"Token is already staked"
12,788
isStaked[_tokenId]==false
"Token is not staked"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.sol"; import "./EggToken.sol"; import "./DenOfDragons.sol"; contract StakingOfDragons is ERC721Holder { address public developer; address public stakingContract = address(this); mapping(address => bool) internal contractManager; mapping(address => bool) internal burnerAddress; mapping(uint256 => address) public originalOwner; //remebers who's nft this is mapping(address => uint256) public stakedNFTCount; //stake counter mapping(address => uint256[]) internal stakedNFTs; string public _name = "StakingOfDragons"; //beautiful branding built right in string public _symbol = "SOD"; DenOfDragons public denOfDragons; EggToken public eggToken; //events event Stake(address indexed from, uint256 amount); event Unstake(address indexed from, uint256 amount); constructor(DenOfDragons _denOfDragons, EggToken _eggToken) { } //function burnTokenAfterNftTransfer(uint256 _nftId) public { // require(burnerAddress[msg.sender] == true); // uint256 token = eggToken.linkedNft(_nftId); // eggToken.burn(token); //} //function setAutoBurnerAddress(address _address) public { // require(contractManager[msg.sender] == true || msg.sender == developer); // burnerAddress[_address] = true; //} /// Core functions function stake(uint256 _nftId) public { } function unstake(uint256 _nftId) public { } function mintTokenInternal(uint256 _reward) internal { } function getStakedNFTs(address _address) public view returns(uint256[] memory) { } function viewTrueTokenBalance(address _address) public view returns (uint256) { } //Timer mapping(address => bool) internal timerManager; mapping(uint256 => uint) public startTime; //for calculating rewards mapping(uint256 => uint) public endTime; mapping(uint256 => uint) internal stakedTime; mapping(uint256 => bool) public isStaked; mapping(uint256 => bool) public hasBeenStaked; function startTimer (uint256 _tokenId) internal { } function endTimer (uint256 _tokenId) internal { require(<FILL_ME>) endTime[_tokenId] = block.timestamp; isStaked[_tokenId] = false; math(_tokenId); } function math (uint256 _tokenId) internal { } function viewStakedTime (uint256 _tokenId) public view returns (uint) { } //End of timer function supplyOfReward () public view returns (uint256) { } function rewardOwned(address _address) public view returns (uint256) { } function resetTokenStats (uint256 _tokenId) public { } function addContractManager (address _address) public { } function removeContractManager (address _address) public { } function transferControl (address _newDeveloper) public { } }
isStaked[_tokenId]==true,"Token is not staked"
12,788
isStaked[_tokenId]==true
"Token locked"
pragma solidity 0.5.5; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC20 { function totalSupply()public view returns (uint256 total_Supply); function balanceOf(address who)public view returns (uint256); function allowance(address owner, address spender)public view returns (uint256); function transferFrom(address from, address to, uint256 value)public returns (bool ok); function approve(address spender, uint256 value)public returns (bool ok); function transfer(address to, uint256 value)public returns (bool ok); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ITCO is ERC20 { using SafeMath for uint256; //--- Token configurations ----// string private constant _name = "IT Coin"; string private constant _symbol = "ITCO"; uint8 private constant _decimals = 18; uint256 private constant _maxCap = 10000000000 ether; //--- Token allocations -------// uint256 private _totalsupply; //--- Address -----------------// address private _owner; address payable private _ethFundMain; //--- Variables ---------------// bool private _lockToken = false; mapping(address => uint256) private balances; mapping(address => mapping(address => uint256)) private allowed; mapping(address => bool) private locked; event Mint(address indexed from, address indexed to, uint256 amount); event Burn(address indexed from, uint256 amount); event ChangeReceiveWallet(address indexed newAddress); event ChangeOwnerShip(address indexed newOwner); event ChangeLockStatusFrom(address indexed investor, bool locked); event ChangeTokenLockStatus(bool locked); event ChangeAllowICOStatus(bool allow); modifier onlyOwner() { } modifier onlyUnlockToken() { require(<FILL_ME>) _; } constructor() public { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function maxCap() public pure returns (uint256) { } function owner() public view returns (address) { } function ethFundMain() public view returns (address) { } function lockToken() public view returns (bool) { } function lockStatusOf(address investor) public view returns (bool) { } function totalSupply() public view returns (uint256) { } function balanceOf(address investor) public view returns (uint256) { } function approve(address _spender, uint256 _amount) public onlyUnlockToken returns (bool) { } function allowance(address _from, address _spender) public view returns (uint256) { } function transfer(address _to, uint256 _amount) public onlyUnlockToken returns (bool) { } function transferFrom( address _from, address _to, uint256 _amount ) public onlyUnlockToken returns (bool) { } function burn(uint256 _value) public onlyOwner returns (bool) { } function stopTransferToken() external onlyOwner { } function startTransferToken() external onlyOwner { } function () external payable { } function manualMint(address receiver, uint256 _value) public onlyOwner{ } function mint(address from, address receiver, uint256 value) internal { } function assignOwnership(address newOwner) external onlyOwner { } function changeReceiveWallet(address payable newAddress) external onlyOwner { } function forwardFunds() external onlyOwner { } function haltTokenTransferFromAddress(address investor) external onlyOwner { } function resumeTokenTransferFromAddress(address investor) external onlyOwner { } }
!_lockToken,"Token locked"
12,954
!_lockToken
"Sender address is locked"
pragma solidity 0.5.5; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC20 { function totalSupply()public view returns (uint256 total_Supply); function balanceOf(address who)public view returns (uint256); function allowance(address owner, address spender)public view returns (uint256); function transferFrom(address from, address to, uint256 value)public returns (bool ok); function approve(address spender, uint256 value)public returns (bool ok); function transfer(address to, uint256 value)public returns (bool ok); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ITCO is ERC20 { using SafeMath for uint256; //--- Token configurations ----// string private constant _name = "IT Coin"; string private constant _symbol = "ITCO"; uint8 private constant _decimals = 18; uint256 private constant _maxCap = 10000000000 ether; //--- Token allocations -------// uint256 private _totalsupply; //--- Address -----------------// address private _owner; address payable private _ethFundMain; //--- Variables ---------------// bool private _lockToken = false; mapping(address => uint256) private balances; mapping(address => mapping(address => uint256)) private allowed; mapping(address => bool) private locked; event Mint(address indexed from, address indexed to, uint256 amount); event Burn(address indexed from, uint256 amount); event ChangeReceiveWallet(address indexed newAddress); event ChangeOwnerShip(address indexed newOwner); event ChangeLockStatusFrom(address indexed investor, bool locked); event ChangeTokenLockStatus(bool locked); event ChangeAllowICOStatus(bool allow); modifier onlyOwner() { } modifier onlyUnlockToken() { } constructor() public { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function maxCap() public pure returns (uint256) { } function owner() public view returns (address) { } function ethFundMain() public view returns (address) { } function lockToken() public view returns (bool) { } function lockStatusOf(address investor) public view returns (bool) { } function totalSupply() public view returns (uint256) { } function balanceOf(address investor) public view returns (uint256) { } function approve(address _spender, uint256 _amount) public onlyUnlockToken returns (bool) { require( _spender != address(0), "Address can not be 0x0"); require(balances[msg.sender] >= _amount, "Balance does not have enough tokens"); require(<FILL_ME>) allowed[msg.sender][_spender] = _amount; emit Approval(msg.sender, _spender, _amount); return true; } function allowance(address _from, address _spender) public view returns (uint256) { } function transfer(address _to, uint256 _amount) public onlyUnlockToken returns (bool) { } function transferFrom( address _from, address _to, uint256 _amount ) public onlyUnlockToken returns (bool) { } function burn(uint256 _value) public onlyOwner returns (bool) { } function stopTransferToken() external onlyOwner { } function startTransferToken() external onlyOwner { } function () external payable { } function manualMint(address receiver, uint256 _value) public onlyOwner{ } function mint(address from, address receiver, uint256 value) internal { } function assignOwnership(address newOwner) external onlyOwner { } function changeReceiveWallet(address payable newAddress) external onlyOwner { } function forwardFunds() external onlyOwner { } function haltTokenTransferFromAddress(address investor) external onlyOwner { } function resumeTokenTransferFromAddress(address investor) external onlyOwner { } }
!locked[msg.sender],"Sender address is locked"
12,954
!locked[msg.sender]
"From address is locked"
pragma solidity 0.5.5; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC20 { function totalSupply()public view returns (uint256 total_Supply); function balanceOf(address who)public view returns (uint256); function allowance(address owner, address spender)public view returns (uint256); function transferFrom(address from, address to, uint256 value)public returns (bool ok); function approve(address spender, uint256 value)public returns (bool ok); function transfer(address to, uint256 value)public returns (bool ok); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ITCO is ERC20 { using SafeMath for uint256; //--- Token configurations ----// string private constant _name = "IT Coin"; string private constant _symbol = "ITCO"; uint8 private constant _decimals = 18; uint256 private constant _maxCap = 10000000000 ether; //--- Token allocations -------// uint256 private _totalsupply; //--- Address -----------------// address private _owner; address payable private _ethFundMain; //--- Variables ---------------// bool private _lockToken = false; mapping(address => uint256) private balances; mapping(address => mapping(address => uint256)) private allowed; mapping(address => bool) private locked; event Mint(address indexed from, address indexed to, uint256 amount); event Burn(address indexed from, uint256 amount); event ChangeReceiveWallet(address indexed newAddress); event ChangeOwnerShip(address indexed newOwner); event ChangeLockStatusFrom(address indexed investor, bool locked); event ChangeTokenLockStatus(bool locked); event ChangeAllowICOStatus(bool allow); modifier onlyOwner() { } modifier onlyUnlockToken() { } constructor() public { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function maxCap() public pure returns (uint256) { } function owner() public view returns (address) { } function ethFundMain() public view returns (address) { } function lockToken() public view returns (bool) { } function lockStatusOf(address investor) public view returns (bool) { } function totalSupply() public view returns (uint256) { } function balanceOf(address investor) public view returns (uint256) { } function approve(address _spender, uint256 _amount) public onlyUnlockToken returns (bool) { } function allowance(address _from, address _spender) public view returns (uint256) { } function transfer(address _to, uint256 _amount) public onlyUnlockToken returns (bool) { } function transferFrom( address _from, address _to, uint256 _amount ) public onlyUnlockToken returns (bool) { require( _to != address(0), "Receiver can not be 0x0"); require(balances[_from] >= _amount, "Source's balance is not enough"); require(allowed[_from][msg.sender] >= _amount, "Allowance is not enough"); require(<FILL_ME>) balances[_from] = (balances[_from]).sub(_amount); allowed[_from][msg.sender] = (allowed[_from][msg.sender]).sub(_amount); balances[_to] = (balances[_to]).add(_amount); emit Transfer(_from, _to, _amount); return true; } function burn(uint256 _value) public onlyOwner returns (bool) { } function stopTransferToken() external onlyOwner { } function startTransferToken() external onlyOwner { } function () external payable { } function manualMint(address receiver, uint256 _value) public onlyOwner{ } function mint(address from, address receiver, uint256 value) internal { } function assignOwnership(address newOwner) external onlyOwner { } function changeReceiveWallet(address payable newAddress) external onlyOwner { } function forwardFunds() external onlyOwner { } function haltTokenTransferFromAddress(address investor) external onlyOwner { } function resumeTokenTransferFromAddress(address investor) external onlyOwner { } }
!locked[_from],"From address is locked"
12,954
!locked[_from]
"ERC20Pausable: token transfer while paused"
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./ERC20.sol"; import "../utils/Pausable.sol"; import "hardhat/console.sol"; /** * @dev ERC20 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC20Pausable is ERC20, Pausable { mapping(address => bool) public whitelist; /** * @dev See {ERC20-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused or sender is whitelisted. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { super._beforeTokenTransfer(from, to, amount); require(<FILL_ME>) } function _changeWhitelistStatus( address whitelisteAddress, bool isWhitelisted ) internal virtual { } }
!paused()||whitelist[from]==true,"ERC20Pausable: token transfer while paused"
13,005
!paused()||whitelist[from]==true
null
pragma solidity 0.5.4; import 'SafeMath.sol'; import 'Ownable.sol'; import 'IERC20.sol'; contract ZildFinanceCoin is Ownable, IERC20 { using SafeMath for uint256; string public constant name = 'Zild Finance Coin'; string public constant symbol = 'Zild'; uint8 public constant decimals = 18; uint256 public totalSupply = 9980 * 10000 * 10 ** uint256(decimals); uint256 public allowBurn = 2100 * 10000 * 10 ** uint256(decimals); uint256 public tokenDestroyed; uint256 public constant FounderAllocation = 1497 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupAmount = 998 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupCliff = 365 days; uint256 public constant FounderReleaseInterval = 30 days; uint256 public constant FounderReleaseAmount = 20.7916 * 10000 * 10 ** uint256(decimals); uint256 public constant MarketingAllocation = 349 * 10000 * 10 ** uint256(decimals); uint256 public constant FurnaceAllocation = 150 * 10000 * 10 ** uint256(decimals); address public founder = address(0); uint256 public founderLockupStartTime = 0; uint256 public founderReleasedAmount = 0; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public frozenAccount; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed from, address indexed to, uint256 value); event ChangeFounder(address indexed previousFounder, address indexed newFounder); event SetMinter(address indexed minter); event SetMarketing(address indexed marketing); event SetFurnace(address indexed furnace); event Burn(address indexed _from, uint256 _tokenDestroyed, uint256 _timestamp); event FrozenFunds(address target, bool frozen); constructor(address _founder, address _marketing) public { } function release() public { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 amount) public returns (bool) { require(to != address(0), "ERC20: tranfer to the zero address"); require(!frozenAccount[msg.sender]); require(<FILL_ME>) _transfer(msg.sender, to, amount); return true; } function burn(uint256 _value) public returns (bool){ } function _burn(address _who, uint256 _burntAmount) internal { } function allowance(address from, address to) public view returns (uint256) { } function approve(address to, uint256 amount) public returns (bool) { } function transferFrom(address from, address to, uint256 amount) public returns (bool) { } function _transfer(address from, address to, uint256 amount) private { } function _approve(address from, address to, uint256 amount) private { } function changeFounder(address _founder) public onlyOwner { } function setMinter(address minter) public onlyOwner { } function setFurnace(address furnace) public onlyOwner { } function freezeAccount(address _target, bool _bool) public onlyOwner { } }
!frozenAccount[to]
13,039
!frozenAccount[to]
"ZildFinanceCoin: exceeded the maximum allowable burning amount"
pragma solidity 0.5.4; import 'SafeMath.sol'; import 'Ownable.sol'; import 'IERC20.sol'; contract ZildFinanceCoin is Ownable, IERC20 { using SafeMath for uint256; string public constant name = 'Zild Finance Coin'; string public constant symbol = 'Zild'; uint8 public constant decimals = 18; uint256 public totalSupply = 9980 * 10000 * 10 ** uint256(decimals); uint256 public allowBurn = 2100 * 10000 * 10 ** uint256(decimals); uint256 public tokenDestroyed; uint256 public constant FounderAllocation = 1497 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupAmount = 998 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupCliff = 365 days; uint256 public constant FounderReleaseInterval = 30 days; uint256 public constant FounderReleaseAmount = 20.7916 * 10000 * 10 ** uint256(decimals); uint256 public constant MarketingAllocation = 349 * 10000 * 10 ** uint256(decimals); uint256 public constant FurnaceAllocation = 150 * 10000 * 10 ** uint256(decimals); address public founder = address(0); uint256 public founderLockupStartTime = 0; uint256 public founderReleasedAmount = 0; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public frozenAccount; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed from, address indexed to, uint256 value); event ChangeFounder(address indexed previousFounder, address indexed newFounder); event SetMinter(address indexed minter); event SetMarketing(address indexed marketing); event SetFurnace(address indexed furnace); event Burn(address indexed _from, uint256 _tokenDestroyed, uint256 _timestamp); event FrozenFunds(address target, bool frozen); constructor(address _founder, address _marketing) public { } function release() public { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 amount) public returns (bool) { } function burn(uint256 _value) public returns (bool){ } function _burn(address _who, uint256 _burntAmount) internal { require(<FILL_ME>) require(_balances[msg.sender] >= _burntAmount && _burntAmount > 0); _transfer(address(_who), address(0), _burntAmount); totalSupply = totalSupply.sub(_burntAmount); tokenDestroyed = tokenDestroyed.add(_burntAmount); emit Burn(_who, _burntAmount, block.timestamp); } function allowance(address from, address to) public view returns (uint256) { } function approve(address to, uint256 amount) public returns (bool) { } function transferFrom(address from, address to, uint256 amount) public returns (bool) { } function _transfer(address from, address to, uint256 amount) private { } function _approve(address from, address to, uint256 amount) private { } function changeFounder(address _founder) public onlyOwner { } function setMinter(address minter) public onlyOwner { } function setFurnace(address furnace) public onlyOwner { } function freezeAccount(address _target, bool _bool) public onlyOwner { } }
tokenDestroyed.add(_burntAmount)<=allowBurn,"ZildFinanceCoin: exceeded the maximum allowable burning amount"
13,039
tokenDestroyed.add(_burntAmount)<=allowBurn
null
pragma solidity 0.5.4; import 'SafeMath.sol'; import 'Ownable.sol'; import 'IERC20.sol'; contract ZildFinanceCoin is Ownable, IERC20 { using SafeMath for uint256; string public constant name = 'Zild Finance Coin'; string public constant symbol = 'Zild'; uint8 public constant decimals = 18; uint256 public totalSupply = 9980 * 10000 * 10 ** uint256(decimals); uint256 public allowBurn = 2100 * 10000 * 10 ** uint256(decimals); uint256 public tokenDestroyed; uint256 public constant FounderAllocation = 1497 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupAmount = 998 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupCliff = 365 days; uint256 public constant FounderReleaseInterval = 30 days; uint256 public constant FounderReleaseAmount = 20.7916 * 10000 * 10 ** uint256(decimals); uint256 public constant MarketingAllocation = 349 * 10000 * 10 ** uint256(decimals); uint256 public constant FurnaceAllocation = 150 * 10000 * 10 ** uint256(decimals); address public founder = address(0); uint256 public founderLockupStartTime = 0; uint256 public founderReleasedAmount = 0; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public frozenAccount; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed from, address indexed to, uint256 value); event ChangeFounder(address indexed previousFounder, address indexed newFounder); event SetMinter(address indexed minter); event SetMarketing(address indexed marketing); event SetFurnace(address indexed furnace); event Burn(address indexed _from, uint256 _tokenDestroyed, uint256 _timestamp); event FrozenFunds(address target, bool frozen); constructor(address _founder, address _marketing) public { } function release() public { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 amount) public returns (bool) { } function burn(uint256 _value) public returns (bool){ } function _burn(address _who, uint256 _burntAmount) internal { require (tokenDestroyed.add(_burntAmount) <= allowBurn, "ZildFinanceCoin: exceeded the maximum allowable burning amount" ); require(<FILL_ME>) _transfer(address(_who), address(0), _burntAmount); totalSupply = totalSupply.sub(_burntAmount); tokenDestroyed = tokenDestroyed.add(_burntAmount); emit Burn(_who, _burntAmount, block.timestamp); } function allowance(address from, address to) public view returns (uint256) { } function approve(address to, uint256 amount) public returns (bool) { } function transferFrom(address from, address to, uint256 amount) public returns (bool) { } function _transfer(address from, address to, uint256 amount) private { } function _approve(address from, address to, uint256 amount) private { } function changeFounder(address _founder) public onlyOwner { } function setMinter(address minter) public onlyOwner { } function setFurnace(address furnace) public onlyOwner { } function freezeAccount(address _target, bool _bool) public onlyOwner { } }
_balances[msg.sender]>=_burntAmount&&_burntAmount>0
13,039
_balances[msg.sender]>=_burntAmount&&_burntAmount>0
null
pragma solidity 0.5.4; import 'SafeMath.sol'; import 'Ownable.sol'; import 'IERC20.sol'; contract ZildFinanceCoin is Ownable, IERC20 { using SafeMath for uint256; string public constant name = 'Zild Finance Coin'; string public constant symbol = 'Zild'; uint8 public constant decimals = 18; uint256 public totalSupply = 9980 * 10000 * 10 ** uint256(decimals); uint256 public allowBurn = 2100 * 10000 * 10 ** uint256(decimals); uint256 public tokenDestroyed; uint256 public constant FounderAllocation = 1497 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupAmount = 998 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupCliff = 365 days; uint256 public constant FounderReleaseInterval = 30 days; uint256 public constant FounderReleaseAmount = 20.7916 * 10000 * 10 ** uint256(decimals); uint256 public constant MarketingAllocation = 349 * 10000 * 10 ** uint256(decimals); uint256 public constant FurnaceAllocation = 150 * 10000 * 10 ** uint256(decimals); address public founder = address(0); uint256 public founderLockupStartTime = 0; uint256 public founderReleasedAmount = 0; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public frozenAccount; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed from, address indexed to, uint256 value); event ChangeFounder(address indexed previousFounder, address indexed newFounder); event SetMinter(address indexed minter); event SetMarketing(address indexed marketing); event SetFurnace(address indexed furnace); event Burn(address indexed _from, uint256 _tokenDestroyed, uint256 _timestamp); event FrozenFunds(address target, bool frozen); constructor(address _founder, address _marketing) public { } function release() public { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 amount) public returns (bool) { } function burn(uint256 _value) public returns (bool){ } function _burn(address _who, uint256 _burntAmount) internal { } function allowance(address from, address to) public view returns (uint256) { } function approve(address to, uint256 amount) public returns (bool) { } function transferFrom(address from, address to, uint256 amount) public returns (bool) { uint256 remaining = _allowances[from][msg.sender].sub(amount, "ERC20: transfer amount exceeds allowance"); require(to != address(0), "ERC20: tranfer to the zero address"); require(<FILL_ME>) require(!frozenAccount[to]); require(!frozenAccount[msg.sender]); _transfer(from, to, amount); _approve(from, msg.sender, remaining); return true; } function _transfer(address from, address to, uint256 amount) private { } function _approve(address from, address to, uint256 amount) private { } function changeFounder(address _founder) public onlyOwner { } function setMinter(address minter) public onlyOwner { } function setFurnace(address furnace) public onlyOwner { } function freezeAccount(address _target, bool _bool) public onlyOwner { } }
!frozenAccount[from]
13,039
!frozenAccount[from]
"ZildFinanceCoin: minter has been initialized"
pragma solidity 0.5.4; import 'SafeMath.sol'; import 'Ownable.sol'; import 'IERC20.sol'; contract ZildFinanceCoin is Ownable, IERC20 { using SafeMath for uint256; string public constant name = 'Zild Finance Coin'; string public constant symbol = 'Zild'; uint8 public constant decimals = 18; uint256 public totalSupply = 9980 * 10000 * 10 ** uint256(decimals); uint256 public allowBurn = 2100 * 10000 * 10 ** uint256(decimals); uint256 public tokenDestroyed; uint256 public constant FounderAllocation = 1497 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupAmount = 998 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupCliff = 365 days; uint256 public constant FounderReleaseInterval = 30 days; uint256 public constant FounderReleaseAmount = 20.7916 * 10000 * 10 ** uint256(decimals); uint256 public constant MarketingAllocation = 349 * 10000 * 10 ** uint256(decimals); uint256 public constant FurnaceAllocation = 150 * 10000 * 10 ** uint256(decimals); address public founder = address(0); uint256 public founderLockupStartTime = 0; uint256 public founderReleasedAmount = 0; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public frozenAccount; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed from, address indexed to, uint256 value); event ChangeFounder(address indexed previousFounder, address indexed newFounder); event SetMinter(address indexed minter); event SetMarketing(address indexed marketing); event SetFurnace(address indexed furnace); event Burn(address indexed _from, uint256 _tokenDestroyed, uint256 _timestamp); event FrozenFunds(address target, bool frozen); constructor(address _founder, address _marketing) public { } function release() public { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 amount) public returns (bool) { } function burn(uint256 _value) public returns (bool){ } function _burn(address _who, uint256 _burntAmount) internal { } function allowance(address from, address to) public view returns (uint256) { } function approve(address to, uint256 amount) public returns (bool) { } function transferFrom(address from, address to, uint256 amount) public returns (bool) { } function _transfer(address from, address to, uint256 amount) private { } function _approve(address from, address to, uint256 amount) private { } function changeFounder(address _founder) public onlyOwner { } function setMinter(address minter) public onlyOwner { require(minter != address(0), "ZildFinanceCoin: minter is the zero address"); require(<FILL_ME>) _transfer(address(this), minter, totalSupply.sub(FounderAllocation)); emit SetMinter(minter); } function setFurnace(address furnace) public onlyOwner { } function freezeAccount(address _target, bool _bool) public onlyOwner { } }
_balances[minter]==0,"ZildFinanceCoin: minter has been initialized"
13,039
_balances[minter]==0
"ZildFinanceCoin: furnace has been initialized"
pragma solidity 0.5.4; import 'SafeMath.sol'; import 'Ownable.sol'; import 'IERC20.sol'; contract ZildFinanceCoin is Ownable, IERC20 { using SafeMath for uint256; string public constant name = 'Zild Finance Coin'; string public constant symbol = 'Zild'; uint8 public constant decimals = 18; uint256 public totalSupply = 9980 * 10000 * 10 ** uint256(decimals); uint256 public allowBurn = 2100 * 10000 * 10 ** uint256(decimals); uint256 public tokenDestroyed; uint256 public constant FounderAllocation = 1497 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupAmount = 998 * 10000 * 10 ** uint256(decimals); uint256 public constant FounderLockupCliff = 365 days; uint256 public constant FounderReleaseInterval = 30 days; uint256 public constant FounderReleaseAmount = 20.7916 * 10000 * 10 ** uint256(decimals); uint256 public constant MarketingAllocation = 349 * 10000 * 10 ** uint256(decimals); uint256 public constant FurnaceAllocation = 150 * 10000 * 10 ** uint256(decimals); address public founder = address(0); uint256 public founderLockupStartTime = 0; uint256 public founderReleasedAmount = 0; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public frozenAccount; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed from, address indexed to, uint256 value); event ChangeFounder(address indexed previousFounder, address indexed newFounder); event SetMinter(address indexed minter); event SetMarketing(address indexed marketing); event SetFurnace(address indexed furnace); event Burn(address indexed _from, uint256 _tokenDestroyed, uint256 _timestamp); event FrozenFunds(address target, bool frozen); constructor(address _founder, address _marketing) public { } function release() public { } function balanceOf(address account) public view returns (uint256) { } function transfer(address to, uint256 amount) public returns (bool) { } function burn(uint256 _value) public returns (bool){ } function _burn(address _who, uint256 _burntAmount) internal { } function allowance(address from, address to) public view returns (uint256) { } function approve(address to, uint256 amount) public returns (bool) { } function transferFrom(address from, address to, uint256 amount) public returns (bool) { } function _transfer(address from, address to, uint256 amount) private { } function _approve(address from, address to, uint256 amount) private { } function changeFounder(address _founder) public onlyOwner { } function setMinter(address minter) public onlyOwner { } function setFurnace(address furnace) public onlyOwner { require(furnace != address(0), "ZildFinanceCoin: furnace is the zero address"); require(<FILL_ME>) _transfer(address(this), furnace, FurnaceAllocation); emit SetFurnace(furnace); } function freezeAccount(address _target, bool _bool) public onlyOwner { } }
_balances[furnace]==0,"ZildFinanceCoin: furnace has been initialized"
13,039
_balances[furnace]==0
null
pragma solidity ^0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ 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 { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping (address => uint256) balances; uint256 totalSupply_; mapping (address => uint256) public threeMonVesting; mapping (address => uint256) public bonusVesting; uint256 public launchBlock = 999999999999999999999999999999; uint256 constant public monthSeconds = 2592000; uint256 constant public secsPerBlock = 15; // 1 block per 15 seconds bool public launch = false; function totalSupply() public view returns (uint256) { } modifier afterLaunch() { } function checkVesting(address sender) 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) afterLaunch 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) { } } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) afterLaunch public { } } contract StandardToken is ERC20, BurnableToken { mapping (address => mapping (address => uint256)) allowed; function transferFrom(address _from, address _to, uint256 _value) afterLaunch public returns (bool) { } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @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 specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } } contract InstaToken is StandardToken { string constant public name = "INSTA"; string constant public symbol = "INSTA"; uint256 constant public decimals = 18; address constant public partnersWallet = 0x4092678e4E78230F46A1534C0fbc8fA39780892B; // change uint256 public partnersPart = uint256(200000000).mul(10 ** decimals); // 20 address constant public foundersWallet = 0x6748F50f686bfbcA6Fe8ad62b22228b87F31ff2b; // change uint256 public foundersPart = uint256(200000000).mul(10 ** decimals); // 20 address constant public treasuryWallet = 0xEa11755Ae41D889CeEc39A63E6FF75a02Bc1C00d; // change uint256 public treasuryPart = uint256(150000000).mul(10 ** decimals); // 15 uint256 public salePart = uint256(400000000).mul(10 ** decimals); // 40 address constant public devWallet = 0x39Bb259F66E1C59d5ABEF88375979b4D20D98022; // change uint256 public devPart = uint256(50000000).mul(10 ** decimals); // 5 uint256 public INITIAL_SUPPLY = uint256(1000000000).mul(10 ** decimals); // 1 000 000 000 tokens uint256 public foundersWithdrawTokens = 0; uint256 public partnersWithdrawTokens = 0; bool public oneTry = true; function setup() external { require(<FILL_ME>) require(oneTry); totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = salePart; emit Transfer(this, msg.sender, salePart); balances[devWallet] = devPart; emit Transfer(this, devWallet, devPart); balances[treasuryWallet] = treasuryPart; emit Transfer(this, treasuryWallet, treasuryPart); balances[address(this)] = INITIAL_SUPPLY.sub(treasuryPart.add(devPart).add(salePart)); emit Transfer(this, treasuryWallet, treasuryPart); oneTry = false; } function setLaunchBlock() public onlyOwner { } modifier onlyFounders() { } modifier onlyPartners() { } function viewFoundersTokens() public view returns (uint256) { } function viewPartnersTokens() public view returns (uint256) { } function getFoundersTokens(uint256 _tokens) public onlyFounders { } function getPartnersTokens(uint256 _tokens) public onlyPartners { } function addBonusTokens(address sender, uint256 amount) external onlyOwner { } function freezeTokens(address sender, uint256 amount) external onlyOwner { } }
address(msg.sender)==owner
13,040
address(msg.sender)==owner
null
pragma solidity ^0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ 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 { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping (address => uint256) balances; uint256 totalSupply_; mapping (address => uint256) public threeMonVesting; mapping (address => uint256) public bonusVesting; uint256 public launchBlock = 999999999999999999999999999999; uint256 constant public monthSeconds = 2592000; uint256 constant public secsPerBlock = 15; // 1 block per 15 seconds bool public launch = false; function totalSupply() public view returns (uint256) { } modifier afterLaunch() { } function checkVesting(address sender) 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) afterLaunch 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) { } } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) afterLaunch public { } } contract StandardToken is ERC20, BurnableToken { mapping (address => mapping (address => uint256)) allowed; function transferFrom(address _from, address _to, uint256 _value) afterLaunch public returns (bool) { } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @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 specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } } contract InstaToken is StandardToken { string constant public name = "INSTA"; string constant public symbol = "INSTA"; uint256 constant public decimals = 18; address constant public partnersWallet = 0x4092678e4E78230F46A1534C0fbc8fA39780892B; // change uint256 public partnersPart = uint256(200000000).mul(10 ** decimals); // 20 address constant public foundersWallet = 0x6748F50f686bfbcA6Fe8ad62b22228b87F31ff2b; // change uint256 public foundersPart = uint256(200000000).mul(10 ** decimals); // 20 address constant public treasuryWallet = 0xEa11755Ae41D889CeEc39A63E6FF75a02Bc1C00d; // change uint256 public treasuryPart = uint256(150000000).mul(10 ** decimals); // 15 uint256 public salePart = uint256(400000000).mul(10 ** decimals); // 40 address constant public devWallet = 0x39Bb259F66E1C59d5ABEF88375979b4D20D98022; // change uint256 public devPart = uint256(50000000).mul(10 ** decimals); // 5 uint256 public INITIAL_SUPPLY = uint256(1000000000).mul(10 ** decimals); // 1 000 000 000 tokens uint256 public foundersWithdrawTokens = 0; uint256 public partnersWithdrawTokens = 0; bool public oneTry = true; function setup() external { } function setLaunchBlock() public onlyOwner { require(<FILL_ME>) launchBlock = block.number.add(monthSeconds.div(secsPerBlock).div(2)); launch = true; } modifier onlyFounders() { } modifier onlyPartners() { } function viewFoundersTokens() public view returns (uint256) { } function viewPartnersTokens() public view returns (uint256) { } function getFoundersTokens(uint256 _tokens) public onlyFounders { } function getPartnersTokens(uint256 _tokens) public onlyPartners { } function addBonusTokens(address sender, uint256 amount) external onlyOwner { } function freezeTokens(address sender, uint256 amount) external onlyOwner { } }
!launch
13,040
!launch
null
pragma solidity ^0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ 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 { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping (address => uint256) balances; uint256 totalSupply_; mapping (address => uint256) public threeMonVesting; mapping (address => uint256) public bonusVesting; uint256 public launchBlock = 999999999999999999999999999999; uint256 constant public monthSeconds = 2592000; uint256 constant public secsPerBlock = 15; // 1 block per 15 seconds bool public launch = false; function totalSupply() public view returns (uint256) { } modifier afterLaunch() { } function checkVesting(address sender) 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) afterLaunch 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) { } } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) afterLaunch public { } } contract StandardToken is ERC20, BurnableToken { mapping (address => mapping (address => uint256)) allowed; function transferFrom(address _from, address _to, uint256 _value) afterLaunch public returns (bool) { } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @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 specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } } contract InstaToken is StandardToken { string constant public name = "INSTA"; string constant public symbol = "INSTA"; uint256 constant public decimals = 18; address constant public partnersWallet = 0x4092678e4E78230F46A1534C0fbc8fA39780892B; // change uint256 public partnersPart = uint256(200000000).mul(10 ** decimals); // 20 address constant public foundersWallet = 0x6748F50f686bfbcA6Fe8ad62b22228b87F31ff2b; // change uint256 public foundersPart = uint256(200000000).mul(10 ** decimals); // 20 address constant public treasuryWallet = 0xEa11755Ae41D889CeEc39A63E6FF75a02Bc1C00d; // change uint256 public treasuryPart = uint256(150000000).mul(10 ** decimals); // 15 uint256 public salePart = uint256(400000000).mul(10 ** decimals); // 40 address constant public devWallet = 0x39Bb259F66E1C59d5ABEF88375979b4D20D98022; // change uint256 public devPart = uint256(50000000).mul(10 ** decimals); // 5 uint256 public INITIAL_SUPPLY = uint256(1000000000).mul(10 ** decimals); // 1 000 000 000 tokens uint256 public foundersWithdrawTokens = 0; uint256 public partnersWithdrawTokens = 0; bool public oneTry = true; function setup() external { } function setLaunchBlock() public onlyOwner { } modifier onlyFounders() { } modifier onlyPartners() { } function viewFoundersTokens() public view returns (uint256) { } function viewPartnersTokens() public view returns (uint256) { } function getFoundersTokens(uint256 _tokens) public onlyFounders { uint256 tokens = _tokens.mul(10 ** decimals); require(<FILL_ME>) transfer(foundersWallet, tokens); emit Transfer(this, foundersWallet, tokens); foundersWithdrawTokens = foundersWithdrawTokens.add(tokens); } function getPartnersTokens(uint256 _tokens) public onlyPartners { } function addBonusTokens(address sender, uint256 amount) external onlyOwner { } function freezeTokens(address sender, uint256 amount) external onlyOwner { } }
foundersWithdrawTokens.add(tokens)<=viewFoundersTokens().mul(10**decimals)
13,040
foundersWithdrawTokens.add(tokens)<=viewFoundersTokens().mul(10**decimals)
null
pragma solidity ^0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ 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 { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping (address => uint256) balances; uint256 totalSupply_; mapping (address => uint256) public threeMonVesting; mapping (address => uint256) public bonusVesting; uint256 public launchBlock = 999999999999999999999999999999; uint256 constant public monthSeconds = 2592000; uint256 constant public secsPerBlock = 15; // 1 block per 15 seconds bool public launch = false; function totalSupply() public view returns (uint256) { } modifier afterLaunch() { } function checkVesting(address sender) 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) afterLaunch 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) { } } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) afterLaunch public { } } contract StandardToken is ERC20, BurnableToken { mapping (address => mapping (address => uint256)) allowed; function transferFrom(address _from, address _to, uint256 _value) afterLaunch public returns (bool) { } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @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 specifing the amount of tokens still avaible for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } } contract InstaToken is StandardToken { string constant public name = "INSTA"; string constant public symbol = "INSTA"; uint256 constant public decimals = 18; address constant public partnersWallet = 0x4092678e4E78230F46A1534C0fbc8fA39780892B; // change uint256 public partnersPart = uint256(200000000).mul(10 ** decimals); // 20 address constant public foundersWallet = 0x6748F50f686bfbcA6Fe8ad62b22228b87F31ff2b; // change uint256 public foundersPart = uint256(200000000).mul(10 ** decimals); // 20 address constant public treasuryWallet = 0xEa11755Ae41D889CeEc39A63E6FF75a02Bc1C00d; // change uint256 public treasuryPart = uint256(150000000).mul(10 ** decimals); // 15 uint256 public salePart = uint256(400000000).mul(10 ** decimals); // 40 address constant public devWallet = 0x39Bb259F66E1C59d5ABEF88375979b4D20D98022; // change uint256 public devPart = uint256(50000000).mul(10 ** decimals); // 5 uint256 public INITIAL_SUPPLY = uint256(1000000000).mul(10 ** decimals); // 1 000 000 000 tokens uint256 public foundersWithdrawTokens = 0; uint256 public partnersWithdrawTokens = 0; bool public oneTry = true; function setup() external { } function setLaunchBlock() public onlyOwner { } modifier onlyFounders() { } modifier onlyPartners() { } function viewFoundersTokens() public view returns (uint256) { } function viewPartnersTokens() public view returns (uint256) { } function getFoundersTokens(uint256 _tokens) public onlyFounders { } function getPartnersTokens(uint256 _tokens) public onlyPartners { uint256 tokens = _tokens.mul(10 ** decimals); require(<FILL_ME>) transfer(partnersWallet, tokens); emit Transfer(this, partnersWallet, tokens); partnersWithdrawTokens = partnersWithdrawTokens.add(tokens); } function addBonusTokens(address sender, uint256 amount) external onlyOwner { } function freezeTokens(address sender, uint256 amount) external onlyOwner { } }
partnersWithdrawTokens.add(tokens)<=viewPartnersTokens().mul(10**decimals)
13,040
partnersWithdrawTokens.add(tokens)<=viewPartnersTokens().mul(10**decimals)
"ERR: Uniswap only"
//RRR (RRR) //2% Deflationary yes //Bot Protect yes // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract RRR is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "RRR"; string private constant _symbol = "RRR"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor(address payable addr1, address payable addr2) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function setCooldownEnabled(bool onoff) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require(<FILL_ME>) } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function manualswap() external { } function manualsend() external { } function setBots(address[] memory bots_) public onlyOwner { } function delBot(address notbot) public onlyOwner { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { } }
_msgSender()==address(uniswapV2Router)||_msgSender()==uniswapV2Pair,"ERR: Uniswap only"
13,043
_msgSender()==address(uniswapV2Router)||_msgSender()==uniswapV2Pair
null
//RRR (RRR) //2% Deflationary yes //Bot Protect yes // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract RRR is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "RRR"; string private constant _symbol = "RRR"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor(address payable addr1, address payable addr2) { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function setCooldownEnabled(bool onoff) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function openTrading() external onlyOwner() { } function manualswap() external { require(<FILL_ME>) uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { } function setBots(address[] memory bots_) public onlyOwner { } function delBot(address notbot) public onlyOwner { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { } }
_msgSender()==_teamAddress
13,043
_msgSender()==_teamAddress
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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 { uint256 public totalSupply; 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); } contract Drainable is Ownable { function withdrawToken(address tokenaddr) onlyOwner public { } function withdrawEther() onlyOwner public { require(<FILL_ME>) } } contract ADXExchangeInterface { // events event LogBidAccepted(bytes32 bidId, address advertiser, bytes32 adunit, address publisher, bytes32 adslot, uint acceptedTime); event LogBidCanceled(bytes32 bidId); event LogBidExpired(bytes32 bidId); event LogBidConfirmed(bytes32 bidId, address advertiserOrPublisher, bytes32 report); event LogBidCompleted(bytes32 bidId, bytes32 advReport, bytes32 pubReport); event LogDeposit(address _user, uint _amnt); event LogWithdrawal(address _user, uint _amnt); function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function giveupBid(bytes32 _bidId) public; function refundBid(bytes32 _bidId) public; function verifyBid(bytes32 _bidId, bytes32 _report) public; function deposit(uint _amount) public; function withdraw(uint _amount) public; // constants function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ); function getBalance(address _user) constant external returns (uint, uint); function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32); } contract ADXExchange is ADXExchangeInterface, Drainable { string public name = "AdEx Exchange"; ERC20 public token; uint public maxTimeout = 365 days; mapping (address => uint) balances; // escrowed on bids mapping (address => uint) onBids; // bid info mapping (bytes32 => Bid) bids; mapping (bytes32 => BidState) bidStates; enum BidState { DoesNotExist, // default state // There is no 'Open' state - the Open state is just a signed message that you're willing to place such a bid Accepted, // in progress // the following states MUST unlock the ADX amount (return to advertiser) // fail states Canceled, Expired, // success states Completed } struct Bid { // Links on advertiser side address advertiser; bytes32 adUnit; // Links on publisher side address publisher; bytes32 adSlot; // when was it accepted by a publisher uint acceptedTime; // Token reward amount uint amount; // Requirements uint target; // how many impressions/clicks/conversions have to be done uint timeout; // the time to execute // Confirmations from both sides; any value other than 0 is vconsidered as confirm, but this should usually be an IPFS hash to a final report bytes32 publisherConfirmation; bytes32 advertiserConfirmation; } // Schema hash // keccak256(_advertiser, _adunit, _opened, _target, _amount, _timeout, this) bytes32 constant public SCHEMA_HASH = keccak256( "address Advertiser", "bytes32 Ad Unit ID", "uint Opened", "uint Target", "uint Amount", "uint Timeout", "address Exchange" ); // // MODIFIERS // modifier onlyBidAdvertiser(bytes32 _bidId) { } modifier onlyBidPublisher(bytes32 _bidId) { } modifier onlyBidState(bytes32 _bidId, BidState _state) { } // Functions function ADXExchange(address _token) public { } // // Bid actions // // the bid is accepted by the publisher function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the advertiser function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the publisher function giveupBid(bytes32 _bidId) public onlyBidPublisher(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // This can be done if a bid is accepted, but expired // This is essentially the protection from never settling on verification, or from publisher not executing the bid within a reasonable time function refundBid(bytes32 _bidId) public onlyBidAdvertiser(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // both publisher and advertiser have to call this for a bid to be considered verified function verifyBid(bytes32 _bidId, bytes32 _report) public onlyBidState(_bidId, BidState.Accepted) { } // Deposit and withdraw function deposit(uint _amount) public { } function withdraw(uint _amount) public { } function didSign(address addr, bytes32 hash, uint8 v, bytes32 r, bytes32 s, uint8 mode) public pure returns (bool) { } // // Public constant functions // function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ) { } function getBalance(address _user) constant external returns (uint, uint) { } function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32) { } }
msg.sender.send(this.balance)
13,059
msg.sender.send(this.balance)
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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 { uint256 public totalSupply; 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); } contract Drainable is Ownable { function withdrawToken(address tokenaddr) onlyOwner public { } function withdrawEther() onlyOwner public { } } contract ADXExchangeInterface { // events event LogBidAccepted(bytes32 bidId, address advertiser, bytes32 adunit, address publisher, bytes32 adslot, uint acceptedTime); event LogBidCanceled(bytes32 bidId); event LogBidExpired(bytes32 bidId); event LogBidConfirmed(bytes32 bidId, address advertiserOrPublisher, bytes32 report); event LogBidCompleted(bytes32 bidId, bytes32 advReport, bytes32 pubReport); event LogDeposit(address _user, uint _amnt); event LogWithdrawal(address _user, uint _amnt); function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function giveupBid(bytes32 _bidId) public; function refundBid(bytes32 _bidId) public; function verifyBid(bytes32 _bidId, bytes32 _report) public; function deposit(uint _amount) public; function withdraw(uint _amount) public; // constants function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ); function getBalance(address _user) constant external returns (uint, uint); function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32); } contract ADXExchange is ADXExchangeInterface, Drainable { string public name = "AdEx Exchange"; ERC20 public token; uint public maxTimeout = 365 days; mapping (address => uint) balances; // escrowed on bids mapping (address => uint) onBids; // bid info mapping (bytes32 => Bid) bids; mapping (bytes32 => BidState) bidStates; enum BidState { DoesNotExist, // default state // There is no 'Open' state - the Open state is just a signed message that you're willing to place such a bid Accepted, // in progress // the following states MUST unlock the ADX amount (return to advertiser) // fail states Canceled, Expired, // success states Completed } struct Bid { // Links on advertiser side address advertiser; bytes32 adUnit; // Links on publisher side address publisher; bytes32 adSlot; // when was it accepted by a publisher uint acceptedTime; // Token reward amount uint amount; // Requirements uint target; // how many impressions/clicks/conversions have to be done uint timeout; // the time to execute // Confirmations from both sides; any value other than 0 is vconsidered as confirm, but this should usually be an IPFS hash to a final report bytes32 publisherConfirmation; bytes32 advertiserConfirmation; } // Schema hash // keccak256(_advertiser, _adunit, _opened, _target, _amount, _timeout, this) bytes32 constant public SCHEMA_HASH = keccak256( "address Advertiser", "bytes32 Ad Unit ID", "uint Opened", "uint Target", "uint Amount", "uint Timeout", "address Exchange" ); // // MODIFIERS // modifier onlyBidAdvertiser(bytes32 _bidId) { } modifier onlyBidPublisher(bytes32 _bidId) { } modifier onlyBidState(bytes32 _bidId, BidState _state) { require(<FILL_ME>) _; } // Functions function ADXExchange(address _token) public { } // // Bid actions // // the bid is accepted by the publisher function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the advertiser function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the publisher function giveupBid(bytes32 _bidId) public onlyBidPublisher(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // This can be done if a bid is accepted, but expired // This is essentially the protection from never settling on verification, or from publisher not executing the bid within a reasonable time function refundBid(bytes32 _bidId) public onlyBidAdvertiser(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // both publisher and advertiser have to call this for a bid to be considered verified function verifyBid(bytes32 _bidId, bytes32 _report) public onlyBidState(_bidId, BidState.Accepted) { } // Deposit and withdraw function deposit(uint _amount) public { } function withdraw(uint _amount) public { } function didSign(address addr, bytes32 hash, uint8 v, bytes32 r, bytes32 s, uint8 mode) public pure returns (bool) { } // // Public constant functions // function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ) { } function getBalance(address _user) constant external returns (uint, uint) { } function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32) { } }
bidStates[_bidId]==_state
13,059
bidStates[_bidId]==_state
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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 { uint256 public totalSupply; 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); } contract Drainable is Ownable { function withdrawToken(address tokenaddr) onlyOwner public { } function withdrawEther() onlyOwner public { } } contract ADXExchangeInterface { // events event LogBidAccepted(bytes32 bidId, address advertiser, bytes32 adunit, address publisher, bytes32 adslot, uint acceptedTime); event LogBidCanceled(bytes32 bidId); event LogBidExpired(bytes32 bidId); event LogBidConfirmed(bytes32 bidId, address advertiserOrPublisher, bytes32 report); event LogBidCompleted(bytes32 bidId, bytes32 advReport, bytes32 pubReport); event LogDeposit(address _user, uint _amnt); event LogWithdrawal(address _user, uint _amnt); function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function giveupBid(bytes32 _bidId) public; function refundBid(bytes32 _bidId) public; function verifyBid(bytes32 _bidId, bytes32 _report) public; function deposit(uint _amount) public; function withdraw(uint _amount) public; // constants function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ); function getBalance(address _user) constant external returns (uint, uint); function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32); } contract ADXExchange is ADXExchangeInterface, Drainable { string public name = "AdEx Exchange"; ERC20 public token; uint public maxTimeout = 365 days; mapping (address => uint) balances; // escrowed on bids mapping (address => uint) onBids; // bid info mapping (bytes32 => Bid) bids; mapping (bytes32 => BidState) bidStates; enum BidState { DoesNotExist, // default state // There is no 'Open' state - the Open state is just a signed message that you're willing to place such a bid Accepted, // in progress // the following states MUST unlock the ADX amount (return to advertiser) // fail states Canceled, Expired, // success states Completed } struct Bid { // Links on advertiser side address advertiser; bytes32 adUnit; // Links on publisher side address publisher; bytes32 adSlot; // when was it accepted by a publisher uint acceptedTime; // Token reward amount uint amount; // Requirements uint target; // how many impressions/clicks/conversions have to be done uint timeout; // the time to execute // Confirmations from both sides; any value other than 0 is vconsidered as confirm, but this should usually be an IPFS hash to a final report bytes32 publisherConfirmation; bytes32 advertiserConfirmation; } // Schema hash // keccak256(_advertiser, _adunit, _opened, _target, _amount, _timeout, this) bytes32 constant public SCHEMA_HASH = keccak256( "address Advertiser", "bytes32 Ad Unit ID", "uint Opened", "uint Target", "uint Amount", "uint Timeout", "address Exchange" ); // // MODIFIERS // modifier onlyBidAdvertiser(bytes32 _bidId) { } modifier onlyBidPublisher(bytes32 _bidId) { } modifier onlyBidState(bytes32 _bidId, BidState _state) { } // Functions function ADXExchange(address _token) public { } // // Bid actions // // the bid is accepted by the publisher function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { require(_amount > 0); // It can be proven that onBids will never exceed balances which means this can't underflow // SafeMath can't be used here because of the stack depth require(<FILL_ME>) // _opened acts as a nonce here bytes32 bidId = getBidID(_advertiser, _adunit, _opened, _target, _amount, _timeout); require(bidStates[bidId] == BidState.DoesNotExist); require(didSign(_advertiser, bidId, v, r, s, sigMode)); // advertier and publisher cannot be the same require(_advertiser != msg.sender); Bid storage bid = bids[bidId]; bid.target = _target; bid.amount = _amount; // it is pretty much mandatory for a bid to have a timeout, else tokens can be stuck forever bid.timeout = _timeout > 0 ? _timeout : maxTimeout; require(bid.timeout <= maxTimeout); bid.advertiser = _advertiser; bid.adUnit = _adunit; bid.publisher = msg.sender; bid.adSlot = _adslot; bid.acceptedTime = now; bidStates[bidId] = BidState.Accepted; onBids[_advertiser] += _amount; // static analysis? // require(onBids[_advertiser] <= balances[advertiser]); LogBidAccepted(bidId, _advertiser, _adunit, msg.sender, _adslot, bid.acceptedTime); } // The bid is canceled by the advertiser function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the publisher function giveupBid(bytes32 _bidId) public onlyBidPublisher(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // This can be done if a bid is accepted, but expired // This is essentially the protection from never settling on verification, or from publisher not executing the bid within a reasonable time function refundBid(bytes32 _bidId) public onlyBidAdvertiser(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // both publisher and advertiser have to call this for a bid to be considered verified function verifyBid(bytes32 _bidId, bytes32 _report) public onlyBidState(_bidId, BidState.Accepted) { } // Deposit and withdraw function deposit(uint _amount) public { } function withdraw(uint _amount) public { } function didSign(address addr, bytes32 hash, uint8 v, bytes32 r, bytes32 s, uint8 mode) public pure returns (bool) { } // // Public constant functions // function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ) { } function getBalance(address _user) constant external returns (uint, uint) { } function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32) { } }
_amount<=(balances[_advertiser]-onBids[_advertiser])
13,059
_amount<=(balances[_advertiser]-onBids[_advertiser])
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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 { uint256 public totalSupply; 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); } contract Drainable is Ownable { function withdrawToken(address tokenaddr) onlyOwner public { } function withdrawEther() onlyOwner public { } } contract ADXExchangeInterface { // events event LogBidAccepted(bytes32 bidId, address advertiser, bytes32 adunit, address publisher, bytes32 adslot, uint acceptedTime); event LogBidCanceled(bytes32 bidId); event LogBidExpired(bytes32 bidId); event LogBidConfirmed(bytes32 bidId, address advertiserOrPublisher, bytes32 report); event LogBidCompleted(bytes32 bidId, bytes32 advReport, bytes32 pubReport); event LogDeposit(address _user, uint _amnt); event LogWithdrawal(address _user, uint _amnt); function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function giveupBid(bytes32 _bidId) public; function refundBid(bytes32 _bidId) public; function verifyBid(bytes32 _bidId, bytes32 _report) public; function deposit(uint _amount) public; function withdraw(uint _amount) public; // constants function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ); function getBalance(address _user) constant external returns (uint, uint); function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32); } contract ADXExchange is ADXExchangeInterface, Drainable { string public name = "AdEx Exchange"; ERC20 public token; uint public maxTimeout = 365 days; mapping (address => uint) balances; // escrowed on bids mapping (address => uint) onBids; // bid info mapping (bytes32 => Bid) bids; mapping (bytes32 => BidState) bidStates; enum BidState { DoesNotExist, // default state // There is no 'Open' state - the Open state is just a signed message that you're willing to place such a bid Accepted, // in progress // the following states MUST unlock the ADX amount (return to advertiser) // fail states Canceled, Expired, // success states Completed } struct Bid { // Links on advertiser side address advertiser; bytes32 adUnit; // Links on publisher side address publisher; bytes32 adSlot; // when was it accepted by a publisher uint acceptedTime; // Token reward amount uint amount; // Requirements uint target; // how many impressions/clicks/conversions have to be done uint timeout; // the time to execute // Confirmations from both sides; any value other than 0 is vconsidered as confirm, but this should usually be an IPFS hash to a final report bytes32 publisherConfirmation; bytes32 advertiserConfirmation; } // Schema hash // keccak256(_advertiser, _adunit, _opened, _target, _amount, _timeout, this) bytes32 constant public SCHEMA_HASH = keccak256( "address Advertiser", "bytes32 Ad Unit ID", "uint Opened", "uint Target", "uint Amount", "uint Timeout", "address Exchange" ); // // MODIFIERS // modifier onlyBidAdvertiser(bytes32 _bidId) { } modifier onlyBidPublisher(bytes32 _bidId) { } modifier onlyBidState(bytes32 _bidId, BidState _state) { } // Functions function ADXExchange(address _token) public { } // // Bid actions // // the bid is accepted by the publisher function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { require(_amount > 0); // It can be proven that onBids will never exceed balances which means this can't underflow // SafeMath can't be used here because of the stack depth require(_amount <= (balances[_advertiser] - onBids[_advertiser])); // _opened acts as a nonce here bytes32 bidId = getBidID(_advertiser, _adunit, _opened, _target, _amount, _timeout); require(<FILL_ME>) require(didSign(_advertiser, bidId, v, r, s, sigMode)); // advertier and publisher cannot be the same require(_advertiser != msg.sender); Bid storage bid = bids[bidId]; bid.target = _target; bid.amount = _amount; // it is pretty much mandatory for a bid to have a timeout, else tokens can be stuck forever bid.timeout = _timeout > 0 ? _timeout : maxTimeout; require(bid.timeout <= maxTimeout); bid.advertiser = _advertiser; bid.adUnit = _adunit; bid.publisher = msg.sender; bid.adSlot = _adslot; bid.acceptedTime = now; bidStates[bidId] = BidState.Accepted; onBids[_advertiser] += _amount; // static analysis? // require(onBids[_advertiser] <= balances[advertiser]); LogBidAccepted(bidId, _advertiser, _adunit, msg.sender, _adslot, bid.acceptedTime); } // The bid is canceled by the advertiser function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the publisher function giveupBid(bytes32 _bidId) public onlyBidPublisher(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // This can be done if a bid is accepted, but expired // This is essentially the protection from never settling on verification, or from publisher not executing the bid within a reasonable time function refundBid(bytes32 _bidId) public onlyBidAdvertiser(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // both publisher and advertiser have to call this for a bid to be considered verified function verifyBid(bytes32 _bidId, bytes32 _report) public onlyBidState(_bidId, BidState.Accepted) { } // Deposit and withdraw function deposit(uint _amount) public { } function withdraw(uint _amount) public { } function didSign(address addr, bytes32 hash, uint8 v, bytes32 r, bytes32 s, uint8 mode) public pure returns (bool) { } // // Public constant functions // function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ) { } function getBalance(address _user) constant external returns (uint, uint) { } function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32) { } }
bidStates[bidId]==BidState.DoesNotExist
13,059
bidStates[bidId]==BidState.DoesNotExist
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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 { uint256 public totalSupply; 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); } contract Drainable is Ownable { function withdrawToken(address tokenaddr) onlyOwner public { } function withdrawEther() onlyOwner public { } } contract ADXExchangeInterface { // events event LogBidAccepted(bytes32 bidId, address advertiser, bytes32 adunit, address publisher, bytes32 adslot, uint acceptedTime); event LogBidCanceled(bytes32 bidId); event LogBidExpired(bytes32 bidId); event LogBidConfirmed(bytes32 bidId, address advertiserOrPublisher, bytes32 report); event LogBidCompleted(bytes32 bidId, bytes32 advReport, bytes32 pubReport); event LogDeposit(address _user, uint _amnt); event LogWithdrawal(address _user, uint _amnt); function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function giveupBid(bytes32 _bidId) public; function refundBid(bytes32 _bidId) public; function verifyBid(bytes32 _bidId, bytes32 _report) public; function deposit(uint _amount) public; function withdraw(uint _amount) public; // constants function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ); function getBalance(address _user) constant external returns (uint, uint); function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32); } contract ADXExchange is ADXExchangeInterface, Drainable { string public name = "AdEx Exchange"; ERC20 public token; uint public maxTimeout = 365 days; mapping (address => uint) balances; // escrowed on bids mapping (address => uint) onBids; // bid info mapping (bytes32 => Bid) bids; mapping (bytes32 => BidState) bidStates; enum BidState { DoesNotExist, // default state // There is no 'Open' state - the Open state is just a signed message that you're willing to place such a bid Accepted, // in progress // the following states MUST unlock the ADX amount (return to advertiser) // fail states Canceled, Expired, // success states Completed } struct Bid { // Links on advertiser side address advertiser; bytes32 adUnit; // Links on publisher side address publisher; bytes32 adSlot; // when was it accepted by a publisher uint acceptedTime; // Token reward amount uint amount; // Requirements uint target; // how many impressions/clicks/conversions have to be done uint timeout; // the time to execute // Confirmations from both sides; any value other than 0 is vconsidered as confirm, but this should usually be an IPFS hash to a final report bytes32 publisherConfirmation; bytes32 advertiserConfirmation; } // Schema hash // keccak256(_advertiser, _adunit, _opened, _target, _amount, _timeout, this) bytes32 constant public SCHEMA_HASH = keccak256( "address Advertiser", "bytes32 Ad Unit ID", "uint Opened", "uint Target", "uint Amount", "uint Timeout", "address Exchange" ); // // MODIFIERS // modifier onlyBidAdvertiser(bytes32 _bidId) { } modifier onlyBidPublisher(bytes32 _bidId) { } modifier onlyBidState(bytes32 _bidId, BidState _state) { } // Functions function ADXExchange(address _token) public { } // // Bid actions // // the bid is accepted by the publisher function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { require(_amount > 0); // It can be proven that onBids will never exceed balances which means this can't underflow // SafeMath can't be used here because of the stack depth require(_amount <= (balances[_advertiser] - onBids[_advertiser])); // _opened acts as a nonce here bytes32 bidId = getBidID(_advertiser, _adunit, _opened, _target, _amount, _timeout); require(bidStates[bidId] == BidState.DoesNotExist); require(<FILL_ME>) // advertier and publisher cannot be the same require(_advertiser != msg.sender); Bid storage bid = bids[bidId]; bid.target = _target; bid.amount = _amount; // it is pretty much mandatory for a bid to have a timeout, else tokens can be stuck forever bid.timeout = _timeout > 0 ? _timeout : maxTimeout; require(bid.timeout <= maxTimeout); bid.advertiser = _advertiser; bid.adUnit = _adunit; bid.publisher = msg.sender; bid.adSlot = _adslot; bid.acceptedTime = now; bidStates[bidId] = BidState.Accepted; onBids[_advertiser] += _amount; // static analysis? // require(onBids[_advertiser] <= balances[advertiser]); LogBidAccepted(bidId, _advertiser, _adunit, msg.sender, _adslot, bid.acceptedTime); } // The bid is canceled by the advertiser function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the publisher function giveupBid(bytes32 _bidId) public onlyBidPublisher(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // This can be done if a bid is accepted, but expired // This is essentially the protection from never settling on verification, or from publisher not executing the bid within a reasonable time function refundBid(bytes32 _bidId) public onlyBidAdvertiser(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // both publisher and advertiser have to call this for a bid to be considered verified function verifyBid(bytes32 _bidId, bytes32 _report) public onlyBidState(_bidId, BidState.Accepted) { } // Deposit and withdraw function deposit(uint _amount) public { } function withdraw(uint _amount) public { } function didSign(address addr, bytes32 hash, uint8 v, bytes32 r, bytes32 s, uint8 mode) public pure returns (bool) { } // // Public constant functions // function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ) { } function getBalance(address _user) constant external returns (uint, uint) { } function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32) { } }
didSign(_advertiser,bidId,v,r,s,sigMode)
13,059
didSign(_advertiser,bidId,v,r,s,sigMode)
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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 { uint256 public totalSupply; 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); } contract Drainable is Ownable { function withdrawToken(address tokenaddr) onlyOwner public { } function withdrawEther() onlyOwner public { } } contract ADXExchangeInterface { // events event LogBidAccepted(bytes32 bidId, address advertiser, bytes32 adunit, address publisher, bytes32 adslot, uint acceptedTime); event LogBidCanceled(bytes32 bidId); event LogBidExpired(bytes32 bidId); event LogBidConfirmed(bytes32 bidId, address advertiserOrPublisher, bytes32 report); event LogBidCompleted(bytes32 bidId, bytes32 advReport, bytes32 pubReport); event LogDeposit(address _user, uint _amnt); event LogWithdrawal(address _user, uint _amnt); function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function giveupBid(bytes32 _bidId) public; function refundBid(bytes32 _bidId) public; function verifyBid(bytes32 _bidId, bytes32 _report) public; function deposit(uint _amount) public; function withdraw(uint _amount) public; // constants function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ); function getBalance(address _user) constant external returns (uint, uint); function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32); } contract ADXExchange is ADXExchangeInterface, Drainable { string public name = "AdEx Exchange"; ERC20 public token; uint public maxTimeout = 365 days; mapping (address => uint) balances; // escrowed on bids mapping (address => uint) onBids; // bid info mapping (bytes32 => Bid) bids; mapping (bytes32 => BidState) bidStates; enum BidState { DoesNotExist, // default state // There is no 'Open' state - the Open state is just a signed message that you're willing to place such a bid Accepted, // in progress // the following states MUST unlock the ADX amount (return to advertiser) // fail states Canceled, Expired, // success states Completed } struct Bid { // Links on advertiser side address advertiser; bytes32 adUnit; // Links on publisher side address publisher; bytes32 adSlot; // when was it accepted by a publisher uint acceptedTime; // Token reward amount uint amount; // Requirements uint target; // how many impressions/clicks/conversions have to be done uint timeout; // the time to execute // Confirmations from both sides; any value other than 0 is vconsidered as confirm, but this should usually be an IPFS hash to a final report bytes32 publisherConfirmation; bytes32 advertiserConfirmation; } // Schema hash // keccak256(_advertiser, _adunit, _opened, _target, _amount, _timeout, this) bytes32 constant public SCHEMA_HASH = keccak256( "address Advertiser", "bytes32 Ad Unit ID", "uint Opened", "uint Target", "uint Amount", "uint Timeout", "address Exchange" ); // // MODIFIERS // modifier onlyBidAdvertiser(bytes32 _bidId) { } modifier onlyBidPublisher(bytes32 _bidId) { } modifier onlyBidState(bytes32 _bidId, BidState _state) { } // Functions function ADXExchange(address _token) public { } // // Bid actions // // the bid is accepted by the publisher function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the advertiser function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { // _opened acts as a nonce here bytes32 bidId = getBidID(msg.sender, _adunit, _opened, _target, _amount, _timeout); require(bidStates[bidId] == BidState.DoesNotExist); require(<FILL_ME>) bidStates[bidId] = BidState.Canceled; LogBidCanceled(bidId); } // The bid is canceled by the publisher function giveupBid(bytes32 _bidId) public onlyBidPublisher(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // This can be done if a bid is accepted, but expired // This is essentially the protection from never settling on verification, or from publisher not executing the bid within a reasonable time function refundBid(bytes32 _bidId) public onlyBidAdvertiser(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // both publisher and advertiser have to call this for a bid to be considered verified function verifyBid(bytes32 _bidId, bytes32 _report) public onlyBidState(_bidId, BidState.Accepted) { } // Deposit and withdraw function deposit(uint _amount) public { } function withdraw(uint _amount) public { } function didSign(address addr, bytes32 hash, uint8 v, bytes32 r, bytes32 s, uint8 mode) public pure returns (bool) { } // // Public constant functions // function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ) { } function getBalance(address _user) constant external returns (uint, uint) { } function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32) { } }
didSign(msg.sender,bidId,v,r,s,sigMode)
13,059
didSign(msg.sender,bidId,v,r,s,sigMode)
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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 { uint256 public totalSupply; 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); } contract Drainable is Ownable { function withdrawToken(address tokenaddr) onlyOwner public { } function withdrawEther() onlyOwner public { } } contract ADXExchangeInterface { // events event LogBidAccepted(bytes32 bidId, address advertiser, bytes32 adunit, address publisher, bytes32 adslot, uint acceptedTime); event LogBidCanceled(bytes32 bidId); event LogBidExpired(bytes32 bidId); event LogBidConfirmed(bytes32 bidId, address advertiserOrPublisher, bytes32 report); event LogBidCompleted(bytes32 bidId, bytes32 advReport, bytes32 pubReport); event LogDeposit(address _user, uint _amnt); event LogWithdrawal(address _user, uint _amnt); function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function giveupBid(bytes32 _bidId) public; function refundBid(bytes32 _bidId) public; function verifyBid(bytes32 _bidId, bytes32 _report) public; function deposit(uint _amount) public; function withdraw(uint _amount) public; // constants function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ); function getBalance(address _user) constant external returns (uint, uint); function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32); } contract ADXExchange is ADXExchangeInterface, Drainable { string public name = "AdEx Exchange"; ERC20 public token; uint public maxTimeout = 365 days; mapping (address => uint) balances; // escrowed on bids mapping (address => uint) onBids; // bid info mapping (bytes32 => Bid) bids; mapping (bytes32 => BidState) bidStates; enum BidState { DoesNotExist, // default state // There is no 'Open' state - the Open state is just a signed message that you're willing to place such a bid Accepted, // in progress // the following states MUST unlock the ADX amount (return to advertiser) // fail states Canceled, Expired, // success states Completed } struct Bid { // Links on advertiser side address advertiser; bytes32 adUnit; // Links on publisher side address publisher; bytes32 adSlot; // when was it accepted by a publisher uint acceptedTime; // Token reward amount uint amount; // Requirements uint target; // how many impressions/clicks/conversions have to be done uint timeout; // the time to execute // Confirmations from both sides; any value other than 0 is vconsidered as confirm, but this should usually be an IPFS hash to a final report bytes32 publisherConfirmation; bytes32 advertiserConfirmation; } // Schema hash // keccak256(_advertiser, _adunit, _opened, _target, _amount, _timeout, this) bytes32 constant public SCHEMA_HASH = keccak256( "address Advertiser", "bytes32 Ad Unit ID", "uint Opened", "uint Target", "uint Amount", "uint Timeout", "address Exchange" ); // // MODIFIERS // modifier onlyBidAdvertiser(bytes32 _bidId) { } modifier onlyBidPublisher(bytes32 _bidId) { } modifier onlyBidState(bytes32 _bidId, BidState _state) { } // Functions function ADXExchange(address _token) public { } // // Bid actions // // the bid is accepted by the publisher function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the advertiser function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the publisher function giveupBid(bytes32 _bidId) public onlyBidPublisher(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // This can be done if a bid is accepted, but expired // This is essentially the protection from never settling on verification, or from publisher not executing the bid within a reasonable time function refundBid(bytes32 _bidId) public onlyBidAdvertiser(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // both publisher and advertiser have to call this for a bid to be considered verified function verifyBid(bytes32 _bidId, bytes32 _report) public onlyBidState(_bidId, BidState.Accepted) { } // Deposit and withdraw function deposit(uint _amount) public { balances[msg.sender] = SafeMath.add(balances[msg.sender], _amount); require(<FILL_ME>) LogDeposit(msg.sender, _amount); } function withdraw(uint _amount) public { } function didSign(address addr, bytes32 hash, uint8 v, bytes32 r, bytes32 s, uint8 mode) public pure returns (bool) { } // // Public constant functions // function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ) { } function getBalance(address _user) constant external returns (uint, uint) { } function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32) { } }
token.transferFrom(msg.sender,address(this),_amount)
13,059
token.transferFrom(msg.sender,address(this),_amount)
null
pragma solidity ^0.4.18; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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 { uint256 public totalSupply; 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); } contract Drainable is Ownable { function withdrawToken(address tokenaddr) onlyOwner public { } function withdrawEther() onlyOwner public { } } contract ADXExchangeInterface { // events event LogBidAccepted(bytes32 bidId, address advertiser, bytes32 adunit, address publisher, bytes32 adslot, uint acceptedTime); event LogBidCanceled(bytes32 bidId); event LogBidExpired(bytes32 bidId); event LogBidConfirmed(bytes32 bidId, address advertiserOrPublisher, bytes32 report); event LogBidCompleted(bytes32 bidId, bytes32 advReport, bytes32 pubReport); event LogDeposit(address _user, uint _amnt); event LogWithdrawal(address _user, uint _amnt); function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _rewardAmount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public; function giveupBid(bytes32 _bidId) public; function refundBid(bytes32 _bidId) public; function verifyBid(bytes32 _bidId, bytes32 _report) public; function deposit(uint _amount) public; function withdraw(uint _amount) public; // constants function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ); function getBalance(address _user) constant external returns (uint, uint); function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32); } contract ADXExchange is ADXExchangeInterface, Drainable { string public name = "AdEx Exchange"; ERC20 public token; uint public maxTimeout = 365 days; mapping (address => uint) balances; // escrowed on bids mapping (address => uint) onBids; // bid info mapping (bytes32 => Bid) bids; mapping (bytes32 => BidState) bidStates; enum BidState { DoesNotExist, // default state // There is no 'Open' state - the Open state is just a signed message that you're willing to place such a bid Accepted, // in progress // the following states MUST unlock the ADX amount (return to advertiser) // fail states Canceled, Expired, // success states Completed } struct Bid { // Links on advertiser side address advertiser; bytes32 adUnit; // Links on publisher side address publisher; bytes32 adSlot; // when was it accepted by a publisher uint acceptedTime; // Token reward amount uint amount; // Requirements uint target; // how many impressions/clicks/conversions have to be done uint timeout; // the time to execute // Confirmations from both sides; any value other than 0 is vconsidered as confirm, but this should usually be an IPFS hash to a final report bytes32 publisherConfirmation; bytes32 advertiserConfirmation; } // Schema hash // keccak256(_advertiser, _adunit, _opened, _target, _amount, _timeout, this) bytes32 constant public SCHEMA_HASH = keccak256( "address Advertiser", "bytes32 Ad Unit ID", "uint Opened", "uint Target", "uint Amount", "uint Timeout", "address Exchange" ); // // MODIFIERS // modifier onlyBidAdvertiser(bytes32 _bidId) { } modifier onlyBidPublisher(bytes32 _bidId) { } modifier onlyBidState(bytes32 _bidId, BidState _state) { } // Functions function ADXExchange(address _token) public { } // // Bid actions // // the bid is accepted by the publisher function acceptBid(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, bytes32 _adslot, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the advertiser function cancelBid(bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout, uint8 v, bytes32 r, bytes32 s, uint8 sigMode) public { } // The bid is canceled by the publisher function giveupBid(bytes32 _bidId) public onlyBidPublisher(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // This can be done if a bid is accepted, but expired // This is essentially the protection from never settling on verification, or from publisher not executing the bid within a reasonable time function refundBid(bytes32 _bidId) public onlyBidAdvertiser(_bidId) onlyBidState(_bidId, BidState.Accepted) { } // both publisher and advertiser have to call this for a bid to be considered verified function verifyBid(bytes32 _bidId, bytes32 _report) public onlyBidState(_bidId, BidState.Accepted) { } // Deposit and withdraw function deposit(uint _amount) public { } function withdraw(uint _amount) public { uint available = SafeMath.sub(balances[msg.sender], onBids[msg.sender]); require(_amount <= available); balances[msg.sender] = SafeMath.sub(balances[msg.sender], _amount); require(<FILL_ME>) LogWithdrawal(msg.sender, _amount); } function didSign(address addr, bytes32 hash, uint8 v, bytes32 r, bytes32 s, uint8 mode) public pure returns (bool) { } // // Public constant functions // function getBid(bytes32 _bidId) constant external returns ( uint, uint, uint, uint, uint, // advertiser (advertiser, ad unit, confiration) address, bytes32, bytes32, // publisher (publisher, ad slot, confirmation) address, bytes32, bytes32 ) { } function getBalance(address _user) constant external returns (uint, uint) { } function getBidID(address _advertiser, bytes32 _adunit, uint _opened, uint _target, uint _amount, uint _timeout) constant public returns (bytes32) { } }
token.transfer(msg.sender,_amount)
13,059
token.transfer(msg.sender,_amount)
null
// SPDX-License-Identifier: BUSL-1.1 pragma solidity >=0.5.0; import './BitMath.sol'; /// @title Packed tick initialized state library /// @notice Stores a packed mapping of tick index to its initialized state /// @dev The mapping uses int16 for keys since ticks are represented as int24 and there are 256 (2^8) values per word. library TickBitmap { /// @notice Computes the position in the mapping where the initialized bit for a tick lives /// @param tick The tick for which to compute the position /// @return wordPos The key in the mapping containing the word in which the bit is stored /// @return bitPos The bit position in the word where the flag is stored function position(int24 tick) private pure returns (int16 wordPos, uint8 bitPos) { } /// @notice Flips the initialized state for a given tick from false to true, or vice versa /// @param self The mapping in which to flip the tick /// @param tick The tick to flip /// @param tickSpacing The spacing between usable ticks function flipTick( mapping(int16 => uint256) storage self, int24 tick, int24 tickSpacing ) internal { require(<FILL_ME>) // ensure that the tick is spaced (int16 wordPos, uint8 bitPos) = position(tick / tickSpacing); uint256 mask = 1 << bitPos; self[wordPos] ^= mask; } /// @notice Returns the next initialized tick contained in the same word (or adjacent word) as the tick that is either /// to the left (less than or equal to) or right (greater than) of the given tick /// @param self The mapping in which to compute the next initialized tick /// @param tick The starting tick /// @param tickSpacing The spacing between usable ticks /// @param lte Whether to search for the next initialized tick to the left (less than or equal to the starting tick) /// @return next The next initialized or uninitialized tick up to 256 ticks away from the current tick /// @return initialized Whether the next tick is initialized, as the function only searches within up to 256 ticks function nextInitializedTickWithinOneWord( mapping(int16 => uint256) storage self, int24 tick, int24 tickSpacing, bool lte ) internal view returns (int24 next, bool initialized) { } }
tick%tickSpacing==0
13,065
tick%tickSpacing==0
null
pragma solidity ^0.4.25; interface IToken { function name() external view returns(string); function symbol() external view returns(string); function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function increaseAllowance(address spender, uint256 addedValue) external returns (bool); function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool); function mint(address to, uint256 value) external returns (bool); function burn(address from, uint256 value) external returns (bool); function isMinter(address account) external returns (bool); event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); event Paused(address account); event Unpaused(address account); } library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev give an account access to this role */ function add(Role storage role, address account) internal { } /** * @dev remove an account's access to this role */ function remove(Role storage role, address account) internal { } /** * @dev check if an account has this role * @return bool */ function has(Role storage role, address account) internal view returns (bool) { } } /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC20 is IToken { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev Gets the balance of the specified address. * @param owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address owner) public view returns (uint256) { } /** * @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 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 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 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 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 increaseAllowance( address spender, uint256 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 decreaseAllowance( address spender, uint256 subtractedValue ) public returns (bool) { } /** * @dev Transfer token for a specified addresses * @param from The address to transfer from. * @param to The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address from, address to, uint256 value) internal { } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { } } contract PauserRole { using Roles for Roles.Role; event PauserAdded(address indexed account); event PauserRemoved(address indexed account); Roles.Role private pausers; constructor() internal { } modifier onlyPauser() { require(<FILL_ME>) _; } function isPauser(address account) public view returns (bool) { } function addPauser(address account) public onlyPauser { } function renouncePauser() public { } function _addPauser(address account) internal { } function _removePauser(address account) internal { } } contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor() internal { } /** * @return true if the contract is paused, false otherwise. */ function paused() public view returns(bool) { } /** * @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() public onlyPauser whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyPauser whenPaused { } } contract ERC20Pausable is ERC20, Pausable { function transfer( address to, uint256 value ) public whenNotPaused returns (bool) { } function transferFrom( address from, address to, uint256 value ) public whenNotPaused returns (bool) { } function approve( address spender, uint256 value ) public whenNotPaused returns (bool) { } function increaseAllowance( address spender, uint addedValue ) public whenNotPaused returns (bool success) { } function decreaseAllowance( address spender, uint subtractedValue ) public whenNotPaused returns (bool success) { } } contract MinterRole { using Roles for Roles.Role; event MinterAdded(address indexed account); event MinterRemoved(address indexed account); Roles.Role private minters; constructor() internal { } modifier onlyMinter() { } function isMinter(address account) public view returns (bool) { } function addMinter(address account) public onlyMinter { } function renounceMinter() public { } function _addMinter(address account) internal { } function _removeMinter(address account) internal { } } contract ERC20Mintable is ERC20, MinterRole { /** * @dev Function to mint tokens * @param to The address that will receive the minted tokens. * @param value The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint( address to, uint256 value ) public onlyMinter returns (bool) { } /** * @dev Burns a specific amount of tokens. * @param from address The address which you want to burn tokens from * @param value The amount of token to be burned. * @return A boolean that indicates if operation was successful. */ function burn( address from, uint256 value ) public onlyMinter returns (bool) { } } contract Token is ERC20, ERC20Mintable, ERC20Pausable { string private _name; string private _symbol; uint8 private _decimals; constructor(string name, string symbol, uint8 decimals) ERC20() ERC20Mintable() ERC20Pausable() public { } /** * @return the name of the token. */ function name() public view returns(string) { } /** * @return the symbol of the token. */ function symbol() public view returns(string) { } /** * @return the number of decimals of the token. */ function decimals() public view returns(uint8) { } }
isPauser(msg.sender)
13,111
isPauser(msg.sender)
"Max supply exceeded!"
pragma solidity >=0.7.0 <0.9.0; contract GenieDoodles is ERC721, Ownable { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private supply; string public uriPrefix = "ipfs://QmZf74BMoE4Mrs2tYBoJFeBm34YKRShmKKNaS9W6Z1LMMU/"; string public uriSuffix = ".json"; string public hiddenMetadataUri; uint256 public cost = 0.01777 ether; uint256 public maxSupply = 7777; uint256 public maxMintAmountPerTx = 10; bool public paused = false; bool public revealed = true; constructor() ERC721("Genie Doodles", "GD") { } modifier mintCompliance(uint256 _mintAmount) { require(_mintAmount > 0 && _mintAmount <= maxMintAmountPerTx, "Invalid mint amount!"); require(<FILL_ME>) _; } function totalSupply() public view returns (uint256) { } function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) { } function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setRevealed(bool _state) public onlyOwner { } function setCost(uint256 _cost) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function withdraw() public onlyOwner { } function _mintLoop(address _receiver, uint256 _mintAmount) internal { } function _baseURI() internal view virtual override returns (string memory) { } }
supply.current()+_mintAmount<=maxSupply,"Max supply exceeded!"
13,221
supply.current()+_mintAmount<=maxSupply
"Initializable: contract is already initialized"
pragma solidity ^0.8.0; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract 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 protect an initializer function from being invoked twice. */ modifier initializer() { require(<FILL_ME>) bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
_initializing||!_initialized,"Initializable: contract is already initialized"
13,225
_initializing||!_initialized
'add: lpToken already added'
// SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; interface IVestable { function vest(address _receiver, uint256 _amount) external; } interface IMigrator { // Take the current LP token address and return the new LP token address. // Migrator should have full access to the caller's LP token. function migrate(IERC20 token) external returns (IERC20); } contract LPTokenStaker is Ownable { using SafeERC20 for IERC20; IVestable public vesting; /// @notice Info of each user. /// `amount` LP token amount the user has provided. /// `rewardDebt` The amount of GRO entitled to the user. struct UserInfo { uint256 amount; int256 rewardDebt; } /// @notice Info of each pool. /// `allocPoint` The amount of allocation points assigned to the pool. /// which will determine the share of GRO token rewards the pool will get struct PoolInfo { uint256 accGroPerShare; uint256 allocPoint; uint256 lastRewardBlock; IERC20 lpToken; } /// @notice Info of each pool. PoolInfo[] public poolInfo; /// @notice Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; /// @dev Total allocation points. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint; uint256 public maxGroPerBlock; uint256 public groPerBlock; address public manager; mapping(address => bool) public activeLpTokens; uint256 private constant ACC_GRO_PRECISION = 1e12; /// @notice The migrator contract. It has a lot of power. Can only be set through governance (owner). IMigrator public migrator; event LogAddPool(uint256 indexed pid, uint256 allocPoint, IERC20 indexed lpToken); event LogSetPool(uint256 indexed pid, uint256 allocPoint); event LogUpdatePool(uint256 indexed pid, uint256 lastRewardBlock, uint256 lpSupply, uint256 accGroPerShare); event LogDeposit(address indexed user, uint256 indexed pid, uint256 amount); event LogWithdraw(address indexed user, uint256 indexed pid, uint256 amount); event LogClaim(address indexed user, uint256 indexed pid, uint256 amount); event LogLpTokenAdded(address token); event LogEmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount); event LogNewManagment(address newManager); event LogMaxGroPerBlock(uint256 newMax); event LogGroPerBlock(uint256 newGro); event LogNewVester(address newVester); event LogNewMigrator(address newMigrator); function setVesting(address _vesting) external onlyOwner { } function setManager(address _manager) external onlyOwner { } function setMaxGroPerBlock(uint256 _maxGroPerBlock) external onlyOwner { } function setGroPerBlock(uint256 _groPerBlock) external { } /// @notice Returns the number of pools. function poolLength() public view returns (uint256 pools) { } /// @notice Add a new LP to the pool. Can only be called by the manager. /// DO NOT add the same LP token more than once. Rewards will be messed up if you do. /// @param allocPoint AP of the new pool. /// @param _lpToken Address of the LP ERC-20 token. function add(uint256 allocPoint, IERC20 _lpToken) external { require(msg.sender == manager, 'add: !manager'); totalAllocPoint += allocPoint; require(<FILL_ME>) poolInfo.push( PoolInfo({allocPoint: allocPoint, lastRewardBlock: block.number, accGroPerShare: 0, lpToken: _lpToken}) ); activeLpTokens[address(_lpToken)] = true; emit LogLpTokenAdded(address(_lpToken)); emit LogAddPool(poolInfo.length - 1, allocPoint, _lpToken); } /// @notice Update the given pool's allocation point. Can only be called by the manager. /// @param _pid The index of the pool. See `poolInfo`. /// @param _allocPoint New AP of the pool. function set(uint256 _pid, uint256 _allocPoint) external { } /// @notice Set the `migrator` contract. Can only be called by the owner. /// @param _migrator The contract address to set. function setMigrator(IMigrator _migrator) public onlyOwner { } /// @notice Migrate LP token to another LP contract through the `migrator` contract. /// @param _pid The index of the pool. See `poolInfo`. function migrate(uint256 _pid) public { } /// @notice Update reward variables for all pools. Be careful of gas spending! /// @param pids Pool IDs of all to be updated. Make sure to update all active pools. function massUpdatePools(uint256[] calldata pids) external { } /// @notice Update reward variables of the given pool. /// @param pid The index of the pool. See `poolInfo`. /// @return pool Returns the pool that was updated. function updatePool(uint256 pid) public returns (PoolInfo memory pool) { } /// @notice View function to see claimable GRO on frontend. /// @param _pid The index of the pool. See `poolInfo`. /// @param _user Address of user. /// @return claimable GRO reward for a given user. function claimable(uint256 _pid, address _user) external view returns (uint256) { } /// @notice Deposit LP tokens for GRO reward. /// @param pid The index of the pool. See `poolInfo`. /// @param amount LP token amount to deposit. function deposit(uint256 pid, uint256 amount) public { } /// @notice Withdraw LP tokens. /// @param pid The index of the pool. See `poolInfo`. /// @param amount LP token amount to withdraw. function withdraw(uint256 pid, uint256 amount) public { } /// @notice Claim proceeds for transaction sender. /// @param pid The index of the pool. See `poolInfo`. function claim(uint256 pid) public { } /// @notice Withdraw LP tokens and claim proceeds for transaction sender. /// @param pid The index of the pool. See `poolInfo`. /// @param amount LP token amount to withdraw. function withdrawAndClaim(uint256 pid, uint256 amount) public { } /// @notice Withdraw without caring about rewards. EMERGENCY ONLY. /// @param pid The index of the pool. See `poolInfo`. function emergencyWithdraw(uint256 pid) public { } }
!activeLpTokens[address(_lpToken)],'add: lpToken already added'
13,250
!activeLpTokens[address(_lpToken)]
"Not a spendable token"
pragma solidity ^0.6.0; /* โ–“โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–„ โ–“โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–ˆโ–ˆ โ–’โ–ˆโ–ˆโ–“ โ–“โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–„ โ–„โ–„โ–„โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–“ โ–ˆโ–ˆโ–“โ–ˆโ–ˆโ–ˆ โ–’โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–’โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ โ–ˆโ–ˆโ–“ โ–’โ–ˆโ–ˆโ–€ โ–ˆโ–ˆโ–Œโ–“โ–ˆ โ–€ โ–“โ–ˆโ–ˆ โ–’โ–“โ–ˆโ–ˆโ–’ โ–“โ–ˆ โ–€ โ–’โ–ˆโ–ˆโ–€ โ–€โ–ˆ โ–“ โ–ˆโ–ˆโ–’ โ–“โ–’ โ–“โ–ˆโ–ˆโ–‘ โ–ˆโ–ˆโ–’โ–’โ–ˆโ–ˆโ–’ โ–ˆโ–ˆโ–’โ–’โ–ˆโ–ˆโ–’ โ–ˆโ–ˆโ–’ โ–“โ–ˆโ–ˆโ–’ โ–‘โ–ˆโ–ˆ โ–ˆโ–Œโ–’โ–ˆโ–ˆโ–ˆ โ–’โ–ˆโ–ˆโ–ˆโ–ˆ โ–‘โ–’โ–ˆโ–ˆโ–‘ โ–’โ–ˆโ–ˆโ–ˆ โ–’โ–“โ–ˆ โ–„ โ–ˆโ–ˆโ–‘ โ–’ โ–“โ–ˆโ–ˆโ–‘ โ–ˆโ–ˆโ–“โ–’โ–’โ–ˆโ–ˆ โ–ˆโ–ˆโ–’โ–’โ–ˆโ–ˆโ–‘ โ–ˆโ–ˆโ–’ โ–’โ–ˆโ–ˆโ–‘ โ–‘โ–“โ–ˆโ–„ โ–Œโ–’โ–“โ–ˆ โ–„ โ–‘ โ–“โ–ˆโ–’ โ–‘โ–’โ–ˆโ–ˆโ–‘ โ–’โ–“โ–ˆ โ–„ โ–’โ–“โ–“โ–„ โ–„โ–ˆโ–ˆโ–’โ–‘ โ–ˆโ–ˆ โ–‘ โ–’โ–ˆโ–ˆโ–„โ–ˆโ–“โ–’ โ–’โ–’โ–ˆโ–ˆ โ–ˆโ–ˆโ–‘โ–’โ–ˆโ–ˆ โ–ˆโ–ˆโ–‘ โ–’โ–ˆโ–ˆโ–‘ โ–‘โ–’โ–ˆโ–ˆโ–ˆโ–ˆโ–“ โ–‘โ–’โ–ˆโ–ˆโ–ˆโ–ˆโ–’โ–‘ โ–’โ–ˆโ–‘ โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–’โ–‘โ–’โ–ˆโ–ˆโ–ˆโ–ˆโ–’โ–’ โ–“โ–ˆโ–ˆโ–ˆโ–€ โ–‘ โ–’โ–ˆโ–ˆโ–’ โ–’โ–ˆโ–ˆโ–’ โ–‘ โ–‘โ–‘ โ–ˆโ–ˆโ–ˆโ–ˆโ–“โ–’โ–‘โ–‘ โ–ˆโ–ˆโ–ˆโ–ˆโ–“โ–’โ–‘โ–‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–’ โ–’โ–’โ–“ โ–’ โ–‘โ–‘ โ–’โ–‘ โ–‘ โ–’ โ–‘ โ–‘ โ–’โ–‘โ–“ โ–‘โ–‘โ–‘ โ–’โ–‘ โ–‘โ–‘ โ–‘โ–’ โ–’ โ–‘ โ–’ โ–‘โ–‘ โ–’โ–“โ–’โ–‘ โ–‘ โ–‘โ–‘ โ–’โ–‘โ–’โ–‘โ–’โ–‘ โ–‘ โ–’โ–‘โ–’โ–‘โ–’โ–‘ โ–‘ โ–’โ–‘โ–“ โ–‘ โ–‘ โ–’ โ–’ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–’ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–’ โ–‘ โ–‘โ–’ โ–‘ โ–‘ โ–’ โ–’โ–‘ โ–‘ โ–’ โ–’โ–‘ โ–‘ โ–‘ โ–’ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘ โ–‘โ–‘ โ–‘ โ–‘ โ–‘ โ–’ โ–‘ โ–‘ โ–‘ โ–’ */ import "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/math/Math.sol"; import "./LPTokenWrapper.sol"; import "./interfaces/IDeflector.sol"; /** * @title DeflectPool * @author DEFLECT PROTOCOL * @dev This contract is a time-based yield farming pool with effective-staking multiplier mechanics. * * * * NOTE: A withdrawal fee of 1.5% is included which is sent to the treasury address. * * * */ contract DEFLCTROOT is LPTokenWrapper, OwnableUpgradeSafe { using SafeERC20 for IERC20; IERC20 public rewardToken; IDeflector deflector; uint256 public DURATION; uint256 public periodFinish; uint256 public lastUpdateTime; uint256 public rewardRate; uint256 public rewardPerTokenStored; uint256 public deployedTime; address public devFund; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; event RewardAdded(uint256 reward); event Withdrawn(address indexed user, uint256 amount); event Staked(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event Boost(address _token, uint256 level); constructor( uint256 _duration, address _stakingToken, address _rewardToken, address _deflector, address _treasury, address _devFund ) public LPTokenWrapper() { } function setNewTreasury(address _treasury) external onlyOwner { } function lastTimeRewardsActive() public view returns (uint256) { } /*ย @dev Returns the current rate of rewards per token (doh) */ function rewardPerToken() public view returns (uint256) { } /** @dev Returns the claimable tokens for user.*/ function earned(address account) public view returns (uint256) { } /** @dev Staking function which updates the user balances in the parent contract */ function stake(uint256 amount) public override { } /** @dev Withdraw function, this pool contains a tax which is defined in the constructor */ function withdraw(uint256 amount) public override { } /** @dev Adjust the bonus effective stakee for user and whole userbase */ function adjustEffectiveStake( address self, uint256 _totalMultiplier, bool _isWithdraw ) private { } // Ease-of-access function for user to remove assets from the pool. function exit() external { } // Sends out the reward tokens to the user. function getReward() public { } // Called to start the pool with the reward amount it should distribute // The reward period will be the duration of the pool. function notifyRewardAmount(uint256 reward) external onlyOwner { } // Notify a reward amount without updating time, function notifyRewardAmountWithoutUpdateTime(uint256 reward) external onlyOwner { } // Returns the users current multiplier level function getTotalLevel(address _user) external view returns (uint256) { } // Return the amount spent on multipliers, used for subtracting for future purchases. function getSpent(address _token, address _user) external view returns (uint256) { } // Calculate the cost for purchasing a boost. function calculateCost( address _user, address _token, uint256 _level ) public view returns (uint256) { } // Purchase a multiplier level, same level cannot be purchased twice. function purchase(address _token, uint256 _newLevel) external { // Must be a spendable token require(<FILL_ME>) // What's the last level for the user? s uint256 lastLevel = deflector.getLastTokenLevelForUser(address(this), msg.sender, _token); require(lastLevel < _newLevel, "Cannot downgrade level or same level"); // Get the subtracted cost for the new level. uint256 cost = calculateCost(msg.sender, _token, _newLevel); // Transfer the bonus cost into the treasury and dev fund. IERC20(_token).safeTransferFrom(msg.sender, devFund, cost.mul(25).div(100)); IERC20(_token).safeTransferFrom(msg.sender, treasury, cost.mul(75).div(100)); // Update balances and level in the multiplier contarct deflector.purchase(address(this), msg.sender, _token, _newLevel); // Adjust new level uint256 userTotalMultiplier = deflector.getTotalValueForUser(address(this), msg.sender); adjustEffectiveStake(msg.sender, userTotalMultiplier, false); emit Boost(_token, _newLevel); } // Returns the multiplier for user. function getTotalMultiplier(address _account) public view returns (uint256) { } // Ejects any remaining tokens from the pool. // Callable only after the pool has started and the pools reward distribution period has finished. function eject() external onlyOwner { } // Forcefully retire a pool // Only sets the period finish to 0 // This will prevent more rewards from being disbursed function kill() external onlyOwner { } function updateRewardPerTokenStored() internal { } function updateReward(address account) internal { } }
deflector.isSpendableTokenInContract(address(this),_token),"Not a spendable token"
13,309
deflector.isSpendableTokenInContract(address(this),_token)