comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"overminting:supply"
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { // are on the wl require(MerkleProof.verify(proof, _merkle_root_wl, keccak256(abi.encodePacked(msg.sender))), "u!WL"); // not minting too much require(quantity <= MAX_WL_MINTS_PER_WALLET, ">quantity"); // need to have enough ETH to mint require(quantity*MINT_PRICE_WL == msg.value, "$ETH<"); // per user check require((__n_wl_minted[msg.sender] + quantity) <= MAX_WL_MINTS_PER_WALLET, "overminting"); // global mint check require(<FILL_ME>) // free eligibility if ((__has_minted_free[msg.sender] == false) && ((__og_free_claimed + __wl_free_claimed + 1) <= MAX_TOTAL_FREE_TOKENS)) { require((__og_free_claimed + __wl_free_claimed + 1) <= MAX_TOTAL_FREE_TOKENS, "over free total."); unchecked{ __wl_free_claimed++; } __has_minted_free[msg.sender] = true; // refund one tokens value (bool sent, ) = payable(msg.sender).call{value: MINT_PRICE_WL}(""); require(sent, "!refund"); } // increment unchecked { // per user bought __n_wl_minted[msg.sender] = __n_wl_minted[msg.sender] + uint8(quantity); // global minted __total_wl_claimed = __total_wl_claimed + uint16(quantity); } _safeMint(msg.sender, quantity); } function mint_public(uint256 quantity) internal { } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
(__total_wl_claimed+quantity)<=MAX_WL_TOKENS,"overminting:supply"
381,321
(__total_wl_claimed+quantity)<=MAX_WL_TOKENS
"over free total."
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { // are on the wl require(MerkleProof.verify(proof, _merkle_root_wl, keccak256(abi.encodePacked(msg.sender))), "u!WL"); // not minting too much require(quantity <= MAX_WL_MINTS_PER_WALLET, ">quantity"); // need to have enough ETH to mint require(quantity*MINT_PRICE_WL == msg.value, "$ETH<"); // per user check require((__n_wl_minted[msg.sender] + quantity) <= MAX_WL_MINTS_PER_WALLET, "overminting"); // global mint check require((__total_wl_claimed + quantity) <= MAX_WL_TOKENS, "overminting:supply"); // free eligibility if ((__has_minted_free[msg.sender] == false) && ((__og_free_claimed + __wl_free_claimed + 1) <= MAX_TOTAL_FREE_TOKENS)) { require(<FILL_ME>) unchecked{ __wl_free_claimed++; } __has_minted_free[msg.sender] = true; // refund one tokens value (bool sent, ) = payable(msg.sender).call{value: MINT_PRICE_WL}(""); require(sent, "!refund"); } // increment unchecked { // per user bought __n_wl_minted[msg.sender] = __n_wl_minted[msg.sender] + uint8(quantity); // global minted __total_wl_claimed = __total_wl_claimed + uint16(quantity); } _safeMint(msg.sender, quantity); } function mint_public(uint256 quantity) internal { } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
(__og_free_claimed+__wl_free_claimed+1)<=MAX_TOTAL_FREE_TOKENS,"over free total."
381,321
(__og_free_claimed+__wl_free_claimed+1)<=MAX_TOTAL_FREE_TOKENS
"$ETH<"
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { } function mint_public(uint256 quantity) internal { // its the public mint require(<FILL_ME>) _safeMint(msg.sender, quantity); } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
quantity*MINT_PRICE_PUBLIC==msg.value,"$ETH<"
381,321
quantity*MINT_PRICE_PUBLIC==msg.value
">maxTokens"
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { } function mint_public(uint256 quantity) internal { } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { require(_halt_mint == false, "Halted"); require(quantity > 0, "q<0"); require(quantity < 10, "q>9"); require(<FILL_ME>) require(_mint_start != 0, "!r:E0"); require(block.timestamp >= _mint_start, "!r:E1"); // og mint // [T, T+Xmin) if ((block.timestamp >= _mint_start) && (block.timestamp < (_mint_start + OG_MINT_DURATION))) { require(proof.length > 0, "!p"); mint_og(quantity, proof); return; } // wl mint // [T+Xmin, T+Xmin+Ymin) if ((block.timestamp >= (_mint_start + OG_MINT_DURATION)) && (block.timestamp < (_mint_start + OG_MINT_DURATION + WL_MINT_DURATION))) { require(proof.length > 0, "!p"); mint_wl(quantity, proof); return; } // public mint // [T+Xmin+Ymin, \inf+) mint_public(quantity); } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
(totalSupply()+quantity)<=MAX_TOTAL_TOKENS,">maxTokens"
381,321
(totalSupply()+quantity)<=MAX_TOTAL_TOKENS
null
pragma solidity ^0.4.21; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original owner of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title 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) { } } /** * Utility library of inline functions on addresses */ library AddressUtils { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address to check * @return whether the target address is a contract */ function isContract(address addr) internal view returns (bool) { } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * Internal transfer, only can be called by this contract */ function _transfer(address _to, uint _value) internal { } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. */ contract StandardToken is ERC20, BasicToken { mapping(address => mapping(address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken, StandardToken, Ownable { using AddressUtils for address; event Burn(address indexed burner, uint256 value); event BurnTokens(address indexed tokenAddress, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { } function burnTokens(address _from) public onlyOwner { require(<FILL_ME>) uint256 tokenAmount = balances[_from]; _burn(_from, tokenAmount); emit BurnTokens(_from, tokenAmount); } function _burn(address _who, uint256 _value) internal { } } /** * @title Standard Burnable Token * @dev Adds burnFrom method to ERC20 implementations */ contract StandardBurnableToken is BurnableToken { /** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param _from address The address which you want to send tokens from * @param _value uint256 The amount of token to be burned */ function burnFrom(address _from, uint256 _value) public { } } contract SEMToken is StandardBurnableToken { string public constant name = "SEMToken"; string public constant symbol = "SEMT"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 2100000000 * (10 ** uint256(decimals)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ constructor() public { } }
_from.isContract()
381,465
_from.isContract()
"Either sale is currently active or fusion is inactive"
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract DizzyDragons is ERC721, ERC721Enumerable, ERC721Burnable, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public maxTokenSupply; uint256 public constant MAX_MINTS_PER_TXN = 15; uint256 public mintPrice = 25000000 gwei; // 0.025 ETH uint256 public fusionPrice = 25000000 gwei; // 0.025 ETH bool public saleIsActive = false; bool public fusionIsActive = false; string public baseURI; string public provenance; uint256 public startingIndexBlock; uint256 public startingIndex; address[7] private _shareholders; uint[7] private _shares; event DragonsFused(uint256 firstTokenId, uint256 secondTokenId, uint256 fusedDragonTokenId); event PaymentReleased(address to, uint256 amount); constructor(string memory name, string memory symbol, uint256 maxDragonSupply) ERC721(name, symbol) { } function setMaxTokenSupply(uint256 maxDragonSupply) public onlyOwner { } function setMintPrice(uint256 newPrice) public onlyOwner { } function setFusionPrice(uint256 newPrice) public onlyOwner { } function withdrawForGiveaway(uint256 amount, address payable to) public onlyOwner { } function withdraw(uint256 amount) public onlyOwner { } /* * Mint reserved NFTs for giveaways, devs, etc. */ function reserveMint(uint256 reservedAmount) public onlyOwner { } /* * Mint reserved NFTs for giveaways, devs, etc. */ function reserveMint(uint256 reservedAmount, address mintAddress) public onlyOwner { } /* * Pause sale if active, make active if paused. */ function flipSaleState() public onlyOwner { } /* * Pause fusion if active, make active if paused. */ function flipFusionState() public onlyOwner { } /* * Mint Dizzy Dragon NFTs, woo! */ function adoptDragons(uint256 numberOfTokens) public payable { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory newBaseURI) public onlyOwner { } /** * Set the starting index for the collection. */ function setStartingIndex() public onlyOwner { } /** * Set the starting index block for the collection. Usually, this will be set after the first sale mint. */ function emergencySetStartingIndexBlock() public onlyOwner { } /* * Set provenance once it's calculated. */ function setProvenanceHash(string memory provenanceHash) public onlyOwner { } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } function fuseDragons(uint256 firstTokenId, uint256 secondTokenId) public payable { require(<FILL_ME>) require(fusionPrice <= msg.value, "Ether value sent is not correct"); require(_isApprovedOrOwner(_msgSender(), firstTokenId) && _isApprovedOrOwner(_msgSender(), secondTokenId), "Caller is not owner nor approved"); // burn the 2 tokens _burn(firstTokenId); _burn(secondTokenId); // mint new token uint256 fusedDragonTokenId = _tokenIdCounter.current() + 1; _safeMint(msg.sender, fusedDragonTokenId); _tokenIdCounter.increment(); // fire event in logs emit DragonsFused(firstTokenId, secondTokenId, fusedDragonTokenId); } }
fusionIsActive&&!saleIsActive,"Either sale is currently active or fusion is inactive"
381,473
fusionIsActive&&!saleIsActive
'Not Time To Burn'
//SPDX-License-Identifier: MIT pragma solidity 0.8.4; import "./IERC20.sol"; import "./IKeys.sol"; /** Burns KEY Tokens Quarterly */ contract TokenBurner { // Last Burn Time uint256 lastBurnTime; // Data address public immutable token; uint256 public constant burnWaitTime = 26 * 10**5; uint256 public constant amount = 5 * 10**6 * 10**9; // events event Burned(uint256 numTokens); constructor( address _token ) { } // claim function burn() external { } function _burn() internal { // number of tokens locked uint256 tokensToBurn = IERC20(token).balanceOf(address(this)); // number of tokens to unlock require(tokensToBurn > 0, 'No Tokens To Burn'); require(<FILL_ME>) // amount to burn uint256 amountToBurn = amount > tokensToBurn ? tokensToBurn : amount; // update times lastBurnTime = block.number; // burn tokens IKeys(token).burnTokensIncludingDecimals(amountToBurn); emit Burned(amount); } receive() external payable { } function getTimeTillBurn() external view returns (uint256) { } }
lastBurnTime+burnWaitTime<=block.number,'Not Time To Burn'
381,513
lastBurnTime+burnWaitTime<=block.number
null
// SPDX-License-Identifier: MIT /** ________ __ __ ______ __ / |/ | / | / \ / | $$$$$$$$/_$$ |_ $$ |____ ______ ______ /$$$$$$ | ______ __ __ _______ ____$$ | $$ |__ / $$ | $$ \ / \ / \ $$ \__$$/ / \ / | / |/ \ / $$ | $$ | $$$$$$/ $$$$$$$ |/$$$$$$ |/$$$$$$ |$$ \ /$$$$$$ |$$ | $$ |$$$$$$$ |/$$$$$$$ | $$$$$/ $$ | __ $$ | $$ |$$ $$ |$$ | $$/ $$$$$$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ | $$ |_____ $$ |/ |$$ | $$ |$$$$$$$$/ $$ | / \__$$ |$$ \__$$ |$$ \__$$ |$$ | $$ |$$ \__$$ | $$ |$$ $$/ $$ | $$ |$$ |$$ | $$ $$/ $$ $$/ $$ $$/ $$ | $$ |$$ $$ | $$$$$$$$/ $$$$/ $$/ $$/ $$$$$$$/ $$/ $$$$$$/ $$$$$$/ $$$$$$/ $$/ $$/ $$$$$$$/ Each EtherSound is a set of 8 random C major notes ranging from C2 to B4. First 777 EtherSounds can be claimed if your Eth balance < 1 Eth and EtherSounds balance < 10 EtherSounds. Otherwhise you can still mint them. Mint price : 0.05 Eth Max mint : 10 EtherSounds Supply : 7777 EtherSounds */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract EtherSound is ERC721Enumerable, Ownable, ReentrancyGuard { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.05 ether; uint256 public maxSupply = 7777; uint256 public maxSupplyClaim = 777; uint256 public maxMintAmount = 10; constructor( string memory _name, string memory _symbol, string memory _initBaseURI ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function claim(uint256 _claimAmount) public nonReentrant { uint256 supply = totalSupply(); require(msg.sender.balance < 1 * 10**18); require(<FILL_ME>) require(_claimAmount > 0); require(_claimAmount <= maxMintAmount); require(supply + _claimAmount <= maxSupplyClaim); for (uint256 i = 1; i <= _claimAmount; i++) { _safeMint(msg.sender, supply + i); } } function mint(uint256 _mintAmount) public payable nonReentrant { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function PleaseReadTheCode() public payable{ } function withdraw() public payable onlyOwner { } }
balanceOf(msg.sender)+_claimAmount<=10
381,515
balanceOf(msg.sender)+_claimAmount<=10
null
// SPDX-License-Identifier: MIT /** ________ __ __ ______ __ / |/ | / | / \ / | $$$$$$$$/_$$ |_ $$ |____ ______ ______ /$$$$$$ | ______ __ __ _______ ____$$ | $$ |__ / $$ | $$ \ / \ / \ $$ \__$$/ / \ / | / |/ \ / $$ | $$ | $$$$$$/ $$$$$$$ |/$$$$$$ |/$$$$$$ |$$ \ /$$$$$$ |$$ | $$ |$$$$$$$ |/$$$$$$$ | $$$$$/ $$ | __ $$ | $$ |$$ $$ |$$ | $$/ $$$$$$ |$$ | $$ |$$ | $$ |$$ | $$ |$$ | $$ | $$ |_____ $$ |/ |$$ | $$ |$$$$$$$$/ $$ | / \__$$ |$$ \__$$ |$$ \__$$ |$$ | $$ |$$ \__$$ | $$ |$$ $$/ $$ | $$ |$$ |$$ | $$ $$/ $$ $$/ $$ $$/ $$ | $$ |$$ $$ | $$$$$$$$/ $$$$/ $$/ $$/ $$$$$$$/ $$/ $$$$$$/ $$$$$$/ $$$$$$/ $$/ $$/ $$$$$$$/ Each EtherSound is a set of 8 random C major notes ranging from C2 to B4. First 777 EtherSounds can be claimed if your Eth balance < 1 Eth and EtherSounds balance < 10 EtherSounds. Otherwhise you can still mint them. Mint price : 0.05 Eth Max mint : 10 EtherSounds Supply : 7777 EtherSounds */ pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract EtherSound is ERC721Enumerable, Ownable, ReentrancyGuard { using Strings for uint256; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.05 ether; uint256 public maxSupply = 7777; uint256 public maxSupplyClaim = 777; uint256 public maxMintAmount = 10; constructor( string memory _name, string memory _symbol, string memory _initBaseURI ) ERC721(_name, _symbol) { } function _baseURI() internal view virtual override returns (string memory) { } function claim(uint256 _claimAmount) public nonReentrant { uint256 supply = totalSupply(); require(msg.sender.balance < 1 * 10**18); require(balanceOf(msg.sender) + _claimAmount <= 10); require(_claimAmount > 0); require(_claimAmount <= maxMintAmount); require(<FILL_ME>) for (uint256 i = 1; i <= _claimAmount; i++) { _safeMint(msg.sender, supply + i); } } function mint(uint256 _mintAmount) public payable nonReentrant { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function PleaseReadTheCode() public payable{ } function withdraw() public payable onlyOwner { } }
supply+_claimAmount<=maxSupplyClaim
381,515
supply+_claimAmount<=maxSupplyClaim
"Invalid Balancer Pool"
///@author DeFiZap ///@notice this contract helps in investing in balancer pools through ETH or ERC20 tokens pragma solidity 0.5.12; interface IBFactory_Balancer_ZapIn_General_V1 { function isBPool(address b) external view returns (bool); } interface IBPool_Balancer_ZapIn_General_V1 { function joinswapExternAmountIn( address tokenIn, uint256 tokenAmountIn, uint256 minPoolAmountOut ) external payable returns (uint256 poolAmountOut); function isBound(address t) external view returns (bool); function getFinalTokens() external view returns (address[] memory tokens); function totalSupply() external view returns (uint256); function getDenormalizedWeight(address token) external view returns (uint256); function getTotalDenormalizedWeight() external view returns (uint256); function getSwapFee() external view returns (uint256); function calcPoolOutGivenSingleIn( uint256 tokenBalanceIn, uint256 tokenWeightIn, uint256 poolSupply, uint256 totalWeight, uint256 tokenAmountIn, uint256 swapFee ) external pure returns (uint256 poolAmountOut); function getBalance(address token) external view returns (uint256); } interface IuniswapFactory_Balancer_ZapIn_General_V1 { function getExchange(address token) external view returns (address exchange); } interface Iuniswap_Balancer_ZapIn_General_V1 { function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256 tokens_bought); // converting ERC20 to ERC20 and transfer function tokenToTokenSwapInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr ) external returns (uint256 tokens_bought); function getTokenToEthInputPrice(uint256 tokens_sold) external view returns (uint256 eth_bought); function getEthToTokenInputPrice(uint256 eth_sold) external view returns (uint256 tokens_bought); function balanceOf(address _owner) external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool); function transferFrom(address from, address to, uint256 tokens) external returns (bool success); } contract Balancer_ZapIn_General_V1 is ReentrancyGuard, Ownable { using SafeMath for uint256; using Address for address; bool private stopped = false; uint16 public goodwill; address public dzgoodwillAddress; IuniswapFactory_Balancer_ZapIn_General_V1 public UniSwapFactoryAddress = IuniswapFactory_Balancer_ZapIn_General_V1( 0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95 ); IBFactory_Balancer_ZapIn_General_V1 BalancerFactory = IBFactory_Balancer_ZapIn_General_V1( 0x9424B1412450D0f8Fc2255FAf6046b98213B76Bd ); event Zapin( address _toWhomToIssue, address _toBalancerPoolAddress, uint256 _OutgoingBPT ); constructor(uint16 _goodwill, address _dzgoodwillAddress) public { } // circuit breaker modifiers modifier stopInEmergency { } /** @notice This function is used to invest in given balancer pool through ETH/ERC20 Tokens @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ERC to invest @return success or failure */ function EasyZapIn( address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount ) public payable nonReentrant stopInEmergency returns (uint256 tokensBought) { require(<FILL_ME>) if (_FromTokenContractAddress == address(0)) { require(msg.value > 0, "ERR: No ETH sent"); address _ToTokenContractAddress = _getBestDeal( _ToBalancerPoolAddress, msg.value, _FromTokenContractAddress ); tokensBought = _performZapIn( msg.sender, _FromTokenContractAddress, _ToBalancerPoolAddress, msg.value, _ToTokenContractAddress ); return tokensBought; } require(_amount > 0, "ERR: No ERC sent"); require(msg.value == 0, "ERR: ETH sent with tokens"); //transfer tokens to contract require( IERC20(_FromTokenContractAddress).transferFrom( msg.sender, address(this), _amount ), "Error in transferring ERC: 1" ); address _ToTokenContractAddress = _getBestDeal( _ToBalancerPoolAddress, _amount, _FromTokenContractAddress ); tokensBought = _performZapIn( msg.sender, _FromTokenContractAddress, _ToBalancerPoolAddress, _amount, _ToTokenContractAddress ); } /** @notice This function is used to invest in given balancer pool through ETH/ERC20 Tokens with interface @param _toWhomToIssue The user address who want to invest @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ERC to invest @param _IntermediateToken The token for intermediate conversion before zapin @return The quantity of Balancer Pool tokens returned */ function ZapIn( address payable _toWhomToIssue, address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount, address _IntermediateToken ) public payable nonReentrant stopInEmergency returns (uint256 tokensBought) { } /** @notice This function internally called by ZapIn() and EasyZapIn() @param _toWhomToIssue The user address who want to invest @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ETH/ERC to invest @param _IntermediateToken The token for intermediate conversion before zapin @return The quantity of Balancer Pool tokens returned */ function _performZapIn( address _toWhomToIssue, address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount, address _IntermediateToken ) internal returns (uint256 tokensBought) { } /** @notice This function is used to buy tokens from eth @param _tokenContractAddress Token address which we want to buy @return The quantity of token bought */ function _eth2Token(address _tokenContractAddress) internal returns (uint256 tokenBought) { } /** @notice This function is used to calculate and transfer goodwill @param _tokenContractAddress Token in which goodwill is deducted @param tokens2Trade The total amount of tokens to be zapped in @return The quantity of goodwill deducted */ function _transferGoodwill( address _tokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 goodwillPortion) { } /** @notice This function is used to zapin to balancer pool @param _ToBalancerPoolAddress The address of balancer pool to zap in @param _FromTokenContractAddress The token used to zap in @param tokens2Trade The amount of tokens to invest @return The quantity of Balancer Pool tokens returned */ function _enter2Balancer( address _ToBalancerPoolAddress, address _FromTokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 poolTokensOut) { } /** @notice This function finds best token from the final tokens of balancer pool @param _ToBalancerPoolAddress The address of balancer pool to zap in @param _amount amount of eth/erc to invest @param _FromTokenContractAddress the token address which is used to invest @return The token address having max liquidity */ function _getBestDeal( address _ToBalancerPoolAddress, uint256 _amount, address _FromTokenContractAddress ) internal view returns (address _token) { } /** @notice Function gives the expected amount of pool tokens on investing @param _ToBalancerPoolAddress Address of balancer pool to zapin @param _IncomingERC The amount of ERC to invest @param _FromToken Address of token to zap in with @return Amount of BPT token */ function getToken2BPT( address _ToBalancerPoolAddress, uint256 _IncomingERC, address _FromToken ) internal view returns (uint256 tokensReturned) { } /** @notice This function is used to swap tokens @param _FromTokenContractAddress The token address to swap from @param _ToTokenContractAddress The token address to swap to @param tokens2Trade The amount of tokens to swap @return The quantity of tokens bought */ function _token2Token( address _FromTokenContractAddress, address _ToTokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 tokenBought) { } function set_new_goodwill(uint16 _new_goodwill) public onlyOwner { } function set_new_dzgoodwillAddress(address _new_dzgoodwillAddress) public onlyOwner { } function inCaseTokengetsStuck(IERC20 _TokenAddress) public onlyOwner { } // - to Pause the contract function toggleContractActive() public onlyOwner { } // - to withdraw any ETH balance sitting in the contract function withdraw() public onlyOwner { } // - to kill the contract function destruct() public onlyOwner { } function() external payable {} }
BalancerFactory.isBPool(_ToBalancerPoolAddress),"Invalid Balancer Pool"
381,536
BalancerFactory.isBPool(_ToBalancerPoolAddress)
"Error in transferring ERC: 1"
///@author DeFiZap ///@notice this contract helps in investing in balancer pools through ETH or ERC20 tokens pragma solidity 0.5.12; interface IBFactory_Balancer_ZapIn_General_V1 { function isBPool(address b) external view returns (bool); } interface IBPool_Balancer_ZapIn_General_V1 { function joinswapExternAmountIn( address tokenIn, uint256 tokenAmountIn, uint256 minPoolAmountOut ) external payable returns (uint256 poolAmountOut); function isBound(address t) external view returns (bool); function getFinalTokens() external view returns (address[] memory tokens); function totalSupply() external view returns (uint256); function getDenormalizedWeight(address token) external view returns (uint256); function getTotalDenormalizedWeight() external view returns (uint256); function getSwapFee() external view returns (uint256); function calcPoolOutGivenSingleIn( uint256 tokenBalanceIn, uint256 tokenWeightIn, uint256 poolSupply, uint256 totalWeight, uint256 tokenAmountIn, uint256 swapFee ) external pure returns (uint256 poolAmountOut); function getBalance(address token) external view returns (uint256); } interface IuniswapFactory_Balancer_ZapIn_General_V1 { function getExchange(address token) external view returns (address exchange); } interface Iuniswap_Balancer_ZapIn_General_V1 { function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256 tokens_bought); // converting ERC20 to ERC20 and transfer function tokenToTokenSwapInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr ) external returns (uint256 tokens_bought); function getTokenToEthInputPrice(uint256 tokens_sold) external view returns (uint256 eth_bought); function getEthToTokenInputPrice(uint256 eth_sold) external view returns (uint256 tokens_bought); function balanceOf(address _owner) external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool); function transferFrom(address from, address to, uint256 tokens) external returns (bool success); } contract Balancer_ZapIn_General_V1 is ReentrancyGuard, Ownable { using SafeMath for uint256; using Address for address; bool private stopped = false; uint16 public goodwill; address public dzgoodwillAddress; IuniswapFactory_Balancer_ZapIn_General_V1 public UniSwapFactoryAddress = IuniswapFactory_Balancer_ZapIn_General_V1( 0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95 ); IBFactory_Balancer_ZapIn_General_V1 BalancerFactory = IBFactory_Balancer_ZapIn_General_V1( 0x9424B1412450D0f8Fc2255FAf6046b98213B76Bd ); event Zapin( address _toWhomToIssue, address _toBalancerPoolAddress, uint256 _OutgoingBPT ); constructor(uint16 _goodwill, address _dzgoodwillAddress) public { } // circuit breaker modifiers modifier stopInEmergency { } /** @notice This function is used to invest in given balancer pool through ETH/ERC20 Tokens @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ERC to invest @return success or failure */ function EasyZapIn( address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount ) public payable nonReentrant stopInEmergency returns (uint256 tokensBought) { require( BalancerFactory.isBPool(_ToBalancerPoolAddress), "Invalid Balancer Pool" ); if (_FromTokenContractAddress == address(0)) { require(msg.value > 0, "ERR: No ETH sent"); address _ToTokenContractAddress = _getBestDeal( _ToBalancerPoolAddress, msg.value, _FromTokenContractAddress ); tokensBought = _performZapIn( msg.sender, _FromTokenContractAddress, _ToBalancerPoolAddress, msg.value, _ToTokenContractAddress ); return tokensBought; } require(_amount > 0, "ERR: No ERC sent"); require(msg.value == 0, "ERR: ETH sent with tokens"); //transfer tokens to contract require(<FILL_ME>) address _ToTokenContractAddress = _getBestDeal( _ToBalancerPoolAddress, _amount, _FromTokenContractAddress ); tokensBought = _performZapIn( msg.sender, _FromTokenContractAddress, _ToBalancerPoolAddress, _amount, _ToTokenContractAddress ); } /** @notice This function is used to invest in given balancer pool through ETH/ERC20 Tokens with interface @param _toWhomToIssue The user address who want to invest @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ERC to invest @param _IntermediateToken The token for intermediate conversion before zapin @return The quantity of Balancer Pool tokens returned */ function ZapIn( address payable _toWhomToIssue, address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount, address _IntermediateToken ) public payable nonReentrant stopInEmergency returns (uint256 tokensBought) { } /** @notice This function internally called by ZapIn() and EasyZapIn() @param _toWhomToIssue The user address who want to invest @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ETH/ERC to invest @param _IntermediateToken The token for intermediate conversion before zapin @return The quantity of Balancer Pool tokens returned */ function _performZapIn( address _toWhomToIssue, address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount, address _IntermediateToken ) internal returns (uint256 tokensBought) { } /** @notice This function is used to buy tokens from eth @param _tokenContractAddress Token address which we want to buy @return The quantity of token bought */ function _eth2Token(address _tokenContractAddress) internal returns (uint256 tokenBought) { } /** @notice This function is used to calculate and transfer goodwill @param _tokenContractAddress Token in which goodwill is deducted @param tokens2Trade The total amount of tokens to be zapped in @return The quantity of goodwill deducted */ function _transferGoodwill( address _tokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 goodwillPortion) { } /** @notice This function is used to zapin to balancer pool @param _ToBalancerPoolAddress The address of balancer pool to zap in @param _FromTokenContractAddress The token used to zap in @param tokens2Trade The amount of tokens to invest @return The quantity of Balancer Pool tokens returned */ function _enter2Balancer( address _ToBalancerPoolAddress, address _FromTokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 poolTokensOut) { } /** @notice This function finds best token from the final tokens of balancer pool @param _ToBalancerPoolAddress The address of balancer pool to zap in @param _amount amount of eth/erc to invest @param _FromTokenContractAddress the token address which is used to invest @return The token address having max liquidity */ function _getBestDeal( address _ToBalancerPoolAddress, uint256 _amount, address _FromTokenContractAddress ) internal view returns (address _token) { } /** @notice Function gives the expected amount of pool tokens on investing @param _ToBalancerPoolAddress Address of balancer pool to zapin @param _IncomingERC The amount of ERC to invest @param _FromToken Address of token to zap in with @return Amount of BPT token */ function getToken2BPT( address _ToBalancerPoolAddress, uint256 _IncomingERC, address _FromToken ) internal view returns (uint256 tokensReturned) { } /** @notice This function is used to swap tokens @param _FromTokenContractAddress The token address to swap from @param _ToTokenContractAddress The token address to swap to @param tokens2Trade The amount of tokens to swap @return The quantity of tokens bought */ function _token2Token( address _FromTokenContractAddress, address _ToTokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 tokenBought) { } function set_new_goodwill(uint16 _new_goodwill) public onlyOwner { } function set_new_dzgoodwillAddress(address _new_dzgoodwillAddress) public onlyOwner { } function inCaseTokengetsStuck(IERC20 _TokenAddress) public onlyOwner { } // - to Pause the contract function toggleContractActive() public onlyOwner { } // - to withdraw any ETH balance sitting in the contract function withdraw() public onlyOwner { } // - to kill the contract function destruct() public onlyOwner { } function() external payable {} }
IERC20(_FromTokenContractAddress).transferFrom(msg.sender,address(this),_amount),"Error in transferring ERC: 1"
381,536
IERC20(_FromTokenContractAddress).transferFrom(msg.sender,address(this),_amount)
"Error in transferring ERC: 2"
///@author DeFiZap ///@notice this contract helps in investing in balancer pools through ETH or ERC20 tokens pragma solidity 0.5.12; interface IBFactory_Balancer_ZapIn_General_V1 { function isBPool(address b) external view returns (bool); } interface IBPool_Balancer_ZapIn_General_V1 { function joinswapExternAmountIn( address tokenIn, uint256 tokenAmountIn, uint256 minPoolAmountOut ) external payable returns (uint256 poolAmountOut); function isBound(address t) external view returns (bool); function getFinalTokens() external view returns (address[] memory tokens); function totalSupply() external view returns (uint256); function getDenormalizedWeight(address token) external view returns (uint256); function getTotalDenormalizedWeight() external view returns (uint256); function getSwapFee() external view returns (uint256); function calcPoolOutGivenSingleIn( uint256 tokenBalanceIn, uint256 tokenWeightIn, uint256 poolSupply, uint256 totalWeight, uint256 tokenAmountIn, uint256 swapFee ) external pure returns (uint256 poolAmountOut); function getBalance(address token) external view returns (uint256); } interface IuniswapFactory_Balancer_ZapIn_General_V1 { function getExchange(address token) external view returns (address exchange); } interface Iuniswap_Balancer_ZapIn_General_V1 { function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256 tokens_bought); // converting ERC20 to ERC20 and transfer function tokenToTokenSwapInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr ) external returns (uint256 tokens_bought); function getTokenToEthInputPrice(uint256 tokens_sold) external view returns (uint256 eth_bought); function getEthToTokenInputPrice(uint256 eth_sold) external view returns (uint256 tokens_bought); function balanceOf(address _owner) external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool); function transferFrom(address from, address to, uint256 tokens) external returns (bool success); } contract Balancer_ZapIn_General_V1 is ReentrancyGuard, Ownable { using SafeMath for uint256; using Address for address; bool private stopped = false; uint16 public goodwill; address public dzgoodwillAddress; IuniswapFactory_Balancer_ZapIn_General_V1 public UniSwapFactoryAddress = IuniswapFactory_Balancer_ZapIn_General_V1( 0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95 ); IBFactory_Balancer_ZapIn_General_V1 BalancerFactory = IBFactory_Balancer_ZapIn_General_V1( 0x9424B1412450D0f8Fc2255FAf6046b98213B76Bd ); event Zapin( address _toWhomToIssue, address _toBalancerPoolAddress, uint256 _OutgoingBPT ); constructor(uint16 _goodwill, address _dzgoodwillAddress) public { } // circuit breaker modifiers modifier stopInEmergency { } /** @notice This function is used to invest in given balancer pool through ETH/ERC20 Tokens @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ERC to invest @return success or failure */ function EasyZapIn( address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount ) public payable nonReentrant stopInEmergency returns (uint256 tokensBought) { } /** @notice This function is used to invest in given balancer pool through ETH/ERC20 Tokens with interface @param _toWhomToIssue The user address who want to invest @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ERC to invest @param _IntermediateToken The token for intermediate conversion before zapin @return The quantity of Balancer Pool tokens returned */ function ZapIn( address payable _toWhomToIssue, address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount, address _IntermediateToken ) public payable nonReentrant stopInEmergency returns (uint256 tokensBought) { if (_FromTokenContractAddress == address(0)) { require(msg.value > 0, "ERR: No ETH sent"); tokensBought = _performZapIn( _toWhomToIssue, _FromTokenContractAddress, _ToBalancerPoolAddress, msg.value, _IntermediateToken ); return tokensBought; } require(_amount > 0, "ERR: No ERC sent"); require(msg.value == 0, "ERR: ETH sent with tokens"); //transfer tokens to contract require(<FILL_ME>) tokensBought = _performZapIn( _toWhomToIssue, _FromTokenContractAddress, _ToBalancerPoolAddress, _amount, _IntermediateToken ); } /** @notice This function internally called by ZapIn() and EasyZapIn() @param _toWhomToIssue The user address who want to invest @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ETH/ERC to invest @param _IntermediateToken The token for intermediate conversion before zapin @return The quantity of Balancer Pool tokens returned */ function _performZapIn( address _toWhomToIssue, address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount, address _IntermediateToken ) internal returns (uint256 tokensBought) { } /** @notice This function is used to buy tokens from eth @param _tokenContractAddress Token address which we want to buy @return The quantity of token bought */ function _eth2Token(address _tokenContractAddress) internal returns (uint256 tokenBought) { } /** @notice This function is used to calculate and transfer goodwill @param _tokenContractAddress Token in which goodwill is deducted @param tokens2Trade The total amount of tokens to be zapped in @return The quantity of goodwill deducted */ function _transferGoodwill( address _tokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 goodwillPortion) { } /** @notice This function is used to zapin to balancer pool @param _ToBalancerPoolAddress The address of balancer pool to zap in @param _FromTokenContractAddress The token used to zap in @param tokens2Trade The amount of tokens to invest @return The quantity of Balancer Pool tokens returned */ function _enter2Balancer( address _ToBalancerPoolAddress, address _FromTokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 poolTokensOut) { } /** @notice This function finds best token from the final tokens of balancer pool @param _ToBalancerPoolAddress The address of balancer pool to zap in @param _amount amount of eth/erc to invest @param _FromTokenContractAddress the token address which is used to invest @return The token address having max liquidity */ function _getBestDeal( address _ToBalancerPoolAddress, uint256 _amount, address _FromTokenContractAddress ) internal view returns (address _token) { } /** @notice Function gives the expected amount of pool tokens on investing @param _ToBalancerPoolAddress Address of balancer pool to zapin @param _IncomingERC The amount of ERC to invest @param _FromToken Address of token to zap in with @return Amount of BPT token */ function getToken2BPT( address _ToBalancerPoolAddress, uint256 _IncomingERC, address _FromToken ) internal view returns (uint256 tokensReturned) { } /** @notice This function is used to swap tokens @param _FromTokenContractAddress The token address to swap from @param _ToTokenContractAddress The token address to swap to @param tokens2Trade The amount of tokens to swap @return The quantity of tokens bought */ function _token2Token( address _FromTokenContractAddress, address _ToTokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 tokenBought) { } function set_new_goodwill(uint16 _new_goodwill) public onlyOwner { } function set_new_dzgoodwillAddress(address _new_dzgoodwillAddress) public onlyOwner { } function inCaseTokengetsStuck(IERC20 _TokenAddress) public onlyOwner { } // - to Pause the contract function toggleContractActive() public onlyOwner { } // - to withdraw any ETH balance sitting in the contract function withdraw() public onlyOwner { } // - to kill the contract function destruct() public onlyOwner { } function() external payable {} }
IERC20(_FromTokenContractAddress).transferFrom(_toWhomToIssue,address(this),_amount),"Error in transferring ERC: 2"
381,536
IERC20(_FromTokenContractAddress).transferFrom(_toWhomToIssue,address(this),_amount)
"Error in transferring BPT:1"
///@author DeFiZap ///@notice this contract helps in investing in balancer pools through ETH or ERC20 tokens pragma solidity 0.5.12; interface IBFactory_Balancer_ZapIn_General_V1 { function isBPool(address b) external view returns (bool); } interface IBPool_Balancer_ZapIn_General_V1 { function joinswapExternAmountIn( address tokenIn, uint256 tokenAmountIn, uint256 minPoolAmountOut ) external payable returns (uint256 poolAmountOut); function isBound(address t) external view returns (bool); function getFinalTokens() external view returns (address[] memory tokens); function totalSupply() external view returns (uint256); function getDenormalizedWeight(address token) external view returns (uint256); function getTotalDenormalizedWeight() external view returns (uint256); function getSwapFee() external view returns (uint256); function calcPoolOutGivenSingleIn( uint256 tokenBalanceIn, uint256 tokenWeightIn, uint256 poolSupply, uint256 totalWeight, uint256 tokenAmountIn, uint256 swapFee ) external pure returns (uint256 poolAmountOut); function getBalance(address token) external view returns (uint256); } interface IuniswapFactory_Balancer_ZapIn_General_V1 { function getExchange(address token) external view returns (address exchange); } interface Iuniswap_Balancer_ZapIn_General_V1 { function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256 tokens_bought); // converting ERC20 to ERC20 and transfer function tokenToTokenSwapInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr ) external returns (uint256 tokens_bought); function getTokenToEthInputPrice(uint256 tokens_sold) external view returns (uint256 eth_bought); function getEthToTokenInputPrice(uint256 eth_sold) external view returns (uint256 tokens_bought); function balanceOf(address _owner) external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool); function transferFrom(address from, address to, uint256 tokens) external returns (bool success); } contract Balancer_ZapIn_General_V1 is ReentrancyGuard, Ownable { using SafeMath for uint256; using Address for address; bool private stopped = false; uint16 public goodwill; address public dzgoodwillAddress; IuniswapFactory_Balancer_ZapIn_General_V1 public UniSwapFactoryAddress = IuniswapFactory_Balancer_ZapIn_General_V1( 0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95 ); IBFactory_Balancer_ZapIn_General_V1 BalancerFactory = IBFactory_Balancer_ZapIn_General_V1( 0x9424B1412450D0f8Fc2255FAf6046b98213B76Bd ); event Zapin( address _toWhomToIssue, address _toBalancerPoolAddress, uint256 _OutgoingBPT ); constructor(uint16 _goodwill, address _dzgoodwillAddress) public { } // circuit breaker modifiers modifier stopInEmergency { } /** @notice This function is used to invest in given balancer pool through ETH/ERC20 Tokens @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ERC to invest @return success or failure */ function EasyZapIn( address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount ) public payable nonReentrant stopInEmergency returns (uint256 tokensBought) { } /** @notice This function is used to invest in given balancer pool through ETH/ERC20 Tokens with interface @param _toWhomToIssue The user address who want to invest @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ERC to invest @param _IntermediateToken The token for intermediate conversion before zapin @return The quantity of Balancer Pool tokens returned */ function ZapIn( address payable _toWhomToIssue, address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount, address _IntermediateToken ) public payable nonReentrant stopInEmergency returns (uint256 tokensBought) { } /** @notice This function internally called by ZapIn() and EasyZapIn() @param _toWhomToIssue The user address who want to invest @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ETH/ERC to invest @param _IntermediateToken The token for intermediate conversion before zapin @return The quantity of Balancer Pool tokens returned */ function _performZapIn( address _toWhomToIssue, address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount, address _IntermediateToken ) internal returns (uint256 tokensBought) { } /** @notice This function is used to buy tokens from eth @param _tokenContractAddress Token address which we want to buy @return The quantity of token bought */ function _eth2Token(address _tokenContractAddress) internal returns (uint256 tokenBought) { } /** @notice This function is used to calculate and transfer goodwill @param _tokenContractAddress Token in which goodwill is deducted @param tokens2Trade The total amount of tokens to be zapped in @return The quantity of goodwill deducted */ function _transferGoodwill( address _tokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 goodwillPortion) { goodwillPortion = SafeMath.div( SafeMath.mul(tokens2Trade, goodwill), 10000 ); if (goodwillPortion == 0) { return 0; } require(<FILL_ME>) } /** @notice This function is used to zapin to balancer pool @param _ToBalancerPoolAddress The address of balancer pool to zap in @param _FromTokenContractAddress The token used to zap in @param tokens2Trade The amount of tokens to invest @return The quantity of Balancer Pool tokens returned */ function _enter2Balancer( address _ToBalancerPoolAddress, address _FromTokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 poolTokensOut) { } /** @notice This function finds best token from the final tokens of balancer pool @param _ToBalancerPoolAddress The address of balancer pool to zap in @param _amount amount of eth/erc to invest @param _FromTokenContractAddress the token address which is used to invest @return The token address having max liquidity */ function _getBestDeal( address _ToBalancerPoolAddress, uint256 _amount, address _FromTokenContractAddress ) internal view returns (address _token) { } /** @notice Function gives the expected amount of pool tokens on investing @param _ToBalancerPoolAddress Address of balancer pool to zapin @param _IncomingERC The amount of ERC to invest @param _FromToken Address of token to zap in with @return Amount of BPT token */ function getToken2BPT( address _ToBalancerPoolAddress, uint256 _IncomingERC, address _FromToken ) internal view returns (uint256 tokensReturned) { } /** @notice This function is used to swap tokens @param _FromTokenContractAddress The token address to swap from @param _ToTokenContractAddress The token address to swap to @param tokens2Trade The amount of tokens to swap @return The quantity of tokens bought */ function _token2Token( address _FromTokenContractAddress, address _ToTokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 tokenBought) { } function set_new_goodwill(uint16 _new_goodwill) public onlyOwner { } function set_new_dzgoodwillAddress(address _new_dzgoodwillAddress) public onlyOwner { } function inCaseTokengetsStuck(IERC20 _TokenAddress) public onlyOwner { } // - to Pause the contract function toggleContractActive() public onlyOwner { } // - to withdraw any ETH balance sitting in the contract function withdraw() public onlyOwner { } // - to kill the contract function destruct() public onlyOwner { } function() external payable {} }
IERC20(_tokenContractAddress).transfer(dzgoodwillAddress,goodwillPortion),"Error in transferring BPT:1"
381,536
IERC20(_tokenContractAddress).transfer(dzgoodwillAddress,goodwillPortion)
"Token not bound"
///@author DeFiZap ///@notice this contract helps in investing in balancer pools through ETH or ERC20 tokens pragma solidity 0.5.12; interface IBFactory_Balancer_ZapIn_General_V1 { function isBPool(address b) external view returns (bool); } interface IBPool_Balancer_ZapIn_General_V1 { function joinswapExternAmountIn( address tokenIn, uint256 tokenAmountIn, uint256 minPoolAmountOut ) external payable returns (uint256 poolAmountOut); function isBound(address t) external view returns (bool); function getFinalTokens() external view returns (address[] memory tokens); function totalSupply() external view returns (uint256); function getDenormalizedWeight(address token) external view returns (uint256); function getTotalDenormalizedWeight() external view returns (uint256); function getSwapFee() external view returns (uint256); function calcPoolOutGivenSingleIn( uint256 tokenBalanceIn, uint256 tokenWeightIn, uint256 poolSupply, uint256 totalWeight, uint256 tokenAmountIn, uint256 swapFee ) external pure returns (uint256 poolAmountOut); function getBalance(address token) external view returns (uint256); } interface IuniswapFactory_Balancer_ZapIn_General_V1 { function getExchange(address token) external view returns (address exchange); } interface Iuniswap_Balancer_ZapIn_General_V1 { function ethToTokenSwapInput(uint256 min_tokens, uint256 deadline) external payable returns (uint256 tokens_bought); // converting ERC20 to ERC20 and transfer function tokenToTokenSwapInput( uint256 tokens_sold, uint256 min_tokens_bought, uint256 min_eth_bought, uint256 deadline, address token_addr ) external returns (uint256 tokens_bought); function getTokenToEthInputPrice(uint256 tokens_sold) external view returns (uint256 eth_bought); function getEthToTokenInputPrice(uint256 eth_sold) external view returns (uint256 tokens_bought); function balanceOf(address _owner) external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool); function transferFrom(address from, address to, uint256 tokens) external returns (bool success); } contract Balancer_ZapIn_General_V1 is ReentrancyGuard, Ownable { using SafeMath for uint256; using Address for address; bool private stopped = false; uint16 public goodwill; address public dzgoodwillAddress; IuniswapFactory_Balancer_ZapIn_General_V1 public UniSwapFactoryAddress = IuniswapFactory_Balancer_ZapIn_General_V1( 0xc0a47dFe034B400B47bDaD5FecDa2621de6c4d95 ); IBFactory_Balancer_ZapIn_General_V1 BalancerFactory = IBFactory_Balancer_ZapIn_General_V1( 0x9424B1412450D0f8Fc2255FAf6046b98213B76Bd ); event Zapin( address _toWhomToIssue, address _toBalancerPoolAddress, uint256 _OutgoingBPT ); constructor(uint16 _goodwill, address _dzgoodwillAddress) public { } // circuit breaker modifiers modifier stopInEmergency { } /** @notice This function is used to invest in given balancer pool through ETH/ERC20 Tokens @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ERC to invest @return success or failure */ function EasyZapIn( address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount ) public payable nonReentrant stopInEmergency returns (uint256 tokensBought) { } /** @notice This function is used to invest in given balancer pool through ETH/ERC20 Tokens with interface @param _toWhomToIssue The user address who want to invest @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ERC to invest @param _IntermediateToken The token for intermediate conversion before zapin @return The quantity of Balancer Pool tokens returned */ function ZapIn( address payable _toWhomToIssue, address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount, address _IntermediateToken ) public payable nonReentrant stopInEmergency returns (uint256 tokensBought) { } /** @notice This function internally called by ZapIn() and EasyZapIn() @param _toWhomToIssue The user address who want to invest @param _FromTokenContractAddress The token used for investment (address(0x00) if ether) @param _ToBalancerPoolAddress The address of balancer pool to zapin @param _amount The amount of ETH/ERC to invest @param _IntermediateToken The token for intermediate conversion before zapin @return The quantity of Balancer Pool tokens returned */ function _performZapIn( address _toWhomToIssue, address _FromTokenContractAddress, address _ToBalancerPoolAddress, uint256 _amount, address _IntermediateToken ) internal returns (uint256 tokensBought) { } /** @notice This function is used to buy tokens from eth @param _tokenContractAddress Token address which we want to buy @return The quantity of token bought */ function _eth2Token(address _tokenContractAddress) internal returns (uint256 tokenBought) { } /** @notice This function is used to calculate and transfer goodwill @param _tokenContractAddress Token in which goodwill is deducted @param tokens2Trade The total amount of tokens to be zapped in @return The quantity of goodwill deducted */ function _transferGoodwill( address _tokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 goodwillPortion) { } /** @notice This function is used to zapin to balancer pool @param _ToBalancerPoolAddress The address of balancer pool to zap in @param _FromTokenContractAddress The token used to zap in @param tokens2Trade The amount of tokens to invest @return The quantity of Balancer Pool tokens returned */ function _enter2Balancer( address _ToBalancerPoolAddress, address _FromTokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 poolTokensOut) { require(<FILL_ME>) uint256 allowance = IERC20(_FromTokenContractAddress).allowance( address(this), _ToBalancerPoolAddress ); if (allowance < tokens2Trade) { IERC20(_FromTokenContractAddress).approve( _ToBalancerPoolAddress, uint256(-1) ); } poolTokensOut = IBPool_Balancer_ZapIn_General_V1(_ToBalancerPoolAddress) .joinswapExternAmountIn(_FromTokenContractAddress, tokens2Trade, 1); require(poolTokensOut > 0, "Error in entering balancer pool"); } /** @notice This function finds best token from the final tokens of balancer pool @param _ToBalancerPoolAddress The address of balancer pool to zap in @param _amount amount of eth/erc to invest @param _FromTokenContractAddress the token address which is used to invest @return The token address having max liquidity */ function _getBestDeal( address _ToBalancerPoolAddress, uint256 _amount, address _FromTokenContractAddress ) internal view returns (address _token) { } /** @notice Function gives the expected amount of pool tokens on investing @param _ToBalancerPoolAddress Address of balancer pool to zapin @param _IncomingERC The amount of ERC to invest @param _FromToken Address of token to zap in with @return Amount of BPT token */ function getToken2BPT( address _ToBalancerPoolAddress, uint256 _IncomingERC, address _FromToken ) internal view returns (uint256 tokensReturned) { } /** @notice This function is used to swap tokens @param _FromTokenContractAddress The token address to swap from @param _ToTokenContractAddress The token address to swap to @param tokens2Trade The amount of tokens to swap @return The quantity of tokens bought */ function _token2Token( address _FromTokenContractAddress, address _ToTokenContractAddress, uint256 tokens2Trade ) internal returns (uint256 tokenBought) { } function set_new_goodwill(uint16 _new_goodwill) public onlyOwner { } function set_new_dzgoodwillAddress(address _new_dzgoodwillAddress) public onlyOwner { } function inCaseTokengetsStuck(IERC20 _TokenAddress) public onlyOwner { } // - to Pause the contract function toggleContractActive() public onlyOwner { } // - to withdraw any ETH balance sitting in the contract function withdraw() public onlyOwner { } // - to kill the contract function destruct() public onlyOwner { } function() external payable {} }
IBPool_Balancer_ZapIn_General_V1(_ToBalancerPoolAddress).isBound(_FromTokenContractAddress),"Token not bound"
381,536
IBPool_Balancer_ZapIn_General_V1(_ToBalancerPoolAddress).isBound(_FromTokenContractAddress)
"Permission being set must be for a valid method signature"
pragma solidity ^0.4.24; /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function () payable external { } /** * @return The Address of the implementation. */ function _implementation() internal view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { } } /** * Utility library of inline functions on addresses */ library AddressUtils { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param addr address to check * @return whether the target address is a contract */ function isContract(address addr) internal view returns (bool) { } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "org.zeppelinos.proxy.implementation", and is * validated in the constructor. */ bytes32 private constant IMPLEMENTATION_SLOT = 0x7050c9e0f4ca769c69bd3a8ef740bc37934f8e2c036e5a723fd8ee048ed3f8c3; /** * @dev Contract constructor. * @param _implementation Address of the initial implementation. */ constructor(address _implementation) public { } /** * @dev Returns the current implementation. * @return Address of the current implementation */ function _implementation() internal view returns (address impl) { } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) private { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". This adds two-phase * ownership control to OpenZeppelin's Ownable class. In this model, the original owner * designates a new owner but does not actually transfer ownership. The new owner then accepts * ownership and completes the transfer. */ contract Ownable { address public owner; address public pendingOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyPendingOwner() { } /** * @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 pendingOwner address to finalize the transfer. */ function claimOwnership() onlyPendingOwner public { } } /** * * @dev Stores permissions and validators and provides setter and getter methods. * Permissions determine which methods users have access to call. Validators * are able to mutate permissions at the Regulator level. * */ contract RegulatorStorage is Ownable { /** Structs */ /* Contains metadata about a permission to execute a particular method signature. */ struct Permission { string name; // A one-word description for the permission. e.g. "canMint" string description; // A longer description for the permission. e.g. "Allows user to mint tokens." string contract_name; // e.g. "PermissionedToken" bool active; // Permissions can be turned on or off by regulator } /** Constants: stores method signatures. These are potential permissions that a user can have, and each permission gives the user the ability to call the associated PermissionedToken method signature */ bytes4 public constant MINT_SIG = bytes4(keccak256("mint(address,uint256)")); bytes4 public constant MINT_CUSD_SIG = bytes4(keccak256("mintCUSD(address,uint256)")); bytes4 public constant DESTROY_BLACKLISTED_TOKENS_SIG = bytes4(keccak256("destroyBlacklistedTokens(address,uint256)")); bytes4 public constant APPROVE_BLACKLISTED_ADDRESS_SPENDER_SIG = bytes4(keccak256("approveBlacklistedAddressSpender(address)")); bytes4 public constant BLACKLISTED_SIG = bytes4(keccak256("blacklisted()")); /** Mappings */ /* each method signature maps to a Permission */ mapping (bytes4 => Permission) public permissions; /* list of validators, either active or inactive */ mapping (address => bool) public validators; /* each user can be given access to a given method signature */ mapping (address => mapping (bytes4 => bool)) public userPermissions; /** Events */ event PermissionAdded(bytes4 methodsignature); event PermissionRemoved(bytes4 methodsignature); event ValidatorAdded(address indexed validator); event ValidatorRemoved(address indexed validator); /** Modifiers */ /** * @notice Throws if called by any account that does not have access to set attributes */ modifier onlyValidator() { } /** * @notice Sets a permission within the list of permissions. * @param _methodsignature Signature of the method that this permission controls. * @param _permissionName A "slug" name for this permission (e.g. "canMint"). * @param _permissionDescription A lengthier description for this permission (e.g. "Allows user to mint tokens"). * @param _contractName Name of the contract that the method belongs to. */ function addPermission( bytes4 _methodsignature, string _permissionName, string _permissionDescription, string _contractName) public onlyValidator { } /** * @notice Removes a permission the list of permissions. * @param _methodsignature Signature of the method that this permission controls. */ function removePermission(bytes4 _methodsignature) public onlyValidator { } /** * @notice Sets a permission in the list of permissions that a user has. * @param _methodsignature Signature of the method that this permission controls. */ function setUserPermission(address _who, bytes4 _methodsignature) public onlyValidator { require(<FILL_ME>) userPermissions[_who][_methodsignature] = true; } /** * @notice Removes a permission from the list of permissions that a user has. * @param _methodsignature Signature of the method that this permission controls. */ function removeUserPermission(address _who, bytes4 _methodsignature) public onlyValidator { } /** * @notice add a Validator * @param _validator Address of validator to add */ function addValidator(address _validator) public onlyOwner { } /** * @notice remove a Validator * @param _validator Address of validator to remove */ function removeValidator(address _validator) public onlyOwner { } /** * @notice does validator exist? * @return true if yes, false if no **/ function isValidator(address _validator) public view returns (bool) { } /** * @notice does permission exist? * @return true if yes, false if no **/ function isPermission(bytes4 _methodsignature) public view returns (bool) { } /** * @notice get Permission structure * @param _methodsignature request to retrieve the Permission struct for this methodsignature * @return Permission **/ function getPermission(bytes4 _methodsignature) public view returns (string name, string description, string contract_name, bool active) { } /** * @notice does permission exist? * @return true if yes, false if no **/ function hasUserPermission(address _who, bytes4 _methodsignature) public view returns (bool) { } } /** * @title RegulatorProxy * @dev A RegulatorProxy is a proxy contract that acts identically to a Regulator from the * user's point of view. A proxy can change its data storage locations and can also * change its implementation contract location. A call to RegulatorProxy delegates the function call * to the latest implementation contract's version of the function and the proxy then * calls that function in the context of the proxy's data storage * */ contract RegulatorProxy is UpgradeabilityProxy, RegulatorStorage { /** * @dev CONSTRUCTOR * @param _implementation the contract who's logic the proxy will initially delegate functionality to **/ constructor(address _implementation) public UpgradeabilityProxy(_implementation) {} /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) public onlyOwner { } /** * @return The address of the implementation. */ function implementation() public view returns (address) { } }
permissions[_methodsignature].active,"Permission being set must be for a valid method signature"
381,807
permissions[_methodsignature].active
null
pragma solidity ^0.4.8; contract AppCoins { mapping (address => mapping (address => uint256)) public allowance; function balanceOf (address _owner) public constant returns (uint256); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (uint); } /** * The Advertisement contract collects campaigns registered by developers * and executes payments to users using campaign registered applications * after proof of Attention. */ contract Advertisement { struct Filters { string countries; string packageName; uint[] vercodes; } struct ValidationRules { bool vercode; bool ipValidation; bool country; uint constipDailyConversions; uint walletDailyConversions; } struct Campaign { bytes32 bidId; uint price; uint budget; uint startDate; uint endDate; string ipValidator; bool valid; address owner; Filters filters; } ValidationRules public rules; bytes32[] bidIdList; mapping (bytes32 => Campaign) campaigns; mapping (bytes => bytes32[]) campaignsByCountry; AppCoins appc; bytes2[] countryList; address public owner; mapping (address => mapping (bytes32 => bool)) userAttributions; // This notifies clients about a newly created campaign event CampaignCreated(bytes32 bidId, string packageName, string countries, uint[] vercodes, uint price, uint budget, uint startDate, uint endDate); event PoARegistered(bytes32 bidId, string packageName, uint[] timestampList,uint[] nonceList); /** * Constructor function * * Initializes contract with default validation rules */ function Advertisement () public { } /** * Creates a campaign for a certain package name with * a defined price and budget and emits a CampaignCreated event */ function createCampaign (string packageName, string countries, uint[] vercodes, uint price, uint budget, uint startDate, uint endDate) external { Campaign memory newCampaign; newCampaign.filters.packageName = packageName; newCampaign.filters.countries = countries; newCampaign.filters.vercodes = vercodes; newCampaign.price = price; newCampaign.startDate = startDate; newCampaign.endDate = endDate; //Transfers the budget to contract address require(<FILL_ME>) appc.transferFrom(msg.sender, address(this), budget); newCampaign.budget = budget; newCampaign.owner = msg.sender; newCampaign.valid = true; newCampaign.bidId = uintToBytes(bidIdList.length); addCampaign(newCampaign); CampaignCreated( newCampaign.bidId, packageName, countries, vercodes, price, budget, startDate, endDate); } function addCampaign(Campaign campaign) internal { } function addCampaignToCountryMap (Campaign newCampaign,bytes country) internal { } function registerPoA (string packageName, bytes32 bidId, uint[] timestampList, uint[] nonces, address appstore, address oem) external { } function cancelCampaign (bytes32 bidId) external { } function setBudgetOfCampaign (bytes32 bidId, uint budget) internal { } function setCampaignValidity (bytes32 bidId, bool val) internal { } function getCampaignValidity(bytes32 bidId) public view returns(bool){ } function getCountryList () public view returns(bytes2[]) { } function getCampaignsByCountry(string country) public view returns (bytes32[]){ } function getTotalCampaignsByCountry (string country) public view returns (uint){ } function getPackageNameOfCampaign (bytes32 bidId) public view returns(string) { } function getCountriesOfCampaign (bytes32 bidId) public view returns(string){ } function getVercodesOfCampaign (bytes32 bidId) public view returns(uint[]) { } function getPriceOfCampaign (bytes32 bidId) public view returns(uint) { } function getStartDateOfCampaign (bytes32 bidId) public view returns(uint) { } function getEndDateOfCampaign (bytes32 bidId) public view returns(uint) { } function getBudgetOfCampaign (bytes32 bidId) public view returns(uint) { } function getOwnerOfCampaign (bytes32 bidId) public view returns(address) { } function getBidIdList () public view returns(bytes32[]) { } function payFromCampaign (bytes32 bidId, address appstore, address oem) internal{ } function division(uint numerator, uint denominator) public constant returns (uint) { } function uintToBytes (uint256 i) constant returns(bytes32 b) { } }
appc.allowance(msg.sender,address(this))>=budget
381,851
appc.allowance(msg.sender,address(this))>=budget
null
pragma solidity ^0.4.8; contract AppCoins { mapping (address => mapping (address => uint256)) public allowance; function balanceOf (address _owner) public constant returns (uint256); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (uint); } /** * The Advertisement contract collects campaigns registered by developers * and executes payments to users using campaign registered applications * after proof of Attention. */ contract Advertisement { struct Filters { string countries; string packageName; uint[] vercodes; } struct ValidationRules { bool vercode; bool ipValidation; bool country; uint constipDailyConversions; uint walletDailyConversions; } struct Campaign { bytes32 bidId; uint price; uint budget; uint startDate; uint endDate; string ipValidator; bool valid; address owner; Filters filters; } ValidationRules public rules; bytes32[] bidIdList; mapping (bytes32 => Campaign) campaigns; mapping (bytes => bytes32[]) campaignsByCountry; AppCoins appc; bytes2[] countryList; address public owner; mapping (address => mapping (bytes32 => bool)) userAttributions; // This notifies clients about a newly created campaign event CampaignCreated(bytes32 bidId, string packageName, string countries, uint[] vercodes, uint price, uint budget, uint startDate, uint endDate); event PoARegistered(bytes32 bidId, string packageName, uint[] timestampList,uint[] nonceList); /** * Constructor function * * Initializes contract with default validation rules */ function Advertisement () public { } /** * Creates a campaign for a certain package name with * a defined price and budget and emits a CampaignCreated event */ function createCampaign (string packageName, string countries, uint[] vercodes, uint price, uint budget, uint startDate, uint endDate) external { } function addCampaign(Campaign campaign) internal { } function addCampaignToCountryMap (Campaign newCampaign,bytes country) internal { } function registerPoA (string packageName, bytes32 bidId, uint[] timestampList, uint[] nonces, address appstore, address oem) external { require (timestampList.length == nonces.length); //Expect ordered array arranged in ascending order for(uint i = 0; i < timestampList.length-1; i++){ require(<FILL_ME>) } require(!userAttributions[msg.sender][bidId]); //atribute // userAttributions[msg.sender][bidId] = true; // payFromCampaign(bidId,appstore, oem); PoARegistered(bidId,packageName,timestampList,nonces); } function cancelCampaign (bytes32 bidId) external { } function setBudgetOfCampaign (bytes32 bidId, uint budget) internal { } function setCampaignValidity (bytes32 bidId, bool val) internal { } function getCampaignValidity(bytes32 bidId) public view returns(bool){ } function getCountryList () public view returns(bytes2[]) { } function getCampaignsByCountry(string country) public view returns (bytes32[]){ } function getTotalCampaignsByCountry (string country) public view returns (uint){ } function getPackageNameOfCampaign (bytes32 bidId) public view returns(string) { } function getCountriesOfCampaign (bytes32 bidId) public view returns(string){ } function getVercodesOfCampaign (bytes32 bidId) public view returns(uint[]) { } function getPriceOfCampaign (bytes32 bidId) public view returns(uint) { } function getStartDateOfCampaign (bytes32 bidId) public view returns(uint) { } function getEndDateOfCampaign (bytes32 bidId) public view returns(uint) { } function getBudgetOfCampaign (bytes32 bidId) public view returns(uint) { } function getOwnerOfCampaign (bytes32 bidId) public view returns(address) { } function getBidIdList () public view returns(bytes32[]) { } function payFromCampaign (bytes32 bidId, address appstore, address oem) internal{ } function division(uint numerator, uint denominator) public constant returns (uint) { } function uintToBytes (uint256 i) constant returns(bytes32 b) { } }
(timestampList[i+1]-timestampList[i])==10000
381,851
(timestampList[i+1]-timestampList[i])==10000
null
pragma solidity ^0.4.8; contract AppCoins { mapping (address => mapping (address => uint256)) public allowance; function balanceOf (address _owner) public constant returns (uint256); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (uint); } /** * The Advertisement contract collects campaigns registered by developers * and executes payments to users using campaign registered applications * after proof of Attention. */ contract Advertisement { struct Filters { string countries; string packageName; uint[] vercodes; } struct ValidationRules { bool vercode; bool ipValidation; bool country; uint constipDailyConversions; uint walletDailyConversions; } struct Campaign { bytes32 bidId; uint price; uint budget; uint startDate; uint endDate; string ipValidator; bool valid; address owner; Filters filters; } ValidationRules public rules; bytes32[] bidIdList; mapping (bytes32 => Campaign) campaigns; mapping (bytes => bytes32[]) campaignsByCountry; AppCoins appc; bytes2[] countryList; address public owner; mapping (address => mapping (bytes32 => bool)) userAttributions; // This notifies clients about a newly created campaign event CampaignCreated(bytes32 bidId, string packageName, string countries, uint[] vercodes, uint price, uint budget, uint startDate, uint endDate); event PoARegistered(bytes32 bidId, string packageName, uint[] timestampList,uint[] nonceList); /** * Constructor function * * Initializes contract with default validation rules */ function Advertisement () public { } /** * Creates a campaign for a certain package name with * a defined price and budget and emits a CampaignCreated event */ function createCampaign (string packageName, string countries, uint[] vercodes, uint price, uint budget, uint startDate, uint endDate) external { } function addCampaign(Campaign campaign) internal { } function addCampaignToCountryMap (Campaign newCampaign,bytes country) internal { } function registerPoA (string packageName, bytes32 bidId, uint[] timestampList, uint[] nonces, address appstore, address oem) external { require (timestampList.length == nonces.length); //Expect ordered array arranged in ascending order for(uint i = 0; i < timestampList.length-1; i++){ require((timestampList[i+1]-timestampList[i]) == 10000); } require(<FILL_ME>) //atribute // userAttributions[msg.sender][bidId] = true; // payFromCampaign(bidId,appstore, oem); PoARegistered(bidId,packageName,timestampList,nonces); } function cancelCampaign (bytes32 bidId) external { } function setBudgetOfCampaign (bytes32 bidId, uint budget) internal { } function setCampaignValidity (bytes32 bidId, bool val) internal { } function getCampaignValidity(bytes32 bidId) public view returns(bool){ } function getCountryList () public view returns(bytes2[]) { } function getCampaignsByCountry(string country) public view returns (bytes32[]){ } function getTotalCampaignsByCountry (string country) public view returns (uint){ } function getPackageNameOfCampaign (bytes32 bidId) public view returns(string) { } function getCountriesOfCampaign (bytes32 bidId) public view returns(string){ } function getVercodesOfCampaign (bytes32 bidId) public view returns(uint[]) { } function getPriceOfCampaign (bytes32 bidId) public view returns(uint) { } function getStartDateOfCampaign (bytes32 bidId) public view returns(uint) { } function getEndDateOfCampaign (bytes32 bidId) public view returns(uint) { } function getBudgetOfCampaign (bytes32 bidId) public view returns(uint) { } function getOwnerOfCampaign (bytes32 bidId) public view returns(address) { } function getBidIdList () public view returns(bytes32[]) { } function payFromCampaign (bytes32 bidId, address appstore, address oem) internal{ } function division(uint numerator, uint denominator) public constant returns (uint) { } function uintToBytes (uint256 i) constant returns(bytes32 b) { } }
!userAttributions[msg.sender][bidId]
381,851
!userAttributions[msg.sender][bidId]
'Signable: signature already used'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import './ISignable.sol'; abstract contract Signable is ISignable { struct Signature { bytes32 nonce; bytes32 r; bytes32 s; uint8 v; } bytes32 private _uniq; mapping(bytes32 => bool) private _signatures; constructor() { } function uniq() public view virtual override(ISignable) returns (bytes32) { } modifier verifySignature(bytes memory message, Signature memory signature) { address _signer = this.signer(); require(_signer != address(0), 'Signable: signer not initialised'); bytes32 signatureHash = keccak256(abi.encode(signature)); require(<FILL_ME>) require( _signer == ecrecover( keccak256(abi.encode(_uniq, signature.nonce, msg.sender, message)), signature.v, signature.r, signature.s ), 'Signable: invalid signature' ); _signatures[signatureHash] = true; _; } }
!_signatures[signatureHash],'Signable: signature already used'
381,903
!_signatures[signatureHash]
"Exceed the max supply!"
contract Comic is ERC1155, Ownable { struct NftToken { uint16 mintingStatus; // set can be mint or not uint16 currentMinted; uint16 totalSupply; uint16 maxSupply; uint16 maxMintingPerTime; uint16 reserve1; uint32 nftCost; // unit is finney (0.001 ETH) uint32 allowMaxAvatarsId; uint32 reserve3; uint64 reserve4; } NftToken public nftToken; address public immutable multipassAddress; address public immutable avatarAddress; mapping(address => bool) private defaultApprovals; mapping(uint => bool) private avatarMintings; event WithdrawEth(address indexed _operator, uint256 _ethWei); event SetMaxMintingPerTime(uint maxMintingPerTime); event ClaimFromMultipsas(uint indexed comicId, uint indexed multipassId, address holder, uint timestamp); event ClaimFromAvatars(uint indexed comicId, uint indexed avatarsId, address holder, uint timestamp); event Mint(uint indexed comicId, address holder, uint timestamp); event DefaultApproval(address indexed operator, bool hasApproval); constructor(address _multipass, address _avatarAddress) ERC1155("https://ipfs.io/ipfs/bafybeidpfv3ymjppz3m5sdjzfuold7dycmdmflm3fpadbsbg5z4w4w55oe/{id}.json") { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public view virtual returns (uint256) { } function totalSupply() public view returns (uint) { } function maxSupply() public view returns (uint) { } function nftCost() public view returns(uint) { } function mintingStatus() public view returns(uint) { } function maxMintingPerTime() public view returns(uint) { } receive() external virtual payable { } fallback() external virtual payable { } /* withdraw eth from owner */ function withdraw(uint _amount) public onlyOwner { } modifier canMint(uint16 _number) { require(<FILL_ME>) require(nftToken.mintingStatus > 0, "Minting already stop now!"); require(_number <= nftToken.maxMintingPerTime, "exceed the max minting limit per time"); _; } /* check token exist or not */ function existsToken(address _addr, uint _id) public view returns(bool) { } function isApprovedForAll(address _owner, address _operator) public virtual override(ERC1155) view returns (bool) { } function setDefaultApproval(address operator, bool hasApproval) public onlyOwner { } /* Allow the owner set how max minting per time */ function setMaxMintingPerTime(uint16 _maxMintingPerTime) public onlyOwner { } // when _howManyMEth = 1, it's 0.001 ETH function setNftCost(uint32 _howManyFinney) external onlyOwner { } /* set Token URI */ function setTokenURI(string calldata _uri, uint256 _id) external onlyOwner { } /* set status can be mint or not */ function setMintingStatus(uint16 _status) public onlyOwner { } /* can set total supply, but it can't never be exceed max supply */ function setTotalSupply(uint16 _supply) external onlyOwner { } function setAllowMaxAvatarsId(uint32 _id) external onlyOwner { } function setUri(string memory newuri) external onlyOwner { } function claimFromMultipass(uint16[] memory multipassIds) external canMint(uint16(multipassIds.length)) { } function claimFromAvatars(uint16[] memory avatarIds) external canMint(uint16(avatarIds.length)) { } function batchMint(address[] memory _addrs) external onlyOwner { } }
nftToken.currentMinted+_number<=nftToken.totalSupply+1,"Exceed the max supply!"
381,936
nftToken.currentMinted+_number<=nftToken.totalSupply+1
"Illegality avatar id"
contract Comic is ERC1155, Ownable { struct NftToken { uint16 mintingStatus; // set can be mint or not uint16 currentMinted; uint16 totalSupply; uint16 maxSupply; uint16 maxMintingPerTime; uint16 reserve1; uint32 nftCost; // unit is finney (0.001 ETH) uint32 allowMaxAvatarsId; uint32 reserve3; uint64 reserve4; } NftToken public nftToken; address public immutable multipassAddress; address public immutable avatarAddress; mapping(address => bool) private defaultApprovals; mapping(uint => bool) private avatarMintings; event WithdrawEth(address indexed _operator, uint256 _ethWei); event SetMaxMintingPerTime(uint maxMintingPerTime); event ClaimFromMultipsas(uint indexed comicId, uint indexed multipassId, address holder, uint timestamp); event ClaimFromAvatars(uint indexed comicId, uint indexed avatarsId, address holder, uint timestamp); event Mint(uint indexed comicId, address holder, uint timestamp); event DefaultApproval(address indexed operator, bool hasApproval); constructor(address _multipass, address _avatarAddress) ERC1155("https://ipfs.io/ipfs/bafybeidpfv3ymjppz3m5sdjzfuold7dycmdmflm3fpadbsbg5z4w4w55oe/{id}.json") { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public view virtual returns (uint256) { } function totalSupply() public view returns (uint) { } function maxSupply() public view returns (uint) { } function nftCost() public view returns(uint) { } function mintingStatus() public view returns(uint) { } function maxMintingPerTime() public view returns(uint) { } receive() external virtual payable { } fallback() external virtual payable { } /* withdraw eth from owner */ function withdraw(uint _amount) public onlyOwner { } modifier canMint(uint16 _number) { } /* check token exist or not */ function existsToken(address _addr, uint _id) public view returns(bool) { } function isApprovedForAll(address _owner, address _operator) public virtual override(ERC1155) view returns (bool) { } function setDefaultApproval(address operator, bool hasApproval) public onlyOwner { } /* Allow the owner set how max minting per time */ function setMaxMintingPerTime(uint16 _maxMintingPerTime) public onlyOwner { } // when _howManyMEth = 1, it's 0.001 ETH function setNftCost(uint32 _howManyFinney) external onlyOwner { } /* set Token URI */ function setTokenURI(string calldata _uri, uint256 _id) external onlyOwner { } /* set status can be mint or not */ function setMintingStatus(uint16 _status) public onlyOwner { } /* can set total supply, but it can't never be exceed max supply */ function setTotalSupply(uint16 _supply) external onlyOwner { } function setAllowMaxAvatarsId(uint32 _id) external onlyOwner { } function setUri(string memory newuri) external onlyOwner { } function claimFromMultipass(uint16[] memory multipassIds) external canMint(uint16(multipassIds.length)) { } function claimFromAvatars(uint16[] memory avatarIds) external canMint(uint16(avatarIds.length)) { uint number = uint16(avatarIds.length); address holder = _msgSender(); uint16 _currentMintedID = nftToken.currentMinted; for (uint16 i = 0; i < number; i++) { if (IAvatarComic(avatarAddress).existsToken(holder, avatarIds[i])) { require(<FILL_ME>) require(!avatarMintings[avatarIds[i]], "Already claimed from this avatar"); avatarMintings[avatarIds[i]] = true; _balances[_currentMintedID][holder] += 1; emit TransferSingle(_msgSender(), address(0), holder, _currentMintedID, 1); emit ClaimFromAvatars(_currentMintedID, avatarIds[i], holder, block.timestamp); _currentMintedID += 1; } } nftToken.currentMinted = _currentMintedID; } function batchMint(address[] memory _addrs) external onlyOwner { } }
avatarIds[i]<=nftToken.allowMaxAvatarsId,"Illegality avatar id"
381,936
avatarIds[i]<=nftToken.allowMaxAvatarsId
"Already claimed from this avatar"
contract Comic is ERC1155, Ownable { struct NftToken { uint16 mintingStatus; // set can be mint or not uint16 currentMinted; uint16 totalSupply; uint16 maxSupply; uint16 maxMintingPerTime; uint16 reserve1; uint32 nftCost; // unit is finney (0.001 ETH) uint32 allowMaxAvatarsId; uint32 reserve3; uint64 reserve4; } NftToken public nftToken; address public immutable multipassAddress; address public immutable avatarAddress; mapping(address => bool) private defaultApprovals; mapping(uint => bool) private avatarMintings; event WithdrawEth(address indexed _operator, uint256 _ethWei); event SetMaxMintingPerTime(uint maxMintingPerTime); event ClaimFromMultipsas(uint indexed comicId, uint indexed multipassId, address holder, uint timestamp); event ClaimFromAvatars(uint indexed comicId, uint indexed avatarsId, address holder, uint timestamp); event Mint(uint indexed comicId, address holder, uint timestamp); event DefaultApproval(address indexed operator, bool hasApproval); constructor(address _multipass, address _avatarAddress) ERC1155("https://ipfs.io/ipfs/bafybeidpfv3ymjppz3m5sdjzfuold7dycmdmflm3fpadbsbg5z4w4w55oe/{id}.json") { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public view virtual returns (uint256) { } function totalSupply() public view returns (uint) { } function maxSupply() public view returns (uint) { } function nftCost() public view returns(uint) { } function mintingStatus() public view returns(uint) { } function maxMintingPerTime() public view returns(uint) { } receive() external virtual payable { } fallback() external virtual payable { } /* withdraw eth from owner */ function withdraw(uint _amount) public onlyOwner { } modifier canMint(uint16 _number) { } /* check token exist or not */ function existsToken(address _addr, uint _id) public view returns(bool) { } function isApprovedForAll(address _owner, address _operator) public virtual override(ERC1155) view returns (bool) { } function setDefaultApproval(address operator, bool hasApproval) public onlyOwner { } /* Allow the owner set how max minting per time */ function setMaxMintingPerTime(uint16 _maxMintingPerTime) public onlyOwner { } // when _howManyMEth = 1, it's 0.001 ETH function setNftCost(uint32 _howManyFinney) external onlyOwner { } /* set Token URI */ function setTokenURI(string calldata _uri, uint256 _id) external onlyOwner { } /* set status can be mint or not */ function setMintingStatus(uint16 _status) public onlyOwner { } /* can set total supply, but it can't never be exceed max supply */ function setTotalSupply(uint16 _supply) external onlyOwner { } function setAllowMaxAvatarsId(uint32 _id) external onlyOwner { } function setUri(string memory newuri) external onlyOwner { } function claimFromMultipass(uint16[] memory multipassIds) external canMint(uint16(multipassIds.length)) { } function claimFromAvatars(uint16[] memory avatarIds) external canMint(uint16(avatarIds.length)) { uint number = uint16(avatarIds.length); address holder = _msgSender(); uint16 _currentMintedID = nftToken.currentMinted; for (uint16 i = 0; i < number; i++) { if (IAvatarComic(avatarAddress).existsToken(holder, avatarIds[i])) { require(avatarIds[i] <= nftToken.allowMaxAvatarsId, "Illegality avatar id"); require(<FILL_ME>) avatarMintings[avatarIds[i]] = true; _balances[_currentMintedID][holder] += 1; emit TransferSingle(_msgSender(), address(0), holder, _currentMintedID, 1); emit ClaimFromAvatars(_currentMintedID, avatarIds[i], holder, block.timestamp); _currentMintedID += 1; } } nftToken.currentMinted = _currentMintedID; } function batchMint(address[] memory _addrs) external onlyOwner { } }
!avatarMintings[avatarIds[i]],"Already claimed from this avatar"
381,936
!avatarMintings[avatarIds[i]]
"Exceed the max supply!"
contract Comic is ERC1155, Ownable { struct NftToken { uint16 mintingStatus; // set can be mint or not uint16 currentMinted; uint16 totalSupply; uint16 maxSupply; uint16 maxMintingPerTime; uint16 reserve1; uint32 nftCost; // unit is finney (0.001 ETH) uint32 allowMaxAvatarsId; uint32 reserve3; uint64 reserve4; } NftToken public nftToken; address public immutable multipassAddress; address public immutable avatarAddress; mapping(address => bool) private defaultApprovals; mapping(uint => bool) private avatarMintings; event WithdrawEth(address indexed _operator, uint256 _ethWei); event SetMaxMintingPerTime(uint maxMintingPerTime); event ClaimFromMultipsas(uint indexed comicId, uint indexed multipassId, address holder, uint timestamp); event ClaimFromAvatars(uint indexed comicId, uint indexed avatarsId, address holder, uint timestamp); event Mint(uint indexed comicId, address holder, uint timestamp); event DefaultApproval(address indexed operator, bool hasApproval); constructor(address _multipass, address _avatarAddress) ERC1155("https://ipfs.io/ipfs/bafybeidpfv3ymjppz3m5sdjzfuold7dycmdmflm3fpadbsbg5z4w4w55oe/{id}.json") { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public view virtual returns (uint256) { } function totalSupply() public view returns (uint) { } function maxSupply() public view returns (uint) { } function nftCost() public view returns(uint) { } function mintingStatus() public view returns(uint) { } function maxMintingPerTime() public view returns(uint) { } receive() external virtual payable { } fallback() external virtual payable { } /* withdraw eth from owner */ function withdraw(uint _amount) public onlyOwner { } modifier canMint(uint16 _number) { } /* check token exist or not */ function existsToken(address _addr, uint _id) public view returns(bool) { } function isApprovedForAll(address _owner, address _operator) public virtual override(ERC1155) view returns (bool) { } function setDefaultApproval(address operator, bool hasApproval) public onlyOwner { } /* Allow the owner set how max minting per time */ function setMaxMintingPerTime(uint16 _maxMintingPerTime) public onlyOwner { } // when _howManyMEth = 1, it's 0.001 ETH function setNftCost(uint32 _howManyFinney) external onlyOwner { } /* set Token URI */ function setTokenURI(string calldata _uri, uint256 _id) external onlyOwner { } /* set status can be mint or not */ function setMintingStatus(uint16 _status) public onlyOwner { } /* can set total supply, but it can't never be exceed max supply */ function setTotalSupply(uint16 _supply) external onlyOwner { } function setAllowMaxAvatarsId(uint32 _id) external onlyOwner { } function setUri(string memory newuri) external onlyOwner { } function claimFromMultipass(uint16[] memory multipassIds) external canMint(uint16(multipassIds.length)) { } function claimFromAvatars(uint16[] memory avatarIds) external canMint(uint16(avatarIds.length)) { } function batchMint(address[] memory _addrs) external onlyOwner { require(<FILL_ME>) uint8 number = uint8(_addrs.length); uint16 _currentMintedID = nftToken.currentMinted; for (uint8 i = 0; i < number; i++) { _balances[_currentMintedID][_addrs[i]] += 1; emit TransferSingle(_msgSender(), address(0), _addrs[i], _currentMintedID, 1); emit Mint(_currentMintedID, _addrs[i], block.timestamp); _currentMintedID++; } nftToken.currentMinted = _currentMintedID; } }
nftToken.currentMinted+uint16(_addrs.length)<=nftToken.totalSupply+1,"Exceed the max supply!"
381,936
nftToken.currentMinted+uint16(_addrs.length)<=nftToken.totalSupply+1
null
pragma solidity ^0.4.11; /// `Owned` is a base level contract that assigns an `owner` that can be later changed contract Owned { /// @dev `owner` is the only address that can call a function with this /// modifier modifier onlyOwner { } address public owner; /// @notice The Constructor assigns the message sender to be `owner` function Owned() public { } /// @notice `owner` can step down and assign some other address to this role /// @param _newOwner The address of the new owner. 0x0 can be used to create /// an unowned neutral vault, however that cannot be undone function changeOwner(address _newOwner) onlyOwner public { } } contract ERC20 { function balanceOf(address who) constant public returns (uint); function allowance(address owner, address spender) constant public returns (uint); function transfer(address to, uint value) public returns (bool ok); function transferFrom(address from, address to, uint value) public returns (bool ok); function approve(address spender, uint value) public returns (bool ok); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract TokenDistribution is Owned { ERC20 public tokenContract; function TokenDistribution ( address _tokenAddress ) public { } function distributeTokens(address[] _owners, uint256[] _tokens) onlyOwner public { require( _owners.length == _tokens.length ); for(uint i=0;i<_owners.length;i++){ require(<FILL_ME>) } } }
tokenContract.transferFrom(this,_owners[i],_tokens[i])
382,084
tokenContract.transferFrom(this,_owners[i],_tokens[i])
null
contract FUTB1 is StandardToken, MintableToken, BurnableToken { using SafeMath for uint256; using ERC20AsmFn for ERC20; string public constant name = "Futereum BTC 1"; string public constant symbol = "FUTB1"; uint8 public constant decimals = 18; uint public constant SWAP_CAP = 21000000 * (10 ** uint256(decimals)); uint public cycleMintSupply = 0; FUTBTiers public tierContract = FUTBTiers(0x4DD013B9E784C459fe5f82aa926534506CE25EAF); event SwapStarted(uint256 endTime); event MiningRestart(uint16 tier); event MiningTokenAdded(address token, uint ratio); event MiningTokenAdjusted(address token, uint ratio); uint public offset = 10**8; uint public decimalOffset = 10 ** uint256(decimals); uint public baseRate = 100; mapping(address => uint) public exchangeRatios; mapping(address => uint) public unPaidFees; address[] public miningTokens; address public admin; address public tierAdmin; address public FUTC = 0xf880d3C6DCDA42A7b2F6640703C5748557865B35; //initial state uint16 public currentTier = 1; uint public futbLeftInCurrent = 6.597 ether; uint public miningTokenLeftInCurrent = 0.0369 ether; uint public currentRate = futbLeftInCurrent.div(miningTokenLeftInCurrent.div(offset)); bool public isMiningOpen = false; bool public miningActive = false; uint16 public lastTier = 2856; constructor() public { } modifier canMine() { } modifier onlyAdmin() { } modifier onlyTierAdmin() { } // first call Token(address).approve(futb address, amount) for FUTB to transfer on your behalf. function mine(address token, uint amount) canMine external { require(token != 0 && amount > 0); require(<FILL_ME>) require(ERC20(token).asmTransferFrom(msg.sender, this, amount)); _mine(token, amount); } function _mine(address _token, uint256 _inAmount) private { } // swap data bool public swapOpen = false; uint public swapEndTime; mapping(address => uint) public swapRates; function _startSwap() private { } function swap(uint amt) public { } function restart() external { } function setIsMiningOpen(bool isOpen) onlyTierAdmin external { } // base rate is 100, so for 1 to 1 send in 100 as ratio function addMiningToken(address tokenAddr, uint ratio) onlyAdmin external { } function adjustTokenRate(address tokenAddr, uint ratio, uint16 position) onlyAdmin external { } // can only add/change tier contract in between mining cycles function setFutbTiers(address _tiersAddr) onlyTierAdmin external { } // use this to lock the contract from further changes to mining tokens function lockContract() onlyAdmin external { } // this allows us to use a different set of tiers // can only be changed in between mining cycles by admin function setLastTier(uint16 _lastTier) onlyTierAdmin external { } function changeAdmin (address _receiver) onlyAdmin external { } function changeTierAdmin (address _receiver) onlyTierAdmin external { } /* * Whoops. Added a bad token that breaks swap back. * * Removal is irreversible. * * @param _addr The address of the ERC token to remove * @param _position The index of the _addr in the miningTokens array. * Use web3 to cycle through and find the index position. */ function removeToken(address _addr, uint16 _position) onlyTierAdmin external { } }
exchangeRatios[token]>0&&cycleMintSupply<SWAP_CAP
382,247
exchangeRatios[token]>0&&cycleMintSupply<SWAP_CAP
null
contract FUTB1 is StandardToken, MintableToken, BurnableToken { using SafeMath for uint256; using ERC20AsmFn for ERC20; string public constant name = "Futereum BTC 1"; string public constant symbol = "FUTB1"; uint8 public constant decimals = 18; uint public constant SWAP_CAP = 21000000 * (10 ** uint256(decimals)); uint public cycleMintSupply = 0; FUTBTiers public tierContract = FUTBTiers(0x4DD013B9E784C459fe5f82aa926534506CE25EAF); event SwapStarted(uint256 endTime); event MiningRestart(uint16 tier); event MiningTokenAdded(address token, uint ratio); event MiningTokenAdjusted(address token, uint ratio); uint public offset = 10**8; uint public decimalOffset = 10 ** uint256(decimals); uint public baseRate = 100; mapping(address => uint) public exchangeRatios; mapping(address => uint) public unPaidFees; address[] public miningTokens; address public admin; address public tierAdmin; address public FUTC = 0xf880d3C6DCDA42A7b2F6640703C5748557865B35; //initial state uint16 public currentTier = 1; uint public futbLeftInCurrent = 6.597 ether; uint public miningTokenLeftInCurrent = 0.0369 ether; uint public currentRate = futbLeftInCurrent.div(miningTokenLeftInCurrent.div(offset)); bool public isMiningOpen = false; bool public miningActive = false; uint16 public lastTier = 2856; constructor() public { } modifier canMine() { } modifier onlyAdmin() { } modifier onlyTierAdmin() { } // first call Token(address).approve(futb address, amount) for FUTB to transfer on your behalf. function mine(address token, uint amount) canMine external { require(token != 0 && amount > 0); require(exchangeRatios[token] > 0 && cycleMintSupply < SWAP_CAP); require(<FILL_ME>) _mine(token, amount); } function _mine(address _token, uint256 _inAmount) private { } // swap data bool public swapOpen = false; uint public swapEndTime; mapping(address => uint) public swapRates; function _startSwap() private { } function swap(uint amt) public { } function restart() external { } function setIsMiningOpen(bool isOpen) onlyTierAdmin external { } // base rate is 100, so for 1 to 1 send in 100 as ratio function addMiningToken(address tokenAddr, uint ratio) onlyAdmin external { } function adjustTokenRate(address tokenAddr, uint ratio, uint16 position) onlyAdmin external { } // can only add/change tier contract in between mining cycles function setFutbTiers(address _tiersAddr) onlyTierAdmin external { } // use this to lock the contract from further changes to mining tokens function lockContract() onlyAdmin external { } // this allows us to use a different set of tiers // can only be changed in between mining cycles by admin function setLastTier(uint16 _lastTier) onlyTierAdmin external { } function changeAdmin (address _receiver) onlyAdmin external { } function changeTierAdmin (address _receiver) onlyTierAdmin external { } /* * Whoops. Added a bad token that breaks swap back. * * Removal is irreversible. * * @param _addr The address of the ERC token to remove * @param _position The index of the _addr in the miningTokens array. * Use web3 to cycle through and find the index position. */ function removeToken(address _addr, uint16 _position) onlyTierAdmin external { } }
ERC20(token).asmTransferFrom(msg.sender,this,amount)
382,247
ERC20(token).asmTransferFrom(msg.sender,this,amount)
null
contract FUTB1 is StandardToken, MintableToken, BurnableToken { using SafeMath for uint256; using ERC20AsmFn for ERC20; string public constant name = "Futereum BTC 1"; string public constant symbol = "FUTB1"; uint8 public constant decimals = 18; uint public constant SWAP_CAP = 21000000 * (10 ** uint256(decimals)); uint public cycleMintSupply = 0; FUTBTiers public tierContract = FUTBTiers(0x4DD013B9E784C459fe5f82aa926534506CE25EAF); event SwapStarted(uint256 endTime); event MiningRestart(uint16 tier); event MiningTokenAdded(address token, uint ratio); event MiningTokenAdjusted(address token, uint ratio); uint public offset = 10**8; uint public decimalOffset = 10 ** uint256(decimals); uint public baseRate = 100; mapping(address => uint) public exchangeRatios; mapping(address => uint) public unPaidFees; address[] public miningTokens; address public admin; address public tierAdmin; address public FUTC = 0xf880d3C6DCDA42A7b2F6640703C5748557865B35; //initial state uint16 public currentTier = 1; uint public futbLeftInCurrent = 6.597 ether; uint public miningTokenLeftInCurrent = 0.0369 ether; uint public currentRate = futbLeftInCurrent.div(miningTokenLeftInCurrent.div(offset)); bool public isMiningOpen = false; bool public miningActive = false; uint16 public lastTier = 2856; constructor() public { } modifier canMine() { } modifier onlyAdmin() { } modifier onlyTierAdmin() { } // first call Token(address).approve(futb address, amount) for FUTB to transfer on your behalf. function mine(address token, uint amount) canMine external { } function _mine(address _token, uint256 _inAmount) private { } // swap data bool public swapOpen = false; uint public swapEndTime; mapping(address => uint) public swapRates; function _startSwap() private { } function swap(uint amt) public { require(<FILL_ME>) if (amt > cycleMintSupply) { amt = cycleMintSupply; } cycleMintSupply -= amt; // burn verifies msg.sender has balance burn(amt); for (uint16 i = 0; i < miningTokens.length; i++) { address _token = miningTokens[i]; ERC20(_token).asmTransfer(msg.sender, amt.mul(swapRates[_token]).div(decimalOffset)); } } function restart() external { } function setIsMiningOpen(bool isOpen) onlyTierAdmin external { } // base rate is 100, so for 1 to 1 send in 100 as ratio function addMiningToken(address tokenAddr, uint ratio) onlyAdmin external { } function adjustTokenRate(address tokenAddr, uint ratio, uint16 position) onlyAdmin external { } // can only add/change tier contract in between mining cycles function setFutbTiers(address _tiersAddr) onlyTierAdmin external { } // use this to lock the contract from further changes to mining tokens function lockContract() onlyAdmin external { } // this allows us to use a different set of tiers // can only be changed in between mining cycles by admin function setLastTier(uint16 _lastTier) onlyTierAdmin external { } function changeAdmin (address _receiver) onlyAdmin external { } function changeTierAdmin (address _receiver) onlyTierAdmin external { } /* * Whoops. Added a bad token that breaks swap back. * * Removal is irreversible. * * @param _addr The address of the ERC token to remove * @param _position The index of the _addr in the miningTokens array. * Use web3 to cycle through and find the index position. */ function removeToken(address _addr, uint16 _position) onlyTierAdmin external { } }
swapOpen&&cycleMintSupply>0
382,247
swapOpen&&cycleMintSupply>0
null
contract FUTB1 is StandardToken, MintableToken, BurnableToken { using SafeMath for uint256; using ERC20AsmFn for ERC20; string public constant name = "Futereum BTC 1"; string public constant symbol = "FUTB1"; uint8 public constant decimals = 18; uint public constant SWAP_CAP = 21000000 * (10 ** uint256(decimals)); uint public cycleMintSupply = 0; FUTBTiers public tierContract = FUTBTiers(0x4DD013B9E784C459fe5f82aa926534506CE25EAF); event SwapStarted(uint256 endTime); event MiningRestart(uint16 tier); event MiningTokenAdded(address token, uint ratio); event MiningTokenAdjusted(address token, uint ratio); uint public offset = 10**8; uint public decimalOffset = 10 ** uint256(decimals); uint public baseRate = 100; mapping(address => uint) public exchangeRatios; mapping(address => uint) public unPaidFees; address[] public miningTokens; address public admin; address public tierAdmin; address public FUTC = 0xf880d3C6DCDA42A7b2F6640703C5748557865B35; //initial state uint16 public currentTier = 1; uint public futbLeftInCurrent = 6.597 ether; uint public miningTokenLeftInCurrent = 0.0369 ether; uint public currentRate = futbLeftInCurrent.div(miningTokenLeftInCurrent.div(offset)); bool public isMiningOpen = false; bool public miningActive = false; uint16 public lastTier = 2856; constructor() public { } modifier canMine() { } modifier onlyAdmin() { } modifier onlyTierAdmin() { } // first call Token(address).approve(futb address, amount) for FUTB to transfer on your behalf. function mine(address token, uint amount) canMine external { } function _mine(address _token, uint256 _inAmount) private { } // swap data bool public swapOpen = false; uint public swapEndTime; mapping(address => uint) public swapRates; function _startSwap() private { } function swap(uint amt) public { } function restart() external { } function setIsMiningOpen(bool isOpen) onlyTierAdmin external { } // base rate is 100, so for 1 to 1 send in 100 as ratio function addMiningToken(address tokenAddr, uint ratio) onlyAdmin external { require(<FILL_ME>) exchangeRatios[tokenAddr] = ratio; bool found = false; for (uint16 i = 0; i < miningTokens.length; i++) { if (miningTokens[i] == tokenAddr) { found = true; break; } } if (!found) { miningTokens.push(tokenAddr); } emit MiningTokenAdded(tokenAddr, ratio); } function adjustTokenRate(address tokenAddr, uint ratio, uint16 position) onlyAdmin external { } // can only add/change tier contract in between mining cycles function setFutbTiers(address _tiersAddr) onlyTierAdmin external { } // use this to lock the contract from further changes to mining tokens function lockContract() onlyAdmin external { } // this allows us to use a different set of tiers // can only be changed in between mining cycles by admin function setLastTier(uint16 _lastTier) onlyTierAdmin external { } function changeAdmin (address _receiver) onlyAdmin external { } function changeTierAdmin (address _receiver) onlyTierAdmin external { } /* * Whoops. Added a bad token that breaks swap back. * * Removal is irreversible. * * @param _addr The address of the ERC token to remove * @param _position The index of the _addr in the miningTokens array. * Use web3 to cycle through and find the index position. */ function removeToken(address _addr, uint16 _position) onlyTierAdmin external { } }
exchangeRatios[tokenAddr]==0&&ratio>0&&ratio<10000
382,247
exchangeRatios[tokenAddr]==0&&ratio>0&&ratio<10000
null
contract FUTB1 is StandardToken, MintableToken, BurnableToken { using SafeMath for uint256; using ERC20AsmFn for ERC20; string public constant name = "Futereum BTC 1"; string public constant symbol = "FUTB1"; uint8 public constant decimals = 18; uint public constant SWAP_CAP = 21000000 * (10 ** uint256(decimals)); uint public cycleMintSupply = 0; FUTBTiers public tierContract = FUTBTiers(0x4DD013B9E784C459fe5f82aa926534506CE25EAF); event SwapStarted(uint256 endTime); event MiningRestart(uint16 tier); event MiningTokenAdded(address token, uint ratio); event MiningTokenAdjusted(address token, uint ratio); uint public offset = 10**8; uint public decimalOffset = 10 ** uint256(decimals); uint public baseRate = 100; mapping(address => uint) public exchangeRatios; mapping(address => uint) public unPaidFees; address[] public miningTokens; address public admin; address public tierAdmin; address public FUTC = 0xf880d3C6DCDA42A7b2F6640703C5748557865B35; //initial state uint16 public currentTier = 1; uint public futbLeftInCurrent = 6.597 ether; uint public miningTokenLeftInCurrent = 0.0369 ether; uint public currentRate = futbLeftInCurrent.div(miningTokenLeftInCurrent.div(offset)); bool public isMiningOpen = false; bool public miningActive = false; uint16 public lastTier = 2856; constructor() public { } modifier canMine() { } modifier onlyAdmin() { } modifier onlyTierAdmin() { } // first call Token(address).approve(futb address, amount) for FUTB to transfer on your behalf. function mine(address token, uint amount) canMine external { } function _mine(address _token, uint256 _inAmount) private { } // swap data bool public swapOpen = false; uint public swapEndTime; mapping(address => uint) public swapRates; function _startSwap() private { } function swap(uint amt) public { } function restart() external { } function setIsMiningOpen(bool isOpen) onlyTierAdmin external { } // base rate is 100, so for 1 to 1 send in 100 as ratio function addMiningToken(address tokenAddr, uint ratio) onlyAdmin external { } function adjustTokenRate(address tokenAddr, uint ratio, uint16 position) onlyAdmin external { require(<FILL_ME>) exchangeRatios[tokenAddr] = ratio; emit MiningTokenAdjusted(tokenAddr, ratio); } // can only add/change tier contract in between mining cycles function setFutbTiers(address _tiersAddr) onlyTierAdmin external { } // use this to lock the contract from further changes to mining tokens function lockContract() onlyAdmin external { } // this allows us to use a different set of tiers // can only be changed in between mining cycles by admin function setLastTier(uint16 _lastTier) onlyTierAdmin external { } function changeAdmin (address _receiver) onlyAdmin external { } function changeTierAdmin (address _receiver) onlyTierAdmin external { } /* * Whoops. Added a bad token that breaks swap back. * * Removal is irreversible. * * @param _addr The address of the ERC token to remove * @param _position The index of the _addr in the miningTokens array. * Use web3 to cycle through and find the index position. */ function removeToken(address _addr, uint16 _position) onlyTierAdmin external { } }
miningTokens[position]==tokenAddr&&ratio<10000
382,247
miningTokens[position]==tokenAddr&&ratio<10000
null
contract FUTB1 is StandardToken, MintableToken, BurnableToken { using SafeMath for uint256; using ERC20AsmFn for ERC20; string public constant name = "Futereum BTC 1"; string public constant symbol = "FUTB1"; uint8 public constant decimals = 18; uint public constant SWAP_CAP = 21000000 * (10 ** uint256(decimals)); uint public cycleMintSupply = 0; FUTBTiers public tierContract = FUTBTiers(0x4DD013B9E784C459fe5f82aa926534506CE25EAF); event SwapStarted(uint256 endTime); event MiningRestart(uint16 tier); event MiningTokenAdded(address token, uint ratio); event MiningTokenAdjusted(address token, uint ratio); uint public offset = 10**8; uint public decimalOffset = 10 ** uint256(decimals); uint public baseRate = 100; mapping(address => uint) public exchangeRatios; mapping(address => uint) public unPaidFees; address[] public miningTokens; address public admin; address public tierAdmin; address public FUTC = 0xf880d3C6DCDA42A7b2F6640703C5748557865B35; //initial state uint16 public currentTier = 1; uint public futbLeftInCurrent = 6.597 ether; uint public miningTokenLeftInCurrent = 0.0369 ether; uint public currentRate = futbLeftInCurrent.div(miningTokenLeftInCurrent.div(offset)); bool public isMiningOpen = false; bool public miningActive = false; uint16 public lastTier = 2856; constructor() public { } modifier canMine() { } modifier onlyAdmin() { } modifier onlyTierAdmin() { } // first call Token(address).approve(futb address, amount) for FUTB to transfer on your behalf. function mine(address token, uint amount) canMine external { } function _mine(address _token, uint256 _inAmount) private { } // swap data bool public swapOpen = false; uint public swapEndTime; mapping(address => uint) public swapRates; function _startSwap() private { } function swap(uint amt) public { } function restart() external { } function setIsMiningOpen(bool isOpen) onlyTierAdmin external { } // base rate is 100, so for 1 to 1 send in 100 as ratio function addMiningToken(address tokenAddr, uint ratio) onlyAdmin external { } function adjustTokenRate(address tokenAddr, uint ratio, uint16 position) onlyAdmin external { } // can only add/change tier contract in between mining cycles function setFutbTiers(address _tiersAddr) onlyTierAdmin external { require(<FILL_ME>) tierContract = FUTBTiers(_tiersAddr); } // use this to lock the contract from further changes to mining tokens function lockContract() onlyAdmin external { } // this allows us to use a different set of tiers // can only be changed in between mining cycles by admin function setLastTier(uint16 _lastTier) onlyTierAdmin external { } function changeAdmin (address _receiver) onlyAdmin external { } function changeTierAdmin (address _receiver) onlyTierAdmin external { } /* * Whoops. Added a bad token that breaks swap back. * * Removal is irreversible. * * @param _addr The address of the ERC token to remove * @param _position The index of the _addr in the miningTokens array. * Use web3 to cycle through and find the index position. */ function removeToken(address _addr, uint16 _position) onlyTierAdmin external { } }
!miningActive
382,247
!miningActive
null
contract FUTB1 is StandardToken, MintableToken, BurnableToken { using SafeMath for uint256; using ERC20AsmFn for ERC20; string public constant name = "Futereum BTC 1"; string public constant symbol = "FUTB1"; uint8 public constant decimals = 18; uint public constant SWAP_CAP = 21000000 * (10 ** uint256(decimals)); uint public cycleMintSupply = 0; FUTBTiers public tierContract = FUTBTiers(0x4DD013B9E784C459fe5f82aa926534506CE25EAF); event SwapStarted(uint256 endTime); event MiningRestart(uint16 tier); event MiningTokenAdded(address token, uint ratio); event MiningTokenAdjusted(address token, uint ratio); uint public offset = 10**8; uint public decimalOffset = 10 ** uint256(decimals); uint public baseRate = 100; mapping(address => uint) public exchangeRatios; mapping(address => uint) public unPaidFees; address[] public miningTokens; address public admin; address public tierAdmin; address public FUTC = 0xf880d3C6DCDA42A7b2F6640703C5748557865B35; //initial state uint16 public currentTier = 1; uint public futbLeftInCurrent = 6.597 ether; uint public miningTokenLeftInCurrent = 0.0369 ether; uint public currentRate = futbLeftInCurrent.div(miningTokenLeftInCurrent.div(offset)); bool public isMiningOpen = false; bool public miningActive = false; uint16 public lastTier = 2856; constructor() public { } modifier canMine() { } modifier onlyAdmin() { } modifier onlyTierAdmin() { } // first call Token(address).approve(futb address, amount) for FUTB to transfer on your behalf. function mine(address token, uint amount) canMine external { } function _mine(address _token, uint256 _inAmount) private { } // swap data bool public swapOpen = false; uint public swapEndTime; mapping(address => uint) public swapRates; function _startSwap() private { } function swap(uint amt) public { } function restart() external { } function setIsMiningOpen(bool isOpen) onlyTierAdmin external { } // base rate is 100, so for 1 to 1 send in 100 as ratio function addMiningToken(address tokenAddr, uint ratio) onlyAdmin external { } function adjustTokenRate(address tokenAddr, uint ratio, uint16 position) onlyAdmin external { } // can only add/change tier contract in between mining cycles function setFutbTiers(address _tiersAddr) onlyTierAdmin external { } // use this to lock the contract from further changes to mining tokens function lockContract() onlyAdmin external { } // this allows us to use a different set of tiers // can only be changed in between mining cycles by admin function setLastTier(uint16 _lastTier) onlyTierAdmin external { } function changeAdmin (address _receiver) onlyAdmin external { } function changeTierAdmin (address _receiver) onlyTierAdmin external { } /* * Whoops. Added a bad token that breaks swap back. * * Removal is irreversible. * * @param _addr The address of the ERC token to remove * @param _position The index of the _addr in the miningTokens array. * Use web3 to cycle through and find the index position. */ function removeToken(address _addr, uint16 _position) onlyTierAdmin external { require(<FILL_ME>) exchangeRatios[_addr] = 0; miningTokens[_position] = miningTokens[miningTokens.length-1]; delete miningTokens[miningTokens.length-1]; miningTokens.length--; } }
miningTokens[_position]==_addr
382,247
miningTokens[_position]==_addr
"Not allowed"
pragma solidity ^0.8.0; contract EnchantedGolemsRockSociety is ERC721Enumerable, Ownable { using Address for address; using Strings for uint256; string public baseURI = ""; string public ipfsBaseURI = ""; mapping (uint256 => string) public tokenIdToIpfsHash; IERC1155 public WhitelistContract; uint256 public constant MAX_SUPPLY = 10000; uint256 public constant MAX_PER_TX = 15; bool public ipfsLocked = false; bool public manualMintDisabled = false; bool public publicSaleStarted = false; bool public presaleEnded = false; uint256 public mintedByOwner = 0; uint256 public constant RESERVED_FOR_OWNER = 160; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory _uri, address _whitelist) ERC721("Enchanted Golems Rock Society", "EGRS") { } /** * ------------ METADATA ------------ */ /** * @dev Gets base metadata URI */ function _baseURI() internal view override returns (string memory) { } /** * @dev Gets ipfs metadata URI */ function _ipfsBaseURI() internal view returns (string memory) { } /** * @dev Sets base metadata URI, callable by owner */ function setBaseUri(string memory _uri) external onlyOwner { } /** * @dev Sets ipfs metadata URI, callable by owner */ function setIpfsBaseUri(string memory _uri) external onlyOwner { } /** * @dev Lock ipfs metadata URI and hashes, callable by owner */ function lockIpfsMetadata() external onlyOwner { } /** * @dev Set manual ipfs hash for token, callable by owner */ function setIpfsHash(uint256 tokenId, string memory hash) external onlyOwner { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * ------------ SALE AND PRESALE ------------ */ /** * @dev Starts public sale, callable by owner */ function startPublicSale() external onlyOwner { } /** * @dev Ends the presale, callable by owner */ function endPresale() external onlyOwner { } /** * @dev Sets the whitelist contract applicable during presale, callable by owner */ function setWhitelistContract(address _contract) external onlyOwner { } /** * ------------ MINTING ------------ */ /** * @dev Mints `count` tokens to `to` address, internal */ function mintInternal(address to, uint256 count) internal { } /** * @dev Disables manual minting by owner, callable by owner */ function disableManualMint() public onlyOwner { } /** * @dev Manual minting by owner, callable by owner */ function mintOwner(address[] calldata owners, uint256[] calldata counts) public onlyOwner { require(<FILL_ME>) require(owners.length == counts.length, "Bad length"); for (uint256 i = 0; i < counts.length; i++) { require(totalSupply() + counts[i] <= MAX_SUPPLY, "Supply exceeded"); mintInternal(owners[i], counts[i]); mintedByOwner += counts[i]; } } /** * @dev Gets the price tier from token count */ function getPrice(uint256 count) public pure returns (uint256) { } /** * @dev Public minting */ function mint(uint256 count) public payable{ } /** * @dev Withdraw ether from this contract, callable by owner */ function withdraw() external onlyOwner { } }
!manualMintDisabled,"Not allowed"
382,514
!manualMintDisabled
"Supply exceeded"
pragma solidity ^0.8.0; contract EnchantedGolemsRockSociety is ERC721Enumerable, Ownable { using Address for address; using Strings for uint256; string public baseURI = ""; string public ipfsBaseURI = ""; mapping (uint256 => string) public tokenIdToIpfsHash; IERC1155 public WhitelistContract; uint256 public constant MAX_SUPPLY = 10000; uint256 public constant MAX_PER_TX = 15; bool public ipfsLocked = false; bool public manualMintDisabled = false; bool public publicSaleStarted = false; bool public presaleEnded = false; uint256 public mintedByOwner = 0; uint256 public constant RESERVED_FOR_OWNER = 160; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory _uri, address _whitelist) ERC721("Enchanted Golems Rock Society", "EGRS") { } /** * ------------ METADATA ------------ */ /** * @dev Gets base metadata URI */ function _baseURI() internal view override returns (string memory) { } /** * @dev Gets ipfs metadata URI */ function _ipfsBaseURI() internal view returns (string memory) { } /** * @dev Sets base metadata URI, callable by owner */ function setBaseUri(string memory _uri) external onlyOwner { } /** * @dev Sets ipfs metadata URI, callable by owner */ function setIpfsBaseUri(string memory _uri) external onlyOwner { } /** * @dev Lock ipfs metadata URI and hashes, callable by owner */ function lockIpfsMetadata() external onlyOwner { } /** * @dev Set manual ipfs hash for token, callable by owner */ function setIpfsHash(uint256 tokenId, string memory hash) external onlyOwner { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * ------------ SALE AND PRESALE ------------ */ /** * @dev Starts public sale, callable by owner */ function startPublicSale() external onlyOwner { } /** * @dev Ends the presale, callable by owner */ function endPresale() external onlyOwner { } /** * @dev Sets the whitelist contract applicable during presale, callable by owner */ function setWhitelistContract(address _contract) external onlyOwner { } /** * ------------ MINTING ------------ */ /** * @dev Mints `count` tokens to `to` address, internal */ function mintInternal(address to, uint256 count) internal { } /** * @dev Disables manual minting by owner, callable by owner */ function disableManualMint() public onlyOwner { } /** * @dev Manual minting by owner, callable by owner */ function mintOwner(address[] calldata owners, uint256[] calldata counts) public onlyOwner { require(!manualMintDisabled, "Not allowed"); require(owners.length == counts.length, "Bad length"); for (uint256 i = 0; i < counts.length; i++) { require(<FILL_ME>) mintInternal(owners[i], counts[i]); mintedByOwner += counts[i]; } } /** * @dev Gets the price tier from token count */ function getPrice(uint256 count) public pure returns (uint256) { } /** * @dev Public minting */ function mint(uint256 count) public payable{ } /** * @dev Withdraw ether from this contract, callable by owner */ function withdraw() external onlyOwner { } }
totalSupply()+counts[i]<=MAX_SUPPLY,"Supply exceeded"
382,514
totalSupply()+counts[i]<=MAX_SUPPLY
"Supply exceeded"
pragma solidity ^0.8.0; contract EnchantedGolemsRockSociety is ERC721Enumerable, Ownable { using Address for address; using Strings for uint256; string public baseURI = ""; string public ipfsBaseURI = ""; mapping (uint256 => string) public tokenIdToIpfsHash; IERC1155 public WhitelistContract; uint256 public constant MAX_SUPPLY = 10000; uint256 public constant MAX_PER_TX = 15; bool public ipfsLocked = false; bool public manualMintDisabled = false; bool public publicSaleStarted = false; bool public presaleEnded = false; uint256 public mintedByOwner = 0; uint256 public constant RESERVED_FOR_OWNER = 160; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory _uri, address _whitelist) ERC721("Enchanted Golems Rock Society", "EGRS") { } /** * ------------ METADATA ------------ */ /** * @dev Gets base metadata URI */ function _baseURI() internal view override returns (string memory) { } /** * @dev Gets ipfs metadata URI */ function _ipfsBaseURI() internal view returns (string memory) { } /** * @dev Sets base metadata URI, callable by owner */ function setBaseUri(string memory _uri) external onlyOwner { } /** * @dev Sets ipfs metadata URI, callable by owner */ function setIpfsBaseUri(string memory _uri) external onlyOwner { } /** * @dev Lock ipfs metadata URI and hashes, callable by owner */ function lockIpfsMetadata() external onlyOwner { } /** * @dev Set manual ipfs hash for token, callable by owner */ function setIpfsHash(uint256 tokenId, string memory hash) external onlyOwner { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * ------------ SALE AND PRESALE ------------ */ /** * @dev Starts public sale, callable by owner */ function startPublicSale() external onlyOwner { } /** * @dev Ends the presale, callable by owner */ function endPresale() external onlyOwner { } /** * @dev Sets the whitelist contract applicable during presale, callable by owner */ function setWhitelistContract(address _contract) external onlyOwner { } /** * ------------ MINTING ------------ */ /** * @dev Mints `count` tokens to `to` address, internal */ function mintInternal(address to, uint256 count) internal { } /** * @dev Disables manual minting by owner, callable by owner */ function disableManualMint() public onlyOwner { } /** * @dev Manual minting by owner, callable by owner */ function mintOwner(address[] calldata owners, uint256[] calldata counts) public onlyOwner { } /** * @dev Gets the price tier from token count */ function getPrice(uint256 count) public pure returns (uint256) { } /** * @dev Public minting */ function mint(uint256 count) public payable{ require(publicSaleStarted, "Sale not started"); require(count <= MAX_PER_TX, "Too many tokens"); require(msg.value == count * getPrice(count), "Ether value incorrect"); require(<FILL_ME>) if (!presaleEnded) { require(WhitelistContract.balanceOf(msg.sender, 0) > 0, "You need to be whitelisted to mint during presale"); } mintInternal(msg.sender, count); } /** * @dev Withdraw ether from this contract, callable by owner */ function withdraw() external onlyOwner { } }
(totalSupply()+(RESERVED_FOR_OWNER-mintedByOwner)+count)<=MAX_SUPPLY,"Supply exceeded"
382,514
(totalSupply()+(RESERVED_FOR_OWNER-mintedByOwner)+count)<=MAX_SUPPLY
"You need to be whitelisted to mint during presale"
pragma solidity ^0.8.0; contract EnchantedGolemsRockSociety is ERC721Enumerable, Ownable { using Address for address; using Strings for uint256; string public baseURI = ""; string public ipfsBaseURI = ""; mapping (uint256 => string) public tokenIdToIpfsHash; IERC1155 public WhitelistContract; uint256 public constant MAX_SUPPLY = 10000; uint256 public constant MAX_PER_TX = 15; bool public ipfsLocked = false; bool public manualMintDisabled = false; bool public publicSaleStarted = false; bool public presaleEnded = false; uint256 public mintedByOwner = 0; uint256 public constant RESERVED_FOR_OWNER = 160; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory _uri, address _whitelist) ERC721("Enchanted Golems Rock Society", "EGRS") { } /** * ------------ METADATA ------------ */ /** * @dev Gets base metadata URI */ function _baseURI() internal view override returns (string memory) { } /** * @dev Gets ipfs metadata URI */ function _ipfsBaseURI() internal view returns (string memory) { } /** * @dev Sets base metadata URI, callable by owner */ function setBaseUri(string memory _uri) external onlyOwner { } /** * @dev Sets ipfs metadata URI, callable by owner */ function setIpfsBaseUri(string memory _uri) external onlyOwner { } /** * @dev Lock ipfs metadata URI and hashes, callable by owner */ function lockIpfsMetadata() external onlyOwner { } /** * @dev Set manual ipfs hash for token, callable by owner */ function setIpfsHash(uint256 tokenId, string memory hash) external onlyOwner { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * ------------ SALE AND PRESALE ------------ */ /** * @dev Starts public sale, callable by owner */ function startPublicSale() external onlyOwner { } /** * @dev Ends the presale, callable by owner */ function endPresale() external onlyOwner { } /** * @dev Sets the whitelist contract applicable during presale, callable by owner */ function setWhitelistContract(address _contract) external onlyOwner { } /** * ------------ MINTING ------------ */ /** * @dev Mints `count` tokens to `to` address, internal */ function mintInternal(address to, uint256 count) internal { } /** * @dev Disables manual minting by owner, callable by owner */ function disableManualMint() public onlyOwner { } /** * @dev Manual minting by owner, callable by owner */ function mintOwner(address[] calldata owners, uint256[] calldata counts) public onlyOwner { } /** * @dev Gets the price tier from token count */ function getPrice(uint256 count) public pure returns (uint256) { } /** * @dev Public minting */ function mint(uint256 count) public payable{ require(publicSaleStarted, "Sale not started"); require(count <= MAX_PER_TX, "Too many tokens"); require(msg.value == count * getPrice(count), "Ether value incorrect"); require((totalSupply() + (RESERVED_FOR_OWNER - mintedByOwner) + count) <= MAX_SUPPLY, "Supply exceeded"); if (!presaleEnded) { require(<FILL_ME>) } mintInternal(msg.sender, count); } /** * @dev Withdraw ether from this contract, callable by owner */ function withdraw() external onlyOwner { } }
WhitelistContract.balanceOf(msg.sender,0)>0,"You need to be whitelisted to mint during presale"
382,514
WhitelistContract.balanceOf(msg.sender,0)>0
null
pragma solidity >=0.4.22 <0.6.0; interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract SafeMath { uint256 constant MAX_UINT256 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; function safeAdd(uint256 x, uint256 y) internal returns (uint256 z) { } function safeSub(uint256 x, uint256 y) internal returns (uint256 z) { } function safeMul(uint256 x, uint256 y) internal returns (uint256 z) { } } contract Owned { address public originalOwner; address public owner; constructor() public { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } } contract TokenERC20 is SafeMath, Owned{ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; uint256 public unitsOneEthCanBuy; bool public salerunning; uint256 public bonusinpercent; address payable fundsWallet; uint256 public totalEthInWei; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; mapping (address => bool) public frozenAccount; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed from, uint256 value); event FrozenFunds(address target, bool frozen); event Mint(address indexed _to, uint256 _value); function() payable external{ totalEthInWei = totalEthInWei + msg.value; fundsWallet.transfer(msg.value); // ETH from msg.sender -> fundsWallet if(salerunning){ uint256 amount = msg.value * (unitsOneEthCanBuy + (unitsOneEthCanBuy * bonusinpercent / 100)); require(<FILL_ME>) balanceOf[fundsWallet] = balanceOf[fundsWallet] - amount; balanceOf[msg.sender] = balanceOf[msg.sender] + amount; emit Transfer(fundsWallet, msg.sender, amount); } } /** * Batch Token transfer (Airdrop) function || Every address gets unique amount */ function bulkDropAllUnique(address[] memory _addrs, uint256[] memory _amounts)onlyOwner public returns (uint256 sendTokensTotal){ } /** * Batch Token transfer (Airdrop) function || All addresses get same amount */ function bulkDropAllSame(address[] memory _addrs, uint256 _amount)onlyOwner public returns (uint256 sendTokensTotal){ } /** * Batch Token transfer (Airdrop) function || Every address gets random amount (min,max) */ function bulkDropAllRandom(address[] memory _addrs, uint256 minimum, uint256 maximum)onlyOwner public returns (uint256 sendTokensTotal){ } uint nonce = 0; // Random integer between min and max function getRndInteger(uint256 min, uint256 max) internal returns (uint) { } /** * Setter for bonus of tokens user get for 1 ETH sending to contract */ function setBonus(uint256 bonus)onlyOwner public returns (bool success){ } /** * Setter for amount of tokens user get for 1 ETH sending to contract */ function setUnitsOneEthCanBuy(uint256 amount)onlyOwner public returns (bool success){ } /** * Setter for unlocking the sales (Send ETH, Get Token) */ function salesactive(bool active)onlyOwner public returns (bool success){ } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public returns (bool success) { } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { } /// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive function mintToken(address target, uint256 mintedAmount) onlyOwner public returns (bool success){ } /** * Destroy tokens * * Remove `burnAmount` tokens from the system irreversibly * * @param burnAmount the amount of money to burn */ function burn(uint256 burnAmount) public returns (bool success) { } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public returns (bool success) { } /// destroy the contract and reclaim the leftover funds. function kill() onlyOwner public returns (bool killed){ } } contract PublishedToken is TokenERC20{ uint256 tokenamount; /** * @dev Intialises token and all the necesary variable */ constructor() public{ } }
balanceOf[fundsWallet]>=amount
382,536
balanceOf[fundsWallet]>=amount
null
pragma solidity >=0.4.22 <0.6.0; interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract SafeMath { uint256 constant MAX_UINT256 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; function safeAdd(uint256 x, uint256 y) internal returns (uint256 z) { } function safeSub(uint256 x, uint256 y) internal returns (uint256 z) { } function safeMul(uint256 x, uint256 y) internal returns (uint256 z) { } } contract Owned { address public originalOwner; address public owner; constructor() public { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } } contract TokenERC20 is SafeMath, Owned{ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; uint256 public unitsOneEthCanBuy; bool public salerunning; uint256 public bonusinpercent; address payable fundsWallet; uint256 public totalEthInWei; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; mapping (address => bool) public frozenAccount; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed from, uint256 value); event FrozenFunds(address target, bool frozen); event Mint(address indexed _to, uint256 _value); function() payable external{ } /** * Batch Token transfer (Airdrop) function || Every address gets unique amount */ function bulkDropAllUnique(address[] memory _addrs, uint256[] memory _amounts)onlyOwner public returns (uint256 sendTokensTotal){ } /** * Batch Token transfer (Airdrop) function || All addresses get same amount */ function bulkDropAllSame(address[] memory _addrs, uint256 _amount)onlyOwner public returns (uint256 sendTokensTotal){ } /** * Batch Token transfer (Airdrop) function || Every address gets random amount (min,max) */ function bulkDropAllRandom(address[] memory _addrs, uint256 minimum, uint256 maximum)onlyOwner public returns (uint256 sendTokensTotal){ } uint nonce = 0; // Random integer between min and max function getRndInteger(uint256 min, uint256 max) internal returns (uint) { } /** * Setter for bonus of tokens user get for 1 ETH sending to contract */ function setBonus(uint256 bonus)onlyOwner public returns (bool success){ } /** * Setter for amount of tokens user get for 1 ETH sending to contract */ function setUnitsOneEthCanBuy(uint256 amount)onlyOwner public returns (bool success){ } /** * Setter for unlocking the sales (Send ETH, Get Token) */ function salesactive(bool active)onlyOwner public returns (bool success){ } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { require(!frozenAccount[_from]); // Check if sender is frozen require(!frozenAccount[_to]); // Check if recipient is frozen require (_to != address(0x0)); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require(<FILL_ME>) // Check for overflows uint previousBalances = safeAdd(balanceOf[_from], balanceOf[_to]); // Save this for an assertion in the future balanceOf[_from] = safeSub(balanceOf[_from], _value); // Subtract from the sender balanceOf[_to] = safeAdd(balanceOf[_to], _value); // Add the same to the recipient emit Transfer(_from, _to, _value); assert(safeAdd(balanceOf[_from], balanceOf[_to]) == previousBalances); // Asserts are used to use static analysis to find bugs in your code. They should never fail } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public returns (bool success) { } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { } /// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive function mintToken(address target, uint256 mintedAmount) onlyOwner public returns (bool success){ } /** * Destroy tokens * * Remove `burnAmount` tokens from the system irreversibly * * @param burnAmount the amount of money to burn */ function burn(uint256 burnAmount) public returns (bool success) { } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public returns (bool success) { } /// destroy the contract and reclaim the leftover funds. function kill() onlyOwner public returns (bool killed){ } } contract PublishedToken is TokenERC20{ uint256 tokenamount; /** * @dev Intialises token and all the necesary variable */ constructor() public{ } }
safeAdd(balanceOf[_to],_value)>=balanceOf[_to]
382,536
safeAdd(balanceOf[_to],_value)>=balanceOf[_to]
null
pragma solidity >=0.4.22 <0.6.0; interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract SafeMath { uint256 constant MAX_UINT256 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; function safeAdd(uint256 x, uint256 y) internal returns (uint256 z) { } function safeSub(uint256 x, uint256 y) internal returns (uint256 z) { } function safeMul(uint256 x, uint256 y) internal returns (uint256 z) { } } contract Owned { address public originalOwner; address public owner; constructor() public { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } } contract TokenERC20 is SafeMath, Owned{ string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; uint256 public unitsOneEthCanBuy; bool public salerunning; uint256 public bonusinpercent; address payable fundsWallet; uint256 public totalEthInWei; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; mapping (address => bool) public frozenAccount; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed from, uint256 value); event FrozenFunds(address target, bool frozen); event Mint(address indexed _to, uint256 _value); function() payable external{ } /** * Batch Token transfer (Airdrop) function || Every address gets unique amount */ function bulkDropAllUnique(address[] memory _addrs, uint256[] memory _amounts)onlyOwner public returns (uint256 sendTokensTotal){ } /** * Batch Token transfer (Airdrop) function || All addresses get same amount */ function bulkDropAllSame(address[] memory _addrs, uint256 _amount)onlyOwner public returns (uint256 sendTokensTotal){ } /** * Batch Token transfer (Airdrop) function || Every address gets random amount (min,max) */ function bulkDropAllRandom(address[] memory _addrs, uint256 minimum, uint256 maximum)onlyOwner public returns (uint256 sendTokensTotal){ } uint nonce = 0; // Random integer between min and max function getRndInteger(uint256 min, uint256 max) internal returns (uint) { } /** * Setter for bonus of tokens user get for 1 ETH sending to contract */ function setBonus(uint256 bonus)onlyOwner public returns (bool success){ } /** * Setter for amount of tokens user get for 1 ETH sending to contract */ function setUnitsOneEthCanBuy(uint256 amount)onlyOwner public returns (bool success){ } /** * Setter for unlocking the sales (Send ETH, Get Token) */ function salesactive(bool active)onlyOwner public returns (bool success){ } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public returns (bool success) { } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { } /// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive function mintToken(address target, uint256 mintedAmount) onlyOwner public returns (bool success){ } /** * Destroy tokens * * Remove `burnAmount` tokens from the system irreversibly * * @param burnAmount the amount of money to burn */ function burn(uint256 burnAmount) public returns (bool success) { require(<FILL_ME>) // Check if the sender has enough totalSupply = safeSub(totalSupply, burnAmount); // Subtract from total supply balanceOf[msg.sender] = safeSub(balanceOf[msg.sender], burnAmount); // Subtract from the sender emit Burn(msg.sender, burnAmount); return true; } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public returns (bool success) { } /// destroy the contract and reclaim the leftover funds. function kill() onlyOwner public returns (bool killed){ } } contract PublishedToken is TokenERC20{ uint256 tokenamount; /** * @dev Intialises token and all the necesary variable */ constructor() public{ } }
balanceOf[msg.sender]>=burnAmount
382,536
balanceOf[msg.sender]>=burnAmount
"Already Finalized"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/utils/Strings.sol"; import "./core/Base.sol"; contract ERC721EP is ERC721EBase { using Strings for uint256; address private constant _supporter_addr = 0xCF9542a8522E685a46007319Af9C39F4Fde9d88a; bool private _final = false; mapping(uint256 => bool) private _freez; uint256 private _mintFee = 0.03 ether; bool private _autoFreeze = true; event ContractFinalize(address indexed sender); constructor(string memory name_, string memory symbol_, uint256 royalty, uint256 mintFee_) ERC721EBase(name_, symbol_, _supporter_addr, royalty) { } function getOwnerFee() public view returns(uint256) { } function withdrawETH() external virtual onlyAdmin emergencyMode override { } function putTokenURI(uint256 tokenId, string memory uri) external onlySupporter { require(<FILL_ME>) require(tokenOwnerIsCreator(tokenId), "Can not write"); _setTokenURI(tokenId, uri); } function enableAutoFreez() public virtual onlySupporter { } function disableAutoFreez() public virtual onlySupporter { } function setMintFee(uint256 fee) public onlySupporter { } function getMintFee() external view returns(uint256) { } function mint(string memory uri) public payable onlyOwner emergencyMode { } function finalize() public virtual onlySupporter { } function freezing(uint256 tokenId) public onlyAdmin emergencyMode { } function isFinalize() external view returns( bool ) { } function isFreezing(uint256 tokenId) external view returns( bool ) { } }
!_final,"Already Finalized"
382,581
!_final
"Can not write"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts/utils/Strings.sol"; import "./core/Base.sol"; contract ERC721EP is ERC721EBase { using Strings for uint256; address private constant _supporter_addr = 0xCF9542a8522E685a46007319Af9C39F4Fde9d88a; bool private _final = false; mapping(uint256 => bool) private _freez; uint256 private _mintFee = 0.03 ether; bool private _autoFreeze = true; event ContractFinalize(address indexed sender); constructor(string memory name_, string memory symbol_, uint256 royalty, uint256 mintFee_) ERC721EBase(name_, symbol_, _supporter_addr, royalty) { } function getOwnerFee() public view returns(uint256) { } function withdrawETH() external virtual onlyAdmin emergencyMode override { } function putTokenURI(uint256 tokenId, string memory uri) external onlySupporter { require(!_final, "Already Finalized"); require(<FILL_ME>) _setTokenURI(tokenId, uri); } function enableAutoFreez() public virtual onlySupporter { } function disableAutoFreez() public virtual onlySupporter { } function setMintFee(uint256 fee) public onlySupporter { } function getMintFee() external view returns(uint256) { } function mint(string memory uri) public payable onlyOwner emergencyMode { } function finalize() public virtual onlySupporter { } function freezing(uint256 tokenId) public onlyAdmin emergencyMode { } function isFinalize() external view returns( bool ) { } function isFreezing(uint256 tokenId) external view returns( bool ) { } }
tokenOwnerIsCreator(tokenId),"Can not write"
382,581
tokenOwnerIsCreator(tokenId)
"Restricted to minters."
pragma solidity 0.6.7; import "./../openzeppelin/contracts/access/AccessControl.sol"; import "./../openzeppelin/contracts/math/SafeMath.sol"; import "./NftTypes.sol"; import "./SeascapeNft.sol"; /// @title Nft Factory mints Seascape NFTs /// @notice Nft factory has gives to other contracts or wallet addresses permission /// to mint NFTs. It gives two type of permission set as roles: /// /// Static role - allows to mint only Common quality NFTs /// Generator role - allows to mint NFT of any quality. /// /// Nft Factory can revoke the role, or give it to any number of contracts. contract NftFactory is AccessControl { using SafeMath for uint256; using NftTypes for NftTypes; bytes32 public constant STATIC_ROLE = keccak256("STATIC"); bytes32 public constant GENERATOR_ROLE = keccak256("GENERATOR"); SeascapeNft private nft; constructor(address _nft) public { } //-------------------------------------------------- // Only Seascape Staking contract //-------------------------------------------------- function mint(address _owner, uint256 _generation) public onlyStaticUser returns(uint256) { } function mintQuality(address _owner, uint256 _generation, uint8 _quality) public onlyGenerator returns(uint256) { } //-------------------------------------------------- // Only owner //-------------------------------------------------- function setNft(address _nft) public onlyAdmin { } /// @dev Add an account to the admin role. Restricted to admins. function addAdmin(address account) public virtual onlyAdmin { } /// @dev Remove oneself from the admin role. function renounceAdmin() public virtual { } /// @dev Return `true` if the account belongs to the admin role. function isAdmin(address account) public virtual view returns (bool) { } /// @dev Restricted to members of the admin role. modifier onlyAdmin() { } /// @dev Restricted to members of the user role. modifier onlyStaticUser() { require(<FILL_ME>) _; } /// @dev Return `true` if the account belongs to the user role. function isStaticUser(address account) public virtual view returns (bool) { } /// @dev Add an account to the user role. Restricted to admins. function addStaticUser(address account) public virtual onlyAdmin { } /// @dev Remove an account from the user role. Restricted to admins. function removeStaticUser(address account) public virtual onlyAdmin { } /// @dev Restricted to members of the user role. modifier onlyGenerator() { } /// @dev Return `true` if the account belongs to the user role. function isGenerator(address account) public virtual view returns (bool) { } /// @dev Add an account to the user role. Restricted to admins. function addGenerator(address account) public virtual onlyAdmin { } /// @dev Remove an account from the user role. Restricted to admins. function removeGenerator(address account) public virtual onlyAdmin { } }
isStaticUser(msg.sender),"Restricted to minters."
382,601
isStaticUser(msg.sender)
"Restricted to random generator."
pragma solidity 0.6.7; import "./../openzeppelin/contracts/access/AccessControl.sol"; import "./../openzeppelin/contracts/math/SafeMath.sol"; import "./NftTypes.sol"; import "./SeascapeNft.sol"; /// @title Nft Factory mints Seascape NFTs /// @notice Nft factory has gives to other contracts or wallet addresses permission /// to mint NFTs. It gives two type of permission set as roles: /// /// Static role - allows to mint only Common quality NFTs /// Generator role - allows to mint NFT of any quality. /// /// Nft Factory can revoke the role, or give it to any number of contracts. contract NftFactory is AccessControl { using SafeMath for uint256; using NftTypes for NftTypes; bytes32 public constant STATIC_ROLE = keccak256("STATIC"); bytes32 public constant GENERATOR_ROLE = keccak256("GENERATOR"); SeascapeNft private nft; constructor(address _nft) public { } //-------------------------------------------------- // Only Seascape Staking contract //-------------------------------------------------- function mint(address _owner, uint256 _generation) public onlyStaticUser returns(uint256) { } function mintQuality(address _owner, uint256 _generation, uint8 _quality) public onlyGenerator returns(uint256) { } //-------------------------------------------------- // Only owner //-------------------------------------------------- function setNft(address _nft) public onlyAdmin { } /// @dev Add an account to the admin role. Restricted to admins. function addAdmin(address account) public virtual onlyAdmin { } /// @dev Remove oneself from the admin role. function renounceAdmin() public virtual { } /// @dev Return `true` if the account belongs to the admin role. function isAdmin(address account) public virtual view returns (bool) { } /// @dev Restricted to members of the admin role. modifier onlyAdmin() { } /// @dev Restricted to members of the user role. modifier onlyStaticUser() { } /// @dev Return `true` if the account belongs to the user role. function isStaticUser(address account) public virtual view returns (bool) { } /// @dev Add an account to the user role. Restricted to admins. function addStaticUser(address account) public virtual onlyAdmin { } /// @dev Remove an account from the user role. Restricted to admins. function removeStaticUser(address account) public virtual onlyAdmin { } /// @dev Restricted to members of the user role. modifier onlyGenerator() { require(<FILL_ME>) _; } /// @dev Return `true` if the account belongs to the user role. function isGenerator(address account) public virtual view returns (bool) { } /// @dev Add an account to the user role. Restricted to admins. function addGenerator(address account) public virtual onlyAdmin { } /// @dev Remove an account from the user role. Restricted to admins. function removeGenerator(address account) public virtual onlyAdmin { } }
isGenerator(msg.sender),"Restricted to random generator."
382,601
isGenerator(msg.sender)
"Insufficient SWAP AFT balance"
/** *Submitted for verification at Etherscan.io on 2020-09-02 */ /* * @dev This is the Axia Protocol Staking pool 3 contract (SWAP Pool), * a part of the protocol where stakers are rewarded in AXIA tokens * when they make stakes of liquidity tokens from the oracle pool. * stakers reward come from the daily emission from the total supply into circulation, * this happens daily and upon the reach of a new epoch each made of 180 days, * halvings are experienced on the emitting amount of tokens. * on the 11th epoch all the tokens would have been completed emitted into circulation, * from here on, the stakers will still be earning from daily emissions * which would now be coming from the accumulated basis points over the epochs. * stakers are not charged any fee for unstaking. */ pragma solidity 0.6.4; 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 { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract USP{ using SafeMath for uint256; //======================================EVENTS=========================================// event StakeEvent(address indexed staker, address indexed pool, uint amount); event UnstakeEvent(address indexed unstaker, address indexed pool, uint amount); event RewardEvent(address indexed staker, address indexed pool, uint amount); event RewardStake(address indexed staker, address indexed pool, uint amount); //======================================STAKING POOLS=========================================// address public Axiatoken; address public UniswapV2; bool public stakingEnabled; uint256 constant private FLOAT_SCALAR = 2**64; uint256 public MINIMUM_STAKE = 1000000000000000000; // 1 minimum uint256 public MIN_DIVIDENDS_DUR = 18 hours; uint public infocheck; struct User { uint256 balance; uint256 frozen; int256 scaledPayout; uint256 staketime; } struct Info { uint256 totalSupply; uint256 totalFrozen; mapping(address => User) users; uint256 scaledPayoutPerToken; //pool balance address admin; } Info private info; constructor() public { } //======================================ADMINSTRATION=========================================// modifier onlyCreator() { } modifier onlyAxiaToken() { } function tokenconfigs(address _axiatoken, address _univ2) public onlyCreator returns (bool success) { } function _minStakeAmount(uint256 _number) onlyCreator public { } function stakingStatus(bool _status) public onlyCreator { } function MIN_DIVIDENDS_DUR_TIME(uint256 _minDuration) public onlyCreator { } //======================================USER WRITE=========================================// function StakeAxiaTokens(uint256 _tokens) external { } function UnstakeAxiaTokens(uint256 _tokens) external { } //======================================USER READ=========================================// function totalFrozen() public view returns (uint256) { } function frozenOf(address _user) public view returns (uint256) { } function dividendsOf(address _user) public view returns (uint256) { } function userData(address _user) public view returns (uint256 totalTokensFrozen, uint256 userFrozen, uint256 userDividends, uint256 userStaketime, int256 scaledPayout) { } //======================================ACTION CALLS=========================================// function _stake(uint256 _amount) internal { require(stakingEnabled, "Staking not yet initialized"); require(<FILL_ME>) require(frozenOf(msg.sender) + _amount >= MINIMUM_STAKE, "Your amount is lower than the minimum amount allowed to stake"); require(IERC20(UniswapV2).allowance(msg.sender, address(this)) >= _amount, "Not enough allowance given to contract yet to spend by user"); info.users[msg.sender].staketime = now; info.totalFrozen += _amount; info.users[msg.sender].frozen += _amount; info.users[msg.sender].scaledPayout += int256(_amount * info.scaledPayoutPerToken); IERC20(UniswapV2).transferFrom(msg.sender, address(this), _amount); // Transfer liquidity tokens from the sender to this contract emit StakeEvent(msg.sender, address(this), _amount); } function _unstake(uint256 _amount) internal { } function TakeDividends() external returns (uint256) { } function scaledToken(uint _amount) external onlyAxiaToken returns(bool){ } function mulDiv (uint x, uint y, uint z) public pure returns (uint) { } function fullMul (uint x, uint y) private pure returns (uint l, uint h) { } }
IERC20(UniswapV2).balanceOf(msg.sender)>=_amount,"Insufficient SWAP AFT balance"
382,635
IERC20(UniswapV2).balanceOf(msg.sender)>=_amount
"Your amount is lower than the minimum amount allowed to stake"
/** *Submitted for verification at Etherscan.io on 2020-09-02 */ /* * @dev This is the Axia Protocol Staking pool 3 contract (SWAP Pool), * a part of the protocol where stakers are rewarded in AXIA tokens * when they make stakes of liquidity tokens from the oracle pool. * stakers reward come from the daily emission from the total supply into circulation, * this happens daily and upon the reach of a new epoch each made of 180 days, * halvings are experienced on the emitting amount of tokens. * on the 11th epoch all the tokens would have been completed emitted into circulation, * from here on, the stakers will still be earning from daily emissions * which would now be coming from the accumulated basis points over the epochs. * stakers are not charged any fee for unstaking. */ pragma solidity 0.6.4; 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 { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract USP{ using SafeMath for uint256; //======================================EVENTS=========================================// event StakeEvent(address indexed staker, address indexed pool, uint amount); event UnstakeEvent(address indexed unstaker, address indexed pool, uint amount); event RewardEvent(address indexed staker, address indexed pool, uint amount); event RewardStake(address indexed staker, address indexed pool, uint amount); //======================================STAKING POOLS=========================================// address public Axiatoken; address public UniswapV2; bool public stakingEnabled; uint256 constant private FLOAT_SCALAR = 2**64; uint256 public MINIMUM_STAKE = 1000000000000000000; // 1 minimum uint256 public MIN_DIVIDENDS_DUR = 18 hours; uint public infocheck; struct User { uint256 balance; uint256 frozen; int256 scaledPayout; uint256 staketime; } struct Info { uint256 totalSupply; uint256 totalFrozen; mapping(address => User) users; uint256 scaledPayoutPerToken; //pool balance address admin; } Info private info; constructor() public { } //======================================ADMINSTRATION=========================================// modifier onlyCreator() { } modifier onlyAxiaToken() { } function tokenconfigs(address _axiatoken, address _univ2) public onlyCreator returns (bool success) { } function _minStakeAmount(uint256 _number) onlyCreator public { } function stakingStatus(bool _status) public onlyCreator { } function MIN_DIVIDENDS_DUR_TIME(uint256 _minDuration) public onlyCreator { } //======================================USER WRITE=========================================// function StakeAxiaTokens(uint256 _tokens) external { } function UnstakeAxiaTokens(uint256 _tokens) external { } //======================================USER READ=========================================// function totalFrozen() public view returns (uint256) { } function frozenOf(address _user) public view returns (uint256) { } function dividendsOf(address _user) public view returns (uint256) { } function userData(address _user) public view returns (uint256 totalTokensFrozen, uint256 userFrozen, uint256 userDividends, uint256 userStaketime, int256 scaledPayout) { } //======================================ACTION CALLS=========================================// function _stake(uint256 _amount) internal { require(stakingEnabled, "Staking not yet initialized"); require(IERC20(UniswapV2).balanceOf(msg.sender) >= _amount, "Insufficient SWAP AFT balance"); require(<FILL_ME>) require(IERC20(UniswapV2).allowance(msg.sender, address(this)) >= _amount, "Not enough allowance given to contract yet to spend by user"); info.users[msg.sender].staketime = now; info.totalFrozen += _amount; info.users[msg.sender].frozen += _amount; info.users[msg.sender].scaledPayout += int256(_amount * info.scaledPayoutPerToken); IERC20(UniswapV2).transferFrom(msg.sender, address(this), _amount); // Transfer liquidity tokens from the sender to this contract emit StakeEvent(msg.sender, address(this), _amount); } function _unstake(uint256 _amount) internal { } function TakeDividends() external returns (uint256) { } function scaledToken(uint _amount) external onlyAxiaToken returns(bool){ } function mulDiv (uint x, uint y, uint z) public pure returns (uint) { } function fullMul (uint x, uint y) private pure returns (uint l, uint h) { } }
frozenOf(msg.sender)+_amount>=MINIMUM_STAKE,"Your amount is lower than the minimum amount allowed to stake"
382,635
frozenOf(msg.sender)+_amount>=MINIMUM_STAKE
"Not enough allowance given to contract yet to spend by user"
/** *Submitted for verification at Etherscan.io on 2020-09-02 */ /* * @dev This is the Axia Protocol Staking pool 3 contract (SWAP Pool), * a part of the protocol where stakers are rewarded in AXIA tokens * when they make stakes of liquidity tokens from the oracle pool. * stakers reward come from the daily emission from the total supply into circulation, * this happens daily and upon the reach of a new epoch each made of 180 days, * halvings are experienced on the emitting amount of tokens. * on the 11th epoch all the tokens would have been completed emitted into circulation, * from here on, the stakers will still be earning from daily emissions * which would now be coming from the accumulated basis points over the epochs. * stakers are not charged any fee for unstaking. */ pragma solidity 0.6.4; 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 { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract USP{ using SafeMath for uint256; //======================================EVENTS=========================================// event StakeEvent(address indexed staker, address indexed pool, uint amount); event UnstakeEvent(address indexed unstaker, address indexed pool, uint amount); event RewardEvent(address indexed staker, address indexed pool, uint amount); event RewardStake(address indexed staker, address indexed pool, uint amount); //======================================STAKING POOLS=========================================// address public Axiatoken; address public UniswapV2; bool public stakingEnabled; uint256 constant private FLOAT_SCALAR = 2**64; uint256 public MINIMUM_STAKE = 1000000000000000000; // 1 minimum uint256 public MIN_DIVIDENDS_DUR = 18 hours; uint public infocheck; struct User { uint256 balance; uint256 frozen; int256 scaledPayout; uint256 staketime; } struct Info { uint256 totalSupply; uint256 totalFrozen; mapping(address => User) users; uint256 scaledPayoutPerToken; //pool balance address admin; } Info private info; constructor() public { } //======================================ADMINSTRATION=========================================// modifier onlyCreator() { } modifier onlyAxiaToken() { } function tokenconfigs(address _axiatoken, address _univ2) public onlyCreator returns (bool success) { } function _minStakeAmount(uint256 _number) onlyCreator public { } function stakingStatus(bool _status) public onlyCreator { } function MIN_DIVIDENDS_DUR_TIME(uint256 _minDuration) public onlyCreator { } //======================================USER WRITE=========================================// function StakeAxiaTokens(uint256 _tokens) external { } function UnstakeAxiaTokens(uint256 _tokens) external { } //======================================USER READ=========================================// function totalFrozen() public view returns (uint256) { } function frozenOf(address _user) public view returns (uint256) { } function dividendsOf(address _user) public view returns (uint256) { } function userData(address _user) public view returns (uint256 totalTokensFrozen, uint256 userFrozen, uint256 userDividends, uint256 userStaketime, int256 scaledPayout) { } //======================================ACTION CALLS=========================================// function _stake(uint256 _amount) internal { require(stakingEnabled, "Staking not yet initialized"); require(IERC20(UniswapV2).balanceOf(msg.sender) >= _amount, "Insufficient SWAP AFT balance"); require(frozenOf(msg.sender) + _amount >= MINIMUM_STAKE, "Your amount is lower than the minimum amount allowed to stake"); require(<FILL_ME>) info.users[msg.sender].staketime = now; info.totalFrozen += _amount; info.users[msg.sender].frozen += _amount; info.users[msg.sender].scaledPayout += int256(_amount * info.scaledPayoutPerToken); IERC20(UniswapV2).transferFrom(msg.sender, address(this), _amount); // Transfer liquidity tokens from the sender to this contract emit StakeEvent(msg.sender, address(this), _amount); } function _unstake(uint256 _amount) internal { } function TakeDividends() external returns (uint256) { } function scaledToken(uint _amount) external onlyAxiaToken returns(bool){ } function mulDiv (uint x, uint y, uint z) public pure returns (uint) { } function fullMul (uint x, uint y) private pure returns (uint l, uint h) { } }
IERC20(UniswapV2).allowance(msg.sender,address(this))>=_amount,"Not enough allowance given to contract yet to spend by user"
382,635
IERC20(UniswapV2).allowance(msg.sender,address(this))>=_amount
"Transaction failed"
/** *Submitted for verification at Etherscan.io on 2020-09-02 */ /* * @dev This is the Axia Protocol Staking pool 3 contract (SWAP Pool), * a part of the protocol where stakers are rewarded in AXIA tokens * when they make stakes of liquidity tokens from the oracle pool. * stakers reward come from the daily emission from the total supply into circulation, * this happens daily and upon the reach of a new epoch each made of 180 days, * halvings are experienced on the emitting amount of tokens. * on the 11th epoch all the tokens would have been completed emitted into circulation, * from here on, the stakers will still be earning from daily emissions * which would now be coming from the accumulated basis points over the epochs. * stakers are not charged any fee for unstaking. */ pragma solidity 0.6.4; 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 { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract USP{ using SafeMath for uint256; //======================================EVENTS=========================================// event StakeEvent(address indexed staker, address indexed pool, uint amount); event UnstakeEvent(address indexed unstaker, address indexed pool, uint amount); event RewardEvent(address indexed staker, address indexed pool, uint amount); event RewardStake(address indexed staker, address indexed pool, uint amount); //======================================STAKING POOLS=========================================// address public Axiatoken; address public UniswapV2; bool public stakingEnabled; uint256 constant private FLOAT_SCALAR = 2**64; uint256 public MINIMUM_STAKE = 1000000000000000000; // 1 minimum uint256 public MIN_DIVIDENDS_DUR = 18 hours; uint public infocheck; struct User { uint256 balance; uint256 frozen; int256 scaledPayout; uint256 staketime; } struct Info { uint256 totalSupply; uint256 totalFrozen; mapping(address => User) users; uint256 scaledPayoutPerToken; //pool balance address admin; } Info private info; constructor() public { } //======================================ADMINSTRATION=========================================// modifier onlyCreator() { } modifier onlyAxiaToken() { } function tokenconfigs(address _axiatoken, address _univ2) public onlyCreator returns (bool success) { } function _minStakeAmount(uint256 _number) onlyCreator public { } function stakingStatus(bool _status) public onlyCreator { } function MIN_DIVIDENDS_DUR_TIME(uint256 _minDuration) public onlyCreator { } //======================================USER WRITE=========================================// function StakeAxiaTokens(uint256 _tokens) external { } function UnstakeAxiaTokens(uint256 _tokens) external { } //======================================USER READ=========================================// function totalFrozen() public view returns (uint256) { } function frozenOf(address _user) public view returns (uint256) { } function dividendsOf(address _user) public view returns (uint256) { } function userData(address _user) public view returns (uint256 totalTokensFrozen, uint256 userFrozen, uint256 userDividends, uint256 userStaketime, int256 scaledPayout) { } //======================================ACTION CALLS=========================================// function _stake(uint256 _amount) internal { } function _unstake(uint256 _amount) internal { require(frozenOf(msg.sender) >= _amount, "You currently do not have up to that amount staked"); info.totalFrozen -= _amount; info.users[msg.sender].frozen -= _amount; info.users[msg.sender].scaledPayout -= int256(_amount * info.scaledPayoutPerToken); require(<FILL_ME>) emit UnstakeEvent(address(this), msg.sender, _amount); } function TakeDividends() external returns (uint256) { } function scaledToken(uint _amount) external onlyAxiaToken returns(bool){ } function mulDiv (uint x, uint y, uint z) public pure returns (uint) { } function fullMul (uint x, uint y) private pure returns (uint l, uint h) { } }
IERC20(UniswapV2).transfer(msg.sender,_amount),"Transaction failed"
382,635
IERC20(UniswapV2).transfer(msg.sender,_amount)
"Transaction Failed"
/** *Submitted for verification at Etherscan.io on 2020-09-02 */ /* * @dev This is the Axia Protocol Staking pool 3 contract (SWAP Pool), * a part of the protocol where stakers are rewarded in AXIA tokens * when they make stakes of liquidity tokens from the oracle pool. * stakers reward come from the daily emission from the total supply into circulation, * this happens daily and upon the reach of a new epoch each made of 180 days, * halvings are experienced on the emitting amount of tokens. * on the 11th epoch all the tokens would have been completed emitted into circulation, * from here on, the stakers will still be earning from daily emissions * which would now be coming from the accumulated basis points over the epochs. * stakers are not charged any fee for unstaking. */ pragma solidity 0.6.4; 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 { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract USP{ using SafeMath for uint256; //======================================EVENTS=========================================// event StakeEvent(address indexed staker, address indexed pool, uint amount); event UnstakeEvent(address indexed unstaker, address indexed pool, uint amount); event RewardEvent(address indexed staker, address indexed pool, uint amount); event RewardStake(address indexed staker, address indexed pool, uint amount); //======================================STAKING POOLS=========================================// address public Axiatoken; address public UniswapV2; bool public stakingEnabled; uint256 constant private FLOAT_SCALAR = 2**64; uint256 public MINIMUM_STAKE = 1000000000000000000; // 1 minimum uint256 public MIN_DIVIDENDS_DUR = 18 hours; uint public infocheck; struct User { uint256 balance; uint256 frozen; int256 scaledPayout; uint256 staketime; } struct Info { uint256 totalSupply; uint256 totalFrozen; mapping(address => User) users; uint256 scaledPayoutPerToken; //pool balance address admin; } Info private info; constructor() public { } //======================================ADMINSTRATION=========================================// modifier onlyCreator() { } modifier onlyAxiaToken() { } function tokenconfigs(address _axiatoken, address _univ2) public onlyCreator returns (bool success) { } function _minStakeAmount(uint256 _number) onlyCreator public { } function stakingStatus(bool _status) public onlyCreator { } function MIN_DIVIDENDS_DUR_TIME(uint256 _minDuration) public onlyCreator { } //======================================USER WRITE=========================================// function StakeAxiaTokens(uint256 _tokens) external { } function UnstakeAxiaTokens(uint256 _tokens) external { } //======================================USER READ=========================================// function totalFrozen() public view returns (uint256) { } function frozenOf(address _user) public view returns (uint256) { } function dividendsOf(address _user) public view returns (uint256) { } function userData(address _user) public view returns (uint256 totalTokensFrozen, uint256 userFrozen, uint256 userDividends, uint256 userStaketime, int256 scaledPayout) { } //======================================ACTION CALLS=========================================// function _stake(uint256 _amount) internal { } function _unstake(uint256 _amount) internal { } function TakeDividends() external returns (uint256) { uint256 _dividends = dividendsOf(msg.sender); require(_dividends >= 0, "you do not have any dividend yet"); info.users[msg.sender].scaledPayout += int256(_dividends * FLOAT_SCALAR); require(<FILL_ME>) // Transfer dividends to msg.sender emit RewardEvent(msg.sender, address(this), _dividends); return _dividends; } function scaledToken(uint _amount) external onlyAxiaToken returns(bool){ } function mulDiv (uint x, uint y, uint z) public pure returns (uint) { } function fullMul (uint x, uint y) private pure returns (uint l, uint h) { } }
IERC20(Axiatoken).transfer(msg.sender,_dividends),"Transaction Failed"
382,635
IERC20(Axiatoken).transfer(msg.sender,_dividends)
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) { } } contract SuperOwners { address public owner1; address public pendingOwner1; address public owner2; address public pendingOwner2; function SuperOwners(address _owner1, address _owner2) internal { } modifier onlySuperOwner1() { } modifier onlySuperOwner2() { } /** Any of the owners can execute this. */ modifier onlySuperOwner() { require(<FILL_ME>) _; } /** Is msg.sender any of the owners. */ function isSuperOwner(address _addr) public view returns (bool) { } /** * Safe transfer of ownership in 2 steps. Once called, a newOwner needs * to call claimOwnership() to prove ownership. */ function transferOwnership1(address _newOwner1) onlySuperOwner1 public { } function transferOwnership2(address _newOwner2) onlySuperOwner2 public { } function claimOwnership1() public { } function claimOwnership2() public { } } contract MultiOwnable is SuperOwners { mapping (address => bool) public ownerMap; address[] public ownerHistory; event OwnerAddedEvent(address indexed _newOwner); event OwnerRemovedEvent(address indexed _oldOwner); function MultiOwnable(address _owner1, address _owner2) SuperOwners(_owner1, _owner2) internal {} modifier onlyOwner() { } function isOwner(address owner) public view returns (bool) { } function ownerHistoryCount() public view returns (uint) { } // Add extra owner function addOwner(address owner) onlySuperOwner public { } // Remove extra owner function removeOwner(address owner) onlySuperOwner public { } } contract Pausable is MultiOwnable { bool public paused; modifier ifNotPaused { } modifier ifPaused { } // Called by the owner on emergency, triggers paused state function pause() external onlySuperOwner { } // Called by the owner on end of emergency, returns to normal state function resume() external onlySuperOwner ifPaused { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract StandardToken is ERC20 { using SafeMath for uint; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; function balanceOf(address _owner) public view returns (uint256 balance) { } function transfer(address _to, uint256 _value) public returns (bool) { } /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success. /// @param _from Address from where tokens are withdrawn. /// @param _to Address to where tokens are sent. /// @param _value Number of tokens to transfer. function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /// @dev Sets approved amount of tokens for spender. Returns success. /// @param _spender Address of allowed account. /// @param _value Number of approved tokens. function approve(address _spender, uint256 _value) public returns (bool) { } /// @dev Returns number of allowed tokens for given address. /// @param _owner Address of token owner. /// @param _spender Address of token spender. function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } } contract CommonToken is StandardToken, MultiOwnable { string public name; string public symbol; uint256 public totalSupply; uint8 public decimals = 18; string public version = 'v0.1'; address public seller; // The main account that holds all tokens at the beginning and during tokensale. uint256 public saleLimit; // (e18) How many tokens can be sold in total through all tiers or tokensales. uint256 public tokensSold; // (e18) Number of tokens sold through all tiers or tokensales. uint256 public totalSales; // Total number of sales (including external sales) made through all tiers or tokensales. // Lock the transfer functions during tokensales to prevent price speculations. bool public locked = true; event SellEvent(address indexed _seller, address indexed _buyer, uint256 _value); event ChangeSellerEvent(address indexed _oldSeller, address indexed _newSeller); event Burn(address indexed _burner, uint256 _value); event Unlock(); function CommonToken( address _owner1, address _owner2, address _seller, string _name, string _symbol, uint256 _totalSupplyNoDecimals, uint256 _saleLimitNoDecimals ) MultiOwnable(_owner1, _owner2) public { } modifier ifUnlocked(address _from, address _to) { } /** Can be called once by super owner. */ function unlock() onlySuperOwner public { } function changeSeller(address newSeller) onlySuperOwner public returns (bool) { } function sellNoDecimals(address _to, uint256 _value) public returns (bool) { } function sell(address _to, uint256 _value) onlyOwner public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transfer(address _to, uint256 _value) ifUnlocked(msg.sender, _to) public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transferFrom(address _from, address _to, uint256 _value) ifUnlocked(_from, _to) public returns (bool) { } function burn(uint256 _value) public returns (bool) { } } contract RaceToken is CommonToken { function RaceToken() CommonToken( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7, // __OWNER2__ 0x2821e1486D604566842FF27F626aF133FddD5f89, // __SELLER__ 'Coin Race', 'RACE', 100 * 1e6, // 100m tokens in total. 70 * 1e6 // 70m tokens for sale. ) public {} } contract CommonTokensale is MultiOwnable, Pausable { using SafeMath for uint; uint public balance1; uint public balance2; // Token contract reference. RaceToken public token; uint public minPaymentWei = 0.001 ether; uint public tokensPerWei = 15000; uint public maxCapTokens = 6 * 1e6 ether; // 6m tokens // Stats for current tokensale: uint public totalTokensSold; // Total amount of tokens sold during this tokensale. uint public totalWeiReceived; // Total amount of wei received during this tokensale. // This will allow another contract to check whether ETH address is a buyer in this sale. mapping (address => bool) public isBuyer; event ChangeTokenEvent(address indexed _oldAddress, address indexed _newAddress); event ChangeMaxCapTokensEvent(uint _oldMaxCap, uint _newMaxCap); event ChangeTokenPriceEvent(uint _oldPrice, uint _newPrice); event ReceiveEthEvent(address indexed _buyer, uint256 _amountWei); function CommonTokensale( address _owner1, address _owner2 ) MultiOwnable(_owner1, _owner2) public {} function setToken(address _token) onlySuperOwner public { } function setMaxCapTokens(uint _maxCap) onlySuperOwner public { } function setTokenPrice(uint _tokenPrice) onlySuperOwner public { } /** The fallback function corresponds to a donation in ETH. */ function() public payable { } function sellTokensForEth( address _buyer, uint256 _amountWei ) ifNotPaused public payable { } /** Calc how much tokens you can buy at current time. */ function weiToTokens(uint _amountWei) public view returns (uint) { } function withdraw1(address _to) onlySuperOwner1 public { } function withdraw2(address _to) onlySuperOwner2 public { } } contract Tokensale is CommonTokensale { function Tokensale() CommonTokensale( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7 // __OWNER2__ ) public {} }
isSuperOwner(msg.sender)
382,680
isSuperOwner(msg.sender)
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) { } } contract SuperOwners { address public owner1; address public pendingOwner1; address public owner2; address public pendingOwner2; function SuperOwners(address _owner1, address _owner2) internal { } modifier onlySuperOwner1() { } modifier onlySuperOwner2() { } /** Any of the owners can execute this. */ modifier onlySuperOwner() { } /** Is msg.sender any of the owners. */ function isSuperOwner(address _addr) public view returns (bool) { } /** * Safe transfer of ownership in 2 steps. Once called, a newOwner needs * to call claimOwnership() to prove ownership. */ function transferOwnership1(address _newOwner1) onlySuperOwner1 public { } function transferOwnership2(address _newOwner2) onlySuperOwner2 public { } function claimOwnership1() public { } function claimOwnership2() public { } } contract MultiOwnable is SuperOwners { mapping (address => bool) public ownerMap; address[] public ownerHistory; event OwnerAddedEvent(address indexed _newOwner); event OwnerRemovedEvent(address indexed _oldOwner); function MultiOwnable(address _owner1, address _owner2) SuperOwners(_owner1, _owner2) internal {} modifier onlyOwner() { } function isOwner(address owner) public view returns (bool) { } function ownerHistoryCount() public view returns (uint) { } // Add extra owner function addOwner(address owner) onlySuperOwner public { require(owner != address(0)); require(<FILL_ME>) ownerMap[owner] = true; ownerHistory.push(owner); OwnerAddedEvent(owner); } // Remove extra owner function removeOwner(address owner) onlySuperOwner public { } } contract Pausable is MultiOwnable { bool public paused; modifier ifNotPaused { } modifier ifPaused { } // Called by the owner on emergency, triggers paused state function pause() external onlySuperOwner { } // Called by the owner on end of emergency, returns to normal state function resume() external onlySuperOwner ifPaused { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract StandardToken is ERC20 { using SafeMath for uint; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; function balanceOf(address _owner) public view returns (uint256 balance) { } function transfer(address _to, uint256 _value) public returns (bool) { } /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success. /// @param _from Address from where tokens are withdrawn. /// @param _to Address to where tokens are sent. /// @param _value Number of tokens to transfer. function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /// @dev Sets approved amount of tokens for spender. Returns success. /// @param _spender Address of allowed account. /// @param _value Number of approved tokens. function approve(address _spender, uint256 _value) public returns (bool) { } /// @dev Returns number of allowed tokens for given address. /// @param _owner Address of token owner. /// @param _spender Address of token spender. function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } } contract CommonToken is StandardToken, MultiOwnable { string public name; string public symbol; uint256 public totalSupply; uint8 public decimals = 18; string public version = 'v0.1'; address public seller; // The main account that holds all tokens at the beginning and during tokensale. uint256 public saleLimit; // (e18) How many tokens can be sold in total through all tiers or tokensales. uint256 public tokensSold; // (e18) Number of tokens sold through all tiers or tokensales. uint256 public totalSales; // Total number of sales (including external sales) made through all tiers or tokensales. // Lock the transfer functions during tokensales to prevent price speculations. bool public locked = true; event SellEvent(address indexed _seller, address indexed _buyer, uint256 _value); event ChangeSellerEvent(address indexed _oldSeller, address indexed _newSeller); event Burn(address indexed _burner, uint256 _value); event Unlock(); function CommonToken( address _owner1, address _owner2, address _seller, string _name, string _symbol, uint256 _totalSupplyNoDecimals, uint256 _saleLimitNoDecimals ) MultiOwnable(_owner1, _owner2) public { } modifier ifUnlocked(address _from, address _to) { } /** Can be called once by super owner. */ function unlock() onlySuperOwner public { } function changeSeller(address newSeller) onlySuperOwner public returns (bool) { } function sellNoDecimals(address _to, uint256 _value) public returns (bool) { } function sell(address _to, uint256 _value) onlyOwner public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transfer(address _to, uint256 _value) ifUnlocked(msg.sender, _to) public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transferFrom(address _from, address _to, uint256 _value) ifUnlocked(_from, _to) public returns (bool) { } function burn(uint256 _value) public returns (bool) { } } contract RaceToken is CommonToken { function RaceToken() CommonToken( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7, // __OWNER2__ 0x2821e1486D604566842FF27F626aF133FddD5f89, // __SELLER__ 'Coin Race', 'RACE', 100 * 1e6, // 100m tokens in total. 70 * 1e6 // 70m tokens for sale. ) public {} } contract CommonTokensale is MultiOwnable, Pausable { using SafeMath for uint; uint public balance1; uint public balance2; // Token contract reference. RaceToken public token; uint public minPaymentWei = 0.001 ether; uint public tokensPerWei = 15000; uint public maxCapTokens = 6 * 1e6 ether; // 6m tokens // Stats for current tokensale: uint public totalTokensSold; // Total amount of tokens sold during this tokensale. uint public totalWeiReceived; // Total amount of wei received during this tokensale. // This will allow another contract to check whether ETH address is a buyer in this sale. mapping (address => bool) public isBuyer; event ChangeTokenEvent(address indexed _oldAddress, address indexed _newAddress); event ChangeMaxCapTokensEvent(uint _oldMaxCap, uint _newMaxCap); event ChangeTokenPriceEvent(uint _oldPrice, uint _newPrice); event ReceiveEthEvent(address indexed _buyer, uint256 _amountWei); function CommonTokensale( address _owner1, address _owner2 ) MultiOwnable(_owner1, _owner2) public {} function setToken(address _token) onlySuperOwner public { } function setMaxCapTokens(uint _maxCap) onlySuperOwner public { } function setTokenPrice(uint _tokenPrice) onlySuperOwner public { } /** The fallback function corresponds to a donation in ETH. */ function() public payable { } function sellTokensForEth( address _buyer, uint256 _amountWei ) ifNotPaused public payable { } /** Calc how much tokens you can buy at current time. */ function weiToTokens(uint _amountWei) public view returns (uint) { } function withdraw1(address _to) onlySuperOwner1 public { } function withdraw2(address _to) onlySuperOwner2 public { } } contract Tokensale is CommonTokensale { function Tokensale() CommonTokensale( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7 // __OWNER2__ ) public {} }
!ownerMap[owner]
382,680
!ownerMap[owner]
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) { } } contract SuperOwners { address public owner1; address public pendingOwner1; address public owner2; address public pendingOwner2; function SuperOwners(address _owner1, address _owner2) internal { } modifier onlySuperOwner1() { } modifier onlySuperOwner2() { } /** Any of the owners can execute this. */ modifier onlySuperOwner() { } /** Is msg.sender any of the owners. */ function isSuperOwner(address _addr) public view returns (bool) { } /** * Safe transfer of ownership in 2 steps. Once called, a newOwner needs * to call claimOwnership() to prove ownership. */ function transferOwnership1(address _newOwner1) onlySuperOwner1 public { } function transferOwnership2(address _newOwner2) onlySuperOwner2 public { } function claimOwnership1() public { } function claimOwnership2() public { } } contract MultiOwnable is SuperOwners { mapping (address => bool) public ownerMap; address[] public ownerHistory; event OwnerAddedEvent(address indexed _newOwner); event OwnerRemovedEvent(address indexed _oldOwner); function MultiOwnable(address _owner1, address _owner2) SuperOwners(_owner1, _owner2) internal {} modifier onlyOwner() { } function isOwner(address owner) public view returns (bool) { } function ownerHistoryCount() public view returns (uint) { } // Add extra owner function addOwner(address owner) onlySuperOwner public { } // Remove extra owner function removeOwner(address owner) onlySuperOwner public { require(<FILL_ME>) ownerMap[owner] = false; OwnerRemovedEvent(owner); } } contract Pausable is MultiOwnable { bool public paused; modifier ifNotPaused { } modifier ifPaused { } // Called by the owner on emergency, triggers paused state function pause() external onlySuperOwner { } // Called by the owner on end of emergency, returns to normal state function resume() external onlySuperOwner ifPaused { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract StandardToken is ERC20 { using SafeMath for uint; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; function balanceOf(address _owner) public view returns (uint256 balance) { } function transfer(address _to, uint256 _value) public returns (bool) { } /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success. /// @param _from Address from where tokens are withdrawn. /// @param _to Address to where tokens are sent. /// @param _value Number of tokens to transfer. function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /// @dev Sets approved amount of tokens for spender. Returns success. /// @param _spender Address of allowed account. /// @param _value Number of approved tokens. function approve(address _spender, uint256 _value) public returns (bool) { } /// @dev Returns number of allowed tokens for given address. /// @param _owner Address of token owner. /// @param _spender Address of token spender. function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } } contract CommonToken is StandardToken, MultiOwnable { string public name; string public symbol; uint256 public totalSupply; uint8 public decimals = 18; string public version = 'v0.1'; address public seller; // The main account that holds all tokens at the beginning and during tokensale. uint256 public saleLimit; // (e18) How many tokens can be sold in total through all tiers or tokensales. uint256 public tokensSold; // (e18) Number of tokens sold through all tiers or tokensales. uint256 public totalSales; // Total number of sales (including external sales) made through all tiers or tokensales. // Lock the transfer functions during tokensales to prevent price speculations. bool public locked = true; event SellEvent(address indexed _seller, address indexed _buyer, uint256 _value); event ChangeSellerEvent(address indexed _oldSeller, address indexed _newSeller); event Burn(address indexed _burner, uint256 _value); event Unlock(); function CommonToken( address _owner1, address _owner2, address _seller, string _name, string _symbol, uint256 _totalSupplyNoDecimals, uint256 _saleLimitNoDecimals ) MultiOwnable(_owner1, _owner2) public { } modifier ifUnlocked(address _from, address _to) { } /** Can be called once by super owner. */ function unlock() onlySuperOwner public { } function changeSeller(address newSeller) onlySuperOwner public returns (bool) { } function sellNoDecimals(address _to, uint256 _value) public returns (bool) { } function sell(address _to, uint256 _value) onlyOwner public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transfer(address _to, uint256 _value) ifUnlocked(msg.sender, _to) public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transferFrom(address _from, address _to, uint256 _value) ifUnlocked(_from, _to) public returns (bool) { } function burn(uint256 _value) public returns (bool) { } } contract RaceToken is CommonToken { function RaceToken() CommonToken( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7, // __OWNER2__ 0x2821e1486D604566842FF27F626aF133FddD5f89, // __SELLER__ 'Coin Race', 'RACE', 100 * 1e6, // 100m tokens in total. 70 * 1e6 // 70m tokens for sale. ) public {} } contract CommonTokensale is MultiOwnable, Pausable { using SafeMath for uint; uint public balance1; uint public balance2; // Token contract reference. RaceToken public token; uint public minPaymentWei = 0.001 ether; uint public tokensPerWei = 15000; uint public maxCapTokens = 6 * 1e6 ether; // 6m tokens // Stats for current tokensale: uint public totalTokensSold; // Total amount of tokens sold during this tokensale. uint public totalWeiReceived; // Total amount of wei received during this tokensale. // This will allow another contract to check whether ETH address is a buyer in this sale. mapping (address => bool) public isBuyer; event ChangeTokenEvent(address indexed _oldAddress, address indexed _newAddress); event ChangeMaxCapTokensEvent(uint _oldMaxCap, uint _newMaxCap); event ChangeTokenPriceEvent(uint _oldPrice, uint _newPrice); event ReceiveEthEvent(address indexed _buyer, uint256 _amountWei); function CommonTokensale( address _owner1, address _owner2 ) MultiOwnable(_owner1, _owner2) public {} function setToken(address _token) onlySuperOwner public { } function setMaxCapTokens(uint _maxCap) onlySuperOwner public { } function setTokenPrice(uint _tokenPrice) onlySuperOwner public { } /** The fallback function corresponds to a donation in ETH. */ function() public payable { } function sellTokensForEth( address _buyer, uint256 _amountWei ) ifNotPaused public payable { } /** Calc how much tokens you can buy at current time. */ function weiToTokens(uint _amountWei) public view returns (uint) { } function withdraw1(address _to) onlySuperOwner1 public { } function withdraw2(address _to) onlySuperOwner2 public { } } contract Tokensale is CommonTokensale { function Tokensale() CommonTokensale( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7 // __OWNER2__ ) public {} }
ownerMap[owner]
382,680
ownerMap[owner]
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) { } } contract SuperOwners { address public owner1; address public pendingOwner1; address public owner2; address public pendingOwner2; function SuperOwners(address _owner1, address _owner2) internal { } modifier onlySuperOwner1() { } modifier onlySuperOwner2() { } /** Any of the owners can execute this. */ modifier onlySuperOwner() { } /** Is msg.sender any of the owners. */ function isSuperOwner(address _addr) public view returns (bool) { } /** * Safe transfer of ownership in 2 steps. Once called, a newOwner needs * to call claimOwnership() to prove ownership. */ function transferOwnership1(address _newOwner1) onlySuperOwner1 public { } function transferOwnership2(address _newOwner2) onlySuperOwner2 public { } function claimOwnership1() public { } function claimOwnership2() public { } } contract MultiOwnable is SuperOwners { mapping (address => bool) public ownerMap; address[] public ownerHistory; event OwnerAddedEvent(address indexed _newOwner); event OwnerRemovedEvent(address indexed _oldOwner); function MultiOwnable(address _owner1, address _owner2) SuperOwners(_owner1, _owner2) internal {} modifier onlyOwner() { } function isOwner(address owner) public view returns (bool) { } function ownerHistoryCount() public view returns (uint) { } // Add extra owner function addOwner(address owner) onlySuperOwner public { } // Remove extra owner function removeOwner(address owner) onlySuperOwner public { } } contract Pausable is MultiOwnable { bool public paused; modifier ifNotPaused { } modifier ifPaused { } // Called by the owner on emergency, triggers paused state function pause() external onlySuperOwner { } // Called by the owner on end of emergency, returns to normal state function resume() external onlySuperOwner ifPaused { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract StandardToken is ERC20 { using SafeMath for uint; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; function balanceOf(address _owner) public view returns (uint256 balance) { } function transfer(address _to, uint256 _value) public returns (bool) { } /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success. /// @param _from Address from where tokens are withdrawn. /// @param _to Address to where tokens are sent. /// @param _value Number of tokens to transfer. function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /// @dev Sets approved amount of tokens for spender. Returns success. /// @param _spender Address of allowed account. /// @param _value Number of approved tokens. function approve(address _spender, uint256 _value) public returns (bool) { } /// @dev Returns number of allowed tokens for given address. /// @param _owner Address of token owner. /// @param _spender Address of token spender. function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } } contract CommonToken is StandardToken, MultiOwnable { string public name; string public symbol; uint256 public totalSupply; uint8 public decimals = 18; string public version = 'v0.1'; address public seller; // The main account that holds all tokens at the beginning and during tokensale. uint256 public saleLimit; // (e18) How many tokens can be sold in total through all tiers or tokensales. uint256 public tokensSold; // (e18) Number of tokens sold through all tiers or tokensales. uint256 public totalSales; // Total number of sales (including external sales) made through all tiers or tokensales. // Lock the transfer functions during tokensales to prevent price speculations. bool public locked = true; event SellEvent(address indexed _seller, address indexed _buyer, uint256 _value); event ChangeSellerEvent(address indexed _oldSeller, address indexed _newSeller); event Burn(address indexed _burner, uint256 _value); event Unlock(); function CommonToken( address _owner1, address _owner2, address _seller, string _name, string _symbol, uint256 _totalSupplyNoDecimals, uint256 _saleLimitNoDecimals ) MultiOwnable(_owner1, _owner2) public { } modifier ifUnlocked(address _from, address _to) { require(<FILL_ME>) _; } /** Can be called once by super owner. */ function unlock() onlySuperOwner public { } function changeSeller(address newSeller) onlySuperOwner public returns (bool) { } function sellNoDecimals(address _to, uint256 _value) public returns (bool) { } function sell(address _to, uint256 _value) onlyOwner public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transfer(address _to, uint256 _value) ifUnlocked(msg.sender, _to) public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transferFrom(address _from, address _to, uint256 _value) ifUnlocked(_from, _to) public returns (bool) { } function burn(uint256 _value) public returns (bool) { } } contract RaceToken is CommonToken { function RaceToken() CommonToken( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7, // __OWNER2__ 0x2821e1486D604566842FF27F626aF133FddD5f89, // __SELLER__ 'Coin Race', 'RACE', 100 * 1e6, // 100m tokens in total. 70 * 1e6 // 70m tokens for sale. ) public {} } contract CommonTokensale is MultiOwnable, Pausable { using SafeMath for uint; uint public balance1; uint public balance2; // Token contract reference. RaceToken public token; uint public minPaymentWei = 0.001 ether; uint public tokensPerWei = 15000; uint public maxCapTokens = 6 * 1e6 ether; // 6m tokens // Stats for current tokensale: uint public totalTokensSold; // Total amount of tokens sold during this tokensale. uint public totalWeiReceived; // Total amount of wei received during this tokensale. // This will allow another contract to check whether ETH address is a buyer in this sale. mapping (address => bool) public isBuyer; event ChangeTokenEvent(address indexed _oldAddress, address indexed _newAddress); event ChangeMaxCapTokensEvent(uint _oldMaxCap, uint _newMaxCap); event ChangeTokenPriceEvent(uint _oldPrice, uint _newPrice); event ReceiveEthEvent(address indexed _buyer, uint256 _amountWei); function CommonTokensale( address _owner1, address _owner2 ) MultiOwnable(_owner1, _owner2) public {} function setToken(address _token) onlySuperOwner public { } function setMaxCapTokens(uint _maxCap) onlySuperOwner public { } function setTokenPrice(uint _tokenPrice) onlySuperOwner public { } /** The fallback function corresponds to a donation in ETH. */ function() public payable { } function sellTokensForEth( address _buyer, uint256 _amountWei ) ifNotPaused public payable { } /** Calc how much tokens you can buy at current time. */ function weiToTokens(uint _amountWei) public view returns (uint) { } function withdraw1(address _to) onlySuperOwner1 public { } function withdraw2(address _to) onlySuperOwner2 public { } } contract Tokensale is CommonTokensale { function Tokensale() CommonTokensale( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7 // __OWNER2__ ) public {} }
!locked||isOwner(_from)||isOwner(_to)
382,680
!locked||isOwner(_from)||isOwner(_to)
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) { } } contract SuperOwners { address public owner1; address public pendingOwner1; address public owner2; address public pendingOwner2; function SuperOwners(address _owner1, address _owner2) internal { } modifier onlySuperOwner1() { } modifier onlySuperOwner2() { } /** Any of the owners can execute this. */ modifier onlySuperOwner() { } /** Is msg.sender any of the owners. */ function isSuperOwner(address _addr) public view returns (bool) { } /** * Safe transfer of ownership in 2 steps. Once called, a newOwner needs * to call claimOwnership() to prove ownership. */ function transferOwnership1(address _newOwner1) onlySuperOwner1 public { } function transferOwnership2(address _newOwner2) onlySuperOwner2 public { } function claimOwnership1() public { } function claimOwnership2() public { } } contract MultiOwnable is SuperOwners { mapping (address => bool) public ownerMap; address[] public ownerHistory; event OwnerAddedEvent(address indexed _newOwner); event OwnerRemovedEvent(address indexed _oldOwner); function MultiOwnable(address _owner1, address _owner2) SuperOwners(_owner1, _owner2) internal {} modifier onlyOwner() { } function isOwner(address owner) public view returns (bool) { } function ownerHistoryCount() public view returns (uint) { } // Add extra owner function addOwner(address owner) onlySuperOwner public { } // Remove extra owner function removeOwner(address owner) onlySuperOwner public { } } contract Pausable is MultiOwnable { bool public paused; modifier ifNotPaused { } modifier ifPaused { } // Called by the owner on emergency, triggers paused state function pause() external onlySuperOwner { } // Called by the owner on end of emergency, returns to normal state function resume() external onlySuperOwner ifPaused { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract StandardToken is ERC20 { using SafeMath for uint; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; function balanceOf(address _owner) public view returns (uint256 balance) { } function transfer(address _to, uint256 _value) public returns (bool) { } /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success. /// @param _from Address from where tokens are withdrawn. /// @param _to Address to where tokens are sent. /// @param _value Number of tokens to transfer. function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /// @dev Sets approved amount of tokens for spender. Returns success. /// @param _spender Address of allowed account. /// @param _value Number of approved tokens. function approve(address _spender, uint256 _value) public returns (bool) { } /// @dev Returns number of allowed tokens for given address. /// @param _owner Address of token owner. /// @param _spender Address of token spender. function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } } contract CommonToken is StandardToken, MultiOwnable { string public name; string public symbol; uint256 public totalSupply; uint8 public decimals = 18; string public version = 'v0.1'; address public seller; // The main account that holds all tokens at the beginning and during tokensale. uint256 public saleLimit; // (e18) How many tokens can be sold in total through all tiers or tokensales. uint256 public tokensSold; // (e18) Number of tokens sold through all tiers or tokensales. uint256 public totalSales; // Total number of sales (including external sales) made through all tiers or tokensales. // Lock the transfer functions during tokensales to prevent price speculations. bool public locked = true; event SellEvent(address indexed _seller, address indexed _buyer, uint256 _value); event ChangeSellerEvent(address indexed _oldSeller, address indexed _newSeller); event Burn(address indexed _burner, uint256 _value); event Unlock(); function CommonToken( address _owner1, address _owner2, address _seller, string _name, string _symbol, uint256 _totalSupplyNoDecimals, uint256 _saleLimitNoDecimals ) MultiOwnable(_owner1, _owner2) public { } modifier ifUnlocked(address _from, address _to) { } /** Can be called once by super owner. */ function unlock() onlySuperOwner public { } function changeSeller(address newSeller) onlySuperOwner public returns (bool) { } function sellNoDecimals(address _to, uint256 _value) public returns (bool) { } function sell(address _to, uint256 _value) onlyOwner public returns (bool) { // Check that we are not out of limit and still can sell tokens: require(<FILL_ME>) require(_to != address(0)); require(_value > 0); require(_value <= balances[seller]); balances[seller] = balances[seller].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(seller, _to, _value); totalSales++; tokensSold = tokensSold.add(_value); SellEvent(seller, _to, _value); return true; } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transfer(address _to, uint256 _value) ifUnlocked(msg.sender, _to) public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transferFrom(address _from, address _to, uint256 _value) ifUnlocked(_from, _to) public returns (bool) { } function burn(uint256 _value) public returns (bool) { } } contract RaceToken is CommonToken { function RaceToken() CommonToken( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7, // __OWNER2__ 0x2821e1486D604566842FF27F626aF133FddD5f89, // __SELLER__ 'Coin Race', 'RACE', 100 * 1e6, // 100m tokens in total. 70 * 1e6 // 70m tokens for sale. ) public {} } contract CommonTokensale is MultiOwnable, Pausable { using SafeMath for uint; uint public balance1; uint public balance2; // Token contract reference. RaceToken public token; uint public minPaymentWei = 0.001 ether; uint public tokensPerWei = 15000; uint public maxCapTokens = 6 * 1e6 ether; // 6m tokens // Stats for current tokensale: uint public totalTokensSold; // Total amount of tokens sold during this tokensale. uint public totalWeiReceived; // Total amount of wei received during this tokensale. // This will allow another contract to check whether ETH address is a buyer in this sale. mapping (address => bool) public isBuyer; event ChangeTokenEvent(address indexed _oldAddress, address indexed _newAddress); event ChangeMaxCapTokensEvent(uint _oldMaxCap, uint _newMaxCap); event ChangeTokenPriceEvent(uint _oldPrice, uint _newPrice); event ReceiveEthEvent(address indexed _buyer, uint256 _amountWei); function CommonTokensale( address _owner1, address _owner2 ) MultiOwnable(_owner1, _owner2) public {} function setToken(address _token) onlySuperOwner public { } function setMaxCapTokens(uint _maxCap) onlySuperOwner public { } function setTokenPrice(uint _tokenPrice) onlySuperOwner public { } /** The fallback function corresponds to a donation in ETH. */ function() public payable { } function sellTokensForEth( address _buyer, uint256 _amountWei ) ifNotPaused public payable { } /** Calc how much tokens you can buy at current time. */ function weiToTokens(uint _amountWei) public view returns (uint) { } function withdraw1(address _to) onlySuperOwner1 public { } function withdraw2(address _to) onlySuperOwner2 public { } } contract Tokensale is CommonTokensale { function Tokensale() CommonTokensale( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7 // __OWNER2__ ) public {} }
tokensSold.add(_value)<=saleLimit
382,680
tokensSold.add(_value)<=saleLimit
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) { } } contract SuperOwners { address public owner1; address public pendingOwner1; address public owner2; address public pendingOwner2; function SuperOwners(address _owner1, address _owner2) internal { } modifier onlySuperOwner1() { } modifier onlySuperOwner2() { } /** Any of the owners can execute this. */ modifier onlySuperOwner() { } /** Is msg.sender any of the owners. */ function isSuperOwner(address _addr) public view returns (bool) { } /** * Safe transfer of ownership in 2 steps. Once called, a newOwner needs * to call claimOwnership() to prove ownership. */ function transferOwnership1(address _newOwner1) onlySuperOwner1 public { } function transferOwnership2(address _newOwner2) onlySuperOwner2 public { } function claimOwnership1() public { } function claimOwnership2() public { } } contract MultiOwnable is SuperOwners { mapping (address => bool) public ownerMap; address[] public ownerHistory; event OwnerAddedEvent(address indexed _newOwner); event OwnerRemovedEvent(address indexed _oldOwner); function MultiOwnable(address _owner1, address _owner2) SuperOwners(_owner1, _owner2) internal {} modifier onlyOwner() { } function isOwner(address owner) public view returns (bool) { } function ownerHistoryCount() public view returns (uint) { } // Add extra owner function addOwner(address owner) onlySuperOwner public { } // Remove extra owner function removeOwner(address owner) onlySuperOwner public { } } contract Pausable is MultiOwnable { bool public paused; modifier ifNotPaused { } modifier ifPaused { } // Called by the owner on emergency, triggers paused state function pause() external onlySuperOwner { } // Called by the owner on end of emergency, returns to normal state function resume() external onlySuperOwner ifPaused { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract StandardToken is ERC20 { using SafeMath for uint; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; function balanceOf(address _owner) public view returns (uint256 balance) { } function transfer(address _to, uint256 _value) public returns (bool) { } /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success. /// @param _from Address from where tokens are withdrawn. /// @param _to Address to where tokens are sent. /// @param _value Number of tokens to transfer. function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /// @dev Sets approved amount of tokens for spender. Returns success. /// @param _spender Address of allowed account. /// @param _value Number of approved tokens. function approve(address _spender, uint256 _value) public returns (bool) { } /// @dev Returns number of allowed tokens for given address. /// @param _owner Address of token owner. /// @param _spender Address of token spender. function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } } contract CommonToken is StandardToken, MultiOwnable { string public name; string public symbol; uint256 public totalSupply; uint8 public decimals = 18; string public version = 'v0.1'; address public seller; // The main account that holds all tokens at the beginning and during tokensale. uint256 public saleLimit; // (e18) How many tokens can be sold in total through all tiers or tokensales. uint256 public tokensSold; // (e18) Number of tokens sold through all tiers or tokensales. uint256 public totalSales; // Total number of sales (including external sales) made through all tiers or tokensales. // Lock the transfer functions during tokensales to prevent price speculations. bool public locked = true; event SellEvent(address indexed _seller, address indexed _buyer, uint256 _value); event ChangeSellerEvent(address indexed _oldSeller, address indexed _newSeller); event Burn(address indexed _burner, uint256 _value); event Unlock(); function CommonToken( address _owner1, address _owner2, address _seller, string _name, string _symbol, uint256 _totalSupplyNoDecimals, uint256 _saleLimitNoDecimals ) MultiOwnable(_owner1, _owner2) public { } modifier ifUnlocked(address _from, address _to) { } /** Can be called once by super owner. */ function unlock() onlySuperOwner public { } function changeSeller(address newSeller) onlySuperOwner public returns (bool) { } function sellNoDecimals(address _to, uint256 _value) public returns (bool) { } function sell(address _to, uint256 _value) onlyOwner public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transfer(address _to, uint256 _value) ifUnlocked(msg.sender, _to) public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transferFrom(address _from, address _to, uint256 _value) ifUnlocked(_from, _to) public returns (bool) { } function burn(uint256 _value) public returns (bool) { } } contract RaceToken is CommonToken { function RaceToken() CommonToken( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7, // __OWNER2__ 0x2821e1486D604566842FF27F626aF133FddD5f89, // __SELLER__ 'Coin Race', 'RACE', 100 * 1e6, // 100m tokens in total. 70 * 1e6 // 70m tokens for sale. ) public {} } contract CommonTokensale is MultiOwnable, Pausable { using SafeMath for uint; uint public balance1; uint public balance2; // Token contract reference. RaceToken public token; uint public minPaymentWei = 0.001 ether; uint public tokensPerWei = 15000; uint public maxCapTokens = 6 * 1e6 ether; // 6m tokens // Stats for current tokensale: uint public totalTokensSold; // Total amount of tokens sold during this tokensale. uint public totalWeiReceived; // Total amount of wei received during this tokensale. // This will allow another contract to check whether ETH address is a buyer in this sale. mapping (address => bool) public isBuyer; event ChangeTokenEvent(address indexed _oldAddress, address indexed _newAddress); event ChangeMaxCapTokensEvent(uint _oldMaxCap, uint _newMaxCap); event ChangeTokenPriceEvent(uint _oldPrice, uint _newPrice); event ReceiveEthEvent(address indexed _buyer, uint256 _amountWei); function CommonTokensale( address _owner1, address _owner2 ) MultiOwnable(_owner1, _owner2) public {} function setToken(address _token) onlySuperOwner public { } function setMaxCapTokens(uint _maxCap) onlySuperOwner public { } function setTokenPrice(uint _tokenPrice) onlySuperOwner public { } /** The fallback function corresponds to a donation in ETH. */ function() public payable { } function sellTokensForEth( address _buyer, uint256 _amountWei ) ifNotPaused public payable { require(_amountWei >= minPaymentWei); uint tokensE18 = weiToTokens(_amountWei); require(<FILL_ME>) // Transfer tokens to buyer. require(token.sell(_buyer, tokensE18)); // Update total stats: totalTokensSold = totalTokensSold.add(tokensE18); totalWeiReceived = totalWeiReceived.add(_amountWei); isBuyer[_buyer] = true; ReceiveEthEvent(_buyer, _amountWei); uint half = _amountWei / 2; balance1 = balance1.add(half); balance2 = balance2.add(_amountWei - half); } /** Calc how much tokens you can buy at current time. */ function weiToTokens(uint _amountWei) public view returns (uint) { } function withdraw1(address _to) onlySuperOwner1 public { } function withdraw2(address _to) onlySuperOwner2 public { } } contract Tokensale is CommonTokensale { function Tokensale() CommonTokensale( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7 // __OWNER2__ ) public {} }
totalTokensSold.add(tokensE18)<=maxCapTokens
382,680
totalTokensSold.add(tokensE18)<=maxCapTokens
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) { } } contract SuperOwners { address public owner1; address public pendingOwner1; address public owner2; address public pendingOwner2; function SuperOwners(address _owner1, address _owner2) internal { } modifier onlySuperOwner1() { } modifier onlySuperOwner2() { } /** Any of the owners can execute this. */ modifier onlySuperOwner() { } /** Is msg.sender any of the owners. */ function isSuperOwner(address _addr) public view returns (bool) { } /** * Safe transfer of ownership in 2 steps. Once called, a newOwner needs * to call claimOwnership() to prove ownership. */ function transferOwnership1(address _newOwner1) onlySuperOwner1 public { } function transferOwnership2(address _newOwner2) onlySuperOwner2 public { } function claimOwnership1() public { } function claimOwnership2() public { } } contract MultiOwnable is SuperOwners { mapping (address => bool) public ownerMap; address[] public ownerHistory; event OwnerAddedEvent(address indexed _newOwner); event OwnerRemovedEvent(address indexed _oldOwner); function MultiOwnable(address _owner1, address _owner2) SuperOwners(_owner1, _owner2) internal {} modifier onlyOwner() { } function isOwner(address owner) public view returns (bool) { } function ownerHistoryCount() public view returns (uint) { } // Add extra owner function addOwner(address owner) onlySuperOwner public { } // Remove extra owner function removeOwner(address owner) onlySuperOwner public { } } contract Pausable is MultiOwnable { bool public paused; modifier ifNotPaused { } modifier ifPaused { } // Called by the owner on emergency, triggers paused state function pause() external onlySuperOwner { } // Called by the owner on end of emergency, returns to normal state function resume() external onlySuperOwner ifPaused { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address _owner) public view returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract StandardToken is ERC20 { using SafeMath for uint; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; function balanceOf(address _owner) public view returns (uint256 balance) { } function transfer(address _to, uint256 _value) public returns (bool) { } /// @dev Allows allowed third party to transfer tokens from one address to another. Returns success. /// @param _from Address from where tokens are withdrawn. /// @param _to Address to where tokens are sent. /// @param _value Number of tokens to transfer. function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /// @dev Sets approved amount of tokens for spender. Returns success. /// @param _spender Address of allowed account. /// @param _value Number of approved tokens. function approve(address _spender, uint256 _value) public returns (bool) { } /// @dev Returns number of allowed tokens for given address. /// @param _owner Address of token owner. /// @param _spender Address of token spender. function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } } contract CommonToken is StandardToken, MultiOwnable { string public name; string public symbol; uint256 public totalSupply; uint8 public decimals = 18; string public version = 'v0.1'; address public seller; // The main account that holds all tokens at the beginning and during tokensale. uint256 public saleLimit; // (e18) How many tokens can be sold in total through all tiers or tokensales. uint256 public tokensSold; // (e18) Number of tokens sold through all tiers or tokensales. uint256 public totalSales; // Total number of sales (including external sales) made through all tiers or tokensales. // Lock the transfer functions during tokensales to prevent price speculations. bool public locked = true; event SellEvent(address indexed _seller, address indexed _buyer, uint256 _value); event ChangeSellerEvent(address indexed _oldSeller, address indexed _newSeller); event Burn(address indexed _burner, uint256 _value); event Unlock(); function CommonToken( address _owner1, address _owner2, address _seller, string _name, string _symbol, uint256 _totalSupplyNoDecimals, uint256 _saleLimitNoDecimals ) MultiOwnable(_owner1, _owner2) public { } modifier ifUnlocked(address _from, address _to) { } /** Can be called once by super owner. */ function unlock() onlySuperOwner public { } function changeSeller(address newSeller) onlySuperOwner public returns (bool) { } function sellNoDecimals(address _to, uint256 _value) public returns (bool) { } function sell(address _to, uint256 _value) onlyOwner public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transfer(address _to, uint256 _value) ifUnlocked(msg.sender, _to) public returns (bool) { } /** * Until all tokens are sold, tokens can be transfered to/from owner's accounts. */ function transferFrom(address _from, address _to, uint256 _value) ifUnlocked(_from, _to) public returns (bool) { } function burn(uint256 _value) public returns (bool) { } } contract RaceToken is CommonToken { function RaceToken() CommonToken( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7, // __OWNER2__ 0x2821e1486D604566842FF27F626aF133FddD5f89, // __SELLER__ 'Coin Race', 'RACE', 100 * 1e6, // 100m tokens in total. 70 * 1e6 // 70m tokens for sale. ) public {} } contract CommonTokensale is MultiOwnable, Pausable { using SafeMath for uint; uint public balance1; uint public balance2; // Token contract reference. RaceToken public token; uint public minPaymentWei = 0.001 ether; uint public tokensPerWei = 15000; uint public maxCapTokens = 6 * 1e6 ether; // 6m tokens // Stats for current tokensale: uint public totalTokensSold; // Total amount of tokens sold during this tokensale. uint public totalWeiReceived; // Total amount of wei received during this tokensale. // This will allow another contract to check whether ETH address is a buyer in this sale. mapping (address => bool) public isBuyer; event ChangeTokenEvent(address indexed _oldAddress, address indexed _newAddress); event ChangeMaxCapTokensEvent(uint _oldMaxCap, uint _newMaxCap); event ChangeTokenPriceEvent(uint _oldPrice, uint _newPrice); event ReceiveEthEvent(address indexed _buyer, uint256 _amountWei); function CommonTokensale( address _owner1, address _owner2 ) MultiOwnable(_owner1, _owner2) public {} function setToken(address _token) onlySuperOwner public { } function setMaxCapTokens(uint _maxCap) onlySuperOwner public { } function setTokenPrice(uint _tokenPrice) onlySuperOwner public { } /** The fallback function corresponds to a donation in ETH. */ function() public payable { } function sellTokensForEth( address _buyer, uint256 _amountWei ) ifNotPaused public payable { require(_amountWei >= minPaymentWei); uint tokensE18 = weiToTokens(_amountWei); require(totalTokensSold.add(tokensE18) <= maxCapTokens); // Transfer tokens to buyer. require(<FILL_ME>) // Update total stats: totalTokensSold = totalTokensSold.add(tokensE18); totalWeiReceived = totalWeiReceived.add(_amountWei); isBuyer[_buyer] = true; ReceiveEthEvent(_buyer, _amountWei); uint half = _amountWei / 2; balance1 = balance1.add(half); balance2 = balance2.add(_amountWei - half); } /** Calc how much tokens you can buy at current time. */ function weiToTokens(uint _amountWei) public view returns (uint) { } function withdraw1(address _to) onlySuperOwner1 public { } function withdraw2(address _to) onlySuperOwner2 public { } } contract Tokensale is CommonTokensale { function Tokensale() CommonTokensale( 0x229B9Ef80D25A7e7648b17e2c598805d042f9e56, // __OWNER1__ 0xcd7cF1D613D5974876AfBfd612ED6AFd94093ce7 // __OWNER2__ ) public {} }
token.sell(_buyer,tokensE18)
382,680
token.sell(_buyer,tokensE18)
null
pragma solidity ^0.8.2; pragma experimental ABIEncoderV2; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } contract CommissionsStudio { using SafeMath for uint256; enum CommissionStatus { queued, accepted, removed } struct Creator { uint newQueueId; mapping (uint => Queue) queues; } struct Queue { uint minBid; uint newCommissionId; mapping (uint => Commission) commissions; } struct Commission { address payable recipient; uint bid; CommissionStatus status; } address payable public admin; // the recipient of all fees uint public fee; // stored as basis points mapping(address => Creator) public creators; bool public callStarted; // ensures no re-entrancy can occur modifier callNotStarted () { require(<FILL_ME>) callStarted = true; _; callStarted = false; } modifier onlyAdmin () { } modifier isValidQueue (address _creator, uint _queueId) { } modifier isValidCommission (address _creator, uint _queueId, uint _commissionId) { } constructor(address payable _admin, uint _fee) { } function updateAdmin (address payable _newAdmin) public callNotStarted onlyAdmin { } function updateFee (uint _newFee) public callNotStarted onlyAdmin { } function registerQueue(uint _minBid, string memory _queueHash) public callNotStarted { } function updateQueueMinBid(uint _queueId, uint _newMinBid) public callNotStarted isValidQueue(msg.sender, _queueId) { } function commission (address _creator, uint _queueId, string memory _hash) public payable callNotStarted isValidQueue(_creator, _queueId) { } function rescindCommission (address _creator, uint _queueId, uint _commissionId) public callNotStarted isValidQueue(_creator, _queueId) { } function increaseCommissionBid (address _creator, uint _queueId, uint _commissionId) public payable callNotStarted isValidQueue(_creator, _queueId) { } function processCommissions(uint _queueId, uint[] memory _commissionIds) public callNotStarted isValidQueue(msg.sender, _queueId) { } function getCreator(address _creator) public view returns (uint) { } function getQueue(address _creator, uint _queueId) public view returns (uint, uint) { } function getCommission(address _creator, uint _queueId, uint _commissionId) public view returns (Commission memory) { } event AdminUpdated(address _newAdmin); event FeeUpdated(uint _newFee); event MinBidUpdated(address _creator, uint _queueId, uint _newMinBid); event QueueRegistered(address _creator, uint _queueId, uint _minBid, string _hash); event NewCommission(address _creator, uint _queueId, uint _commissionId, string _hash); event CommissionBidUpdated(address _creator, uint _queueId, uint _commissionId, uint _newBid); event CommissionRescinded(address _creator, uint _queueId, uint _commissionId); event CommissionProcessed(address _creator, uint _queueId, uint _commissionId); }
!callStarted
382,736
!callStarted
"commission not valid"
pragma solidity ^0.8.2; pragma experimental ABIEncoderV2; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } contract CommissionsStudio { using SafeMath for uint256; enum CommissionStatus { queued, accepted, removed } struct Creator { uint newQueueId; mapping (uint => Queue) queues; } struct Queue { uint minBid; uint newCommissionId; mapping (uint => Commission) commissions; } struct Commission { address payable recipient; uint bid; CommissionStatus status; } address payable public admin; // the recipient of all fees uint public fee; // stored as basis points mapping(address => Creator) public creators; bool public callStarted; // ensures no re-entrancy can occur modifier callNotStarted () { } modifier onlyAdmin () { } modifier isValidQueue (address _creator, uint _queueId) { } modifier isValidCommission (address _creator, uint _queueId, uint _commissionId) { } constructor(address payable _admin, uint _fee) { } function updateAdmin (address payable _newAdmin) public callNotStarted onlyAdmin { } function updateFee (uint _newFee) public callNotStarted onlyAdmin { } function registerQueue(uint _minBid, string memory _queueHash) public callNotStarted { } function updateQueueMinBid(uint _queueId, uint _newMinBid) public callNotStarted isValidQueue(msg.sender, _queueId) { } function commission (address _creator, uint _queueId, string memory _hash) public payable callNotStarted isValidQueue(_creator, _queueId) { } function rescindCommission (address _creator, uint _queueId, uint _commissionId) public callNotStarted isValidQueue(_creator, _queueId) { } function increaseCommissionBid (address _creator, uint _queueId, uint _commissionId) public payable callNotStarted isValidQueue(_creator, _queueId) { } function processCommissions(uint _queueId, uint[] memory _commissionIds) public callNotStarted isValidQueue(msg.sender, _queueId) { Queue storage queue = creators[msg.sender].queues[_queueId]; for (uint i = 0; i < _commissionIds.length; i++){ require(<FILL_ME>) // must be a valid previously instantiated commission Commission storage selectedCommission = queue.commissions[_commissionIds[i]]; require(selectedCommission.status == CommissionStatus.queued, "commission not in queue"); uint feePaid = (selectedCommission.bid * fee) / 10000; admin.transfer(feePaid); selectedCommission.status = CommissionStatus.accepted; // first, we change the status of the commission to accepted payable(msg.sender).transfer(selectedCommission.bid - feePaid); // next we accept the payment for the commission emit CommissionProcessed(msg.sender, _queueId, _commissionIds[i]); } } function getCreator(address _creator) public view returns (uint) { } function getQueue(address _creator, uint _queueId) public view returns (uint, uint) { } function getCommission(address _creator, uint _queueId, uint _commissionId) public view returns (Commission memory) { } event AdminUpdated(address _newAdmin); event FeeUpdated(uint _newFee); event MinBidUpdated(address _creator, uint _queueId, uint _newMinBid); event QueueRegistered(address _creator, uint _queueId, uint _minBid, string _hash); event NewCommission(address _creator, uint _queueId, uint _commissionId, string _hash); event CommissionBidUpdated(address _creator, uint _queueId, uint _commissionId, uint _newBid); event CommissionRescinded(address _creator, uint _queueId, uint _commissionId); event CommissionProcessed(address _creator, uint _queueId, uint _commissionId); }
_commissionIds[i]<queue.newCommissionId,"commission not valid"
382,736
_commissionIds[i]<queue.newCommissionId
'You have sent incorrect payment amount'
/* ETHStvo.io - Empower Lifestyle Via Blockchain Network Join and earn as many ETH as you want with 0.10 one time contribution SocMed Channel FB/IG/TW/TELEGRAM - ethstvoworld Hashtag #ethstvo #ethereum #ethereummultiplier #ethereumdoubler #ethereumcollector #gainethereum */ pragma solidity ^0.5.7; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint) { } } contract Ownable { address owner; address Main_address; address public main_address; address Upline_address; address public upline_address; mapping (address => bool) managers; constructor() public { } modifier onlyOwner() { } function transferOwnership(address _owner) public onlyOwner { } } contract ETHStvo is Ownable { event Register(uint indexed _user, uint indexed _referrer, uint indexed _introducer, uint _time); event Upgrade(uint indexed _user, uint _level, uint _price, uint _time); event Payment(uint indexed _user, uint indexed _receiver, uint indexed _type, uint _level, uint _money, uint _time); event Lost(uint indexed _user, uint indexed _receiver, uint indexed _type, uint _level, uint _money, uint _time); mapping (uint => uint) public LEVEL_PRICE; mapping (uint => uint) SPONSOR; mapping (uint => uint) INTRODUCER; mapping (uint => uint) UPLINE; mapping (uint => uint) FEE; uint REFERRAL_LIMIT = 3; struct UserStruct { bool manual; bool isExist; uint level; uint introducedTotal; uint referrerID; uint introducerID; address wallet; uint[] introducers; uint[] referrals; } mapping (uint => UserStruct) public users; mapping (address => uint) public userList; mapping (uint => uint) public stats_level; uint public currentUserID = 0; uint public stats_total = 0 ether; uint stats = 0 ether; uint Stats = 0 ether; bool public paused = false; constructor() public { } function setMainAddress(address _main_address) public onlyOwner { } function setAddress(address _main_address, address _upline_address) public onlyOwner { } function setPaused(bool _paused) public onlyOwner { } function getStats() public view onlyOwner returns(uint) { } //https://etherconverter.online to Ether function setLevelPrice(uint _price, uint _level) public onlyOwner { } function setSponsor(uint _price, uint _sponsor) public onlyOwner { } function setIntroducer(uint _price, uint _introducer) public onlyOwner { } function setUpline(uint _price, uint _upline) public onlyOwner { } function setFee(uint _price, uint _fee) public onlyOwner { } function setCurrentUserID(uint _currentUserID) public onlyOwner { } function viewStats() public view onlyOwner returns(uint) { } function addManagers(address manager_1, address manager_2, address manager_3, address manager_4, address manager_5, address manager_6, address manager_7, address manager_8, address manager_9, address manager_10) public onlyOwner { } function removeManagers(address manager_1, address manager_2, address manager_3, address manager_4, address manager_5, address manager_6, address manager_7, address manager_8, address manager_9, address manager_10) public onlyOwner { } function addManager(address manager) public onlyOwner { } function removeManager(address manager) public onlyOwner { } function setUserData(uint _userID, address _wallet, uint _referrerID, uint _introducerID, uint _referral1, uint _referral2, uint _referral3, uint _level, uint _introducedTotal) public { } function () external payable { require(!paused); require(<FILL_ME>) if(LEVEL_PRICE[msg.value] == 1){ uint referrerID = 0; address referrer = bytesToAddress(msg.data); if(referrer == address(0)){ referrerID = 1; } else if (userList[referrer] > 0 && userList[referrer] <= currentUserID){ referrerID = userList[referrer]; } else { revert('Incorrect referrer'); } if(users[userList[msg.sender]].isExist){ revert('You are already signed up'); } else { registerUser(referrerID); } } else if(users[userList[msg.sender]].isExist){ upgradeUser(LEVEL_PRICE[msg.value]); } else { revert("Please buy first level"); } } function registerUser(uint _referrerID) internal { } function upgradeUser(uint _level) internal { } function processPayment(uint _user, uint _level) internal { } function findFreeReferrer(uint _user) public view returns(uint) { } function viewUserReferrals(uint _user) public view returns(uint[] memory) { } function viewUserIntroducers(uint _user) public view returns(uint[] memory) { } function viewUserLevel(uint _user) public view returns(uint) { } function bytesToAddress(bytes memory bys) private pure returns (address addr) { } }
LEVEL_PRICE[msg.value]>0,'You have sent incorrect payment amount'
382,834
LEVEL_PRICE[msg.value]>0
null
pragma solidity ^0.5.0; contract ResolverBase { bytes4 private constant INTERFACE_META_ID = 0x01ffc9a7; function supportsInterface(bytes4 interfaceID) public pure returns(bool) { } function isAuthorised(bytes32 node) internal view returns(bool); modifier authorised(bytes32 node) { require(<FILL_ME>) _; } function bytesToAddress(bytes memory b) internal pure returns(address payable a) { } function addressToBytes(address a) internal pure returns(bytes memory b) { } }
isAuthorised(node)
382,849
isAuthorised(node)
"This contract is out of front money."
pragma solidity 0.4.24; contract Ownable { address public owner; constructor() public { } function setOwner(address _owner) public onlyOwner { } modifier onlyOwner { } } contract PurchasePackInterface { function basePrice() public returns (uint); function purchaseFor(address user, uint16 packCount, address referrer) public payable; } contract Vault is Ownable { function () public payable { } function getBalance() public view returns (uint) { } function withdraw(uint amount) public onlyOwner { } function withdrawAll() public onlyOwner { } } contract DiscountPack is Vault { PurchasePackInterface private pack; uint public basePrice; uint public baseDiscount; constructor(PurchasePackInterface packToDiscount) public { } event PackDiscount(address purchaser, uint16 packs, uint discount); function() public payable {} function purchase(uint16 packs) public payable { uint discountedPrice = packs * basePrice; uint discount = packs * baseDiscount; uint fullPrice = discountedPrice + discount; require(msg.value >= discountedPrice, "Not enough value for the desired pack count."); require(<FILL_ME>) // This should route the referral back to this contract pack.purchaseFor.value(fullPrice)(msg.sender, packs, this); emit PackDiscount(msg.sender, packs, discount); } function fraction(uint value, uint8 num, uint8 denom) internal pure returns (uint) { } } contract DiscountShinyLegendaryPack is DiscountPack { constructor(PurchasePackInterface packToDiscount) public payable DiscountPack(packToDiscount) { } }
address(this).balance>=discount,"This contract is out of front money."
382,859
address(this).balance>=discount
"ERC721: Merging of token that is not own"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../FormaBase.sol"; contract Bingo is FormaBase { uint8 public boardWidth; uint8 public maxBoardWidth = 8; uint16 public tileProbability; uint64 public freshTokensMinted = 0; uint64 public mergeTokensMinted = 0; mapping(uint256 => bytes32) public tokenIdToHash; mapping(uint256 => bool[]) public tokenIdToData; mapping(uint256 => uint32) public tokenIdToCount; mapping(uint256 => bool) public tokenIdToBurned; constructor( string memory _tokenName, string memory _tokenSymbol, string memory _baseURI, uint8 _boardWidth, uint16 _tileProbability, uint256 _pricePerToken, uint256 _maxTokens ) ERC721(_tokenName, _tokenSymbol) { } function mint() public payable virtual override returns (uint256 _tokenId) { } function reserve(address _toAddress) public virtual override onlyAdmins returns (uint256 _tokenId) { } function _mintToken(address _toAddress) internal virtual returns (uint256 _tokenId) { } function _generateTokenData(bytes32 _seedHash) internal view returns (bool[] memory _tokenData) { } function merge(uint256 _tokenId1, uint256 _tokenId2) public returns (uint256 _tokenId) { require(<FILL_ME>) require( ERC721.ownerOf(_tokenId2) == _msgSender(), "ERC721: Merging of token that is not own" ); require(active, "Drop must be active"); bool[] memory _token1Data = tokenIdToData[_tokenId1]; bool[] memory _token2Data = tokenIdToData[_tokenId2]; uint256 mergedTokenId = _mintMergedToken(_token1Data, _token2Data, msg.sender); tokenIdToCount[mergedTokenId] = tokenIdToCount[_tokenId1] + tokenIdToCount[_tokenId2]; _burn(_tokenId1); tokenIdToBurned[_tokenId1] = true; _burn(_tokenId2); tokenIdToBurned[_tokenId2] = true; return mergedTokenId; } function _mintMergedToken( bool[] memory _token1Data, bool[] memory _token2Data, address _toAddress ) internal returns (uint256 _tokenId) { } function _mergeTokenData(bool[] memory _token1Data, bool[] memory _token2Data) internal view returns (bool[] memory _mergedTokenData) { } function tokenData(uint256 tokenId) public view returns (bool[] memory) { } }
ERC721.ownerOf(_tokenId1)==_msgSender(),"ERC721: Merging of token that is not own"
382,894
ERC721.ownerOf(_tokenId1)==_msgSender()
"ERC721: Merging of token that is not own"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../FormaBase.sol"; contract Bingo is FormaBase { uint8 public boardWidth; uint8 public maxBoardWidth = 8; uint16 public tileProbability; uint64 public freshTokensMinted = 0; uint64 public mergeTokensMinted = 0; mapping(uint256 => bytes32) public tokenIdToHash; mapping(uint256 => bool[]) public tokenIdToData; mapping(uint256 => uint32) public tokenIdToCount; mapping(uint256 => bool) public tokenIdToBurned; constructor( string memory _tokenName, string memory _tokenSymbol, string memory _baseURI, uint8 _boardWidth, uint16 _tileProbability, uint256 _pricePerToken, uint256 _maxTokens ) ERC721(_tokenName, _tokenSymbol) { } function mint() public payable virtual override returns (uint256 _tokenId) { } function reserve(address _toAddress) public virtual override onlyAdmins returns (uint256 _tokenId) { } function _mintToken(address _toAddress) internal virtual returns (uint256 _tokenId) { } function _generateTokenData(bytes32 _seedHash) internal view returns (bool[] memory _tokenData) { } function merge(uint256 _tokenId1, uint256 _tokenId2) public returns (uint256 _tokenId) { require( ERC721.ownerOf(_tokenId1) == _msgSender(), "ERC721: Merging of token that is not own" ); require(<FILL_ME>) require(active, "Drop must be active"); bool[] memory _token1Data = tokenIdToData[_tokenId1]; bool[] memory _token2Data = tokenIdToData[_tokenId2]; uint256 mergedTokenId = _mintMergedToken(_token1Data, _token2Data, msg.sender); tokenIdToCount[mergedTokenId] = tokenIdToCount[_tokenId1] + tokenIdToCount[_tokenId2]; _burn(_tokenId1); tokenIdToBurned[_tokenId1] = true; _burn(_tokenId2); tokenIdToBurned[_tokenId2] = true; return mergedTokenId; } function _mintMergedToken( bool[] memory _token1Data, bool[] memory _token2Data, address _toAddress ) internal returns (uint256 _tokenId) { } function _mergeTokenData(bool[] memory _token1Data, bool[] memory _token2Data) internal view returns (bool[] memory _mergedTokenData) { } function tokenData(uint256 tokenId) public view returns (bool[] memory) { } }
ERC721.ownerOf(_tokenId2)==_msgSender(),"ERC721: Merging of token that is not own"
382,894
ERC721.ownerOf(_tokenId2)==_msgSender()
null
// 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.12; import "./BToken.sol"; import "./BMath.sol"; contract BPool is BBronze, BToken, BMath { struct Record { bool bound; // is token bound to pool uint index; // private uint denorm; // denormalized weight uint balance; } event LOG_SWAP( address indexed caller, address indexed tokenIn, address indexed tokenOut, uint256 tokenAmountIn, uint256 tokenAmountOut, uint256 reservesAmount ); event LOG_JOIN( address indexed caller, address indexed tokenIn, uint256 tokenAmountIn, uint256 reservesAmount ); event LOG_EXIT( address indexed caller, address indexed tokenOut, uint256 tokenAmountOut, uint256 reservesAmount ); event LOG_DRAIN_RESERVES( address indexed caller, address indexed tokenOut, uint256 tokenAmountOut ); event LOG_ADD_RESERVES( address indexed token, uint256 reservesAmount ); event LOG_CALL( bytes4 indexed sig, address indexed caller, bytes data ) anonymous; modifier _logs_() { } modifier _lock_() { } modifier _viewlock_() { } bool private _mutex; address private _factory; // BFactory address to push token exitFee to address private _controller; // has CONTROL role bool private _publicSwap; // true if PUBLIC can call SWAP functions // `setSwapFee` and `finalize` require CONTROL // `finalize` sets `PUBLIC can SWAP`, `PUBLIC can JOIN` uint private _swapFee; uint private _reservesRatio; bool private _finalized; address[] private _tokens; mapping(address=>Record) private _records; mapping(address=>uint) public totalReserves; uint private _totalWeight; constructor() public { } function isPublicSwap() external view returns (bool) { } function isFinalized() external view returns (bool) { } function isBound(address t) external view returns (bool) { } function getNumTokens() external view returns (uint) { } function getCurrentTokens() external view _viewlock_ returns (address[] memory tokens) { } function getFinalTokens() external view _viewlock_ returns (address[] memory tokens) { } function getDenormalizedWeight(address token) external view _viewlock_ returns (uint) { } function getTotalDenormalizedWeight() external view _viewlock_ returns (uint) { } function getNormalizedWeight(address token) external view _viewlock_ returns (uint) { } function getBalance(address token) external view _viewlock_ returns (uint) { } function getSwapFee() external view _viewlock_ returns (uint) { } function getReservesRatio() external view _viewlock_ returns (uint) { } function getController() external view _viewlock_ returns (address) { } function setSwapFee(uint swapFee) external _logs_ _lock_ { } function setReservesRatio(uint reservesRatio) external _logs_ _lock_ { } function setController(address manager) external _logs_ _lock_ { } function setPublicSwap(bool public_) external _logs_ _lock_ { } function finalize() external _logs_ _lock_ { } function bind(address token, uint balance, uint denorm) external _logs_ // _lock_ Bind does not lock because it jumps to `rebind`, which does { require(msg.sender == _controller); require(<FILL_ME>) require(!_finalized); require(_tokens.length < MAX_BOUND_TOKENS); _records[token] = Record({ bound: true, index: _tokens.length, denorm: 0, // balance and denorm will be validated balance: 0 // and set by `rebind` }); _tokens.push(token); rebind(token, balance, denorm); } function rebind(address token, uint balance, uint denorm) public _logs_ _lock_ { } function unbind(address token) external _logs_ _lock_ { } // Absorb any tokens that have been sent to this contract into the pool function gulp(address token) external _logs_ _lock_ { } function seize(address token, uint amount) external _logs_ _lock_ { } function getSpotPrice(address tokenIn, address tokenOut) external view _viewlock_ returns (uint spotPrice) { } function getSpotPriceSansFee(address tokenIn, address tokenOut) external view _viewlock_ returns (uint spotPrice) { } function joinPool(uint poolAmountOut, uint[] calldata maxAmountsIn) external _logs_ _lock_ { } function exitPool(uint poolAmountIn, uint[] calldata minAmountsOut) external _logs_ _lock_ { } function swapExactAmountIn( address tokenIn, uint tokenAmountIn, address tokenOut, uint minAmountOut, uint maxPrice ) external _logs_ _lock_ returns (uint tokenAmountOut, uint spotPriceAfter) { } function swapExactAmountOut( address tokenIn, uint maxAmountIn, address tokenOut, uint tokenAmountOut, uint maxPrice ) external _logs_ _lock_ returns (uint tokenAmountIn, uint spotPriceAfter) { } function joinswapExternAmountIn(address tokenIn, uint tokenAmountIn, uint minPoolAmountOut) external _logs_ _lock_ returns (uint poolAmountOut) { } function joinswapPoolAmountOut(address tokenIn, uint poolAmountOut, uint maxAmountIn) external _logs_ _lock_ returns (uint tokenAmountIn) { } function exitswapPoolAmountIn(address tokenOut, uint poolAmountIn, uint minAmountOut) external _logs_ _lock_ returns (uint tokenAmountOut) { } function exitswapExternAmountOut(address tokenOut, uint tokenAmountOut, uint maxPoolAmountIn) external _logs_ _lock_ returns (uint poolAmountIn) { } function drainTotalReserves(address reservesAddress) external _logs_ _lock_ { } // == // 'Underlying' token-manipulation functions make external calls but are NOT locked // You must `_lock_` or otherwise ensure reentry-safety function _pullUnderlying(address erc20, address from, uint amount) internal { } function _pushUnderlying(address erc20, address to, uint amount) internal { } function _pullPoolShare(address from, uint amount) internal { } function _pushPoolShare(address to, uint amount) internal { } function _mintPoolShare(uint amount) internal { } function _burnPoolShare(uint amount) internal { } }
!_records[token].bound
382,937
!_records[token].bound
null
// 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.12; import "./BToken.sol"; import "./BMath.sol"; contract BPool is BBronze, BToken, BMath { struct Record { bool bound; // is token bound to pool uint index; // private uint denorm; // denormalized weight uint balance; } event LOG_SWAP( address indexed caller, address indexed tokenIn, address indexed tokenOut, uint256 tokenAmountIn, uint256 tokenAmountOut, uint256 reservesAmount ); event LOG_JOIN( address indexed caller, address indexed tokenIn, uint256 tokenAmountIn, uint256 reservesAmount ); event LOG_EXIT( address indexed caller, address indexed tokenOut, uint256 tokenAmountOut, uint256 reservesAmount ); event LOG_DRAIN_RESERVES( address indexed caller, address indexed tokenOut, uint256 tokenAmountOut ); event LOG_ADD_RESERVES( address indexed token, uint256 reservesAmount ); event LOG_CALL( bytes4 indexed sig, address indexed caller, bytes data ) anonymous; modifier _logs_() { } modifier _lock_() { } modifier _viewlock_() { } bool private _mutex; address private _factory; // BFactory address to push token exitFee to address private _controller; // has CONTROL role bool private _publicSwap; // true if PUBLIC can call SWAP functions // `setSwapFee` and `finalize` require CONTROL // `finalize` sets `PUBLIC can SWAP`, `PUBLIC can JOIN` uint private _swapFee; uint private _reservesRatio; bool private _finalized; address[] private _tokens; mapping(address=>Record) private _records; mapping(address=>uint) public totalReserves; uint private _totalWeight; constructor() public { } function isPublicSwap() external view returns (bool) { } function isFinalized() external view returns (bool) { } function isBound(address t) external view returns (bool) { } function getNumTokens() external view returns (uint) { } function getCurrentTokens() external view _viewlock_ returns (address[] memory tokens) { } function getFinalTokens() external view _viewlock_ returns (address[] memory tokens) { } function getDenormalizedWeight(address token) external view _viewlock_ returns (uint) { } function getTotalDenormalizedWeight() external view _viewlock_ returns (uint) { } function getNormalizedWeight(address token) external view _viewlock_ returns (uint) { } function getBalance(address token) external view _viewlock_ returns (uint) { } function getSwapFee() external view _viewlock_ returns (uint) { } function getReservesRatio() external view _viewlock_ returns (uint) { } function getController() external view _viewlock_ returns (address) { } function setSwapFee(uint swapFee) external _logs_ _lock_ { } function setReservesRatio(uint reservesRatio) external _logs_ _lock_ { } function setController(address manager) external _logs_ _lock_ { } function setPublicSwap(bool public_) external _logs_ _lock_ { } function finalize() external _logs_ _lock_ { } function bind(address token, uint balance, uint denorm) external _logs_ // _lock_ Bind does not lock because it jumps to `rebind`, which does { } function rebind(address token, uint balance, uint denorm) public _logs_ _lock_ { } function unbind(address token) external _logs_ _lock_ { } // Absorb any tokens that have been sent to this contract into the pool function gulp(address token) external _logs_ _lock_ { require(_records[token].bound); uint erc20Balance = IERC20(token).balanceOf(address(this)); uint reserves = totalReserves[token]; // `_records[token].balance` should be equaled to `bsub(erc20Balance, reserves)` unless there are extra // tokens transferred to this pool without calling `joinxxx`. require(<FILL_ME>) _records[token].balance = bsub(erc20Balance, reserves); } function seize(address token, uint amount) external _logs_ _lock_ { } function getSpotPrice(address tokenIn, address tokenOut) external view _viewlock_ returns (uint spotPrice) { } function getSpotPriceSansFee(address tokenIn, address tokenOut) external view _viewlock_ returns (uint spotPrice) { } function joinPool(uint poolAmountOut, uint[] calldata maxAmountsIn) external _logs_ _lock_ { } function exitPool(uint poolAmountIn, uint[] calldata minAmountsOut) external _logs_ _lock_ { } function swapExactAmountIn( address tokenIn, uint tokenAmountIn, address tokenOut, uint minAmountOut, uint maxPrice ) external _logs_ _lock_ returns (uint tokenAmountOut, uint spotPriceAfter) { } function swapExactAmountOut( address tokenIn, uint maxAmountIn, address tokenOut, uint tokenAmountOut, uint maxPrice ) external _logs_ _lock_ returns (uint tokenAmountIn, uint spotPriceAfter) { } function joinswapExternAmountIn(address tokenIn, uint tokenAmountIn, uint minPoolAmountOut) external _logs_ _lock_ returns (uint poolAmountOut) { } function joinswapPoolAmountOut(address tokenIn, uint poolAmountOut, uint maxAmountIn) external _logs_ _lock_ returns (uint tokenAmountIn) { } function exitswapPoolAmountIn(address tokenOut, uint poolAmountIn, uint minAmountOut) external _logs_ _lock_ returns (uint tokenAmountOut) { } function exitswapExternAmountOut(address tokenOut, uint tokenAmountOut, uint maxPoolAmountIn) external _logs_ _lock_ returns (uint poolAmountIn) { } function drainTotalReserves(address reservesAddress) external _logs_ _lock_ { } // == // 'Underlying' token-manipulation functions make external calls but are NOT locked // You must `_lock_` or otherwise ensure reentry-safety function _pullUnderlying(address erc20, address from, uint amount) internal { } function _pushUnderlying(address erc20, address to, uint amount) internal { } function _pullPoolShare(address from, uint amount) internal { } function _pushPoolShare(address to, uint amount) internal { } function _mintPoolShare(uint amount) internal { } function _burnPoolShare(uint amount) internal { } }
_records[token].balance<=bsub(erc20Balance,reserves)
382,937
_records[token].balance<=bsub(erc20Balance,reserves)
"ERR_NOT_BOUND"
// 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.12; import "./BToken.sol"; import "./BMath.sol"; contract BPool is BBronze, BToken, BMath { struct Record { bool bound; // is token bound to pool uint index; // private uint denorm; // denormalized weight uint balance; } event LOG_SWAP( address indexed caller, address indexed tokenIn, address indexed tokenOut, uint256 tokenAmountIn, uint256 tokenAmountOut, uint256 reservesAmount ); event LOG_JOIN( address indexed caller, address indexed tokenIn, uint256 tokenAmountIn, uint256 reservesAmount ); event LOG_EXIT( address indexed caller, address indexed tokenOut, uint256 tokenAmountOut, uint256 reservesAmount ); event LOG_DRAIN_RESERVES( address indexed caller, address indexed tokenOut, uint256 tokenAmountOut ); event LOG_ADD_RESERVES( address indexed token, uint256 reservesAmount ); event LOG_CALL( bytes4 indexed sig, address indexed caller, bytes data ) anonymous; modifier _logs_() { } modifier _lock_() { } modifier _viewlock_() { } bool private _mutex; address private _factory; // BFactory address to push token exitFee to address private _controller; // has CONTROL role bool private _publicSwap; // true if PUBLIC can call SWAP functions // `setSwapFee` and `finalize` require CONTROL // `finalize` sets `PUBLIC can SWAP`, `PUBLIC can JOIN` uint private _swapFee; uint private _reservesRatio; bool private _finalized; address[] private _tokens; mapping(address=>Record) private _records; mapping(address=>uint) public totalReserves; uint private _totalWeight; constructor() public { } function isPublicSwap() external view returns (bool) { } function isFinalized() external view returns (bool) { } function isBound(address t) external view returns (bool) { } function getNumTokens() external view returns (uint) { } function getCurrentTokens() external view _viewlock_ returns (address[] memory tokens) { } function getFinalTokens() external view _viewlock_ returns (address[] memory tokens) { } function getDenormalizedWeight(address token) external view _viewlock_ returns (uint) { } function getTotalDenormalizedWeight() external view _viewlock_ returns (uint) { } function getNormalizedWeight(address token) external view _viewlock_ returns (uint) { } function getBalance(address token) external view _viewlock_ returns (uint) { } function getSwapFee() external view _viewlock_ returns (uint) { } function getReservesRatio() external view _viewlock_ returns (uint) { } function getController() external view _viewlock_ returns (address) { } function setSwapFee(uint swapFee) external _logs_ _lock_ { } function setReservesRatio(uint reservesRatio) external _logs_ _lock_ { } function setController(address manager) external _logs_ _lock_ { } function setPublicSwap(bool public_) external _logs_ _lock_ { } function finalize() external _logs_ _lock_ { } function bind(address token, uint balance, uint denorm) external _logs_ // _lock_ Bind does not lock because it jumps to `rebind`, which does { } function rebind(address token, uint balance, uint denorm) public _logs_ _lock_ { } function unbind(address token) external _logs_ _lock_ { } // Absorb any tokens that have been sent to this contract into the pool function gulp(address token) external _logs_ _lock_ { } function seize(address token, uint amount) external _logs_ _lock_ { } function getSpotPrice(address tokenIn, address tokenOut) external view _viewlock_ returns (uint spotPrice) { require(<FILL_ME>) require(_records[tokenOut].bound, "ERR_NOT_BOUND"); Record storage inRecord = _records[tokenIn]; Record storage outRecord = _records[tokenOut]; return calcSpotPrice(inRecord.balance, inRecord.denorm, outRecord.balance, outRecord.denorm, _swapFee); } function getSpotPriceSansFee(address tokenIn, address tokenOut) external view _viewlock_ returns (uint spotPrice) { } function joinPool(uint poolAmountOut, uint[] calldata maxAmountsIn) external _logs_ _lock_ { } function exitPool(uint poolAmountIn, uint[] calldata minAmountsOut) external _logs_ _lock_ { } function swapExactAmountIn( address tokenIn, uint tokenAmountIn, address tokenOut, uint minAmountOut, uint maxPrice ) external _logs_ _lock_ returns (uint tokenAmountOut, uint spotPriceAfter) { } function swapExactAmountOut( address tokenIn, uint maxAmountIn, address tokenOut, uint tokenAmountOut, uint maxPrice ) external _logs_ _lock_ returns (uint tokenAmountIn, uint spotPriceAfter) { } function joinswapExternAmountIn(address tokenIn, uint tokenAmountIn, uint minPoolAmountOut) external _logs_ _lock_ returns (uint poolAmountOut) { } function joinswapPoolAmountOut(address tokenIn, uint poolAmountOut, uint maxAmountIn) external _logs_ _lock_ returns (uint tokenAmountIn) { } function exitswapPoolAmountIn(address tokenOut, uint poolAmountIn, uint minAmountOut) external _logs_ _lock_ returns (uint tokenAmountOut) { } function exitswapExternAmountOut(address tokenOut, uint tokenAmountOut, uint maxPoolAmountIn) external _logs_ _lock_ returns (uint poolAmountIn) { } function drainTotalReserves(address reservesAddress) external _logs_ _lock_ { } // == // 'Underlying' token-manipulation functions make external calls but are NOT locked // You must `_lock_` or otherwise ensure reentry-safety function _pullUnderlying(address erc20, address from, uint amount) internal { } function _pushUnderlying(address erc20, address to, uint amount) internal { } function _pullPoolShare(address from, uint amount) internal { } function _pushPoolShare(address to, uint amount) internal { } function _mintPoolShare(uint amount) internal { } function _burnPoolShare(uint amount) internal { } }
_records[tokenIn].bound,"ERR_NOT_BOUND"
382,937
_records[tokenIn].bound
"ERR_NOT_BOUND"
// 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.12; import "./BToken.sol"; import "./BMath.sol"; contract BPool is BBronze, BToken, BMath { struct Record { bool bound; // is token bound to pool uint index; // private uint denorm; // denormalized weight uint balance; } event LOG_SWAP( address indexed caller, address indexed tokenIn, address indexed tokenOut, uint256 tokenAmountIn, uint256 tokenAmountOut, uint256 reservesAmount ); event LOG_JOIN( address indexed caller, address indexed tokenIn, uint256 tokenAmountIn, uint256 reservesAmount ); event LOG_EXIT( address indexed caller, address indexed tokenOut, uint256 tokenAmountOut, uint256 reservesAmount ); event LOG_DRAIN_RESERVES( address indexed caller, address indexed tokenOut, uint256 tokenAmountOut ); event LOG_ADD_RESERVES( address indexed token, uint256 reservesAmount ); event LOG_CALL( bytes4 indexed sig, address indexed caller, bytes data ) anonymous; modifier _logs_() { } modifier _lock_() { } modifier _viewlock_() { } bool private _mutex; address private _factory; // BFactory address to push token exitFee to address private _controller; // has CONTROL role bool private _publicSwap; // true if PUBLIC can call SWAP functions // `setSwapFee` and `finalize` require CONTROL // `finalize` sets `PUBLIC can SWAP`, `PUBLIC can JOIN` uint private _swapFee; uint private _reservesRatio; bool private _finalized; address[] private _tokens; mapping(address=>Record) private _records; mapping(address=>uint) public totalReserves; uint private _totalWeight; constructor() public { } function isPublicSwap() external view returns (bool) { } function isFinalized() external view returns (bool) { } function isBound(address t) external view returns (bool) { } function getNumTokens() external view returns (uint) { } function getCurrentTokens() external view _viewlock_ returns (address[] memory tokens) { } function getFinalTokens() external view _viewlock_ returns (address[] memory tokens) { } function getDenormalizedWeight(address token) external view _viewlock_ returns (uint) { } function getTotalDenormalizedWeight() external view _viewlock_ returns (uint) { } function getNormalizedWeight(address token) external view _viewlock_ returns (uint) { } function getBalance(address token) external view _viewlock_ returns (uint) { } function getSwapFee() external view _viewlock_ returns (uint) { } function getReservesRatio() external view _viewlock_ returns (uint) { } function getController() external view _viewlock_ returns (address) { } function setSwapFee(uint swapFee) external _logs_ _lock_ { } function setReservesRatio(uint reservesRatio) external _logs_ _lock_ { } function setController(address manager) external _logs_ _lock_ { } function setPublicSwap(bool public_) external _logs_ _lock_ { } function finalize() external _logs_ _lock_ { } function bind(address token, uint balance, uint denorm) external _logs_ // _lock_ Bind does not lock because it jumps to `rebind`, which does { } function rebind(address token, uint balance, uint denorm) public _logs_ _lock_ { } function unbind(address token) external _logs_ _lock_ { } // Absorb any tokens that have been sent to this contract into the pool function gulp(address token) external _logs_ _lock_ { } function seize(address token, uint amount) external _logs_ _lock_ { } function getSpotPrice(address tokenIn, address tokenOut) external view _viewlock_ returns (uint spotPrice) { require(_records[tokenIn].bound, "ERR_NOT_BOUND"); require(<FILL_ME>) Record storage inRecord = _records[tokenIn]; Record storage outRecord = _records[tokenOut]; return calcSpotPrice(inRecord.balance, inRecord.denorm, outRecord.balance, outRecord.denorm, _swapFee); } function getSpotPriceSansFee(address tokenIn, address tokenOut) external view _viewlock_ returns (uint spotPrice) { } function joinPool(uint poolAmountOut, uint[] calldata maxAmountsIn) external _logs_ _lock_ { } function exitPool(uint poolAmountIn, uint[] calldata minAmountsOut) external _logs_ _lock_ { } function swapExactAmountIn( address tokenIn, uint tokenAmountIn, address tokenOut, uint minAmountOut, uint maxPrice ) external _logs_ _lock_ returns (uint tokenAmountOut, uint spotPriceAfter) { } function swapExactAmountOut( address tokenIn, uint maxAmountIn, address tokenOut, uint tokenAmountOut, uint maxPrice ) external _logs_ _lock_ returns (uint tokenAmountIn, uint spotPriceAfter) { } function joinswapExternAmountIn(address tokenIn, uint tokenAmountIn, uint minPoolAmountOut) external _logs_ _lock_ returns (uint poolAmountOut) { } function joinswapPoolAmountOut(address tokenIn, uint poolAmountOut, uint maxAmountIn) external _logs_ _lock_ returns (uint tokenAmountIn) { } function exitswapPoolAmountIn(address tokenOut, uint poolAmountIn, uint minAmountOut) external _logs_ _lock_ returns (uint tokenAmountOut) { } function exitswapExternAmountOut(address tokenOut, uint tokenAmountOut, uint maxPoolAmountIn) external _logs_ _lock_ returns (uint poolAmountIn) { } function drainTotalReserves(address reservesAddress) external _logs_ _lock_ { } // == // 'Underlying' token-manipulation functions make external calls but are NOT locked // You must `_lock_` or otherwise ensure reentry-safety function _pullUnderlying(address erc20, address from, uint amount) internal { } function _pushUnderlying(address erc20, address to, uint amount) internal { } function _pullPoolShare(address from, uint amount) internal { } function _pushPoolShare(address to, uint amount) internal { } function _mintPoolShare(uint amount) internal { } function _burnPoolShare(uint amount) internal { } }
_records[tokenOut].bound,"ERR_NOT_BOUND"
382,937
_records[tokenOut].bound
"Already activated"
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; import "./Owned.sol"; import "./RootKit.sol"; import "./IRootKitDistribution.sol"; import "./TokensRecoverable.sol"; contract RootKitLiquidityGeneration is Owned, TokensRecoverable { mapping (address => uint256) public contribution; address[] public contributors; bool public isActive; RootKit immutable rootKit; IRootKitDistribution public rootKitDistribution; uint256 refundsAllowedUntil; constructor (RootKit _rootKit) { } modifier active() { } function contributorsCount() public view returns (uint256) { } function activate(IRootKitDistribution _rootKitDistribution) public ownerOnly() { require(<FILL_ME>) require (rootKit.balanceOf(address(this)) == rootKit.totalSupply(), "Missing supply"); require (address(_rootKitDistribution) != address(0)); rootKitDistribution = _rootKitDistribution; isActive = true; } function setRootKitDistribution(IRootKitDistribution _rootKitDistribution) public ownerOnly() active() { } function complete() public ownerOnly() active() { } function allowRefunds() public ownerOnly() active() { } function claim() public { } receive() external payable active() { } }
!isActive&&contributors.length==0&&block.timestamp>=refundsAllowedUntil,"Already activated"
382,958
!isActive&&contributors.length==0&&block.timestamp>=refundsAllowedUntil
"Missing supply"
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; import "./Owned.sol"; import "./RootKit.sol"; import "./IRootKitDistribution.sol"; import "./TokensRecoverable.sol"; contract RootKitLiquidityGeneration is Owned, TokensRecoverable { mapping (address => uint256) public contribution; address[] public contributors; bool public isActive; RootKit immutable rootKit; IRootKitDistribution public rootKitDistribution; uint256 refundsAllowedUntil; constructor (RootKit _rootKit) { } modifier active() { } function contributorsCount() public view returns (uint256) { } function activate(IRootKitDistribution _rootKitDistribution) public ownerOnly() { require (!isActive && contributors.length == 0 && block.timestamp >= refundsAllowedUntil, "Already activated"); require(<FILL_ME>) require (address(_rootKitDistribution) != address(0)); rootKitDistribution = _rootKitDistribution; isActive = true; } function setRootKitDistribution(IRootKitDistribution _rootKitDistribution) public ownerOnly() active() { } function complete() public ownerOnly() active() { } function allowRefunds() public ownerOnly() active() { } function claim() public { } receive() external payable active() { } }
rootKit.balanceOf(address(this))==rootKit.totalSupply(),"Missing supply"
382,958
rootKit.balanceOf(address(this))==rootKit.totalSupply()
null
// SPDX-License-Identifier: J-J-J-JENGA!!! pragma solidity ^0.7.4; import "./Owned.sol"; import "./RootKit.sol"; import "./IRootKitDistribution.sol"; import "./TokensRecoverable.sol"; contract RootKitLiquidityGeneration is Owned, TokensRecoverable { mapping (address => uint256) public contribution; address[] public contributors; bool public isActive; RootKit immutable rootKit; IRootKitDistribution public rootKitDistribution; uint256 refundsAllowedUntil; constructor (RootKit _rootKit) { } modifier active() { } function contributorsCount() public view returns (uint256) { } function activate(IRootKitDistribution _rootKitDistribution) public ownerOnly() { require (!isActive && contributors.length == 0 && block.timestamp >= refundsAllowedUntil, "Already activated"); require (rootKit.balanceOf(address(this)) == rootKit.totalSupply(), "Missing supply"); require(<FILL_ME>) rootKitDistribution = _rootKitDistribution; isActive = true; } function setRootKitDistribution(IRootKitDistribution _rootKitDistribution) public ownerOnly() active() { } function complete() public ownerOnly() active() { } function allowRefunds() public ownerOnly() active() { } function claim() public { } receive() external payable active() { } }
address(_rootKitDistribution)!=address(0)
382,958
address(_rootKitDistribution)!=address(0)
"!stable"
pragma solidity 0.5.16; pragma experimental ABIEncoderV2; import "openzeppelin-solidity-2.3.0/contracts/ownership/Ownable.sol"; import "openzeppelin-solidity-2.3.0/contracts/math/SafeMath.sol"; import "@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol"; import "./OrbitConfig.sol"; import "./PriceOracle.sol"; import "./SafeToken.sol"; interface IUniswapOrbit { function lpToken() external view returns (IUniswapV2Pair); } contract UniswapOrbitConfig is Ownable, OrbitConfig { using SafeToken for address; using SafeMath for uint256; struct Config { bool acceptDebt; uint64 launcher; uint64 terminator; uint64 maxPriceDiff; } PriceOracle public oracle; mapping (address => Config) public orbits; constructor(PriceOracle _oracle) public { } /// @dev Set oracle address. Must be called by owner. function setOracle(PriceOracle _oracle) external onlyOwner { } /// @dev Set orbit configurations. Must be called by owner. function setConfigs(address[] calldata addrs, Config[] calldata configs) external onlyOwner { } /// @dev Return whether the given orbit is stable, presumably not under manipulation. function isStable(address orbit) public view returns (bool) { } /// @dev Return whether the given orbit accepts more debt. function acceptDebt(address orbit) external view returns (bool) { require(<FILL_ME>) return orbits[orbit].acceptDebt; } /// @dev Return the work factor for the orbit + ETH debt, using 1e4 as denom. function launcher(address orbit, uint256 /* debt */) external view returns (uint256) { } /// @dev Return the kill factor for the orbit + ETH debt, using 1e4 as denom. function terminator(address orbit, uint256 /* debt */) external view returns (uint256) { } }
isStable(orbit),"!stable"
382,984
isStable(orbit)
null
pragma solidity ^0.4.18; contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } contract DefconPro is Ownable { event Defcon(uint64 blockNumber, uint16 defconLevel); uint16 public defcon = 5;//default defcon level of 5 means everything is cool, no problems //if defcon is set to 4 or lower then function is paused modifier defcon4() { } //if defcon is set to 3 or lower then function is paused modifier defcon3() { } //if defcon is set to 2 or lower then function is paused modifier defcon2() { } //if defcon is set to 1 or lower then function is paused modifier defcon1() { } //set the defcon level, 5 is unpaused, 1 is EVERYTHING is paused function setDefconLevel(uint16 _defcon) onlyOwner public { } } contract bigBankLittleBank is DefconPro { using SafeMath for uint; uint public houseFee = 2; //Fee is 2% uint public houseCommission = 0; //keeps track of commission uint public bookKeeper = 0; //keeping track of what the balance should be to tie into auto pause script if it doesn't match contracte balance bytes32 emptyBet = 0x0000000000000000000000000000000000000000000000000000000000000000; //main event, listing off winners/losers event BigBankBet(uint blockNumber, address indexed winner, address indexed loser, uint winningBetId1, uint losingBetId2, uint total); //event to show users deposit history event Deposit(address indexed user, uint amount); //event to show users withdraw history event Withdraw(address indexed user, uint amount); //Private struct that keeps track of each users bet BetBank[] private betBanks; //bet Struct struct BetBank { bytes32 bet; address owner; } //gets the user balance, requires that the user be the msg.sender, should make it a bit harder to get users balance function userBalance() public view returns(uint) { } //setting up internal bank struct, should prevent prying eyes from seeing other users banks mapping (address => uint) public userBank; //main deposit function function depositBank() public defcon4 payable { } //widthdraw what is in users bank function withdrawBank(uint amount) public defcon2 returns(bool) { require(<FILL_ME>)//require that the user has enough to withdraw bookKeeper = bookKeeper.sub(amount);//update the bookkeeper userBank[msg.sender] = userBank[msg.sender].sub(amount);//reduce users account balance Withdraw(msg.sender, amount);//broadcast Withdraw event (msg.sender).transfer(amount);//transfer the amount to user return true; } //create a bet function startBet(uint _bet) public defcon3 returns(uint betId) { } //internal function to delete the bet token function _endBetListing(uint betId) private returns(bool){ } //bet a users token against another users token function betAgainstUser(uint _betId1, uint _betId2) public defcon3 returns(bool){ } //internal function to pay out the winner function _payoutWinner(uint winner, uint loser, uint take, uint fee) private returns(bool) { } //set the fee function setHouseFee(uint newFee)public onlyOwner returns(bool) { } //withdraw the commission function withdrawCommission()public onlyOwner returns(bool) { } //random function for tiebreaker function _random() private view returns (uint8) { } //get amount of active bet tokens function _totalActiveBets() private view returns(uint total) { } //get list of active bet tokens function listActiveBets() public view returns(uint[]) { } //total open bets of user function _totalUsersBets() private view returns(uint total) { } //get list of active bet tokens function listUsersBets() public view returns(uint[]) { } } /** * @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) { } }
userBank[msg.sender]>=amount
383,006
userBank[msg.sender]>=amount
null
pragma solidity ^0.4.18; contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } contract DefconPro is Ownable { event Defcon(uint64 blockNumber, uint16 defconLevel); uint16 public defcon = 5;//default defcon level of 5 means everything is cool, no problems //if defcon is set to 4 or lower then function is paused modifier defcon4() { } //if defcon is set to 3 or lower then function is paused modifier defcon3() { } //if defcon is set to 2 or lower then function is paused modifier defcon2() { } //if defcon is set to 1 or lower then function is paused modifier defcon1() { } //set the defcon level, 5 is unpaused, 1 is EVERYTHING is paused function setDefconLevel(uint16 _defcon) onlyOwner public { } } contract bigBankLittleBank is DefconPro { using SafeMath for uint; uint public houseFee = 2; //Fee is 2% uint public houseCommission = 0; //keeps track of commission uint public bookKeeper = 0; //keeping track of what the balance should be to tie into auto pause script if it doesn't match contracte balance bytes32 emptyBet = 0x0000000000000000000000000000000000000000000000000000000000000000; //main event, listing off winners/losers event BigBankBet(uint blockNumber, address indexed winner, address indexed loser, uint winningBetId1, uint losingBetId2, uint total); //event to show users deposit history event Deposit(address indexed user, uint amount); //event to show users withdraw history event Withdraw(address indexed user, uint amount); //Private struct that keeps track of each users bet BetBank[] private betBanks; //bet Struct struct BetBank { bytes32 bet; address owner; } //gets the user balance, requires that the user be the msg.sender, should make it a bit harder to get users balance function userBalance() public view returns(uint) { } //setting up internal bank struct, should prevent prying eyes from seeing other users banks mapping (address => uint) public userBank; //main deposit function function depositBank() public defcon4 payable { } //widthdraw what is in users bank function withdrawBank(uint amount) public defcon2 returns(bool) { } //create a bet function startBet(uint _bet) public defcon3 returns(uint betId) { require(<FILL_ME>)//require user has enough to create the bet require(_bet > 0); userBank[msg.sender] = (userBank[msg.sender]).sub(_bet);//reduce users bank by the bet amount uint convertedAddr = uint(msg.sender); uint combinedBet = convertedAddr.add(_bet)*7; BetBank memory betBank = BetBank({//birth the bet token bet: bytes32(combinedBet),//_bet, owner: msg.sender }); //push new bet and get betId betId = betBanks.push(betBank).sub(1);//push the bet token and get the Id } //internal function to delete the bet token function _endBetListing(uint betId) private returns(bool){ } //bet a users token against another users token function betAgainstUser(uint _betId1, uint _betId2) public defcon3 returns(bool){ } //internal function to pay out the winner function _payoutWinner(uint winner, uint loser, uint take, uint fee) private returns(bool) { } //set the fee function setHouseFee(uint newFee)public onlyOwner returns(bool) { } //withdraw the commission function withdrawCommission()public onlyOwner returns(bool) { } //random function for tiebreaker function _random() private view returns (uint8) { } //get amount of active bet tokens function _totalActiveBets() private view returns(uint total) { } //get list of active bet tokens function listActiveBets() public view returns(uint[]) { } //total open bets of user function _totalUsersBets() private view returns(uint total) { } //get list of active bet tokens function listUsersBets() public view returns(uint[]) { } } /** * @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) { } }
userBank[msg.sender]>=_bet
383,006
userBank[msg.sender]>=_bet
null
pragma solidity ^0.4.18; contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } contract DefconPro is Ownable { event Defcon(uint64 blockNumber, uint16 defconLevel); uint16 public defcon = 5;//default defcon level of 5 means everything is cool, no problems //if defcon is set to 4 or lower then function is paused modifier defcon4() { } //if defcon is set to 3 or lower then function is paused modifier defcon3() { } //if defcon is set to 2 or lower then function is paused modifier defcon2() { } //if defcon is set to 1 or lower then function is paused modifier defcon1() { } //set the defcon level, 5 is unpaused, 1 is EVERYTHING is paused function setDefconLevel(uint16 _defcon) onlyOwner public { } } contract bigBankLittleBank is DefconPro { using SafeMath for uint; uint public houseFee = 2; //Fee is 2% uint public houseCommission = 0; //keeps track of commission uint public bookKeeper = 0; //keeping track of what the balance should be to tie into auto pause script if it doesn't match contracte balance bytes32 emptyBet = 0x0000000000000000000000000000000000000000000000000000000000000000; //main event, listing off winners/losers event BigBankBet(uint blockNumber, address indexed winner, address indexed loser, uint winningBetId1, uint losingBetId2, uint total); //event to show users deposit history event Deposit(address indexed user, uint amount); //event to show users withdraw history event Withdraw(address indexed user, uint amount); //Private struct that keeps track of each users bet BetBank[] private betBanks; //bet Struct struct BetBank { bytes32 bet; address owner; } //gets the user balance, requires that the user be the msg.sender, should make it a bit harder to get users balance function userBalance() public view returns(uint) { } //setting up internal bank struct, should prevent prying eyes from seeing other users banks mapping (address => uint) public userBank; //main deposit function function depositBank() public defcon4 payable { } //widthdraw what is in users bank function withdrawBank(uint amount) public defcon2 returns(bool) { } //create a bet function startBet(uint _bet) public defcon3 returns(uint betId) { } //internal function to delete the bet token function _endBetListing(uint betId) private returns(bool){ } //bet a users token against another users token function betAgainstUser(uint _betId1, uint _betId2) public defcon3 returns(bool){ require(<FILL_ME>)//require that both tokens are active and hold funds require(betBanks[_betId1].owner == msg.sender || betBanks[_betId2].owner == msg.sender); //require that the user submitting is the owner of one of the tokens require(betBanks[_betId1].owner != betBanks[_betId2].owner);//prevent a user from betting 2 tokens he owns, prevent possible exploits require(_betId1 != _betId2);//require that user doesn't bet token against itself //unhash the bets to calculate winner uint bet1ConvertedAddr = uint(betBanks[_betId1].owner); uint bet1 = (uint(betBanks[_betId1].bet)/7).sub(bet1ConvertedAddr); uint bet2ConvertedAddr = uint(betBanks[_betId2].owner); uint bet2 = (uint(betBanks[_betId2].bet)/7).sub(bet2ConvertedAddr); uint take = (bet1).add(bet2);//calculate the total rewards for winning uint fee = (take.mul(houseFee)).div(100);//calculate the fee houseCommission = houseCommission.add(fee);//add fee to commission if(bet1 != bet2) {//if no tie if(bet1 > bet2) {//if betId1 wins _payoutWinner(_betId1, _betId2, take, fee);//payout betId1 } else { _payoutWinner(_betId2, _betId1, take, fee);//payout betId2 } } else {//if its a tie if(_random() == 0) {//choose a random winner _payoutWinner(_betId1, _betId2, take, fee);//payout betId1 } else { _payoutWinner(_betId2, _betId1, take, fee);//payout betId2 } } return true; } //internal function to pay out the winner function _payoutWinner(uint winner, uint loser, uint take, uint fee) private returns(bool) { } //set the fee function setHouseFee(uint newFee)public onlyOwner returns(bool) { } //withdraw the commission function withdrawCommission()public onlyOwner returns(bool) { } //random function for tiebreaker function _random() private view returns (uint8) { } //get amount of active bet tokens function _totalActiveBets() private view returns(uint total) { } //get list of active bet tokens function listActiveBets() public view returns(uint[]) { } //total open bets of user function _totalUsersBets() private view returns(uint total) { } //get list of active bet tokens function listUsersBets() public view returns(uint[]) { } } /** * @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) { } }
betBanks[_betId1].bet!=emptyBet&&betBanks[_betId2].bet!=emptyBet
383,006
betBanks[_betId1].bet!=emptyBet&&betBanks[_betId2].bet!=emptyBet
null
pragma solidity ^0.4.18; contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } contract DefconPro is Ownable { event Defcon(uint64 blockNumber, uint16 defconLevel); uint16 public defcon = 5;//default defcon level of 5 means everything is cool, no problems //if defcon is set to 4 or lower then function is paused modifier defcon4() { } //if defcon is set to 3 or lower then function is paused modifier defcon3() { } //if defcon is set to 2 or lower then function is paused modifier defcon2() { } //if defcon is set to 1 or lower then function is paused modifier defcon1() { } //set the defcon level, 5 is unpaused, 1 is EVERYTHING is paused function setDefconLevel(uint16 _defcon) onlyOwner public { } } contract bigBankLittleBank is DefconPro { using SafeMath for uint; uint public houseFee = 2; //Fee is 2% uint public houseCommission = 0; //keeps track of commission uint public bookKeeper = 0; //keeping track of what the balance should be to tie into auto pause script if it doesn't match contracte balance bytes32 emptyBet = 0x0000000000000000000000000000000000000000000000000000000000000000; //main event, listing off winners/losers event BigBankBet(uint blockNumber, address indexed winner, address indexed loser, uint winningBetId1, uint losingBetId2, uint total); //event to show users deposit history event Deposit(address indexed user, uint amount); //event to show users withdraw history event Withdraw(address indexed user, uint amount); //Private struct that keeps track of each users bet BetBank[] private betBanks; //bet Struct struct BetBank { bytes32 bet; address owner; } //gets the user balance, requires that the user be the msg.sender, should make it a bit harder to get users balance function userBalance() public view returns(uint) { } //setting up internal bank struct, should prevent prying eyes from seeing other users banks mapping (address => uint) public userBank; //main deposit function function depositBank() public defcon4 payable { } //widthdraw what is in users bank function withdrawBank(uint amount) public defcon2 returns(bool) { } //create a bet function startBet(uint _bet) public defcon3 returns(uint betId) { } //internal function to delete the bet token function _endBetListing(uint betId) private returns(bool){ } //bet a users token against another users token function betAgainstUser(uint _betId1, uint _betId2) public defcon3 returns(bool){ require(betBanks[_betId1].bet != emptyBet && betBanks[_betId2].bet != emptyBet);//require that both tokens are active and hold funds require(<FILL_ME>) //require that the user submitting is the owner of one of the tokens require(betBanks[_betId1].owner != betBanks[_betId2].owner);//prevent a user from betting 2 tokens he owns, prevent possible exploits require(_betId1 != _betId2);//require that user doesn't bet token against itself //unhash the bets to calculate winner uint bet1ConvertedAddr = uint(betBanks[_betId1].owner); uint bet1 = (uint(betBanks[_betId1].bet)/7).sub(bet1ConvertedAddr); uint bet2ConvertedAddr = uint(betBanks[_betId2].owner); uint bet2 = (uint(betBanks[_betId2].bet)/7).sub(bet2ConvertedAddr); uint take = (bet1).add(bet2);//calculate the total rewards for winning uint fee = (take.mul(houseFee)).div(100);//calculate the fee houseCommission = houseCommission.add(fee);//add fee to commission if(bet1 != bet2) {//if no tie if(bet1 > bet2) {//if betId1 wins _payoutWinner(_betId1, _betId2, take, fee);//payout betId1 } else { _payoutWinner(_betId2, _betId1, take, fee);//payout betId2 } } else {//if its a tie if(_random() == 0) {//choose a random winner _payoutWinner(_betId1, _betId2, take, fee);//payout betId1 } else { _payoutWinner(_betId2, _betId1, take, fee);//payout betId2 } } return true; } //internal function to pay out the winner function _payoutWinner(uint winner, uint loser, uint take, uint fee) private returns(bool) { } //set the fee function setHouseFee(uint newFee)public onlyOwner returns(bool) { } //withdraw the commission function withdrawCommission()public onlyOwner returns(bool) { } //random function for tiebreaker function _random() private view returns (uint8) { } //get amount of active bet tokens function _totalActiveBets() private view returns(uint total) { } //get list of active bet tokens function listActiveBets() public view returns(uint[]) { } //total open bets of user function _totalUsersBets() private view returns(uint total) { } //get list of active bet tokens function listUsersBets() public view returns(uint[]) { } } /** * @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) { } }
betBanks[_betId1].owner==msg.sender||betBanks[_betId2].owner==msg.sender
383,006
betBanks[_betId1].owner==msg.sender||betBanks[_betId2].owner==msg.sender
null
pragma solidity ^0.4.18; contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } contract DefconPro is Ownable { event Defcon(uint64 blockNumber, uint16 defconLevel); uint16 public defcon = 5;//default defcon level of 5 means everything is cool, no problems //if defcon is set to 4 or lower then function is paused modifier defcon4() { } //if defcon is set to 3 or lower then function is paused modifier defcon3() { } //if defcon is set to 2 or lower then function is paused modifier defcon2() { } //if defcon is set to 1 or lower then function is paused modifier defcon1() { } //set the defcon level, 5 is unpaused, 1 is EVERYTHING is paused function setDefconLevel(uint16 _defcon) onlyOwner public { } } contract bigBankLittleBank is DefconPro { using SafeMath for uint; uint public houseFee = 2; //Fee is 2% uint public houseCommission = 0; //keeps track of commission uint public bookKeeper = 0; //keeping track of what the balance should be to tie into auto pause script if it doesn't match contracte balance bytes32 emptyBet = 0x0000000000000000000000000000000000000000000000000000000000000000; //main event, listing off winners/losers event BigBankBet(uint blockNumber, address indexed winner, address indexed loser, uint winningBetId1, uint losingBetId2, uint total); //event to show users deposit history event Deposit(address indexed user, uint amount); //event to show users withdraw history event Withdraw(address indexed user, uint amount); //Private struct that keeps track of each users bet BetBank[] private betBanks; //bet Struct struct BetBank { bytes32 bet; address owner; } //gets the user balance, requires that the user be the msg.sender, should make it a bit harder to get users balance function userBalance() public view returns(uint) { } //setting up internal bank struct, should prevent prying eyes from seeing other users banks mapping (address => uint) public userBank; //main deposit function function depositBank() public defcon4 payable { } //widthdraw what is in users bank function withdrawBank(uint amount) public defcon2 returns(bool) { } //create a bet function startBet(uint _bet) public defcon3 returns(uint betId) { } //internal function to delete the bet token function _endBetListing(uint betId) private returns(bool){ } //bet a users token against another users token function betAgainstUser(uint _betId1, uint _betId2) public defcon3 returns(bool){ require(betBanks[_betId1].bet != emptyBet && betBanks[_betId2].bet != emptyBet);//require that both tokens are active and hold funds require(betBanks[_betId1].owner == msg.sender || betBanks[_betId2].owner == msg.sender); //require that the user submitting is the owner of one of the tokens require(<FILL_ME>)//prevent a user from betting 2 tokens he owns, prevent possible exploits require(_betId1 != _betId2);//require that user doesn't bet token against itself //unhash the bets to calculate winner uint bet1ConvertedAddr = uint(betBanks[_betId1].owner); uint bet1 = (uint(betBanks[_betId1].bet)/7).sub(bet1ConvertedAddr); uint bet2ConvertedAddr = uint(betBanks[_betId2].owner); uint bet2 = (uint(betBanks[_betId2].bet)/7).sub(bet2ConvertedAddr); uint take = (bet1).add(bet2);//calculate the total rewards for winning uint fee = (take.mul(houseFee)).div(100);//calculate the fee houseCommission = houseCommission.add(fee);//add fee to commission if(bet1 != bet2) {//if no tie if(bet1 > bet2) {//if betId1 wins _payoutWinner(_betId1, _betId2, take, fee);//payout betId1 } else { _payoutWinner(_betId2, _betId1, take, fee);//payout betId2 } } else {//if its a tie if(_random() == 0) {//choose a random winner _payoutWinner(_betId1, _betId2, take, fee);//payout betId1 } else { _payoutWinner(_betId2, _betId1, take, fee);//payout betId2 } } return true; } //internal function to pay out the winner function _payoutWinner(uint winner, uint loser, uint take, uint fee) private returns(bool) { } //set the fee function setHouseFee(uint newFee)public onlyOwner returns(bool) { } //withdraw the commission function withdrawCommission()public onlyOwner returns(bool) { } //random function for tiebreaker function _random() private view returns (uint8) { } //get amount of active bet tokens function _totalActiveBets() private view returns(uint total) { } //get list of active bet tokens function listActiveBets() public view returns(uint[]) { } //total open bets of user function _totalUsersBets() private view returns(uint total) { } //get list of active bet tokens function listUsersBets() public view returns(uint[]) { } } /** * @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) { } }
betBanks[_betId1].owner!=betBanks[_betId2].owner
383,006
betBanks[_betId1].owner!=betBanks[_betId2].owner
null
pragma solidity ^0.4.25; contract Ownable { address public owner; constructor() public { } modifier onlyOwner() { } } contract Role is Ownable { struct AdminGroup { mapping (address => bool) administers; mapping (address => uint) administerListIndex; address[] administerList; mapping (address => bool) pausers; mapping (address => uint) pauserListIndex; address[] pauserList; } AdminGroup private adminGroup; modifier administerAndAbove() { require(<FILL_ME>) _; } modifier pauserAndAbove() { } function isAdminister(address account) public view returns (bool) { } function addAdminister(address account) public onlyOwner { } function removeAdminister(address account) public onlyOwner { } function getAdministerList() view public returns(address[]) { } function isPauser(address account) public view returns (bool) { } function addPauser(address account) public onlyOwner { } function removePauser(address account) public onlyOwner{ } function getPauserList() view public returns(address[]) { } event AdministerAdded(address indexed account); event AdministerRemoved(address indexed account); event PauserAdded(address indexed account); event PauserRemoved(address indexed account); } contract Proxy is Role { event Upgraded(address indexed implementation); address internal _linkedContractAddress; function implementation() public view returns (address) { } function upgradeTo(address newContractAddress) public administerAndAbove { } function () payable public { } } contract PathHiveNetworkProxy is Proxy { string public name = "PathHive Network"; string public symbol = "PHV"; uint8 public decimals = 18; constructor() public {} }
isAdminister(msg.sender)||msg.sender==owner
383,132
isAdminister(msg.sender)||msg.sender==owner
null
pragma solidity ^0.4.25; contract Ownable { address public owner; constructor() public { } modifier onlyOwner() { } } contract Role is Ownable { struct AdminGroup { mapping (address => bool) administers; mapping (address => uint) administerListIndex; address[] administerList; mapping (address => bool) pausers; mapping (address => uint) pauserListIndex; address[] pauserList; } AdminGroup private adminGroup; modifier administerAndAbove() { } modifier pauserAndAbove() { require(<FILL_ME>) _; } function isAdminister(address account) public view returns (bool) { } function addAdminister(address account) public onlyOwner { } function removeAdminister(address account) public onlyOwner { } function getAdministerList() view public returns(address[]) { } function isPauser(address account) public view returns (bool) { } function addPauser(address account) public onlyOwner { } function removePauser(address account) public onlyOwner{ } function getPauserList() view public returns(address[]) { } event AdministerAdded(address indexed account); event AdministerRemoved(address indexed account); event PauserAdded(address indexed account); event PauserRemoved(address indexed account); } contract Proxy is Role { event Upgraded(address indexed implementation); address internal _linkedContractAddress; function implementation() public view returns (address) { } function upgradeTo(address newContractAddress) public administerAndAbove { } function () payable public { } } contract PathHiveNetworkProxy is Proxy { string public name = "PathHive Network"; string public symbol = "PHV"; uint8 public decimals = 18; constructor() public {} }
isPauser(msg.sender)||isAdminister(msg.sender)||msg.sender==owner
383,132
isPauser(msg.sender)||isAdminister(msg.sender)||msg.sender==owner
null
pragma solidity ^0.4.25; contract Ownable { address public owner; constructor() public { } modifier onlyOwner() { } } contract Role is Ownable { struct AdminGroup { mapping (address => bool) administers; mapping (address => uint) administerListIndex; address[] administerList; mapping (address => bool) pausers; mapping (address => uint) pauserListIndex; address[] pauserList; } AdminGroup private adminGroup; modifier administerAndAbove() { } modifier pauserAndAbove() { } function isAdminister(address account) public view returns (bool) { } function addAdminister(address account) public onlyOwner { require(<FILL_ME>) require(!isPauser(account)); if (account == owner) { revert(); } adminGroup.administers[account] = true; adminGroup.administerListIndex[account] = adminGroup.administerList.push(account)-1; emit AdministerAdded(account); } function removeAdminister(address account) public onlyOwner { } function getAdministerList() view public returns(address[]) { } function isPauser(address account) public view returns (bool) { } function addPauser(address account) public onlyOwner { } function removePauser(address account) public onlyOwner{ } function getPauserList() view public returns(address[]) { } event AdministerAdded(address indexed account); event AdministerRemoved(address indexed account); event PauserAdded(address indexed account); event PauserRemoved(address indexed account); } contract Proxy is Role { event Upgraded(address indexed implementation); address internal _linkedContractAddress; function implementation() public view returns (address) { } function upgradeTo(address newContractAddress) public administerAndAbove { } function () payable public { } } contract PathHiveNetworkProxy is Proxy { string public name = "PathHive Network"; string public symbol = "PHV"; uint8 public decimals = 18; constructor() public {} }
!isAdminister(account)
383,132
!isAdminister(account)
null
pragma solidity ^0.4.25; contract Ownable { address public owner; constructor() public { } modifier onlyOwner() { } } contract Role is Ownable { struct AdminGroup { mapping (address => bool) administers; mapping (address => uint) administerListIndex; address[] administerList; mapping (address => bool) pausers; mapping (address => uint) pauserListIndex; address[] pauserList; } AdminGroup private adminGroup; modifier administerAndAbove() { } modifier pauserAndAbove() { } function isAdminister(address account) public view returns (bool) { } function addAdminister(address account) public onlyOwner { } function removeAdminister(address account) public onlyOwner { require(<FILL_ME>) require(!isPauser(account)); if (adminGroup.administerListIndex[account]==0){ require(adminGroup.administerList[0] == account); } if (adminGroup.administerListIndex[account] >= adminGroup.administerList.length) return; adminGroup.administers[account] = false; for (uint i = adminGroup.administerListIndex[account]; i<adminGroup.administerList.length-1; i++){ adminGroup.administerList[i] = adminGroup.administerList[i+1]; adminGroup.administerListIndex[adminGroup.administerList[i+1]] = adminGroup.administerListIndex[adminGroup.administerList[i+1]]-1; } delete adminGroup.administerList[adminGroup.administerList.length-1]; delete adminGroup.administerListIndex[account]; adminGroup.administerList.length--; emit AdministerRemoved(account); } function getAdministerList() view public returns(address[]) { } function isPauser(address account) public view returns (bool) { } function addPauser(address account) public onlyOwner { } function removePauser(address account) public onlyOwner{ } function getPauserList() view public returns(address[]) { } event AdministerAdded(address indexed account); event AdministerRemoved(address indexed account); event PauserAdded(address indexed account); event PauserRemoved(address indexed account); } contract Proxy is Role { event Upgraded(address indexed implementation); address internal _linkedContractAddress; function implementation() public view returns (address) { } function upgradeTo(address newContractAddress) public administerAndAbove { } function () payable public { } } contract PathHiveNetworkProxy is Proxy { string public name = "PathHive Network"; string public symbol = "PHV"; uint8 public decimals = 18; constructor() public {} }
isAdminister(account)
383,132
isAdminister(account)
null
pragma solidity ^0.4.25; contract Ownable { address public owner; constructor() public { } modifier onlyOwner() { } } contract Role is Ownable { struct AdminGroup { mapping (address => bool) administers; mapping (address => uint) administerListIndex; address[] administerList; mapping (address => bool) pausers; mapping (address => uint) pauserListIndex; address[] pauserList; } AdminGroup private adminGroup; modifier administerAndAbove() { } modifier pauserAndAbove() { } function isAdminister(address account) public view returns (bool) { } function addAdminister(address account) public onlyOwner { } function removeAdminister(address account) public onlyOwner { require(isAdminister(account)); require(!isPauser(account)); if (adminGroup.administerListIndex[account]==0){ require(<FILL_ME>) } if (adminGroup.administerListIndex[account] >= adminGroup.administerList.length) return; adminGroup.administers[account] = false; for (uint i = adminGroup.administerListIndex[account]; i<adminGroup.administerList.length-1; i++){ adminGroup.administerList[i] = adminGroup.administerList[i+1]; adminGroup.administerListIndex[adminGroup.administerList[i+1]] = adminGroup.administerListIndex[adminGroup.administerList[i+1]]-1; } delete adminGroup.administerList[adminGroup.administerList.length-1]; delete adminGroup.administerListIndex[account]; adminGroup.administerList.length--; emit AdministerRemoved(account); } function getAdministerList() view public returns(address[]) { } function isPauser(address account) public view returns (bool) { } function addPauser(address account) public onlyOwner { } function removePauser(address account) public onlyOwner{ } function getPauserList() view public returns(address[]) { } event AdministerAdded(address indexed account); event AdministerRemoved(address indexed account); event PauserAdded(address indexed account); event PauserRemoved(address indexed account); } contract Proxy is Role { event Upgraded(address indexed implementation); address internal _linkedContractAddress; function implementation() public view returns (address) { } function upgradeTo(address newContractAddress) public administerAndAbove { } function () payable public { } } contract PathHiveNetworkProxy is Proxy { string public name = "PathHive Network"; string public symbol = "PHV"; uint8 public decimals = 18; constructor() public {} }
adminGroup.administerList[0]==account
383,132
adminGroup.administerList[0]==account
null
pragma solidity ^0.4.25; contract Ownable { address public owner; constructor() public { } modifier onlyOwner() { } } contract Role is Ownable { struct AdminGroup { mapping (address => bool) administers; mapping (address => uint) administerListIndex; address[] administerList; mapping (address => bool) pausers; mapping (address => uint) pauserListIndex; address[] pauserList; } AdminGroup private adminGroup; modifier administerAndAbove() { } modifier pauserAndAbove() { } function isAdminister(address account) public view returns (bool) { } function addAdminister(address account) public onlyOwner { } function removeAdminister(address account) public onlyOwner { } function getAdministerList() view public returns(address[]) { } function isPauser(address account) public view returns (bool) { } function addPauser(address account) public onlyOwner { } function removePauser(address account) public onlyOwner{ require(isPauser(account)); require(!isAdminister(account)); if (adminGroup.pauserListIndex[account]==0){ require(<FILL_ME>) } if (adminGroup.pauserListIndex[account] >= adminGroup.pauserList.length) return; adminGroup.pausers[account] = false; for (uint i = adminGroup.pauserListIndex[account]; i<adminGroup.pauserList.length-1; i++){ adminGroup.pauserList[i] = adminGroup.pauserList[i+1]; adminGroup.pauserListIndex[adminGroup.pauserList[i+1]] = adminGroup.pauserListIndex[adminGroup.pauserList[i+1]]-1; } delete adminGroup.pauserList[adminGroup.pauserList.length-1]; delete adminGroup.pauserListIndex[account]; adminGroup.pauserList.length--; emit PauserRemoved(account); } function getPauserList() view public returns(address[]) { } event AdministerAdded(address indexed account); event AdministerRemoved(address indexed account); event PauserAdded(address indexed account); event PauserRemoved(address indexed account); } contract Proxy is Role { event Upgraded(address indexed implementation); address internal _linkedContractAddress; function implementation() public view returns (address) { } function upgradeTo(address newContractAddress) public administerAndAbove { } function () payable public { } } contract PathHiveNetworkProxy is Proxy { string public name = "PathHive Network"; string public symbol = "PHV"; uint8 public decimals = 18; constructor() public {} }
adminGroup.pauserList[0]==account
383,132
adminGroup.pauserList[0]==account
"api key already in use"
pragma solidity 0.7.1; /** * @title enabling Zero Knowledge API Keys as described in: https://blog.leverj.io/zero-knowledge-api-keys-43280cc93647 * @notice the Registry app consists of the RegistryLogic & RegistryData contracts. * api-key registrations are held within RegistryData for an easier upgrade path. * @dev although Registry enable account-based apps needing log-less logins, no app is required to use it. */ contract RegistryLogic is Validating, AppLogic, AppState, GluonLogic { RegistryData public data; OldRegistry public old; event Registered(address apiKey, address indexed account); constructor(address gluon_, address old_, address data_) GluonLogic(REGISTRY_INDEX, gluon_) { } modifier isAbsent(address apiKey) { require(<FILL_ME>) _; } /// @notice register an api-key on behalf of the sender /// @dev irreversible operation; the apiKey->sender association cannot be broken or overwritten /// (but further apiKey->sender associations can be provided) /// /// @param apiKey the account to be used to stand-in for the registering sender function register(address apiKey) external whenOn validAddress(apiKey) isAbsent(apiKey) { } /// @notice retrieve the stand-in-for account /// /// @param apiKey the account to be used to stand-in for the registering sender function translate(address apiKey) public view returns (address) { } /**************************************************** AppLogic ****************************************************/ /// @notice upgrade the app to a new version; the approved proposal. /// by the end of this call the approved proposal would be the current and active version of the app. function upgrade() external override onlyUpgradeOperator { } function credit(address, address, uint) external override pure { } function debit(address, bytes calldata) external override pure returns (address, uint) { } /***************************************************** AppState *****************************************************/ /// @notice halt the app. this action is irreversible. /// (the only option at this point is have a proposal that will get to approval, then activated.) /// should be called by an app-owner when the app has been compromised. /// /// Note the constraint that all apps but Registry & Stake must be halted first! function switchOff() external onlyOwner { } /********************************************************************************************************************/ }
translate(apiKey)==address(0x0),"api key already in use"
383,232
translate(apiKey)==address(0x0)
"One of the apps is still ON"
pragma solidity 0.7.1; /** * @title enabling Zero Knowledge API Keys as described in: https://blog.leverj.io/zero-knowledge-api-keys-43280cc93647 * @notice the Registry app consists of the RegistryLogic & RegistryData contracts. * api-key registrations are held within RegistryData for an easier upgrade path. * @dev although Registry enable account-based apps needing log-less logins, no app is required to use it. */ contract RegistryLogic is Validating, AppLogic, AppState, GluonLogic { RegistryData public data; OldRegistry public old; event Registered(address apiKey, address indexed account); constructor(address gluon_, address old_, address data_) GluonLogic(REGISTRY_INDEX, gluon_) { } modifier isAbsent(address apiKey) { } /// @notice register an api-key on behalf of the sender /// @dev irreversible operation; the apiKey->sender association cannot be broken or overwritten /// (but further apiKey->sender associations can be provided) /// /// @param apiKey the account to be used to stand-in for the registering sender function register(address apiKey) external whenOn validAddress(apiKey) isAbsent(apiKey) { } /// @notice retrieve the stand-in-for account /// /// @param apiKey the account to be used to stand-in for the registering sender function translate(address apiKey) public view returns (address) { } /**************************************************** AppLogic ****************************************************/ /// @notice upgrade the app to a new version; the approved proposal. /// by the end of this call the approved proposal would be the current and active version of the app. function upgrade() external override onlyUpgradeOperator { } function credit(address, address, uint) external override pure { } function debit(address, bytes calldata) external override pure returns (address, uint) { } /***************************************************** AppState *****************************************************/ /// @notice halt the app. this action is irreversible. /// (the only option at this point is have a proposal that will get to approval, then activated.) /// should be called by an app-owner when the app has been compromised. /// /// Note the constraint that all apps but Registry & Stake must be halted first! function switchOff() external onlyOwner { uint32 totalAppsCount = gluon.totalAppsCount(); for (uint32 i = 2; i < totalAppsCount; i++) { AppState appState = AppState(gluon.current(i)); require(<FILL_ME>) } switchOff_(); } /********************************************************************************************************************/ }
!appState.isOn(),"One of the apps is still ON"
383,232
!appState.isOn()
"Non-unique work components"
pragma solidity ^0.6.0; contract KnsTokenMining is AccessControl, KnsTokenWork { IMintableERC20 public token; mapping (uint256 => uint256) private user_pow_height; uint256 public constant ONE_KNS = 100000000; uint256 public constant MINEABLE_TOKENS = 100 * 1000000 * ONE_KNS; uint256 public constant FINAL_PRINT_RATE = 1500; // basis points uint256 public constant TOTAL_EMISSION_TIME = 180 days; uint256 public constant EMISSION_COEFF_1 = (MINEABLE_TOKENS * (20000 - FINAL_PRINT_RATE) * TOTAL_EMISSION_TIME); uint256 public constant EMISSION_COEFF_2 = (MINEABLE_TOKENS * (10000 - FINAL_PRINT_RATE)); uint256 public constant HC_RESERVE_DECAY_TIME = 5 days; uint256 public constant RECENT_BLOCK_LIMIT = 96; uint256 public start_time; uint256 public token_reserve; uint256 public hc_reserve; uint256 public last_mint_time; bool public is_testing; event Mine( address[] recipients, uint256[] split_percents, uint256 hc_submit, uint256 hc_decay, uint256 token_virtual_mint, uint256[] tokens_mined ); constructor( address tok, uint256 start_t, uint256 start_hc_reserve, bool testing ) public { } function _initial_mining_event( uint256 start_hc_reserve ) internal { } /** * Get the hash of the secured struct. * * Basically calls keccak256() on parameters. Mainly exists for readability purposes. */ function get_secured_struct_hash( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height ) public pure returns (uint256) { } /** * Require w[0]..w[9] are all distinct values. * * w[10] is untouched. */ function check_uniqueness( uint256[11] memory w ) public pure { // Implement a simple direct comparison algorithm, unroll to optimize gas usage. require(<FILL_ME>) } /** * Check proof of work for validity. * * Throws if the provided fields have any problems. */ function check_pow( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public view { } function array_check( uint256[] memory arr ) internal pure { } function get_emission_curve( uint256 t ) public view returns (uint256) { } function get_hc_reserve_multiplier( uint256 dt ) public pure returns (uint256) { } function get_background_activity( uint256 current_time ) public view returns (uint256 hc_decay, uint256 token_virtual_mint) { } function process_background_activity( uint256 current_time ) internal returns (uint256 hc_decay, uint256 token_virtual_mint) { } /** * Calculate value in tokens the given hash credits are worth **/ function get_hash_credits_conversion( uint256 hc ) public view returns (uint256) { } /** * Executes the trade of hash credits to tokens * Returns number of minted tokens **/ function convert_hash_credits( uint256 hc ) internal returns (uint256) { } function increment_pow_height( address[] memory recipients, uint256[] memory split_percents ) internal { } function mine_impl( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) internal { } /** * Get the total number of proof-of-work submitted by a user. */ function get_pow_height( address from, address[] memory recipients, uint256[] memory split_percents ) public view returns (uint256) { } /** * Executes the distribution, minting the tokens to the recipient addresses **/ function distribute(address[] memory recipients, uint256[] memory split_percents, uint256 token_mined) internal returns ( uint256[] memory ) { } function mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public { } function test_process_background_activity( uint256 current_time ) public { } function test_mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) public { } }
(w[0]!=w[1])&&(w[0]!=w[2])&&(w[0]!=w[3])&&(w[0]!=w[4])&&(w[0]!=w[5])&&(w[0]!=w[6])&&(w[0]!=w[7])&&(w[0]!=w[8])&&(w[0]!=w[9])&&(w[1]!=w[2])&&(w[1]!=w[3])&&(w[1]!=w[4])&&(w[1]!=w[5])&&(w[1]!=w[6])&&(w[1]!=w[7])&&(w[1]!=w[8])&&(w[1]!=w[9])&&(w[2]!=w[3])&&(w[2]!=w[4])&&(w[2]!=w[5])&&(w[2]!=w[6])&&(w[2]!=w[7])&&(w[2]!=w[8])&&(w[2]!=w[9])&&(w[3]!=w[4])&&(w[3]!=w[5])&&(w[3]!=w[6])&&(w[3]!=w[7])&&(w[3]!=w[8])&&(w[3]!=w[9])&&(w[4]!=w[5])&&(w[4]!=w[6])&&(w[4]!=w[7])&&(w[4]!=w[8])&&(w[4]!=w[9])&&(w[5]!=w[6])&&(w[5]!=w[7])&&(w[5]!=w[8])&&(w[5]!=w[9])&&(w[6]!=w[7])&&(w[6]!=w[8])&&(w[6]!=w[9])&&(w[7]!=w[8])&&(w[7]!=w[9])&&(w[8]!=w[9]),"Non-unique work components"
383,280
(w[0]!=w[1])&&(w[0]!=w[2])&&(w[0]!=w[3])&&(w[0]!=w[4])&&(w[0]!=w[5])&&(w[0]!=w[6])&&(w[0]!=w[7])&&(w[0]!=w[8])&&(w[0]!=w[9])&&(w[1]!=w[2])&&(w[1]!=w[3])&&(w[1]!=w[4])&&(w[1]!=w[5])&&(w[1]!=w[6])&&(w[1]!=w[7])&&(w[1]!=w[8])&&(w[1]!=w[9])&&(w[2]!=w[3])&&(w[2]!=w[4])&&(w[2]!=w[5])&&(w[2]!=w[6])&&(w[2]!=w[7])&&(w[2]!=w[8])&&(w[2]!=w[9])&&(w[3]!=w[4])&&(w[3]!=w[5])&&(w[3]!=w[6])&&(w[3]!=w[7])&&(w[3]!=w[8])&&(w[3]!=w[9])&&(w[4]!=w[5])&&(w[4]!=w[6])&&(w[4]!=w[7])&&(w[4]!=w[8])&&(w[4]!=w[9])&&(w[5]!=w[6])&&(w[5]!=w[7])&&(w[5]!=w[8])&&(w[5]!=w[9])&&(w[6]!=w[7])&&(w[6]!=w[8])&&(w[6]!=w[9])&&(w[7]!=w[8])&&(w[7]!=w[9])&&(w[8]!=w[9])
"Recent block too old"
pragma solidity ^0.6.0; contract KnsTokenMining is AccessControl, KnsTokenWork { IMintableERC20 public token; mapping (uint256 => uint256) private user_pow_height; uint256 public constant ONE_KNS = 100000000; uint256 public constant MINEABLE_TOKENS = 100 * 1000000 * ONE_KNS; uint256 public constant FINAL_PRINT_RATE = 1500; // basis points uint256 public constant TOTAL_EMISSION_TIME = 180 days; uint256 public constant EMISSION_COEFF_1 = (MINEABLE_TOKENS * (20000 - FINAL_PRINT_RATE) * TOTAL_EMISSION_TIME); uint256 public constant EMISSION_COEFF_2 = (MINEABLE_TOKENS * (10000 - FINAL_PRINT_RATE)); uint256 public constant HC_RESERVE_DECAY_TIME = 5 days; uint256 public constant RECENT_BLOCK_LIMIT = 96; uint256 public start_time; uint256 public token_reserve; uint256 public hc_reserve; uint256 public last_mint_time; bool public is_testing; event Mine( address[] recipients, uint256[] split_percents, uint256 hc_submit, uint256 hc_decay, uint256 token_virtual_mint, uint256[] tokens_mined ); constructor( address tok, uint256 start_t, uint256 start_hc_reserve, bool testing ) public { } function _initial_mining_event( uint256 start_hc_reserve ) internal { } /** * Get the hash of the secured struct. * * Basically calls keccak256() on parameters. Mainly exists for readability purposes. */ function get_secured_struct_hash( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height ) public pure returns (uint256) { } /** * Require w[0]..w[9] are all distinct values. * * w[10] is untouched. */ function check_uniqueness( uint256[11] memory w ) public pure { } /** * Check proof of work for validity. * * Throws if the provided fields have any problems. */ function check_pow( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public view { require( recent_eth_block_hash != 0, "Zero block hash not allowed" ); require( recent_eth_block_number <= block.number, "Recent block in future" ); require(<FILL_ME>) require( nonce >= recent_eth_block_hash, "Nonce too small" ); require( (recent_eth_block_hash + (1 << 128)) > nonce, "Nonce too large" ); require( uint256( blockhash( recent_eth_block_number ) ) == recent_eth_block_hash, "Block hash mismatch" ); require( recipients.length <= 5, "Number of recipients cannot exceed 5" ); require( recipients.length == split_percents.length, "Recipient and split percent array size mismatch" ); array_check( split_percents ); require( get_pow_height( _msgSender(), recipients, split_percents ) + 1 == pow_height, "pow_height mismatch" ); uint256 h = get_secured_struct_hash( recipients, split_percents, recent_eth_block_number, recent_eth_block_hash, target, pow_height ); uint256[11] memory w = work( recent_eth_block_hash, h, nonce ); check_uniqueness( w ); require( w[10] < target, "Work missed target" ); // always fails if target == 0 } function array_check( uint256[] memory arr ) internal pure { } function get_emission_curve( uint256 t ) public view returns (uint256) { } function get_hc_reserve_multiplier( uint256 dt ) public pure returns (uint256) { } function get_background_activity( uint256 current_time ) public view returns (uint256 hc_decay, uint256 token_virtual_mint) { } function process_background_activity( uint256 current_time ) internal returns (uint256 hc_decay, uint256 token_virtual_mint) { } /** * Calculate value in tokens the given hash credits are worth **/ function get_hash_credits_conversion( uint256 hc ) public view returns (uint256) { } /** * Executes the trade of hash credits to tokens * Returns number of minted tokens **/ function convert_hash_credits( uint256 hc ) internal returns (uint256) { } function increment_pow_height( address[] memory recipients, uint256[] memory split_percents ) internal { } function mine_impl( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) internal { } /** * Get the total number of proof-of-work submitted by a user. */ function get_pow_height( address from, address[] memory recipients, uint256[] memory split_percents ) public view returns (uint256) { } /** * Executes the distribution, minting the tokens to the recipient addresses **/ function distribute(address[] memory recipients, uint256[] memory split_percents, uint256 token_mined) internal returns ( uint256[] memory ) { } function mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public { } function test_process_background_activity( uint256 current_time ) public { } function test_mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) public { } }
recent_eth_block_number+RECENT_BLOCK_LIMIT>block.number,"Recent block too old"
383,280
recent_eth_block_number+RECENT_BLOCK_LIMIT>block.number
"Nonce too large"
pragma solidity ^0.6.0; contract KnsTokenMining is AccessControl, KnsTokenWork { IMintableERC20 public token; mapping (uint256 => uint256) private user_pow_height; uint256 public constant ONE_KNS = 100000000; uint256 public constant MINEABLE_TOKENS = 100 * 1000000 * ONE_KNS; uint256 public constant FINAL_PRINT_RATE = 1500; // basis points uint256 public constant TOTAL_EMISSION_TIME = 180 days; uint256 public constant EMISSION_COEFF_1 = (MINEABLE_TOKENS * (20000 - FINAL_PRINT_RATE) * TOTAL_EMISSION_TIME); uint256 public constant EMISSION_COEFF_2 = (MINEABLE_TOKENS * (10000 - FINAL_PRINT_RATE)); uint256 public constant HC_RESERVE_DECAY_TIME = 5 days; uint256 public constant RECENT_BLOCK_LIMIT = 96; uint256 public start_time; uint256 public token_reserve; uint256 public hc_reserve; uint256 public last_mint_time; bool public is_testing; event Mine( address[] recipients, uint256[] split_percents, uint256 hc_submit, uint256 hc_decay, uint256 token_virtual_mint, uint256[] tokens_mined ); constructor( address tok, uint256 start_t, uint256 start_hc_reserve, bool testing ) public { } function _initial_mining_event( uint256 start_hc_reserve ) internal { } /** * Get the hash of the secured struct. * * Basically calls keccak256() on parameters. Mainly exists for readability purposes. */ function get_secured_struct_hash( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height ) public pure returns (uint256) { } /** * Require w[0]..w[9] are all distinct values. * * w[10] is untouched. */ function check_uniqueness( uint256[11] memory w ) public pure { } /** * Check proof of work for validity. * * Throws if the provided fields have any problems. */ function check_pow( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public view { require( recent_eth_block_hash != 0, "Zero block hash not allowed" ); require( recent_eth_block_number <= block.number, "Recent block in future" ); require( recent_eth_block_number + RECENT_BLOCK_LIMIT > block.number, "Recent block too old" ); require( nonce >= recent_eth_block_hash, "Nonce too small" ); require(<FILL_ME>) require( uint256( blockhash( recent_eth_block_number ) ) == recent_eth_block_hash, "Block hash mismatch" ); require( recipients.length <= 5, "Number of recipients cannot exceed 5" ); require( recipients.length == split_percents.length, "Recipient and split percent array size mismatch" ); array_check( split_percents ); require( get_pow_height( _msgSender(), recipients, split_percents ) + 1 == pow_height, "pow_height mismatch" ); uint256 h = get_secured_struct_hash( recipients, split_percents, recent_eth_block_number, recent_eth_block_hash, target, pow_height ); uint256[11] memory w = work( recent_eth_block_hash, h, nonce ); check_uniqueness( w ); require( w[10] < target, "Work missed target" ); // always fails if target == 0 } function array_check( uint256[] memory arr ) internal pure { } function get_emission_curve( uint256 t ) public view returns (uint256) { } function get_hc_reserve_multiplier( uint256 dt ) public pure returns (uint256) { } function get_background_activity( uint256 current_time ) public view returns (uint256 hc_decay, uint256 token_virtual_mint) { } function process_background_activity( uint256 current_time ) internal returns (uint256 hc_decay, uint256 token_virtual_mint) { } /** * Calculate value in tokens the given hash credits are worth **/ function get_hash_credits_conversion( uint256 hc ) public view returns (uint256) { } /** * Executes the trade of hash credits to tokens * Returns number of minted tokens **/ function convert_hash_credits( uint256 hc ) internal returns (uint256) { } function increment_pow_height( address[] memory recipients, uint256[] memory split_percents ) internal { } function mine_impl( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) internal { } /** * Get the total number of proof-of-work submitted by a user. */ function get_pow_height( address from, address[] memory recipients, uint256[] memory split_percents ) public view returns (uint256) { } /** * Executes the distribution, minting the tokens to the recipient addresses **/ function distribute(address[] memory recipients, uint256[] memory split_percents, uint256 token_mined) internal returns ( uint256[] memory ) { } function mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public { } function test_process_background_activity( uint256 current_time ) public { } function test_mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) public { } }
(recent_eth_block_hash+(1<<128))>nonce,"Nonce too large"
383,280
(recent_eth_block_hash+(1<<128))>nonce
"Block hash mismatch"
pragma solidity ^0.6.0; contract KnsTokenMining is AccessControl, KnsTokenWork { IMintableERC20 public token; mapping (uint256 => uint256) private user_pow_height; uint256 public constant ONE_KNS = 100000000; uint256 public constant MINEABLE_TOKENS = 100 * 1000000 * ONE_KNS; uint256 public constant FINAL_PRINT_RATE = 1500; // basis points uint256 public constant TOTAL_EMISSION_TIME = 180 days; uint256 public constant EMISSION_COEFF_1 = (MINEABLE_TOKENS * (20000 - FINAL_PRINT_RATE) * TOTAL_EMISSION_TIME); uint256 public constant EMISSION_COEFF_2 = (MINEABLE_TOKENS * (10000 - FINAL_PRINT_RATE)); uint256 public constant HC_RESERVE_DECAY_TIME = 5 days; uint256 public constant RECENT_BLOCK_LIMIT = 96; uint256 public start_time; uint256 public token_reserve; uint256 public hc_reserve; uint256 public last_mint_time; bool public is_testing; event Mine( address[] recipients, uint256[] split_percents, uint256 hc_submit, uint256 hc_decay, uint256 token_virtual_mint, uint256[] tokens_mined ); constructor( address tok, uint256 start_t, uint256 start_hc_reserve, bool testing ) public { } function _initial_mining_event( uint256 start_hc_reserve ) internal { } /** * Get the hash of the secured struct. * * Basically calls keccak256() on parameters. Mainly exists for readability purposes. */ function get_secured_struct_hash( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height ) public pure returns (uint256) { } /** * Require w[0]..w[9] are all distinct values. * * w[10] is untouched. */ function check_uniqueness( uint256[11] memory w ) public pure { } /** * Check proof of work for validity. * * Throws if the provided fields have any problems. */ function check_pow( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public view { require( recent_eth_block_hash != 0, "Zero block hash not allowed" ); require( recent_eth_block_number <= block.number, "Recent block in future" ); require( recent_eth_block_number + RECENT_BLOCK_LIMIT > block.number, "Recent block too old" ); require( nonce >= recent_eth_block_hash, "Nonce too small" ); require( (recent_eth_block_hash + (1 << 128)) > nonce, "Nonce too large" ); require(<FILL_ME>) require( recipients.length <= 5, "Number of recipients cannot exceed 5" ); require( recipients.length == split_percents.length, "Recipient and split percent array size mismatch" ); array_check( split_percents ); require( get_pow_height( _msgSender(), recipients, split_percents ) + 1 == pow_height, "pow_height mismatch" ); uint256 h = get_secured_struct_hash( recipients, split_percents, recent_eth_block_number, recent_eth_block_hash, target, pow_height ); uint256[11] memory w = work( recent_eth_block_hash, h, nonce ); check_uniqueness( w ); require( w[10] < target, "Work missed target" ); // always fails if target == 0 } function array_check( uint256[] memory arr ) internal pure { } function get_emission_curve( uint256 t ) public view returns (uint256) { } function get_hc_reserve_multiplier( uint256 dt ) public pure returns (uint256) { } function get_background_activity( uint256 current_time ) public view returns (uint256 hc_decay, uint256 token_virtual_mint) { } function process_background_activity( uint256 current_time ) internal returns (uint256 hc_decay, uint256 token_virtual_mint) { } /** * Calculate value in tokens the given hash credits are worth **/ function get_hash_credits_conversion( uint256 hc ) public view returns (uint256) { } /** * Executes the trade of hash credits to tokens * Returns number of minted tokens **/ function convert_hash_credits( uint256 hc ) internal returns (uint256) { } function increment_pow_height( address[] memory recipients, uint256[] memory split_percents ) internal { } function mine_impl( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) internal { } /** * Get the total number of proof-of-work submitted by a user. */ function get_pow_height( address from, address[] memory recipients, uint256[] memory split_percents ) public view returns (uint256) { } /** * Executes the distribution, minting the tokens to the recipient addresses **/ function distribute(address[] memory recipients, uint256[] memory split_percents, uint256 token_mined) internal returns ( uint256[] memory ) { } function mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public { } function test_process_background_activity( uint256 current_time ) public { } function test_mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) public { } }
uint256(blockhash(recent_eth_block_number))==recent_eth_block_hash,"Block hash mismatch"
383,280
uint256(blockhash(recent_eth_block_number))==recent_eth_block_hash
"pow_height mismatch"
pragma solidity ^0.6.0; contract KnsTokenMining is AccessControl, KnsTokenWork { IMintableERC20 public token; mapping (uint256 => uint256) private user_pow_height; uint256 public constant ONE_KNS = 100000000; uint256 public constant MINEABLE_TOKENS = 100 * 1000000 * ONE_KNS; uint256 public constant FINAL_PRINT_RATE = 1500; // basis points uint256 public constant TOTAL_EMISSION_TIME = 180 days; uint256 public constant EMISSION_COEFF_1 = (MINEABLE_TOKENS * (20000 - FINAL_PRINT_RATE) * TOTAL_EMISSION_TIME); uint256 public constant EMISSION_COEFF_2 = (MINEABLE_TOKENS * (10000 - FINAL_PRINT_RATE)); uint256 public constant HC_RESERVE_DECAY_TIME = 5 days; uint256 public constant RECENT_BLOCK_LIMIT = 96; uint256 public start_time; uint256 public token_reserve; uint256 public hc_reserve; uint256 public last_mint_time; bool public is_testing; event Mine( address[] recipients, uint256[] split_percents, uint256 hc_submit, uint256 hc_decay, uint256 token_virtual_mint, uint256[] tokens_mined ); constructor( address tok, uint256 start_t, uint256 start_hc_reserve, bool testing ) public { } function _initial_mining_event( uint256 start_hc_reserve ) internal { } /** * Get the hash of the secured struct. * * Basically calls keccak256() on parameters. Mainly exists for readability purposes. */ function get_secured_struct_hash( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height ) public pure returns (uint256) { } /** * Require w[0]..w[9] are all distinct values. * * w[10] is untouched. */ function check_uniqueness( uint256[11] memory w ) public pure { } /** * Check proof of work for validity. * * Throws if the provided fields have any problems. */ function check_pow( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public view { require( recent_eth_block_hash != 0, "Zero block hash not allowed" ); require( recent_eth_block_number <= block.number, "Recent block in future" ); require( recent_eth_block_number + RECENT_BLOCK_LIMIT > block.number, "Recent block too old" ); require( nonce >= recent_eth_block_hash, "Nonce too small" ); require( (recent_eth_block_hash + (1 << 128)) > nonce, "Nonce too large" ); require( uint256( blockhash( recent_eth_block_number ) ) == recent_eth_block_hash, "Block hash mismatch" ); require( recipients.length <= 5, "Number of recipients cannot exceed 5" ); require( recipients.length == split_percents.length, "Recipient and split percent array size mismatch" ); array_check( split_percents ); require(<FILL_ME>) uint256 h = get_secured_struct_hash( recipients, split_percents, recent_eth_block_number, recent_eth_block_hash, target, pow_height ); uint256[11] memory w = work( recent_eth_block_hash, h, nonce ); check_uniqueness( w ); require( w[10] < target, "Work missed target" ); // always fails if target == 0 } function array_check( uint256[] memory arr ) internal pure { } function get_emission_curve( uint256 t ) public view returns (uint256) { } function get_hc_reserve_multiplier( uint256 dt ) public pure returns (uint256) { } function get_background_activity( uint256 current_time ) public view returns (uint256 hc_decay, uint256 token_virtual_mint) { } function process_background_activity( uint256 current_time ) internal returns (uint256 hc_decay, uint256 token_virtual_mint) { } /** * Calculate value in tokens the given hash credits are worth **/ function get_hash_credits_conversion( uint256 hc ) public view returns (uint256) { } /** * Executes the trade of hash credits to tokens * Returns number of minted tokens **/ function convert_hash_credits( uint256 hc ) internal returns (uint256) { } function increment_pow_height( address[] memory recipients, uint256[] memory split_percents ) internal { } function mine_impl( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) internal { } /** * Get the total number of proof-of-work submitted by a user. */ function get_pow_height( address from, address[] memory recipients, uint256[] memory split_percents ) public view returns (uint256) { } /** * Executes the distribution, minting the tokens to the recipient addresses **/ function distribute(address[] memory recipients, uint256[] memory split_percents, uint256 token_mined) internal returns ( uint256[] memory ) { } function mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public { } function test_process_background_activity( uint256 current_time ) public { } function test_mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) public { } }
get_pow_height(_msgSender(),recipients,split_percents)+1==pow_height,"pow_height mismatch"
383,280
get_pow_height(_msgSender(),recipients,split_percents)+1==pow_height
"Work missed target"
pragma solidity ^0.6.0; contract KnsTokenMining is AccessControl, KnsTokenWork { IMintableERC20 public token; mapping (uint256 => uint256) private user_pow_height; uint256 public constant ONE_KNS = 100000000; uint256 public constant MINEABLE_TOKENS = 100 * 1000000 * ONE_KNS; uint256 public constant FINAL_PRINT_RATE = 1500; // basis points uint256 public constant TOTAL_EMISSION_TIME = 180 days; uint256 public constant EMISSION_COEFF_1 = (MINEABLE_TOKENS * (20000 - FINAL_PRINT_RATE) * TOTAL_EMISSION_TIME); uint256 public constant EMISSION_COEFF_2 = (MINEABLE_TOKENS * (10000 - FINAL_PRINT_RATE)); uint256 public constant HC_RESERVE_DECAY_TIME = 5 days; uint256 public constant RECENT_BLOCK_LIMIT = 96; uint256 public start_time; uint256 public token_reserve; uint256 public hc_reserve; uint256 public last_mint_time; bool public is_testing; event Mine( address[] recipients, uint256[] split_percents, uint256 hc_submit, uint256 hc_decay, uint256 token_virtual_mint, uint256[] tokens_mined ); constructor( address tok, uint256 start_t, uint256 start_hc_reserve, bool testing ) public { } function _initial_mining_event( uint256 start_hc_reserve ) internal { } /** * Get the hash of the secured struct. * * Basically calls keccak256() on parameters. Mainly exists for readability purposes. */ function get_secured_struct_hash( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height ) public pure returns (uint256) { } /** * Require w[0]..w[9] are all distinct values. * * w[10] is untouched. */ function check_uniqueness( uint256[11] memory w ) public pure { } /** * Check proof of work for validity. * * Throws if the provided fields have any problems. */ function check_pow( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public view { require( recent_eth_block_hash != 0, "Zero block hash not allowed" ); require( recent_eth_block_number <= block.number, "Recent block in future" ); require( recent_eth_block_number + RECENT_BLOCK_LIMIT > block.number, "Recent block too old" ); require( nonce >= recent_eth_block_hash, "Nonce too small" ); require( (recent_eth_block_hash + (1 << 128)) > nonce, "Nonce too large" ); require( uint256( blockhash( recent_eth_block_number ) ) == recent_eth_block_hash, "Block hash mismatch" ); require( recipients.length <= 5, "Number of recipients cannot exceed 5" ); require( recipients.length == split_percents.length, "Recipient and split percent array size mismatch" ); array_check( split_percents ); require( get_pow_height( _msgSender(), recipients, split_percents ) + 1 == pow_height, "pow_height mismatch" ); uint256 h = get_secured_struct_hash( recipients, split_percents, recent_eth_block_number, recent_eth_block_hash, target, pow_height ); uint256[11] memory w = work( recent_eth_block_hash, h, nonce ); check_uniqueness( w ); require(<FILL_ME>) // always fails if target == 0 } function array_check( uint256[] memory arr ) internal pure { } function get_emission_curve( uint256 t ) public view returns (uint256) { } function get_hc_reserve_multiplier( uint256 dt ) public pure returns (uint256) { } function get_background_activity( uint256 current_time ) public view returns (uint256 hc_decay, uint256 token_virtual_mint) { } function process_background_activity( uint256 current_time ) internal returns (uint256 hc_decay, uint256 token_virtual_mint) { } /** * Calculate value in tokens the given hash credits are worth **/ function get_hash_credits_conversion( uint256 hc ) public view returns (uint256) { } /** * Executes the trade of hash credits to tokens * Returns number of minted tokens **/ function convert_hash_credits( uint256 hc ) internal returns (uint256) { } function increment_pow_height( address[] memory recipients, uint256[] memory split_percents ) internal { } function mine_impl( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) internal { } /** * Get the total number of proof-of-work submitted by a user. */ function get_pow_height( address from, address[] memory recipients, uint256[] memory split_percents ) public view returns (uint256) { } /** * Executes the distribution, minting the tokens to the recipient addresses **/ function distribute(address[] memory recipients, uint256[] memory split_percents, uint256 token_mined) internal returns ( uint256[] memory ) { } function mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public { } function test_process_background_activity( uint256 current_time ) public { } function test_mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) public { } }
w[10]<target,"Work missed target"
383,280
w[10]<target
"Percent array element cannot exceed 10000"
pragma solidity ^0.6.0; contract KnsTokenMining is AccessControl, KnsTokenWork { IMintableERC20 public token; mapping (uint256 => uint256) private user_pow_height; uint256 public constant ONE_KNS = 100000000; uint256 public constant MINEABLE_TOKENS = 100 * 1000000 * ONE_KNS; uint256 public constant FINAL_PRINT_RATE = 1500; // basis points uint256 public constant TOTAL_EMISSION_TIME = 180 days; uint256 public constant EMISSION_COEFF_1 = (MINEABLE_TOKENS * (20000 - FINAL_PRINT_RATE) * TOTAL_EMISSION_TIME); uint256 public constant EMISSION_COEFF_2 = (MINEABLE_TOKENS * (10000 - FINAL_PRINT_RATE)); uint256 public constant HC_RESERVE_DECAY_TIME = 5 days; uint256 public constant RECENT_BLOCK_LIMIT = 96; uint256 public start_time; uint256 public token_reserve; uint256 public hc_reserve; uint256 public last_mint_time; bool public is_testing; event Mine( address[] recipients, uint256[] split_percents, uint256 hc_submit, uint256 hc_decay, uint256 token_virtual_mint, uint256[] tokens_mined ); constructor( address tok, uint256 start_t, uint256 start_hc_reserve, bool testing ) public { } function _initial_mining_event( uint256 start_hc_reserve ) internal { } /** * Get the hash of the secured struct. * * Basically calls keccak256() on parameters. Mainly exists for readability purposes. */ function get_secured_struct_hash( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height ) public pure returns (uint256) { } /** * Require w[0]..w[9] are all distinct values. * * w[10] is untouched. */ function check_uniqueness( uint256[11] memory w ) public pure { } /** * Check proof of work for validity. * * Throws if the provided fields have any problems. */ function check_pow( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public view { } function array_check( uint256[] memory arr ) internal pure { uint256 sum = 0; for (uint i = 0; i < arr.length; i++) { require(<FILL_ME>) sum += arr[i]; } require( sum == 10000, "Split percentages do not add up to 10000" ); } function get_emission_curve( uint256 t ) public view returns (uint256) { } function get_hc_reserve_multiplier( uint256 dt ) public pure returns (uint256) { } function get_background_activity( uint256 current_time ) public view returns (uint256 hc_decay, uint256 token_virtual_mint) { } function process_background_activity( uint256 current_time ) internal returns (uint256 hc_decay, uint256 token_virtual_mint) { } /** * Calculate value in tokens the given hash credits are worth **/ function get_hash_credits_conversion( uint256 hc ) public view returns (uint256) { } /** * Executes the trade of hash credits to tokens * Returns number of minted tokens **/ function convert_hash_credits( uint256 hc ) internal returns (uint256) { } function increment_pow_height( address[] memory recipients, uint256[] memory split_percents ) internal { } function mine_impl( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) internal { } /** * Get the total number of proof-of-work submitted by a user. */ function get_pow_height( address from, address[] memory recipients, uint256[] memory split_percents ) public view returns (uint256) { } /** * Executes the distribution, minting the tokens to the recipient addresses **/ function distribute(address[] memory recipients, uint256[] memory split_percents, uint256 token_mined) internal returns ( uint256[] memory ) { } function mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public { } function test_process_background_activity( uint256 current_time ) public { } function test_mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) public { } }
arr[i]<=10000,"Percent array element cannot exceed 10000"
383,280
arr[i]<=10000
"HC overflow"
pragma solidity ^0.6.0; contract KnsTokenMining is AccessControl, KnsTokenWork { IMintableERC20 public token; mapping (uint256 => uint256) private user_pow_height; uint256 public constant ONE_KNS = 100000000; uint256 public constant MINEABLE_TOKENS = 100 * 1000000 * ONE_KNS; uint256 public constant FINAL_PRINT_RATE = 1500; // basis points uint256 public constant TOTAL_EMISSION_TIME = 180 days; uint256 public constant EMISSION_COEFF_1 = (MINEABLE_TOKENS * (20000 - FINAL_PRINT_RATE) * TOTAL_EMISSION_TIME); uint256 public constant EMISSION_COEFF_2 = (MINEABLE_TOKENS * (10000 - FINAL_PRINT_RATE)); uint256 public constant HC_RESERVE_DECAY_TIME = 5 days; uint256 public constant RECENT_BLOCK_LIMIT = 96; uint256 public start_time; uint256 public token_reserve; uint256 public hc_reserve; uint256 public last_mint_time; bool public is_testing; event Mine( address[] recipients, uint256[] split_percents, uint256 hc_submit, uint256 hc_decay, uint256 token_virtual_mint, uint256[] tokens_mined ); constructor( address tok, uint256 start_t, uint256 start_hc_reserve, bool testing ) public { } function _initial_mining_event( uint256 start_hc_reserve ) internal { } /** * Get the hash of the secured struct. * * Basically calls keccak256() on parameters. Mainly exists for readability purposes. */ function get_secured_struct_hash( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height ) public pure returns (uint256) { } /** * Require w[0]..w[9] are all distinct values. * * w[10] is untouched. */ function check_uniqueness( uint256[11] memory w ) public pure { } /** * Check proof of work for validity. * * Throws if the provided fields have any problems. */ function check_pow( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public view { } function array_check( uint256[] memory arr ) internal pure { } function get_emission_curve( uint256 t ) public view returns (uint256) { } function get_hc_reserve_multiplier( uint256 dt ) public pure returns (uint256) { } function get_background_activity( uint256 current_time ) public view returns (uint256 hc_decay, uint256 token_virtual_mint) { } function process_background_activity( uint256 current_time ) internal returns (uint256 hc_decay, uint256 token_virtual_mint) { } /** * Calculate value in tokens the given hash credits are worth **/ function get_hash_credits_conversion( uint256 hc ) public view returns (uint256) { require( hc > 1, "HC underflow" ); require(<FILL_ME>) // xyk algorithm uint256 x0 = token_reserve; uint256 y0 = hc_reserve; require( x0 < (1 << 128), "Token balance overflow" ); require( y0 < (1 << 128), "HC balance overflow" ); uint256 y1 = y0 + hc; require( y1 < (1 << 128), "HC balance overflow" ); // x0*y0 = x1*y1 -> x1 = (x0*y0)/y1 // NB above require() ensures overflow safety uint256 x1 = ((x0*y0)/y1)+1; require( x1 < x0, "No tokens available" ); return x0-x1; } /** * Executes the trade of hash credits to tokens * Returns number of minted tokens **/ function convert_hash_credits( uint256 hc ) internal returns (uint256) { } function increment_pow_height( address[] memory recipients, uint256[] memory split_percents ) internal { } function mine_impl( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) internal { } /** * Get the total number of proof-of-work submitted by a user. */ function get_pow_height( address from, address[] memory recipients, uint256[] memory split_percents ) public view returns (uint256) { } /** * Executes the distribution, minting the tokens to the recipient addresses **/ function distribute(address[] memory recipients, uint256[] memory split_percents, uint256 token_mined) internal returns ( uint256[] memory ) { } function mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public { } function test_process_background_activity( uint256 current_time ) public { } function test_mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) public { } }
hc<(1<<128),"HC overflow"
383,280
hc<(1<<128)
"Token balance overflow"
pragma solidity ^0.6.0; contract KnsTokenMining is AccessControl, KnsTokenWork { IMintableERC20 public token; mapping (uint256 => uint256) private user_pow_height; uint256 public constant ONE_KNS = 100000000; uint256 public constant MINEABLE_TOKENS = 100 * 1000000 * ONE_KNS; uint256 public constant FINAL_PRINT_RATE = 1500; // basis points uint256 public constant TOTAL_EMISSION_TIME = 180 days; uint256 public constant EMISSION_COEFF_1 = (MINEABLE_TOKENS * (20000 - FINAL_PRINT_RATE) * TOTAL_EMISSION_TIME); uint256 public constant EMISSION_COEFF_2 = (MINEABLE_TOKENS * (10000 - FINAL_PRINT_RATE)); uint256 public constant HC_RESERVE_DECAY_TIME = 5 days; uint256 public constant RECENT_BLOCK_LIMIT = 96; uint256 public start_time; uint256 public token_reserve; uint256 public hc_reserve; uint256 public last_mint_time; bool public is_testing; event Mine( address[] recipients, uint256[] split_percents, uint256 hc_submit, uint256 hc_decay, uint256 token_virtual_mint, uint256[] tokens_mined ); constructor( address tok, uint256 start_t, uint256 start_hc_reserve, bool testing ) public { } function _initial_mining_event( uint256 start_hc_reserve ) internal { } /** * Get the hash of the secured struct. * * Basically calls keccak256() on parameters. Mainly exists for readability purposes. */ function get_secured_struct_hash( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height ) public pure returns (uint256) { } /** * Require w[0]..w[9] are all distinct values. * * w[10] is untouched. */ function check_uniqueness( uint256[11] memory w ) public pure { } /** * Check proof of work for validity. * * Throws if the provided fields have any problems. */ function check_pow( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public view { } function array_check( uint256[] memory arr ) internal pure { } function get_emission_curve( uint256 t ) public view returns (uint256) { } function get_hc_reserve_multiplier( uint256 dt ) public pure returns (uint256) { } function get_background_activity( uint256 current_time ) public view returns (uint256 hc_decay, uint256 token_virtual_mint) { } function process_background_activity( uint256 current_time ) internal returns (uint256 hc_decay, uint256 token_virtual_mint) { } /** * Calculate value in tokens the given hash credits are worth **/ function get_hash_credits_conversion( uint256 hc ) public view returns (uint256) { require( hc > 1, "HC underflow" ); require( hc < (1 << 128), "HC overflow" ); // xyk algorithm uint256 x0 = token_reserve; uint256 y0 = hc_reserve; require(<FILL_ME>) require( y0 < (1 << 128), "HC balance overflow" ); uint256 y1 = y0 + hc; require( y1 < (1 << 128), "HC balance overflow" ); // x0*y0 = x1*y1 -> x1 = (x0*y0)/y1 // NB above require() ensures overflow safety uint256 x1 = ((x0*y0)/y1)+1; require( x1 < x0, "No tokens available" ); return x0-x1; } /** * Executes the trade of hash credits to tokens * Returns number of minted tokens **/ function convert_hash_credits( uint256 hc ) internal returns (uint256) { } function increment_pow_height( address[] memory recipients, uint256[] memory split_percents ) internal { } function mine_impl( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) internal { } /** * Get the total number of proof-of-work submitted by a user. */ function get_pow_height( address from, address[] memory recipients, uint256[] memory split_percents ) public view returns (uint256) { } /** * Executes the distribution, minting the tokens to the recipient addresses **/ function distribute(address[] memory recipients, uint256[] memory split_percents, uint256 token_mined) internal returns ( uint256[] memory ) { } function mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public { } function test_process_background_activity( uint256 current_time ) public { } function test_mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) public { } }
x0<(1<<128),"Token balance overflow"
383,280
x0<(1<<128)
"HC balance overflow"
pragma solidity ^0.6.0; contract KnsTokenMining is AccessControl, KnsTokenWork { IMintableERC20 public token; mapping (uint256 => uint256) private user_pow_height; uint256 public constant ONE_KNS = 100000000; uint256 public constant MINEABLE_TOKENS = 100 * 1000000 * ONE_KNS; uint256 public constant FINAL_PRINT_RATE = 1500; // basis points uint256 public constant TOTAL_EMISSION_TIME = 180 days; uint256 public constant EMISSION_COEFF_1 = (MINEABLE_TOKENS * (20000 - FINAL_PRINT_RATE) * TOTAL_EMISSION_TIME); uint256 public constant EMISSION_COEFF_2 = (MINEABLE_TOKENS * (10000 - FINAL_PRINT_RATE)); uint256 public constant HC_RESERVE_DECAY_TIME = 5 days; uint256 public constant RECENT_BLOCK_LIMIT = 96; uint256 public start_time; uint256 public token_reserve; uint256 public hc_reserve; uint256 public last_mint_time; bool public is_testing; event Mine( address[] recipients, uint256[] split_percents, uint256 hc_submit, uint256 hc_decay, uint256 token_virtual_mint, uint256[] tokens_mined ); constructor( address tok, uint256 start_t, uint256 start_hc_reserve, bool testing ) public { } function _initial_mining_event( uint256 start_hc_reserve ) internal { } /** * Get the hash of the secured struct. * * Basically calls keccak256() on parameters. Mainly exists for readability purposes. */ function get_secured_struct_hash( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height ) public pure returns (uint256) { } /** * Require w[0]..w[9] are all distinct values. * * w[10] is untouched. */ function check_uniqueness( uint256[11] memory w ) public pure { } /** * Check proof of work for validity. * * Throws if the provided fields have any problems. */ function check_pow( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public view { } function array_check( uint256[] memory arr ) internal pure { } function get_emission_curve( uint256 t ) public view returns (uint256) { } function get_hc_reserve_multiplier( uint256 dt ) public pure returns (uint256) { } function get_background_activity( uint256 current_time ) public view returns (uint256 hc_decay, uint256 token_virtual_mint) { } function process_background_activity( uint256 current_time ) internal returns (uint256 hc_decay, uint256 token_virtual_mint) { } /** * Calculate value in tokens the given hash credits are worth **/ function get_hash_credits_conversion( uint256 hc ) public view returns (uint256) { require( hc > 1, "HC underflow" ); require( hc < (1 << 128), "HC overflow" ); // xyk algorithm uint256 x0 = token_reserve; uint256 y0 = hc_reserve; require( x0 < (1 << 128), "Token balance overflow" ); require(<FILL_ME>) uint256 y1 = y0 + hc; require( y1 < (1 << 128), "HC balance overflow" ); // x0*y0 = x1*y1 -> x1 = (x0*y0)/y1 // NB above require() ensures overflow safety uint256 x1 = ((x0*y0)/y1)+1; require( x1 < x0, "No tokens available" ); return x0-x1; } /** * Executes the trade of hash credits to tokens * Returns number of minted tokens **/ function convert_hash_credits( uint256 hc ) internal returns (uint256) { } function increment_pow_height( address[] memory recipients, uint256[] memory split_percents ) internal { } function mine_impl( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) internal { } /** * Get the total number of proof-of-work submitted by a user. */ function get_pow_height( address from, address[] memory recipients, uint256[] memory split_percents ) public view returns (uint256) { } /** * Executes the distribution, minting the tokens to the recipient addresses **/ function distribute(address[] memory recipients, uint256[] memory split_percents, uint256 token_mined) internal returns ( uint256[] memory ) { } function mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public { } function test_process_background_activity( uint256 current_time ) public { } function test_mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) public { } }
y0<(1<<128),"HC balance overflow"
383,280
y0<(1<<128)
"HC balance overflow"
pragma solidity ^0.6.0; contract KnsTokenMining is AccessControl, KnsTokenWork { IMintableERC20 public token; mapping (uint256 => uint256) private user_pow_height; uint256 public constant ONE_KNS = 100000000; uint256 public constant MINEABLE_TOKENS = 100 * 1000000 * ONE_KNS; uint256 public constant FINAL_PRINT_RATE = 1500; // basis points uint256 public constant TOTAL_EMISSION_TIME = 180 days; uint256 public constant EMISSION_COEFF_1 = (MINEABLE_TOKENS * (20000 - FINAL_PRINT_RATE) * TOTAL_EMISSION_TIME); uint256 public constant EMISSION_COEFF_2 = (MINEABLE_TOKENS * (10000 - FINAL_PRINT_RATE)); uint256 public constant HC_RESERVE_DECAY_TIME = 5 days; uint256 public constant RECENT_BLOCK_LIMIT = 96; uint256 public start_time; uint256 public token_reserve; uint256 public hc_reserve; uint256 public last_mint_time; bool public is_testing; event Mine( address[] recipients, uint256[] split_percents, uint256 hc_submit, uint256 hc_decay, uint256 token_virtual_mint, uint256[] tokens_mined ); constructor( address tok, uint256 start_t, uint256 start_hc_reserve, bool testing ) public { } function _initial_mining_event( uint256 start_hc_reserve ) internal { } /** * Get the hash of the secured struct. * * Basically calls keccak256() on parameters. Mainly exists for readability purposes. */ function get_secured_struct_hash( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height ) public pure returns (uint256) { } /** * Require w[0]..w[9] are all distinct values. * * w[10] is untouched. */ function check_uniqueness( uint256[11] memory w ) public pure { } /** * Check proof of work for validity. * * Throws if the provided fields have any problems. */ function check_pow( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public view { } function array_check( uint256[] memory arr ) internal pure { } function get_emission_curve( uint256 t ) public view returns (uint256) { } function get_hc_reserve_multiplier( uint256 dt ) public pure returns (uint256) { } function get_background_activity( uint256 current_time ) public view returns (uint256 hc_decay, uint256 token_virtual_mint) { } function process_background_activity( uint256 current_time ) internal returns (uint256 hc_decay, uint256 token_virtual_mint) { } /** * Calculate value in tokens the given hash credits are worth **/ function get_hash_credits_conversion( uint256 hc ) public view returns (uint256) { require( hc > 1, "HC underflow" ); require( hc < (1 << 128), "HC overflow" ); // xyk algorithm uint256 x0 = token_reserve; uint256 y0 = hc_reserve; require( x0 < (1 << 128), "Token balance overflow" ); require( y0 < (1 << 128), "HC balance overflow" ); uint256 y1 = y0 + hc; require(<FILL_ME>) // x0*y0 = x1*y1 -> x1 = (x0*y0)/y1 // NB above require() ensures overflow safety uint256 x1 = ((x0*y0)/y1)+1; require( x1 < x0, "No tokens available" ); return x0-x1; } /** * Executes the trade of hash credits to tokens * Returns number of minted tokens **/ function convert_hash_credits( uint256 hc ) internal returns (uint256) { } function increment_pow_height( address[] memory recipients, uint256[] memory split_percents ) internal { } function mine_impl( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) internal { } /** * Get the total number of proof-of-work submitted by a user. */ function get_pow_height( address from, address[] memory recipients, uint256[] memory split_percents ) public view returns (uint256) { } /** * Executes the distribution, minting the tokens to the recipient addresses **/ function distribute(address[] memory recipients, uint256[] memory split_percents, uint256 token_mined) internal returns ( uint256[] memory ) { } function mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce ) public { } function test_process_background_activity( uint256 current_time ) public { } function test_mine( address[] memory recipients, uint256[] memory split_percents, uint256 recent_eth_block_number, uint256 recent_eth_block_hash, uint256 target, uint256 pow_height, uint256 nonce, uint256 current_time ) public { } }
y1<(1<<128),"HC balance overflow"
383,280
y1<(1<<128)
null
pragma solidity ^0.4.19; contract Owned { address public owner; modifier onlyOwner { } function transferOwnership(address newOwner) public onlyOwner() { } } contract Agricoin is Owned { // Dividends payout struct. struct DividendPayout { uint amount; // Value of dividend payout. uint momentTotalSupply; // Total supply in payout moment, } // Redemption payout struct. struct RedemptionPayout { uint amount; // Value of redemption payout. uint momentTotalSupply; // Total supply in payout moment. uint price; // Price of Agricoin in weis. } // Balance struct with dividends and redemptions record. struct Balance { uint icoBalance; uint balance; // Agricoin balance. uint posibleDividends; // Dividend number, which user can get. uint lastDividensPayoutNumber; // Last dividend payout index, which user has gotten. uint posibleRedemption; // Redemption value in weis, which user can use. uint lastRedemptionPayoutNumber; // Last redemption payout index, which user has used. } // Can act only one from payers. modifier onlyPayer() { require(<FILL_ME>) _; } // Can act only after token activation. modifier onlyActivated() { } // Transfer event. event Transfer(address indexed _from, address indexed _to, uint _value); // Approve event. event Approval(address indexed _owner, address indexed _spender, uint _value); // Activate event. event Activate(bool icoSuccessful); // DividendPayout dividends event. event PayoutDividends(uint etherAmount, uint indexed id); // DividendPayout redemption event. event PayoutRedemption(uint etherAmount, uint indexed id, uint price); // Get unpaid event. event GetUnpaid(uint etherAmount); // Get dividends. event GetDividends(address indexed investor, uint etherAmount); // Constructor. function Agricoin(uint payout_period_start, uint payout_period_end, address _payer) public { } // Activate token. function activate(bool icoSuccessful) onlyOwner() external returns (bool) { } // Add new payer by payer. function addPayer(address payer) onlyPayer() external { } // Get balance of address. function balanceOf(address owner) public view returns (uint) { } // Get posible dividends value. function posibleDividendsOf(address owner) public view returns (uint) { } // Get posible redemption value. function posibleRedemptionOf(address owner) public view returns (uint) { } // Transfer _value etheres to _to. function transfer(address _to, uint _value) onlyActivated() external returns (bool) { } // Transfer from _from to _to _value tokens. function transferFrom(address _from, address _to, uint _value) onlyActivated() external returns (bool) { } // Approve for transfers. function approve(address _spender, uint _value) onlyActivated() public returns (bool) { } // Get allowance. function allowance(address _owner, address _spender) onlyActivated() external view returns (uint) { } // Mint _value tokens to _to address. function mint(address _to, uint _value, bool icoMinting) onlyOwner() external returns (bool) { } // Pay dividends. function payDividends() onlyPayer() onlyActivated() external payable returns (bool) { } // Pay redemption. function payRedemption(uint price) onlyPayer() onlyActivated() external payable returns (bool) { } // Get back unpaid dividends and redemption. function getUnpaid() onlyPayer() onlyActivated() external returns (bool) { } // Recalculates dividends and redumptions. function recalculate(address user) onlyActivated() public returns (bool) { } // Get dividends. function () external payable { } // Token name. string public constant name = "Agricoin"; // Token market symbol. string public constant symbol = "AGR"; // Amount of digits after comma. uint public constant decimals = 2; // Total supply. uint public totalSupply; // Total supply on ICO only; uint public totalSupplyOnIco; // Activation date. uint public startDate; // Payment period start date, setted by ICO contract before activation. uint public payoutPeriodStart; // Payment period last date, setted by ICO contract before activation. uint public payoutPeriodEnd; // Dividends DividendPayout counter. uint public amountOfDividendsPayouts = 0; // Redemption DividendPayout counter. uint public amountOfRedemptionPayouts = 0; // Dividend payouts. mapping (uint => DividendPayout) public dividendPayouts; // Redemption payouts. mapping (uint => RedemptionPayout) public redemptionPayouts; // Dividend and redemption payers. mapping (address => bool) public payers; // Balance records. mapping (address => Balance) public balances; // Allowed balances. mapping (address => mapping (address => uint)) public allowed; // Set true for activating token. If false then token isn't working. bool public isActive = false; // Set true for activate ico minted tokens. bool public isSuccessfulIco = false; }
payers[msg.sender]
383,301
payers[msg.sender]
null
pragma solidity ^0.4.19; contract Owned { address public owner; modifier onlyOwner { } function transferOwnership(address newOwner) public onlyOwner() { } } contract Agricoin is Owned { // Dividends payout struct. struct DividendPayout { uint amount; // Value of dividend payout. uint momentTotalSupply; // Total supply in payout moment, } // Redemption payout struct. struct RedemptionPayout { uint amount; // Value of redemption payout. uint momentTotalSupply; // Total supply in payout moment. uint price; // Price of Agricoin in weis. } // Balance struct with dividends and redemptions record. struct Balance { uint icoBalance; uint balance; // Agricoin balance. uint posibleDividends; // Dividend number, which user can get. uint lastDividensPayoutNumber; // Last dividend payout index, which user has gotten. uint posibleRedemption; // Redemption value in weis, which user can use. uint lastRedemptionPayoutNumber; // Last redemption payout index, which user has used. } // Can act only one from payers. modifier onlyPayer() { } // Can act only after token activation. modifier onlyActivated() { } // Transfer event. event Transfer(address indexed _from, address indexed _to, uint _value); // Approve event. event Approval(address indexed _owner, address indexed _spender, uint _value); // Activate event. event Activate(bool icoSuccessful); // DividendPayout dividends event. event PayoutDividends(uint etherAmount, uint indexed id); // DividendPayout redemption event. event PayoutRedemption(uint etherAmount, uint indexed id, uint price); // Get unpaid event. event GetUnpaid(uint etherAmount); // Get dividends. event GetDividends(address indexed investor, uint etherAmount); // Constructor. function Agricoin(uint payout_period_start, uint payout_period_end, address _payer) public { } // Activate token. function activate(bool icoSuccessful) onlyOwner() external returns (bool) { } // Add new payer by payer. function addPayer(address payer) onlyPayer() external { } // Get balance of address. function balanceOf(address owner) public view returns (uint) { } // Get posible dividends value. function posibleDividendsOf(address owner) public view returns (uint) { } // Get posible redemption value. function posibleRedemptionOf(address owner) public view returns (uint) { } // Transfer _value etheres to _to. function transfer(address _to, uint _value) onlyActivated() external returns (bool) { } // Transfer from _from to _to _value tokens. function transferFrom(address _from, address _to, uint _value) onlyActivated() external returns (bool) { // Check transfer posibility. require(<FILL_ME>) require(allowed[_from][msg.sender] >= _value); require(_to != 0x00); // Recalculate structs. recalculate(_from); recalculate(_to); // Change balances. balances[_from].balance -= _value; balances[_to].balance += _value; Transfer(_from, _to, _value);// Call tranfer event. return true; } // Approve for transfers. function approve(address _spender, uint _value) onlyActivated() public returns (bool) { } // Get allowance. function allowance(address _owner, address _spender) onlyActivated() external view returns (uint) { } // Mint _value tokens to _to address. function mint(address _to, uint _value, bool icoMinting) onlyOwner() external returns (bool) { } // Pay dividends. function payDividends() onlyPayer() onlyActivated() external payable returns (bool) { } // Pay redemption. function payRedemption(uint price) onlyPayer() onlyActivated() external payable returns (bool) { } // Get back unpaid dividends and redemption. function getUnpaid() onlyPayer() onlyActivated() external returns (bool) { } // Recalculates dividends and redumptions. function recalculate(address user) onlyActivated() public returns (bool) { } // Get dividends. function () external payable { } // Token name. string public constant name = "Agricoin"; // Token market symbol. string public constant symbol = "AGR"; // Amount of digits after comma. uint public constant decimals = 2; // Total supply. uint public totalSupply; // Total supply on ICO only; uint public totalSupplyOnIco; // Activation date. uint public startDate; // Payment period start date, setted by ICO contract before activation. uint public payoutPeriodStart; // Payment period last date, setted by ICO contract before activation. uint public payoutPeriodEnd; // Dividends DividendPayout counter. uint public amountOfDividendsPayouts = 0; // Redemption DividendPayout counter. uint public amountOfRedemptionPayouts = 0; // Dividend payouts. mapping (uint => DividendPayout) public dividendPayouts; // Redemption payouts. mapping (uint => RedemptionPayout) public redemptionPayouts; // Dividend and redemption payers. mapping (address => bool) public payers; // Balance records. mapping (address => Balance) public balances; // Allowed balances. mapping (address => mapping (address => uint)) public allowed; // Set true for activating token. If false then token isn't working. bool public isActive = false; // Set true for activate ico minted tokens. bool public isSuccessfulIco = false; }
balances[_from].balance>=_value
383,301
balances[_from].balance>=_value
null
pragma solidity 0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @title SafeMath32 * @dev Math operations with safety checks that throw on error */ library SafeMath32 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint32 a, uint32 b) internal pure returns (uint32) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint32 a, uint32 b) internal pure returns (uint32) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint32 a, uint32 b) internal pure returns (uint32) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint32 a, uint32 b) internal pure returns (uint32) { } } /** * @title Ether Habits * @dev Implements the logic behind Ether Habits */ contract Habits { using SafeMath for uint256; using SafeMath32 for uint32; // owner is only set on contract initialization, this cannot be changed address internal owner; mapping (address => bool) internal adminPermission; uint256 constant REGISTRATION_FEE = 0.005 ether; // deposit for a single day uint32 constant NUM_REGISTER_DAYS = 10; // default number of days for registration uint32 constant NINETY_DAYS = 90 days; uint32 constant WITHDRAW_BUFFER = 129600; // time before user can withdraw deposit uint32 constant MAY_FIRST_2018 = 1525132800; uint32 constant DAY = 86400; enum UserEntryStatus { NULL, REGISTERED, COMPLETED, WITHDRAWN } struct DailyContestStatus { uint256 numRegistered; uint256 numCompleted; bool operationFeeWithdrawn; } mapping (address => uint32[]) internal userToDates; mapping (uint32 => address[]) internal dateToUsers; mapping (address => mapping (uint32 => UserEntryStatus)) internal userDateToStatus; mapping (uint32 => DailyContestStatus) internal dateToContestStatus; event LogWithdraw(address user, uint256 amount); event LogOperationFeeWithdraw(address user, uint256 amount); /** * @dev Sets the contract creator as the owner. Owner can't be changed in the future */ function Habits() public { } /** * @dev Registers a user for NUM_REGISTER_DAYS days * @notice Changes state * @param _expectedStartDate (unix time: uint32) Start date the user had in mind when submitting the transaction */ function register(uint32 _expectedStartDate) external payable { // throw if sent ether doesn't match the total registration fee require(<FILL_ME>) // can't register more than 100 days in advance require(_expectedStartDate <= getDate(uint32(now)).add(NINETY_DAYS)); uint32 startDate = getStartDate(); // throw if actual start day doesn't match the user's expectation // may happen if a transaction takes a while to get mined require(startDate == _expectedStartDate); for (uint32 i = 0; i < NUM_REGISTER_DAYS; i++) { uint32 date = startDate.add(i.mul(DAY)); // double check that user already hasn't been registered require(userDateToStatus[msg.sender][date] == UserEntryStatus.NULL); userDateToStatus[msg.sender][date] = UserEntryStatus.REGISTERED; userToDates[msg.sender].push(date); dateToUsers[date].push(msg.sender); dateToContestStatus[date].numRegistered += 1; } } /** * @dev Checks-in a user for a given day * @notice Changes state */ function checkIn() external { } /** * @dev Allow users to withdraw deposit and bonus for checked-in dates * @notice Changes state * @param _dates Array of dates user wishes to withdraw for, this is * calculated beforehand and verified in this method to reduce gas costs */ function withdraw(uint32[] _dates) external { } /** * @dev Calculate current withdrawable amount for a user * @notice Doesn't change state * @return Amount of withdrawable Wei */ function calculateWithdrawableAmount() external view returns (uint256) { } /** * @dev Calculate dates that a user can withdraw his/her deposit * array may contain zeros so those need to be filtered out by the client * @notice Doesn't change state * @return Array of dates (unix time: uint32) */ function getWithdrawableDates() external view returns(uint32[]) { } /** * @dev Return registered days and statuses for a user * @notice Doesn't change state * @return Tupple of two arrays (dates registered, statuses) */ function getUserEntryStatuses() external view returns (uint32[], uint32[]) { } /** * @dev Withdraw operation fees for a list of dates * @notice Changes state, owner only * @param _dates Array of dates to withdraw operation fee */ function withdrawOperationFees(uint32[] _dates) external { } /** * @dev Get total withdrawable operation fee amount and dates, owner only * array may contain zeros so those need to be filtered out by the client * @notice Doesn't change state * @return Tuple(Array of dates (unix time: uint32), amount) */ function getWithdrawableOperationFeeDatesAndAmount() external view returns (uint32[], uint256) { } /** * @dev Get contest status, only return complete and bonus numbers if it's been past the withdraw buffer * Return -1 for complete and bonus numbers if still before withdraw buffer * @notice Doesn't change state * @param _date Date to get DailyContestStatus for * @return Tuple(numRegistered, numCompleted, bonus) */ function getContestStatusForDate(uint32 _date) external view returns (int256, int256, int256) { } /** * @dev Get next valid start date. * Tomorrow or the next non-registered date is the next start date * @notice Doesn't change state * @return Next start date (unix time: uint32) */ function getStartDate() public view returns (uint32) { } /** * @dev Get the next UTC midnight date * @notice Doesn't change state * @param _timestamp (unix time: uint32) * @return Next date (unix time: uint32) */ function getNextDate(uint32 _timestamp) internal pure returns (uint32) { } /** * @dev Get the date floor (UTC midnight) for a given timestamp * @notice Doesn't change state * @param _timestamp (unix time: uint32) * @return UTC midnight date (unix time: uint32) */ function getDate(uint32 _timestamp) internal pure returns (uint32) { } /** * @dev Get the last registered date for a user * @notice Doesn't change state * @return Last registered date (unix time: uint32), 0 if user has never registered */ function getLastRegisterDate() internal view returns (uint32) { } /** * @dev Calculate the bonus for a given day * @notice Doesn't change state * @param _date Date to calculate the bonus for (unix time: uint32) * @return Bonus amount (unit256) */ function calculateBonus(uint32 _date) internal view returns (uint256) { } /** * @dev Calculate the operation fee for a given day * @notice Doesn't change state * @param _date Date to calculate the operation fee for (unix time: uint32) * @return Operation fee amount (unit256) */ function calculateOperationFee(uint32 _date) internal view returns (uint256) { } /******************** * Admin only methods ********************/ /** * @dev Adding an admin, owner only * @notice Changes state * @param _newAdmin Address of new admin */ function addAdmin(address _newAdmin) external { } /** * @dev Return all registered dates for a user, admin only * @notice Doesn't change state * @param _user User to get dates for * @return All dates(uint32[]) the user registered for */ function getDatesForUser(address _user) external view returns (uint32[]) { } /** * @dev Return all registered users for a date, admin only * @notice Doesn't change state * @param _date Date to get users for * @return All users(address[]) registered on a given date */ function getUsersForDate(uint32 _date) external view returns (address[]) { } /** * @dev Return entry status for a user and date, admin only * @notice Doesn't change state * @param _user User to get EntryStatus for * @param _date (unix time: uint32) Date to get EntryStatus for * @return UserEntryStatus */ function getEntryStatus(address _user, uint32 _date) external view returns (UserEntryStatus) { } /** * @dev Get daily contest status, admin only * @notice Doesn't change state * @param _date Date to get DailyContestStatus for * @return Tuple(uint256, uint256, bool) */ function getContestStatusForDateAdmin(uint32 _date) external view returns (uint256, uint256, bool) { } }
REGISTRATION_FEE.mul(NUM_REGISTER_DAYS)==msg.value
383,313
REGISTRATION_FEE.mul(NUM_REGISTER_DAYS)==msg.value
null
pragma solidity 0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @title SafeMath32 * @dev Math operations with safety checks that throw on error */ library SafeMath32 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint32 a, uint32 b) internal pure returns (uint32) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint32 a, uint32 b) internal pure returns (uint32) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint32 a, uint32 b) internal pure returns (uint32) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint32 a, uint32 b) internal pure returns (uint32) { } } /** * @title Ether Habits * @dev Implements the logic behind Ether Habits */ contract Habits { using SafeMath for uint256; using SafeMath32 for uint32; // owner is only set on contract initialization, this cannot be changed address internal owner; mapping (address => bool) internal adminPermission; uint256 constant REGISTRATION_FEE = 0.005 ether; // deposit for a single day uint32 constant NUM_REGISTER_DAYS = 10; // default number of days for registration uint32 constant NINETY_DAYS = 90 days; uint32 constant WITHDRAW_BUFFER = 129600; // time before user can withdraw deposit uint32 constant MAY_FIRST_2018 = 1525132800; uint32 constant DAY = 86400; enum UserEntryStatus { NULL, REGISTERED, COMPLETED, WITHDRAWN } struct DailyContestStatus { uint256 numRegistered; uint256 numCompleted; bool operationFeeWithdrawn; } mapping (address => uint32[]) internal userToDates; mapping (uint32 => address[]) internal dateToUsers; mapping (address => mapping (uint32 => UserEntryStatus)) internal userDateToStatus; mapping (uint32 => DailyContestStatus) internal dateToContestStatus; event LogWithdraw(address user, uint256 amount); event LogOperationFeeWithdraw(address user, uint256 amount); /** * @dev Sets the contract creator as the owner. Owner can't be changed in the future */ function Habits() public { } /** * @dev Registers a user for NUM_REGISTER_DAYS days * @notice Changes state * @param _expectedStartDate (unix time: uint32) Start date the user had in mind when submitting the transaction */ function register(uint32 _expectedStartDate) external payable { // throw if sent ether doesn't match the total registration fee require(REGISTRATION_FEE.mul(NUM_REGISTER_DAYS) == msg.value); // can't register more than 100 days in advance require(_expectedStartDate <= getDate(uint32(now)).add(NINETY_DAYS)); uint32 startDate = getStartDate(); // throw if actual start day doesn't match the user's expectation // may happen if a transaction takes a while to get mined require(startDate == _expectedStartDate); for (uint32 i = 0; i < NUM_REGISTER_DAYS; i++) { uint32 date = startDate.add(i.mul(DAY)); // double check that user already hasn't been registered require(<FILL_ME>) userDateToStatus[msg.sender][date] = UserEntryStatus.REGISTERED; userToDates[msg.sender].push(date); dateToUsers[date].push(msg.sender); dateToContestStatus[date].numRegistered += 1; } } /** * @dev Checks-in a user for a given day * @notice Changes state */ function checkIn() external { } /** * @dev Allow users to withdraw deposit and bonus for checked-in dates * @notice Changes state * @param _dates Array of dates user wishes to withdraw for, this is * calculated beforehand and verified in this method to reduce gas costs */ function withdraw(uint32[] _dates) external { } /** * @dev Calculate current withdrawable amount for a user * @notice Doesn't change state * @return Amount of withdrawable Wei */ function calculateWithdrawableAmount() external view returns (uint256) { } /** * @dev Calculate dates that a user can withdraw his/her deposit * array may contain zeros so those need to be filtered out by the client * @notice Doesn't change state * @return Array of dates (unix time: uint32) */ function getWithdrawableDates() external view returns(uint32[]) { } /** * @dev Return registered days and statuses for a user * @notice Doesn't change state * @return Tupple of two arrays (dates registered, statuses) */ function getUserEntryStatuses() external view returns (uint32[], uint32[]) { } /** * @dev Withdraw operation fees for a list of dates * @notice Changes state, owner only * @param _dates Array of dates to withdraw operation fee */ function withdrawOperationFees(uint32[] _dates) external { } /** * @dev Get total withdrawable operation fee amount and dates, owner only * array may contain zeros so those need to be filtered out by the client * @notice Doesn't change state * @return Tuple(Array of dates (unix time: uint32), amount) */ function getWithdrawableOperationFeeDatesAndAmount() external view returns (uint32[], uint256) { } /** * @dev Get contest status, only return complete and bonus numbers if it's been past the withdraw buffer * Return -1 for complete and bonus numbers if still before withdraw buffer * @notice Doesn't change state * @param _date Date to get DailyContestStatus for * @return Tuple(numRegistered, numCompleted, bonus) */ function getContestStatusForDate(uint32 _date) external view returns (int256, int256, int256) { } /** * @dev Get next valid start date. * Tomorrow or the next non-registered date is the next start date * @notice Doesn't change state * @return Next start date (unix time: uint32) */ function getStartDate() public view returns (uint32) { } /** * @dev Get the next UTC midnight date * @notice Doesn't change state * @param _timestamp (unix time: uint32) * @return Next date (unix time: uint32) */ function getNextDate(uint32 _timestamp) internal pure returns (uint32) { } /** * @dev Get the date floor (UTC midnight) for a given timestamp * @notice Doesn't change state * @param _timestamp (unix time: uint32) * @return UTC midnight date (unix time: uint32) */ function getDate(uint32 _timestamp) internal pure returns (uint32) { } /** * @dev Get the last registered date for a user * @notice Doesn't change state * @return Last registered date (unix time: uint32), 0 if user has never registered */ function getLastRegisterDate() internal view returns (uint32) { } /** * @dev Calculate the bonus for a given day * @notice Doesn't change state * @param _date Date to calculate the bonus for (unix time: uint32) * @return Bonus amount (unit256) */ function calculateBonus(uint32 _date) internal view returns (uint256) { } /** * @dev Calculate the operation fee for a given day * @notice Doesn't change state * @param _date Date to calculate the operation fee for (unix time: uint32) * @return Operation fee amount (unit256) */ function calculateOperationFee(uint32 _date) internal view returns (uint256) { } /******************** * Admin only methods ********************/ /** * @dev Adding an admin, owner only * @notice Changes state * @param _newAdmin Address of new admin */ function addAdmin(address _newAdmin) external { } /** * @dev Return all registered dates for a user, admin only * @notice Doesn't change state * @param _user User to get dates for * @return All dates(uint32[]) the user registered for */ function getDatesForUser(address _user) external view returns (uint32[]) { } /** * @dev Return all registered users for a date, admin only * @notice Doesn't change state * @param _date Date to get users for * @return All users(address[]) registered on a given date */ function getUsersForDate(uint32 _date) external view returns (address[]) { } /** * @dev Return entry status for a user and date, admin only * @notice Doesn't change state * @param _user User to get EntryStatus for * @param _date (unix time: uint32) Date to get EntryStatus for * @return UserEntryStatus */ function getEntryStatus(address _user, uint32 _date) external view returns (UserEntryStatus) { } /** * @dev Get daily contest status, admin only * @notice Doesn't change state * @param _date Date to get DailyContestStatus for * @return Tuple(uint256, uint256, bool) */ function getContestStatusForDateAdmin(uint32 _date) external view returns (uint256, uint256, bool) { } }
userDateToStatus[msg.sender][date]==UserEntryStatus.NULL
383,313
userDateToStatus[msg.sender][date]==UserEntryStatus.NULL
null
pragma solidity 0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @title SafeMath32 * @dev Math operations with safety checks that throw on error */ library SafeMath32 { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint32 a, uint32 b) internal pure returns (uint32) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint32 a, uint32 b) internal pure returns (uint32) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint32 a, uint32 b) internal pure returns (uint32) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint32 a, uint32 b) internal pure returns (uint32) { } } /** * @title Ether Habits * @dev Implements the logic behind Ether Habits */ contract Habits { using SafeMath for uint256; using SafeMath32 for uint32; // owner is only set on contract initialization, this cannot be changed address internal owner; mapping (address => bool) internal adminPermission; uint256 constant REGISTRATION_FEE = 0.005 ether; // deposit for a single day uint32 constant NUM_REGISTER_DAYS = 10; // default number of days for registration uint32 constant NINETY_DAYS = 90 days; uint32 constant WITHDRAW_BUFFER = 129600; // time before user can withdraw deposit uint32 constant MAY_FIRST_2018 = 1525132800; uint32 constant DAY = 86400; enum UserEntryStatus { NULL, REGISTERED, COMPLETED, WITHDRAWN } struct DailyContestStatus { uint256 numRegistered; uint256 numCompleted; bool operationFeeWithdrawn; } mapping (address => uint32[]) internal userToDates; mapping (uint32 => address[]) internal dateToUsers; mapping (address => mapping (uint32 => UserEntryStatus)) internal userDateToStatus; mapping (uint32 => DailyContestStatus) internal dateToContestStatus; event LogWithdraw(address user, uint256 amount); event LogOperationFeeWithdraw(address user, uint256 amount); /** * @dev Sets the contract creator as the owner. Owner can't be changed in the future */ function Habits() public { } /** * @dev Registers a user for NUM_REGISTER_DAYS days * @notice Changes state * @param _expectedStartDate (unix time: uint32) Start date the user had in mind when submitting the transaction */ function register(uint32 _expectedStartDate) external payable { } /** * @dev Checks-in a user for a given day * @notice Changes state */ function checkIn() external { uint32 nowDate = getDate(uint32(now)); // throw if user entry status isn't registered require(<FILL_ME>) userDateToStatus[msg.sender][nowDate] = UserEntryStatus.COMPLETED; dateToContestStatus[nowDate].numCompleted += 1; } /** * @dev Allow users to withdraw deposit and bonus for checked-in dates * @notice Changes state * @param _dates Array of dates user wishes to withdraw for, this is * calculated beforehand and verified in this method to reduce gas costs */ function withdraw(uint32[] _dates) external { } /** * @dev Calculate current withdrawable amount for a user * @notice Doesn't change state * @return Amount of withdrawable Wei */ function calculateWithdrawableAmount() external view returns (uint256) { } /** * @dev Calculate dates that a user can withdraw his/her deposit * array may contain zeros so those need to be filtered out by the client * @notice Doesn't change state * @return Array of dates (unix time: uint32) */ function getWithdrawableDates() external view returns(uint32[]) { } /** * @dev Return registered days and statuses for a user * @notice Doesn't change state * @return Tupple of two arrays (dates registered, statuses) */ function getUserEntryStatuses() external view returns (uint32[], uint32[]) { } /** * @dev Withdraw operation fees for a list of dates * @notice Changes state, owner only * @param _dates Array of dates to withdraw operation fee */ function withdrawOperationFees(uint32[] _dates) external { } /** * @dev Get total withdrawable operation fee amount and dates, owner only * array may contain zeros so those need to be filtered out by the client * @notice Doesn't change state * @return Tuple(Array of dates (unix time: uint32), amount) */ function getWithdrawableOperationFeeDatesAndAmount() external view returns (uint32[], uint256) { } /** * @dev Get contest status, only return complete and bonus numbers if it's been past the withdraw buffer * Return -1 for complete and bonus numbers if still before withdraw buffer * @notice Doesn't change state * @param _date Date to get DailyContestStatus for * @return Tuple(numRegistered, numCompleted, bonus) */ function getContestStatusForDate(uint32 _date) external view returns (int256, int256, int256) { } /** * @dev Get next valid start date. * Tomorrow or the next non-registered date is the next start date * @notice Doesn't change state * @return Next start date (unix time: uint32) */ function getStartDate() public view returns (uint32) { } /** * @dev Get the next UTC midnight date * @notice Doesn't change state * @param _timestamp (unix time: uint32) * @return Next date (unix time: uint32) */ function getNextDate(uint32 _timestamp) internal pure returns (uint32) { } /** * @dev Get the date floor (UTC midnight) for a given timestamp * @notice Doesn't change state * @param _timestamp (unix time: uint32) * @return UTC midnight date (unix time: uint32) */ function getDate(uint32 _timestamp) internal pure returns (uint32) { } /** * @dev Get the last registered date for a user * @notice Doesn't change state * @return Last registered date (unix time: uint32), 0 if user has never registered */ function getLastRegisterDate() internal view returns (uint32) { } /** * @dev Calculate the bonus for a given day * @notice Doesn't change state * @param _date Date to calculate the bonus for (unix time: uint32) * @return Bonus amount (unit256) */ function calculateBonus(uint32 _date) internal view returns (uint256) { } /** * @dev Calculate the operation fee for a given day * @notice Doesn't change state * @param _date Date to calculate the operation fee for (unix time: uint32) * @return Operation fee amount (unit256) */ function calculateOperationFee(uint32 _date) internal view returns (uint256) { } /******************** * Admin only methods ********************/ /** * @dev Adding an admin, owner only * @notice Changes state * @param _newAdmin Address of new admin */ function addAdmin(address _newAdmin) external { } /** * @dev Return all registered dates for a user, admin only * @notice Doesn't change state * @param _user User to get dates for * @return All dates(uint32[]) the user registered for */ function getDatesForUser(address _user) external view returns (uint32[]) { } /** * @dev Return all registered users for a date, admin only * @notice Doesn't change state * @param _date Date to get users for * @return All users(address[]) registered on a given date */ function getUsersForDate(uint32 _date) external view returns (address[]) { } /** * @dev Return entry status for a user and date, admin only * @notice Doesn't change state * @param _user User to get EntryStatus for * @param _date (unix time: uint32) Date to get EntryStatus for * @return UserEntryStatus */ function getEntryStatus(address _user, uint32 _date) external view returns (UserEntryStatus) { } /** * @dev Get daily contest status, admin only * @notice Doesn't change state * @param _date Date to get DailyContestStatus for * @return Tuple(uint256, uint256, bool) */ function getContestStatusForDateAdmin(uint32 _date) external view returns (uint256, uint256, bool) { } }
userDateToStatus[msg.sender][nowDate]==UserEntryStatus.REGISTERED
383,313
userDateToStatus[msg.sender][nowDate]==UserEntryStatus.REGISTERED
"Unique gifts empty"
pragma solidity ^0.8.4; contract BD is ERC721Enumerable, Ownable { uint256 public tokenPricePresale = 0.06 ether; uint256 public tokenPricePublicSale = 0.08 ether; uint256 public constant giftUniquesStart = 0; uint256 public giftUniquesMinted = 0; uint256 public constant giftUniquesTotal = 17; uint256 public constant giftRegularsStart = giftUniquesStart + giftUniquesTotal; uint256 public giftRegularsMinted = 0; uint256 public constant giftRegularsTotal = 50; uint256 public constant forPurchaseStart = giftRegularsStart + giftRegularsTotal; uint256 public forPurchaseMinted = 0; uint256 public constant forPurchaseTotal = 5555 + 20 - giftUniquesTotal - giftRegularsTotal; uint256 public maxTokensPerMint = 10; uint256 public maxTokensPerWhitelistedAddress = 2; bool public hasPresaleStarted = false; bool public hasPublicSaleStarted = false; string public tokenBaseURI = "ipfs://QmfUnzwB6h2Nbx4gD8kh8pnPAc5BmrnuYeP4hVxrZUV8es/"; mapping(address => bool) public presaleWhitelist; mapping(address => uint256) public presaleWhitelistPurchased; constructor() ERC721("Buff Doge NFT", "BD") { } function setTokenPricePresale(uint256 val) external onlyOwner { } function setTokenPricePublicSale(uint256 val) external onlyOwner { } function tokenPrice() public view returns (uint256) { } function setMaxTokensPerMint(uint256 val) external onlyOwner { } function setMaxTokensPerWhitelistedAddress(uint256 val) external onlyOwner { } function setPresale(bool val) external onlyOwner { } function setPublicSale(bool val) external onlyOwner { } function addToPresaleWhitelist(address[] calldata entries) external onlyOwner { } function removeFromPresaleWhitelist(address[] calldata entries) external onlyOwner { } function giftUnique(address[] calldata receivers) external onlyOwner { require(<FILL_ME>) for (uint256 i = 0; i < receivers.length; i++) { _safeMint(receivers[i], 1 + giftUniquesStart + giftUniquesMinted + i); } giftUniquesMinted += receivers.length; } function giftRegular(address[] calldata receivers) external onlyOwner { } function mint(uint256 amount) external payable { } function _baseURI() internal view override(ERC721) returns (string memory) { } function setBaseURI(string calldata URI) external onlyOwner { } function withdraw() external onlyOwner { } }
giftUniquesMinted+receivers.length<=giftRegularsTotal,"Unique gifts empty"
383,319
giftUniquesMinted+receivers.length<=giftRegularsTotal
"Regular gifts empty"
pragma solidity ^0.8.4; contract BD is ERC721Enumerable, Ownable { uint256 public tokenPricePresale = 0.06 ether; uint256 public tokenPricePublicSale = 0.08 ether; uint256 public constant giftUniquesStart = 0; uint256 public giftUniquesMinted = 0; uint256 public constant giftUniquesTotal = 17; uint256 public constant giftRegularsStart = giftUniquesStart + giftUniquesTotal; uint256 public giftRegularsMinted = 0; uint256 public constant giftRegularsTotal = 50; uint256 public constant forPurchaseStart = giftRegularsStart + giftRegularsTotal; uint256 public forPurchaseMinted = 0; uint256 public constant forPurchaseTotal = 5555 + 20 - giftUniquesTotal - giftRegularsTotal; uint256 public maxTokensPerMint = 10; uint256 public maxTokensPerWhitelistedAddress = 2; bool public hasPresaleStarted = false; bool public hasPublicSaleStarted = false; string public tokenBaseURI = "ipfs://QmfUnzwB6h2Nbx4gD8kh8pnPAc5BmrnuYeP4hVxrZUV8es/"; mapping(address => bool) public presaleWhitelist; mapping(address => uint256) public presaleWhitelistPurchased; constructor() ERC721("Buff Doge NFT", "BD") { } function setTokenPricePresale(uint256 val) external onlyOwner { } function setTokenPricePublicSale(uint256 val) external onlyOwner { } function tokenPrice() public view returns (uint256) { } function setMaxTokensPerMint(uint256 val) external onlyOwner { } function setMaxTokensPerWhitelistedAddress(uint256 val) external onlyOwner { } function setPresale(bool val) external onlyOwner { } function setPublicSale(bool val) external onlyOwner { } function addToPresaleWhitelist(address[] calldata entries) external onlyOwner { } function removeFromPresaleWhitelist(address[] calldata entries) external onlyOwner { } function giftUnique(address[] calldata receivers) external onlyOwner { } function giftRegular(address[] calldata receivers) external onlyOwner { require(<FILL_ME>) for (uint256 i = 0; i < receivers.length; i++) { _safeMint(receivers[i], 1 + giftRegularsStart + giftRegularsMinted + i); } giftRegularsMinted += receivers.length; } function mint(uint256 amount) external payable { } function _baseURI() internal view override(ERC721) returns (string memory) { } function setBaseURI(string calldata URI) external onlyOwner { } function withdraw() external onlyOwner { } }
giftRegularsMinted+receivers.length<=giftRegularsTotal,"Regular gifts empty"
383,319
giftRegularsMinted+receivers.length<=giftRegularsTotal