comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Free Mint is Over"
pragma solidity ^0.8.7; import "./ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract nounmfers is ERC721A, Ownable, ReentrancyGuard { using Address for address; using SafeMath for uint256; using Strings for uint256; string public baseURI; uint256 public mintPrice = 0.02 ether; uint256 public maxSupply = 6969; uint256 public freeMintAmount = 1000; bool public publicSaleLive; uint256 public maxMint = 10; mapping(address => uint256) addressMinted; constructor() ERC721A("NoundMfs", "NMF") {} function freeMint(uint256 amount) external payable nonReentrant { require(publicSaleLive, "Public mint is not live"); require(<FILL_ME>) require(msg.value == 0, "Must provide exact required ETH"); addressMinted[msg.sender] += amount; require(addressMinted[msg.sender] <= maxMint, "Max Mint per wallet is 10"); _safeMint(msg.sender, amount); } function mint(uint256 amount) external payable nonReentrant { } function changeMaxMint(uint56 _new) external onlyOwner { } function setPublicSale(bool _status) external onlyOwner { } function setFreeMintAmount(uint256 _new) external onlyOwner { } function setMintPrice(uint256 _mintPrice) external onlyOwner { } function setbaseURI(string memory _baseURI) external onlyOwner { } function withdraw() external onlyOwner nonReentrant { } function devMint(uint256 amount) external onlyOwner { } function walletOfOwner(address address_) public virtual view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
totalSupply()+amount<=freeMintAmount,"Free Mint is Over"
357,175
totalSupply()+amount<=freeMintAmount
"Max Mint per wallet is 10"
pragma solidity ^0.8.7; import "./ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract nounmfers is ERC721A, Ownable, ReentrancyGuard { using Address for address; using SafeMath for uint256; using Strings for uint256; string public baseURI; uint256 public mintPrice = 0.02 ether; uint256 public maxSupply = 6969; uint256 public freeMintAmount = 1000; bool public publicSaleLive; uint256 public maxMint = 10; mapping(address => uint256) addressMinted; constructor() ERC721A("NoundMfs", "NMF") {} function freeMint(uint256 amount) external payable nonReentrant { require(publicSaleLive, "Public mint is not live"); require(totalSupply() + amount <= freeMintAmount, "Free Mint is Over"); require(msg.value == 0, "Must provide exact required ETH"); addressMinted[msg.sender] += amount; require(<FILL_ME>) _safeMint(msg.sender, amount); } function mint(uint256 amount) external payable nonReentrant { } function changeMaxMint(uint56 _new) external onlyOwner { } function setPublicSale(bool _status) external onlyOwner { } function setFreeMintAmount(uint256 _new) external onlyOwner { } function setMintPrice(uint256 _mintPrice) external onlyOwner { } function setbaseURI(string memory _baseURI) external onlyOwner { } function withdraw() external onlyOwner nonReentrant { } function devMint(uint256 amount) external onlyOwner { } function walletOfOwner(address address_) public virtual view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } }
addressMinted[msg.sender]<=maxMint,"Max Mint per wallet is 10"
357,175
addressMinted[msg.sender]<=maxMint
"All NFTs have been minted."
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { } } contract AstroContract is ERC721Enumerable, Ownable, ContextMixin { using Strings for uint256; uint256 public constant MAX_NFT = 4999; uint256 public constant MAX_NFT_PRESALE = 4999; uint256 public constant PRICE = 0.15 ether; uint256 public constant PRICE_PRESALE = 0.15 ether; uint256 public constant MAX_MINT = 2; mapping(address => uint256) public totalMinted; string public baseURI; string public baseExtension; address payable private withdrawAddress = payable(0x1638DcD45bB4042E38509F09Fe7e3f04C64291d7); address private allowedAddress; bool public preSale; bool public publicSale; bytes32 public merkleroot = 0x6396f1f47b8380667856b0030b59a96a01b398bf194b309ff0494479dfc4cdea; event saleStatus(string _message, bool indexed _status); // replace name with your collection name and TIC with your collection ticker constructor (string memory _initialBaseURI, string memory _initialExtension) ERC721("Astro Friends NFT", "ASTRO") { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) external onlyOwner { } function setAllowedAddress(address _allowedAddress) external onlyOwner { } function setMerkleRoot(bytes32 _merkleroot) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function togglePreSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function withdraw() external payable onlyOwner { } function _mintNFT(address _to, uint256 _nftCount) private { } function isWhitelisted(bytes32[] calldata _merkleproof) public view returns (bool) { } function mintReserved(address _to, uint256 _nftCount) external { require(msg.sender == owner() || msg.sender == allowedAddress, "You are not allowed to call this function"); require(<FILL_ME>) _mintNFT(_to, _nftCount); } function mintNFT(uint256 _nftCount) external payable { } function preMintNFT(bytes32[] calldata _merkleproof, uint256 _nftCount) external payable { } // ----------------------------------------------------------------------------- // FOR POLYGON INTEGRATION function isApprovedForAll(address _owner, address _operator) public override view returns (bool isOperator) { } function _msgSender() internal override view returns (address sender) { } }
totalSupply()+_nftCount<=MAX_NFT,"All NFTs have been minted."
357,300
totalSupply()+_nftCount<=MAX_NFT
"ETH amount is incorrect"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { } } contract AstroContract is ERC721Enumerable, Ownable, ContextMixin { using Strings for uint256; uint256 public constant MAX_NFT = 4999; uint256 public constant MAX_NFT_PRESALE = 4999; uint256 public constant PRICE = 0.15 ether; uint256 public constant PRICE_PRESALE = 0.15 ether; uint256 public constant MAX_MINT = 2; mapping(address => uint256) public totalMinted; string public baseURI; string public baseExtension; address payable private withdrawAddress = payable(0x1638DcD45bB4042E38509F09Fe7e3f04C64291d7); address private allowedAddress; bool public preSale; bool public publicSale; bytes32 public merkleroot = 0x6396f1f47b8380667856b0030b59a96a01b398bf194b309ff0494479dfc4cdea; event saleStatus(string _message, bool indexed _status); // replace name with your collection name and TIC with your collection ticker constructor (string memory _initialBaseURI, string memory _initialExtension) ERC721("Astro Friends NFT", "ASTRO") { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) external onlyOwner { } function setAllowedAddress(address _allowedAddress) external onlyOwner { } function setMerkleRoot(bytes32 _merkleroot) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function togglePreSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function withdraw() external payable onlyOwner { } function _mintNFT(address _to, uint256 _nftCount) private { } function isWhitelisted(bytes32[] calldata _merkleproof) public view returns (bool) { } function mintReserved(address _to, uint256 _nftCount) external { } function mintNFT(uint256 _nftCount) external payable { require(publicSale, "Public Sale is not active" ); require(totalSupply() + _nftCount <= MAX_NFT, "All NFTs have been minted." ); require(<FILL_ME>) require( _nftCount <= MAX_MINT, "Cannot buy these many NFT" ); (bool sent, ) = withdrawAddress.call{value: msg.value}(""); require(sent, "Error with payment transfer"); _mintNFT(msg.sender, _nftCount); } function preMintNFT(bytes32[] calldata _merkleproof, uint256 _nftCount) external payable { } // ----------------------------------------------------------------------------- // FOR POLYGON INTEGRATION function isApprovedForAll(address _owner, address _operator) public override view returns (bool isOperator) { } function _msgSender() internal override view returns (address sender) { } }
PRICE*_nftCount==msg.value,"ETH amount is incorrect"
357,300
PRICE*_nftCount==msg.value
"All NFTs have been minted, wait for public sale"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { } } contract AstroContract is ERC721Enumerable, Ownable, ContextMixin { using Strings for uint256; uint256 public constant MAX_NFT = 4999; uint256 public constant MAX_NFT_PRESALE = 4999; uint256 public constant PRICE = 0.15 ether; uint256 public constant PRICE_PRESALE = 0.15 ether; uint256 public constant MAX_MINT = 2; mapping(address => uint256) public totalMinted; string public baseURI; string public baseExtension; address payable private withdrawAddress = payable(0x1638DcD45bB4042E38509F09Fe7e3f04C64291d7); address private allowedAddress; bool public preSale; bool public publicSale; bytes32 public merkleroot = 0x6396f1f47b8380667856b0030b59a96a01b398bf194b309ff0494479dfc4cdea; event saleStatus(string _message, bool indexed _status); // replace name with your collection name and TIC with your collection ticker constructor (string memory _initialBaseURI, string memory _initialExtension) ERC721("Astro Friends NFT", "ASTRO") { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) external onlyOwner { } function setAllowedAddress(address _allowedAddress) external onlyOwner { } function setMerkleRoot(bytes32 _merkleroot) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function togglePreSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function withdraw() external payable onlyOwner { } function _mintNFT(address _to, uint256 _nftCount) private { } function isWhitelisted(bytes32[] calldata _merkleproof) public view returns (bool) { } function mintReserved(address _to, uint256 _nftCount) external { } function mintNFT(uint256 _nftCount) external payable { } function preMintNFT(bytes32[] calldata _merkleproof, uint256 _nftCount) external payable { require(preSale, "Pre Sale is not active" ); require(<FILL_ME>) require(PRICE_PRESALE * _nftCount == msg.value, "ETH amount is incorrect" ); require(_nftCount <= MAX_MINT, "Cannot buy these many NFT" ); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleproof,merkleroot,leaf), "You are not whitelisted"); (bool sent, ) = withdrawAddress.call{value: msg.value}(""); require(sent, "Error with payment transfer"); _mintNFT(msg.sender, _nftCount); } // ----------------------------------------------------------------------------- // FOR POLYGON INTEGRATION function isApprovedForAll(address _owner, address _operator) public override view returns (bool isOperator) { } function _msgSender() internal override view returns (address sender) { } }
totalSupply()+_nftCount<=MAX_NFT_PRESALE,"All NFTs have been minted, wait for public sale"
357,300
totalSupply()+_nftCount<=MAX_NFT_PRESALE
"ETH amount is incorrect"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { } } contract AstroContract is ERC721Enumerable, Ownable, ContextMixin { using Strings for uint256; uint256 public constant MAX_NFT = 4999; uint256 public constant MAX_NFT_PRESALE = 4999; uint256 public constant PRICE = 0.15 ether; uint256 public constant PRICE_PRESALE = 0.15 ether; uint256 public constant MAX_MINT = 2; mapping(address => uint256) public totalMinted; string public baseURI; string public baseExtension; address payable private withdrawAddress = payable(0x1638DcD45bB4042E38509F09Fe7e3f04C64291d7); address private allowedAddress; bool public preSale; bool public publicSale; bytes32 public merkleroot = 0x6396f1f47b8380667856b0030b59a96a01b398bf194b309ff0494479dfc4cdea; event saleStatus(string _message, bool indexed _status); // replace name with your collection name and TIC with your collection ticker constructor (string memory _initialBaseURI, string memory _initialExtension) ERC721("Astro Friends NFT", "ASTRO") { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) external onlyOwner { } function setAllowedAddress(address _allowedAddress) external onlyOwner { } function setMerkleRoot(bytes32 _merkleroot) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function togglePreSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function withdraw() external payable onlyOwner { } function _mintNFT(address _to, uint256 _nftCount) private { } function isWhitelisted(bytes32[] calldata _merkleproof) public view returns (bool) { } function mintReserved(address _to, uint256 _nftCount) external { } function mintNFT(uint256 _nftCount) external payable { } function preMintNFT(bytes32[] calldata _merkleproof, uint256 _nftCount) external payable { require(preSale, "Pre Sale is not active" ); require(totalSupply() + _nftCount <= MAX_NFT_PRESALE, "All NFTs have been minted, wait for public sale" ); require(<FILL_ME>) require(_nftCount <= MAX_MINT, "Cannot buy these many NFT" ); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleproof,merkleroot,leaf), "You are not whitelisted"); (bool sent, ) = withdrawAddress.call{value: msg.value}(""); require(sent, "Error with payment transfer"); _mintNFT(msg.sender, _nftCount); } // ----------------------------------------------------------------------------- // FOR POLYGON INTEGRATION function isApprovedForAll(address _owner, address _operator) public override view returns (bool isOperator) { } function _msgSender() internal override view returns (address sender) { } }
PRICE_PRESALE*_nftCount==msg.value,"ETH amount is incorrect"
357,300
PRICE_PRESALE*_nftCount==msg.value
"You are not whitelisted"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { } } contract AstroContract is ERC721Enumerable, Ownable, ContextMixin { using Strings for uint256; uint256 public constant MAX_NFT = 4999; uint256 public constant MAX_NFT_PRESALE = 4999; uint256 public constant PRICE = 0.15 ether; uint256 public constant PRICE_PRESALE = 0.15 ether; uint256 public constant MAX_MINT = 2; mapping(address => uint256) public totalMinted; string public baseURI; string public baseExtension; address payable private withdrawAddress = payable(0x1638DcD45bB4042E38509F09Fe7e3f04C64291d7); address private allowedAddress; bool public preSale; bool public publicSale; bytes32 public merkleroot = 0x6396f1f47b8380667856b0030b59a96a01b398bf194b309ff0494479dfc4cdea; event saleStatus(string _message, bool indexed _status); // replace name with your collection name and TIC with your collection ticker constructor (string memory _initialBaseURI, string memory _initialExtension) ERC721("Astro Friends NFT", "ASTRO") { } function _baseURI() internal view virtual override returns (string memory) { } function setBaseURI(string memory _newBaseURI) external onlyOwner { } function setAllowedAddress(address _allowedAddress) external onlyOwner { } function setMerkleRoot(bytes32 _merkleroot) external onlyOwner { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function togglePreSale() external onlyOwner { } function togglePublicSale() external onlyOwner { } function withdraw() external payable onlyOwner { } function _mintNFT(address _to, uint256 _nftCount) private { } function isWhitelisted(bytes32[] calldata _merkleproof) public view returns (bool) { } function mintReserved(address _to, uint256 _nftCount) external { } function mintNFT(uint256 _nftCount) external payable { } function preMintNFT(bytes32[] calldata _merkleproof, uint256 _nftCount) external payable { require(preSale, "Pre Sale is not active" ); require(totalSupply() + _nftCount <= MAX_NFT_PRESALE, "All NFTs have been minted, wait for public sale" ); require(PRICE_PRESALE * _nftCount == msg.value, "ETH amount is incorrect" ); require(_nftCount <= MAX_MINT, "Cannot buy these many NFT" ); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(<FILL_ME>) (bool sent, ) = withdrawAddress.call{value: msg.value}(""); require(sent, "Error with payment transfer"); _mintNFT(msg.sender, _nftCount); } // ----------------------------------------------------------------------------- // FOR POLYGON INTEGRATION function isApprovedForAll(address _owner, address _operator) public override view returns (bool isOperator) { } function _msgSender() internal override view returns (address sender) { } }
MerkleProof.verify(_merkleproof,merkleroot,leaf),"You are not whitelisted"
357,300
MerkleProof.verify(_merkleproof,merkleroot,leaf)
null
pragma solidity ^0.4.24; 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 Proxy { using SafeMath for uint256; uint256 public contribution = 0; ETH_8 eth_8; constructor() public { } function() public payable { } function _bytesToAddress(bytes data) private pure returns(address addr) { } function resetContribution() external { } } contract ETH_8 { using SafeMath for uint256; uint256 constant public ONE_HUNDRED_PERCENTS = 10000; // 100% uint256[] public DAILY_INTEREST = [111, 133, 222, 333, 444]; // 1.11%, 2.22%, 3.33%, 4.44% uint256 public MARKETING_AND_TEAM_FEE = 1000; // 10% uint256 public referralPercents = 1000; // 10% uint256 constant public MAX_DIVIDEND_RATE = 25000; // 250% uint256 constant public MINIMUM_DEPOSIT = 100 finney; // 0.1 eth uint256 public wave = 0; uint256 public totalInvest = 0; uint256 public totalDividend = 0; mapping(address => bool) public isProxy; struct Deposit { uint256 amount; uint256 interest; uint256 withdrawedRate; } struct User { address referrer; uint256 referralAmount; uint256 firstTime; uint256 lastPayment; Deposit[] deposits; uint256 referBonus; } address public marketingAndTechnicalSupport = 0xC93C7F3Ac689B822C3e9d09b9cA8934e54cf1D70; // need to change address public owner = 0xbBdE48b0c31dA0DD601DA38F31dcf92b04f42588; mapping(uint256 => mapping(address => User)) public users; event InvestorAdded(address indexed investor); event ReferrerAdded(address indexed investor, address indexed referrer); event DepositAdded(address indexed investor, uint256 indexed depositsCount, uint256 amount); event UserDividendPayed(address indexed investor, uint256 dividend); event DepositDividendPayed(address indexed investor, uint256 indexed index, uint256 deposit, uint256 totalPayed, uint256 dividend); event FeePayed(address indexed investor, uint256 amount); event BalanceChanged(uint256 balance); event NewWave(); function() public payable { require(<FILL_ME>) } function withdrawDividends(address from) public { } function getDividends(address wallet) internal returns(uint256 sum) { } function dividendRate(address wallet, uint256 index) internal view returns(uint256 rate) { } function doInvest(address from, uint256 investment, address newReferrer) public payable { } function getUserInterest(address wallet) public view returns (uint256) { } function min(uint256 a, uint256 b) internal pure returns(uint256) { } function depositForUser(address wallet) external view returns(uint256 sum) { } function dividendsSumForUser(address wallet) external view returns(uint256 dividendsSum) { } function changeInterest(uint256[] interestList) external { } function changeTeamFee(uint256 feeRate) external { } function virtualInvest(address from, uint256 amount) public { } function createProxy() external { } }
isProxy[msg.sender]
357,336
isProxy[msg.sender]
null
pragma solidity ^0.4.15; /* author : dungeon A contract for doing pools with only one contract. */ // ERC20 Interface: https://github.com/ethereum/EIPs/issues/20 contract ERC20 { function transfer(address _to, uint256 _value) returns (bool success); function balanceOf(address _owner) constant returns (uint256 balance); } contract Controller { //The addy of the developer address public developer = 0xEE06BdDafFA56a303718DE53A5bc347EfbE4C68f; modifier onlyOwner { } } contract SanityPools is Controller { //mapping of the pool's index with the corresponding balances mapping (uint256 => mapping (address => uint256)) balances; //Array of 100 pools max Pool[100] pools; //Index of the active pool uint256 index_active = 0; //Allows an emergency withdraw after 1 week after the buy : 7*24*60*60 / 15.3 (mean time for mining a block) uint256 public week_in_blocs = 39529; modifier validIndex(uint256 _index){ } struct Pool { string name; //0 means there is no min/max amount uint256 min_amount; uint256 max_amount; // address sale; ERC20 token; // Record ETH value of tokens currently held by contract for the pool. uint256 pool_eth_value; // Track whether the pool has bought the tokens yet. bool bought_tokens; uint256 buy_block; } //Functions reserved for the owner function createPool(string _name, uint256 _min, uint256 _max) onlyOwner { } function setSale(uint256 _index, address _sale) onlyOwner validIndex(_index) { } function setToken(uint256 _index, address _token) onlyOwner validIndex(_index) { } function buyTokens(uint256 _index) onlyOwner validIndex(_index) { Pool storage pool = pools[_index]; require(pool.pool_eth_value >= pool.min_amount); require(pool.pool_eth_value <= pool.max_amount || pool.max_amount == 0); require(<FILL_ME>) //Prevent burning of ETH by mistake require(pool.sale != 0x0); //Registers the buy block number pool.buy_block = block.number; // Record that the contract has bought the tokens. pool.bought_tokens = true; // Transfer all the funds to the crowdsale address. pool.sale.transfer(pool.pool_eth_value); } function emergency_withdraw(uint256 _index, address _token) onlyOwner validIndex(_index) { } function change_delay(uint256 _delay) onlyOwner { } //Functions accessible to everyone function getPoolName(uint256 _index) validIndex(_index) constant returns (string) { } function refund(uint256 _index) validIndex(_index) { } function withdraw(uint256 _index) validIndex(_index) { } function contribute(uint256 _index) validIndex(_index) payable { } }
!pool.bought_tokens
357,359
!pool.bought_tokens
null
pragma solidity ^0.4.15; /* author : dungeon A contract for doing pools with only one contract. */ // ERC20 Interface: https://github.com/ethereum/EIPs/issues/20 contract ERC20 { function transfer(address _to, uint256 _value) returns (bool success); function balanceOf(address _owner) constant returns (uint256 balance); } contract Controller { //The addy of the developer address public developer = 0xEE06BdDafFA56a303718DE53A5bc347EfbE4C68f; modifier onlyOwner { } } contract SanityPools is Controller { //mapping of the pool's index with the corresponding balances mapping (uint256 => mapping (address => uint256)) balances; //Array of 100 pools max Pool[100] pools; //Index of the active pool uint256 index_active = 0; //Allows an emergency withdraw after 1 week after the buy : 7*24*60*60 / 15.3 (mean time for mining a block) uint256 public week_in_blocs = 39529; modifier validIndex(uint256 _index){ } struct Pool { string name; //0 means there is no min/max amount uint256 min_amount; uint256 max_amount; // address sale; ERC20 token; // Record ETH value of tokens currently held by contract for the pool. uint256 pool_eth_value; // Track whether the pool has bought the tokens yet. bool bought_tokens; uint256 buy_block; } //Functions reserved for the owner function createPool(string _name, uint256 _min, uint256 _max) onlyOwner { } function setSale(uint256 _index, address _sale) onlyOwner validIndex(_index) { } function setToken(uint256 _index, address _token) onlyOwner validIndex(_index) { } function buyTokens(uint256 _index) onlyOwner validIndex(_index) { } function emergency_withdraw(uint256 _index, address _token) onlyOwner validIndex(_index) { //Allows to withdraw all the tokens after a certain amount of time, in the case //of an unplanned situation Pool storage pool = pools[_index]; require(<FILL_ME>) ERC20 token = ERC20(_token); uint256 contract_token_balance = token.balanceOf(address(this)); require (contract_token_balance != 0); // Send the funds. Throws on failure to prevent loss of funds. require(token.transfer(msg.sender, contract_token_balance)); } function change_delay(uint256 _delay) onlyOwner { } //Functions accessible to everyone function getPoolName(uint256 _index) validIndex(_index) constant returns (string) { } function refund(uint256 _index) validIndex(_index) { } function withdraw(uint256 _index) validIndex(_index) { } function contribute(uint256 _index) validIndex(_index) payable { } }
block.number>=(pool.buy_block+week_in_blocs)
357,359
block.number>=(pool.buy_block+week_in_blocs)
null
pragma solidity ^0.4.15; /* author : dungeon A contract for doing pools with only one contract. */ // ERC20 Interface: https://github.com/ethereum/EIPs/issues/20 contract ERC20 { function transfer(address _to, uint256 _value) returns (bool success); function balanceOf(address _owner) constant returns (uint256 balance); } contract Controller { //The addy of the developer address public developer = 0xEE06BdDafFA56a303718DE53A5bc347EfbE4C68f; modifier onlyOwner { } } contract SanityPools is Controller { //mapping of the pool's index with the corresponding balances mapping (uint256 => mapping (address => uint256)) balances; //Array of 100 pools max Pool[100] pools; //Index of the active pool uint256 index_active = 0; //Allows an emergency withdraw after 1 week after the buy : 7*24*60*60 / 15.3 (mean time for mining a block) uint256 public week_in_blocs = 39529; modifier validIndex(uint256 _index){ } struct Pool { string name; //0 means there is no min/max amount uint256 min_amount; uint256 max_amount; // address sale; ERC20 token; // Record ETH value of tokens currently held by contract for the pool. uint256 pool_eth_value; // Track whether the pool has bought the tokens yet. bool bought_tokens; uint256 buy_block; } //Functions reserved for the owner function createPool(string _name, uint256 _min, uint256 _max) onlyOwner { } function setSale(uint256 _index, address _sale) onlyOwner validIndex(_index) { } function setToken(uint256 _index, address _token) onlyOwner validIndex(_index) { } function buyTokens(uint256 _index) onlyOwner validIndex(_index) { } function emergency_withdraw(uint256 _index, address _token) onlyOwner validIndex(_index) { //Allows to withdraw all the tokens after a certain amount of time, in the case //of an unplanned situation Pool storage pool = pools[_index]; require(block.number >= (pool.buy_block + week_in_blocs)); ERC20 token = ERC20(_token); uint256 contract_token_balance = token.balanceOf(address(this)); require (contract_token_balance != 0); // Send the funds. Throws on failure to prevent loss of funds. require(<FILL_ME>) } function change_delay(uint256 _delay) onlyOwner { } //Functions accessible to everyone function getPoolName(uint256 _index) validIndex(_index) constant returns (string) { } function refund(uint256 _index) validIndex(_index) { } function withdraw(uint256 _index) validIndex(_index) { } function contribute(uint256 _index) validIndex(_index) payable { } }
token.transfer(msg.sender,contract_token_balance)
357,359
token.transfer(msg.sender,contract_token_balance)
null
pragma solidity ^0.4.15; /* author : dungeon A contract for doing pools with only one contract. */ // ERC20 Interface: https://github.com/ethereum/EIPs/issues/20 contract ERC20 { function transfer(address _to, uint256 _value) returns (bool success); function balanceOf(address _owner) constant returns (uint256 balance); } contract Controller { //The addy of the developer address public developer = 0xEE06BdDafFA56a303718DE53A5bc347EfbE4C68f; modifier onlyOwner { } } contract SanityPools is Controller { //mapping of the pool's index with the corresponding balances mapping (uint256 => mapping (address => uint256)) balances; //Array of 100 pools max Pool[100] pools; //Index of the active pool uint256 index_active = 0; //Allows an emergency withdraw after 1 week after the buy : 7*24*60*60 / 15.3 (mean time for mining a block) uint256 public week_in_blocs = 39529; modifier validIndex(uint256 _index){ } struct Pool { string name; //0 means there is no min/max amount uint256 min_amount; uint256 max_amount; // address sale; ERC20 token; // Record ETH value of tokens currently held by contract for the pool. uint256 pool_eth_value; // Track whether the pool has bought the tokens yet. bool bought_tokens; uint256 buy_block; } //Functions reserved for the owner function createPool(string _name, uint256 _min, uint256 _max) onlyOwner { } function setSale(uint256 _index, address _sale) onlyOwner validIndex(_index) { } function setToken(uint256 _index, address _token) onlyOwner validIndex(_index) { } function buyTokens(uint256 _index) onlyOwner validIndex(_index) { } function emergency_withdraw(uint256 _index, address _token) onlyOwner validIndex(_index) { } function change_delay(uint256 _delay) onlyOwner { } //Functions accessible to everyone function getPoolName(uint256 _index) validIndex(_index) constant returns (string) { } function refund(uint256 _index) validIndex(_index) { } function withdraw(uint256 _index) validIndex(_index) { Pool storage pool = pools[_index]; // Disallow withdraw if tokens haven't been bought yet. require(<FILL_ME>) uint256 contract_token_balance = pool.token.balanceOf(address(this)); // Disallow token withdrawals if there are no tokens to withdraw. require(contract_token_balance != 0); // Store the user's token balance in a temporary variable. uint256 tokens_to_withdraw = (balances[_index][msg.sender] * contract_token_balance) / pool.pool_eth_value; // Update the value of tokens currently held by the contract. pool.pool_eth_value -= balances[_index][msg.sender]; // Update the user's balance prior to sending to prevent recursive call. balances[_index][msg.sender] = 0; //The 1% fee uint256 fee = tokens_to_withdraw / 100; // Send the funds. Throws on failure to prevent loss of funds. require(pool.token.transfer(msg.sender, tokens_to_withdraw - fee)); // Send the fee to the developer. require(pool.token.transfer(developer, fee)); } function contribute(uint256 _index) validIndex(_index) payable { } }
pool.bought_tokens
357,359
pool.bought_tokens
null
pragma solidity ^0.4.15; /* author : dungeon A contract for doing pools with only one contract. */ // ERC20 Interface: https://github.com/ethereum/EIPs/issues/20 contract ERC20 { function transfer(address _to, uint256 _value) returns (bool success); function balanceOf(address _owner) constant returns (uint256 balance); } contract Controller { //The addy of the developer address public developer = 0xEE06BdDafFA56a303718DE53A5bc347EfbE4C68f; modifier onlyOwner { } } contract SanityPools is Controller { //mapping of the pool's index with the corresponding balances mapping (uint256 => mapping (address => uint256)) balances; //Array of 100 pools max Pool[100] pools; //Index of the active pool uint256 index_active = 0; //Allows an emergency withdraw after 1 week after the buy : 7*24*60*60 / 15.3 (mean time for mining a block) uint256 public week_in_blocs = 39529; modifier validIndex(uint256 _index){ } struct Pool { string name; //0 means there is no min/max amount uint256 min_amount; uint256 max_amount; // address sale; ERC20 token; // Record ETH value of tokens currently held by contract for the pool. uint256 pool_eth_value; // Track whether the pool has bought the tokens yet. bool bought_tokens; uint256 buy_block; } //Functions reserved for the owner function createPool(string _name, uint256 _min, uint256 _max) onlyOwner { } function setSale(uint256 _index, address _sale) onlyOwner validIndex(_index) { } function setToken(uint256 _index, address _token) onlyOwner validIndex(_index) { } function buyTokens(uint256 _index) onlyOwner validIndex(_index) { } function emergency_withdraw(uint256 _index, address _token) onlyOwner validIndex(_index) { } function change_delay(uint256 _delay) onlyOwner { } //Functions accessible to everyone function getPoolName(uint256 _index) validIndex(_index) constant returns (string) { } function refund(uint256 _index) validIndex(_index) { } function withdraw(uint256 _index) validIndex(_index) { Pool storage pool = pools[_index]; // Disallow withdraw if tokens haven't been bought yet. require(pool.bought_tokens); uint256 contract_token_balance = pool.token.balanceOf(address(this)); // Disallow token withdrawals if there are no tokens to withdraw. require(contract_token_balance != 0); // Store the user's token balance in a temporary variable. uint256 tokens_to_withdraw = (balances[_index][msg.sender] * contract_token_balance) / pool.pool_eth_value; // Update the value of tokens currently held by the contract. pool.pool_eth_value -= balances[_index][msg.sender]; // Update the user's balance prior to sending to prevent recursive call. balances[_index][msg.sender] = 0; //The 1% fee uint256 fee = tokens_to_withdraw / 100; // Send the funds. Throws on failure to prevent loss of funds. require(<FILL_ME>) // Send the fee to the developer. require(pool.token.transfer(developer, fee)); } function contribute(uint256 _index) validIndex(_index) payable { } }
pool.token.transfer(msg.sender,tokens_to_withdraw-fee)
357,359
pool.token.transfer(msg.sender,tokens_to_withdraw-fee)
null
pragma solidity ^0.4.15; /* author : dungeon A contract for doing pools with only one contract. */ // ERC20 Interface: https://github.com/ethereum/EIPs/issues/20 contract ERC20 { function transfer(address _to, uint256 _value) returns (bool success); function balanceOf(address _owner) constant returns (uint256 balance); } contract Controller { //The addy of the developer address public developer = 0xEE06BdDafFA56a303718DE53A5bc347EfbE4C68f; modifier onlyOwner { } } contract SanityPools is Controller { //mapping of the pool's index with the corresponding balances mapping (uint256 => mapping (address => uint256)) balances; //Array of 100 pools max Pool[100] pools; //Index of the active pool uint256 index_active = 0; //Allows an emergency withdraw after 1 week after the buy : 7*24*60*60 / 15.3 (mean time for mining a block) uint256 public week_in_blocs = 39529; modifier validIndex(uint256 _index){ } struct Pool { string name; //0 means there is no min/max amount uint256 min_amount; uint256 max_amount; // address sale; ERC20 token; // Record ETH value of tokens currently held by contract for the pool. uint256 pool_eth_value; // Track whether the pool has bought the tokens yet. bool bought_tokens; uint256 buy_block; } //Functions reserved for the owner function createPool(string _name, uint256 _min, uint256 _max) onlyOwner { } function setSale(uint256 _index, address _sale) onlyOwner validIndex(_index) { } function setToken(uint256 _index, address _token) onlyOwner validIndex(_index) { } function buyTokens(uint256 _index) onlyOwner validIndex(_index) { } function emergency_withdraw(uint256 _index, address _token) onlyOwner validIndex(_index) { } function change_delay(uint256 _delay) onlyOwner { } //Functions accessible to everyone function getPoolName(uint256 _index) validIndex(_index) constant returns (string) { } function refund(uint256 _index) validIndex(_index) { } function withdraw(uint256 _index) validIndex(_index) { Pool storage pool = pools[_index]; // Disallow withdraw if tokens haven't been bought yet. require(pool.bought_tokens); uint256 contract_token_balance = pool.token.balanceOf(address(this)); // Disallow token withdrawals if there are no tokens to withdraw. require(contract_token_balance != 0); // Store the user's token balance in a temporary variable. uint256 tokens_to_withdraw = (balances[_index][msg.sender] * contract_token_balance) / pool.pool_eth_value; // Update the value of tokens currently held by the contract. pool.pool_eth_value -= balances[_index][msg.sender]; // Update the user's balance prior to sending to prevent recursive call. balances[_index][msg.sender] = 0; //The 1% fee uint256 fee = tokens_to_withdraw / 100; // Send the funds. Throws on failure to prevent loss of funds. require(pool.token.transfer(msg.sender, tokens_to_withdraw - fee)); // Send the fee to the developer. require(<FILL_ME>) } function contribute(uint256 _index) validIndex(_index) payable { } }
pool.token.transfer(developer,fee)
357,359
pool.token.transfer(developer,fee)
null
pragma solidity ^0.4.15; /* author : dungeon A contract for doing pools with only one contract. */ // ERC20 Interface: https://github.com/ethereum/EIPs/issues/20 contract ERC20 { function transfer(address _to, uint256 _value) returns (bool success); function balanceOf(address _owner) constant returns (uint256 balance); } contract Controller { //The addy of the developer address public developer = 0xEE06BdDafFA56a303718DE53A5bc347EfbE4C68f; modifier onlyOwner { } } contract SanityPools is Controller { //mapping of the pool's index with the corresponding balances mapping (uint256 => mapping (address => uint256)) balances; //Array of 100 pools max Pool[100] pools; //Index of the active pool uint256 index_active = 0; //Allows an emergency withdraw after 1 week after the buy : 7*24*60*60 / 15.3 (mean time for mining a block) uint256 public week_in_blocs = 39529; modifier validIndex(uint256 _index){ } struct Pool { string name; //0 means there is no min/max amount uint256 min_amount; uint256 max_amount; // address sale; ERC20 token; // Record ETH value of tokens currently held by contract for the pool. uint256 pool_eth_value; // Track whether the pool has bought the tokens yet. bool bought_tokens; uint256 buy_block; } //Functions reserved for the owner function createPool(string _name, uint256 _min, uint256 _max) onlyOwner { } function setSale(uint256 _index, address _sale) onlyOwner validIndex(_index) { } function setToken(uint256 _index, address _token) onlyOwner validIndex(_index) { } function buyTokens(uint256 _index) onlyOwner validIndex(_index) { } function emergency_withdraw(uint256 _index, address _token) onlyOwner validIndex(_index) { } function change_delay(uint256 _delay) onlyOwner { } //Functions accessible to everyone function getPoolName(uint256 _index) validIndex(_index) constant returns (string) { } function refund(uint256 _index) validIndex(_index) { } function withdraw(uint256 _index) validIndex(_index) { } function contribute(uint256 _index) validIndex(_index) payable { Pool storage pool = pools[_index]; require(!pool.bought_tokens); //Check if the contribution is within the limits or if there is no max amount require(<FILL_ME>) //Update the eth held by the pool pool.pool_eth_value += msg.value; //Updates the user's balance balances[_index][msg.sender] += msg.value; } }
pool.pool_eth_value+msg.value<=pool.max_amount||pool.max_amount==0
357,359
pool.pool_eth_value+msg.value<=pool.max_amount||pool.max_amount==0
null
pragma solidity ^0.4.16; /*** @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { //knownsec //安全的算法 /** * @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) { } } contract owned { //knownsec //认证 address public owner; function owned() public { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public { } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract TokenERC20 { using SafeMath for uint256; // Public variables of the token string public name; string public symbol; uint8 public decimals = 18; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /*** Constrctor function ** Initializes contract with initial supply tokens to the creator of the contract */ function TokenERC20( //knownsec /初始化代币 uint256 initialSupply, string tokenName, string tokenSymbol ) public { } /*** 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 { } /*** 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 _extraData ) public returns (bool success) { } /*** Destroy tokens ** Remove `_value` tokens from the system irreversibly ** @param _value the amount of money to burn */ function burn(uint256 _value) 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) { } // 批量转账 function batchTransfer(address[] _receivers, uint256 _value) public returns (bool success) { } } /******************************************/ /* ADVANCED TOKEN STARTS HERE */ /******************************************/ contract MyAdvancedToken is owned, TokenERC20 { using SafeMath for uint256; uint256 public sellPrice ; uint256 public buyPrice; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes contract with initial supply tokens to the creator of the contract */ function MyAdvancedToken( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, tokenName, tokenSymbol) public {} /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { } /// @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 { } /// @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 { } /// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { } /// @notice Buy tokens from contract by sending ether function buy() payable public { } /// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold function sell(uint256 amount) public { //knownsec //卖代币 require(<FILL_ME>) // checks if the contract has enough ether to buy _transfer(msg.sender, this, amount); // makes the transfers msg.sender.transfer(amount.mul(sellPrice)); // sends ether to the seller. It's important to do this last to avoid recursion attacks } }
address(this).balance>=amount.mul(sellPrice)
357,414
address(this).balance>=amount.mul(sellPrice)
"Not yours"
contract RaiderHunt is Ownable { // weapon score index to staking reward mapping uint256[18] public weaponStakingReward = [ 1157407407407 wei, // 0.1 per day 6944444444444 wei, // 0.6 per day 8101851851852 wei, // 0.7 per day 9259259259259 wei, // 0.8 per day 10416666666667 wei, // 0.9 per day 11574074074074 wei, // 1 per day 24305555555556 wei, // 2.1 per day 24305555555556 wei, // 2.2 per day 26620370370370 wei, // 2.3 per day 27777777777778 wei, // 2.4 per day 28935185185185 wei // 2.5 per day ]; // boolean to control staking bool public stakingLive = false; // mapping from tokenId to timestamp of staked mapping(uint256 => uint256) public tokenIdToTimeStaked; // mapping from staked tokenId to staker mapping(uint256 => address) public tokenIdToStaker; // mapping from staker to tokenIds staked mapping(address => uint256[]) public stakerToTokenIds; // raider interface IRaider private raider; // token interface IRaiderGold private rgo; // armory interface IRaiderArmory private armory; constructor(address _raiderGoldAddress, address _raiderAddress) { } /************/ /* INTERNAL */ /************/ /** * @notice drops an element from a storage array * @dev used for staked raider tokens. Expensive, so unstakeAll is preferred where possible * @param _array - the array to drop the element from * @param _id - the element to remove */ function dropIdFromArray(uint256[] storage _array, uint256 _id) private { } /************/ /* EXTERNAL */ /************/ /** * @notice stakes (multiple) tokens * @param _tokenIds - array of tokenId(s) to stake */ function stakeRaidersById(uint256[] memory _tokenIds) public { require(stakingLive, "Not live"); for (uint256 i = 0; i < _tokenIds.length; i++) { uint256 id = _tokenIds[i]; require(<FILL_ME>) raider.transferFrom(msg.sender, address(this), id); tokenIdToTimeStaked[id] = block.timestamp; tokenIdToStaker[id] = msg.sender; stakerToTokenIds[msg.sender].push(id); } } /** * @notice unstakes all tokens of a staker */ function unstakeAll() public { } /** * @notice unstakes chosen token(s) of a staker * @param _tokenIds - tokenIds to unstake */ function unstakeRaidersById(uint256[] memory _tokenIds) public { } /** * @notice claims all accrued rewards across staked token(s) */ function claimAll() public { } /** * @notice fetches rewards acrued for tokenId * @param _tokenId - tokenId to fetch accrued rewards for * @return integer value of rewards accrued for token */ function getRewardsByTokenId(uint256 _tokenId) public view returns (uint256) { } /** * @notice fetches total rewards acrued for staker * @param _staker - address of staker to fetch total rewards for * @return integer value of rewards accrued for staker across tokens */ function getTotalRewardsAccrued(address _staker) public view returns (uint256) { } /** * @notice fetches the amount of tokens staked by staker * @param _staker - address of original staker * @return num of tokens staked by staker */ function getRaidersStakedCount(address _staker) public view returns (uint256) { } /** * @notice fetches the tokens staked by staker * @param _staker - address of original staker * @return tokens staked by staker */ function getRaidersStaked(address _staker) public view returns (uint256[] memory) { } /** * @notice returns whether the address is staking the token * @dev used e.g. in armory to check whether someone is staking the token * @param _address - the address to check against * @param _tokenId - the tokenId to check against * @return bool whether the address is the staker of the token */ function isStaker(address _address, uint256 _tokenId) public view returns (bool) { } /************/ /* OWNER */ /************/ /** * @notice adds armory contract for interface use * @param _armoryContract - address of armory contract */ function addRaiderArmoryContract(address _armoryContract) external onlyOwner { } /** * @notice flips staking status */ function flipStakeStatus() external onlyOwner { } }
raider.ownerOf(id)==msg.sender,"Not yours"
357,455
raider.ownerOf(id)==msg.sender
"Not yours"
contract RaiderHunt is Ownable { // weapon score index to staking reward mapping uint256[18] public weaponStakingReward = [ 1157407407407 wei, // 0.1 per day 6944444444444 wei, // 0.6 per day 8101851851852 wei, // 0.7 per day 9259259259259 wei, // 0.8 per day 10416666666667 wei, // 0.9 per day 11574074074074 wei, // 1 per day 24305555555556 wei, // 2.1 per day 24305555555556 wei, // 2.2 per day 26620370370370 wei, // 2.3 per day 27777777777778 wei, // 2.4 per day 28935185185185 wei // 2.5 per day ]; // boolean to control staking bool public stakingLive = false; // mapping from tokenId to timestamp of staked mapping(uint256 => uint256) public tokenIdToTimeStaked; // mapping from staked tokenId to staker mapping(uint256 => address) public tokenIdToStaker; // mapping from staker to tokenIds staked mapping(address => uint256[]) public stakerToTokenIds; // raider interface IRaider private raider; // token interface IRaiderGold private rgo; // armory interface IRaiderArmory private armory; constructor(address _raiderGoldAddress, address _raiderAddress) { } /************/ /* INTERNAL */ /************/ /** * @notice drops an element from a storage array * @dev used for staked raider tokens. Expensive, so unstakeAll is preferred where possible * @param _array - the array to drop the element from * @param _id - the element to remove */ function dropIdFromArray(uint256[] storage _array, uint256 _id) private { } /************/ /* EXTERNAL */ /************/ /** * @notice stakes (multiple) tokens * @param _tokenIds - array of tokenId(s) to stake */ function stakeRaidersById(uint256[] memory _tokenIds) public { } /** * @notice unstakes all tokens of a staker */ function unstakeAll() public { } /** * @notice unstakes chosen token(s) of a staker * @param _tokenIds - tokenIds to unstake */ function unstakeRaidersById(uint256[] memory _tokenIds) public { uint256 rewards; require(stakerToTokenIds[msg.sender].length > 0, "Nothing staked"); require(_tokenIds.length > 0, "No tokens"); for (uint256 i = 0; i < _tokenIds.length; i++) { uint256 id = _tokenIds[i]; require(<FILL_ME>) raider.transferFrom(address(this), msg.sender, id); rewards += getRewardsByTokenId(id); dropIdFromArray(stakerToTokenIds[msg.sender], id); tokenIdToStaker[id] = address(0); } rgo.adminMint(msg.sender, rewards); } /** * @notice claims all accrued rewards across staked token(s) */ function claimAll() public { } /** * @notice fetches rewards acrued for tokenId * @param _tokenId - tokenId to fetch accrued rewards for * @return integer value of rewards accrued for token */ function getRewardsByTokenId(uint256 _tokenId) public view returns (uint256) { } /** * @notice fetches total rewards acrued for staker * @param _staker - address of staker to fetch total rewards for * @return integer value of rewards accrued for staker across tokens */ function getTotalRewardsAccrued(address _staker) public view returns (uint256) { } /** * @notice fetches the amount of tokens staked by staker * @param _staker - address of original staker * @return num of tokens staked by staker */ function getRaidersStakedCount(address _staker) public view returns (uint256) { } /** * @notice fetches the tokens staked by staker * @param _staker - address of original staker * @return tokens staked by staker */ function getRaidersStaked(address _staker) public view returns (uint256[] memory) { } /** * @notice returns whether the address is staking the token * @dev used e.g. in armory to check whether someone is staking the token * @param _address - the address to check against * @param _tokenId - the tokenId to check against * @return bool whether the address is the staker of the token */ function isStaker(address _address, uint256 _tokenId) public view returns (bool) { } /************/ /* OWNER */ /************/ /** * @notice adds armory contract for interface use * @param _armoryContract - address of armory contract */ function addRaiderArmoryContract(address _armoryContract) external onlyOwner { } /** * @notice flips staking status */ function flipStakeStatus() external onlyOwner { } }
tokenIdToStaker[id]==msg.sender,"Not yours"
357,455
tokenIdToStaker[id]==msg.sender
"Not yours"
contract RaiderHunt is Ownable { // weapon score index to staking reward mapping uint256[18] public weaponStakingReward = [ 1157407407407 wei, // 0.1 per day 6944444444444 wei, // 0.6 per day 8101851851852 wei, // 0.7 per day 9259259259259 wei, // 0.8 per day 10416666666667 wei, // 0.9 per day 11574074074074 wei, // 1 per day 24305555555556 wei, // 2.1 per day 24305555555556 wei, // 2.2 per day 26620370370370 wei, // 2.3 per day 27777777777778 wei, // 2.4 per day 28935185185185 wei // 2.5 per day ]; // boolean to control staking bool public stakingLive = false; // mapping from tokenId to timestamp of staked mapping(uint256 => uint256) public tokenIdToTimeStaked; // mapping from staked tokenId to staker mapping(uint256 => address) public tokenIdToStaker; // mapping from staker to tokenIds staked mapping(address => uint256[]) public stakerToTokenIds; // raider interface IRaider private raider; // token interface IRaiderGold private rgo; // armory interface IRaiderArmory private armory; constructor(address _raiderGoldAddress, address _raiderAddress) { } /************/ /* INTERNAL */ /************/ /** * @notice drops an element from a storage array * @dev used for staked raider tokens. Expensive, so unstakeAll is preferred where possible * @param _array - the array to drop the element from * @param _id - the element to remove */ function dropIdFromArray(uint256[] storage _array, uint256 _id) private { } /************/ /* EXTERNAL */ /************/ /** * @notice stakes (multiple) tokens * @param _tokenIds - array of tokenId(s) to stake */ function stakeRaidersById(uint256[] memory _tokenIds) public { } /** * @notice unstakes all tokens of a staker */ function unstakeAll() public { } /** * @notice unstakes chosen token(s) of a staker * @param _tokenIds - tokenIds to unstake */ function unstakeRaidersById(uint256[] memory _tokenIds) public { } /** * @notice claims all accrued rewards across staked token(s) */ function claimAll() public { } /** * @notice fetches rewards acrued for tokenId * @param _tokenId - tokenId to fetch accrued rewards for * @return integer value of rewards accrued for token */ function getRewardsByTokenId(uint256 _tokenId) public view returns (uint256) { require(<FILL_ME>) return ((block.timestamp - tokenIdToTimeStaked[_tokenId]) * weaponStakingReward[armory.getMaxWeaponScore(_tokenId)]); } /** * @notice fetches total rewards acrued for staker * @param _staker - address of staker to fetch total rewards for * @return integer value of rewards accrued for staker across tokens */ function getTotalRewardsAccrued(address _staker) public view returns (uint256) { } /** * @notice fetches the amount of tokens staked by staker * @param _staker - address of original staker * @return num of tokens staked by staker */ function getRaidersStakedCount(address _staker) public view returns (uint256) { } /** * @notice fetches the tokens staked by staker * @param _staker - address of original staker * @return tokens staked by staker */ function getRaidersStaked(address _staker) public view returns (uint256[] memory) { } /** * @notice returns whether the address is staking the token * @dev used e.g. in armory to check whether someone is staking the token * @param _address - the address to check against * @param _tokenId - the tokenId to check against * @return bool whether the address is the staker of the token */ function isStaker(address _address, uint256 _tokenId) public view returns (bool) { } /************/ /* OWNER */ /************/ /** * @notice adds armory contract for interface use * @param _armoryContract - address of armory contract */ function addRaiderArmoryContract(address _armoryContract) external onlyOwner { } /** * @notice flips staking status */ function flipStakeStatus() external onlyOwner { } }
tokenIdToStaker[_tokenId]!=address(0),"Not yours"
357,455
tokenIdToStaker[_tokenId]!=address(0)
"DESTINATION_ALREADY_CLAIMED"
//SPDX-License-Identifier: MIT pragma solidity 0.8.2; import "@openzeppelin/contracts-0.8/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts-0.8/token/ERC1155/IERC1155Receiver.sol"; import "./ClaimERC1155ERC721ERC20.sol"; import "../../common/BaseWithStorage/WithAdmin.sol"; /// @title MultiGiveaway contract. /// @notice This contract manages claims for multiple token types. contract MultiGiveaway is WithAdmin, ClaimERC1155ERC721ERC20 { /////////////////////////////// Data ////////////////////////////// bytes4 private constant ERC1155_RECEIVED = 0xf23a6e61; bytes4 private constant ERC1155_BATCH_RECEIVED = 0xbc197c81; bytes4 internal constant ERC721_RECEIVED = 0x150b7a02; bytes4 internal constant ERC721_BATCH_RECEIVED = 0x4b808c46; mapping(address => mapping(bytes32 => bool)) public claimed; mapping(bytes32 => uint256) internal _expiryTime; /////////////////////////////// Events ////////////////////////////// event NewGiveaway(bytes32 merkleRoot, uint256 expiryTime); /////////////////////////////// Constructor ///////////////////////// constructor(address admin) { } /////////////////////////////// Functions /////////////////////////// /// @notice Function to add a new giveaway. /// @param merkleRoot The merkle root hash of the claim data. /// @param expiryTime The expiry time for the giveaway. function addNewGiveaway(bytes32 merkleRoot, uint256 expiryTime) external onlyAdmin { } /// @notice Function to check which giveaways have been claimed by a particular user. /// @param user The user (intended token destination) address. /// @param rootHashes The array of giveaway root hashes to check. /// @return claimedGiveaways The array of bools confirming whether or not the giveaways relating to the root hashes provided have been claimed. function getClaimedStatus(address user, bytes32[] calldata rootHashes) external view returns (bool[] memory) { } /// @notice Function to permit the claiming of multiple tokens from multiple giveaways to a reserved address. /// @param claims The array of claim structs, each containing a destination address, the giveaway items to be claimed and an optional salt param. /// @param proofs The proofs submitted for verification. function claimMultipleTokensFromMultipleMerkleTree( bytes32[] calldata rootHashes, Claim[] memory claims, bytes32[][] calldata proofs ) external { } /// @dev Public function used to perform validity checks and progress to claim multiple token types in one claim. /// @param merkleRoot The merkle root hash for the specific set of items being claimed. /// @param claim The claim struct containing the destination address, all items to be claimed and optional salt param. /// @param proof The proof provided by the user performing the claim function. function claimMultipleTokens( bytes32 merkleRoot, Claim memory claim, bytes32[] calldata proof ) public { uint256 giveawayExpiryTime = _expiryTime[merkleRoot]; require(claim.to != address(0), "INVALID_TO_ZERO_ADDRESS"); require(claim.to != address(this), "DESTINATION_MULTIGIVEAWAY_CONTRACT"); require(giveawayExpiryTime != 0, "GIVEAWAY_DOES_NOT_EXIST"); require(block.timestamp < giveawayExpiryTime, "CLAIM_PERIOD_IS_OVER"); require(<FILL_ME>) claimed[claim.to][merkleRoot] = true; _claimERC1155ERC721ERC20(merkleRoot, claim, proof); } function onERC721Received( address, /*operator*/ address, /*from*/ uint256, /*id*/ bytes calldata /*data*/ ) external pure returns (bytes4) { } function onERC721BatchReceived( address, /*operator*/ address, /*from*/ uint256[] calldata, /*ids*/ bytes calldata /*data*/ ) external pure returns (bytes4) { } function onERC1155Received( address, /*operator*/ address, /*from*/ uint256, /*id*/ uint256, /*value*/ bytes calldata /*data*/ ) external pure returns (bytes4) { } function onERC1155BatchReceived( address, /*operator*/ address, /*from*/ uint256[] calldata, /*ids*/ uint256[] calldata, /*values*/ bytes calldata /*data*/ ) external pure returns (bytes4) { } }
claimed[claim.to][merkleRoot]==false,"DESTINATION_ALREADY_CLAIMED"
357,476
claimed[claim.to][merkleRoot]==false
"Sale: ERC20 payment failed"
@v6.0.0 pragma solidity 0.6.8; /** * @title FixedPricesSale * An AbstractSale which implements a fixed prices strategy. * The final implementer is responsible for implementing any additional pricing and/or delivery logic. */ contract FixedPricesSale is AbstractSale { /** * Constructor. * @dev Emits the `MagicValues` event. * @dev Emits the `Paused` event. * @param payoutWallet_ the payout wallet. * @param skusCapacity the cap for the number of managed SKUs. * @param tokensPerSkuCapacity the cap for the number of tokens managed per SKU. */ constructor( address payoutWallet_, uint256 skusCapacity, uint256 tokensPerSkuCapacity ) internal AbstractSale(payoutWallet_, skusCapacity, tokensPerSkuCapacity) {} /* Internal Life Cycle Functions */ /** * Lifecycle step which computes the purchase price. * @dev Responsibilities: * - Computes the pricing formula, including any discount logic and price conversion; * - Set the value of `purchase.totalPrice`; * - Add any relevant extra data related to pricing in `purchase.pricingData` and document how to interpret it. * @dev Reverts if `purchase.sku` does not exist. * @dev Reverts if `purchase.token` is not supported by the SKU. * @dev Reverts in case of price overflow. * @param purchase The purchase conditions. */ function _pricing(PurchaseData memory purchase) internal virtual override view { } /** * Lifecycle step which manages the transfer of funds from the purchaser. * @dev Responsibilities: * - Ensure the payment reaches destination in the expected output token; * - Handle any token swap logic; * - Add any relevant extra data related to payment in `purchase.paymentData` and document how to interpret it. * @dev Reverts in case of payment failure. * @param purchase The purchase conditions. */ function _payment(PurchaseData memory purchase) internal virtual override { if (purchase.token == TOKEN_ETH) { require(msg.value >= purchase.totalPrice, "Sale: insufficient ETH provided"); payoutWallet.transfer(purchase.totalPrice); uint256 change = msg.value.sub(purchase.totalPrice); if (change != 0) { purchase.purchaser.transfer(change); } } else { require(<FILL_ME>) } } /* Internal Utility Functions */ function _unitPrice(PurchaseData memory purchase, EnumMap.Map storage prices) internal virtual view returns (uint256 unitPrice) { } }
IERC20(purchase.token).transferFrom(_msgSender(),payoutWallet,purchase.totalPrice),"Sale: ERC20 payment failed"
357,479
IERC20(purchase.token).transferFrom(_msgSender(),payoutWallet,purchase.totalPrice)
null
/** Copyright (c) 2018 SmartTaylor Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. based on the contracts of OpenZeppelin: https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts **/ pragma solidity 0.4.18; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } /** * @title 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) { } } /** Copyright (c) 2018 SmartTaylor Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. based on the contracts of OpenZeppelin: https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts **/ /** @title TaylorToken **/ contract TaylorToken is Ownable{ using SafeMath for uint256; /** EVENTS **/ event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed _owner, uint256 _amount); /** CONTRACT VARIABLES **/ mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; //this address can transfer even when transfer is disabled. mapping (address => bool) public whitelistedTransfer; mapping (address => bool) public whitelistedBurn; string public name = "Taylor"; string public symbol = "TAY"; uint8 public decimals = 18; uint256 constant internal DECIMAL_CASES = 10**18; uint256 public totalSupply = 10**7 * DECIMAL_CASES; bool public transferable = false; /** MODIFIERS **/ modifier onlyWhenTransferable(){ } /** CONSTRUCTOR **/ /** @dev Constructor function executed on contract creation **/ function TaylorToken() Ownable() public { } /** OWNER ONLY FUNCTIONS **/ /** @dev Activates the trasfer for all users **/ function activateTransfers() public onlyOwner { } /** @dev Allows the owner to add addresse that can bypass the transfer lock. Eg: ICO contract, TGE contract. @param _address address Address to be added **/ function addWhitelistedTransfer(address _address) public onlyOwner { } /** @dev Sends all avaible TAY to the TGE contract to be properly distribute @param _tgeAddress address Address of the token distribution contract **/ function distribute(address _tgeAddress) public onlyOwner { } /** @dev Allows the owner to add addresse that can burn tokens Eg: ICO contract, TGE contract. @param _address address Address to be added **/ function addWhitelistedBurn(address _address) public onlyOwner { } /** PUBLIC FUNCTIONS **/ /** * @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 onlyWhenTransferable returns (bool success) { } /** * @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 onlyWhenTransferable returns (bool success) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. For security reasons, if one need to change the value from a existing allowance, it must furst sets it to zero and then sets the new value * @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 onlyWhenTransferable returns (bool success) { } /** * @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) { } /** @dev Allows for msg.sender to burn his on tokens @param _amount uint256 The amount of tokens to be burned **/ function burn(uint256 _amount) public returns (bool success) { require(<FILL_ME>) require(_amount <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_amount); totalSupply = totalSupply.sub(_amount); Burn(msg.sender, _amount); return true; } /** CONSTANT FUNCTIONS **/ /** * @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) view public returns (uint256 balance) { } /** * @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) view public returns (uint256 remaining) { } } /** Copyright (c) 2018 SmartTaylor Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. based on the contracts of OpenZeppelin: https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts **/ contract TaylorTokenTGE is Ownable { using SafeMath for uint256; uint256 constant internal DECIMAL_CASES = 10**18; TaylorToken public token; uint256 constant public FOUNDERS = 10**6 * DECIMAL_CASES; uint256 constant public ADVISORS = 4 * 10**5 * DECIMAL_CASES; uint256 constant public TEAM = 3 * 10**5 * DECIMAL_CASES; uint256 constant public REFERRAL_PROGRAMS = 7 * 10**5 * DECIMAL_CASES; uint256 constant public PRESALE = 1190476 * DECIMAL_CASES; uint256 constant public PUBLICSALE = 6409524 * DECIMAL_CASES; address public founders_address; address public advisors_address; address public team_address; address public referral_address; address public presale_address; address public publicsale_address; /** @dev Sets up alll the addresses needed for the token distribution @param _token address The address of the token that will be distributed @param _founders addresses The address that the founders share will be sent to @param _advisors addresses The address that the advisors share will be sent to @param _team addresses The address that the team share will be sent to @param _referral addresses The address that the referral share will be sent to @param _presale addresses The address that presale share will be sent to @param _publicSale addresses The address that the public sale **/ function setUp(address _token, address _founders, address _advisors, address _team, address _referral, address _presale, address _publicSale) public onlyOwner{ } /** @dev Distributes all the tokens belonging to this contract to it's defined destinationss **/ function distribute() public onlyOwner { } }
whitelistedBurn[msg.sender]
357,520
whitelistedBurn[msg.sender]
null
pragma solidity 0.4.24; library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint c) { } function mul(uint a, uint b) internal pure returns (uint c) { } function div(uint a, uint b) internal pure returns (uint c) { } } contract ERC20 { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } contract Extent { using SafeMath for uint; address public admin; //the admin address mapping(address => bool) private canClaimTokens; mapping(address => uint) public tokens; //mapping of token addresses to mapping of account balances (token=0 means Ether) mapping(address => uint) public claimableAmount; //mapping of token addresses to max amount to claim event Deposit(address token, address user, uint amount, uint balance); event Withdraw(address token, address user, uint amount, uint balance); modifier onlyAdmin() { } modifier onlyWhitelisted(address address_) { require(<FILL_ME>) _; } constructor(address admin_) public { } function() public payable { } function changeAdmin(address admin_) public onlyAdmin { } function addToWhitelist(address address_) public onlyAdmin { } function addToWhitelistBulk(address[] addresses_) public onlyAdmin { } function setAmountToClaim(address token, uint amount) public onlyAdmin { } function depositToken(address token, uint amount) public onlyAdmin { } function claimTokens(address token) public onlyWhitelisted(msg.sender) { } }
canClaimTokens[address_]
357,567
canClaimTokens[address_]
"sFNC is not enabled"
// SPDX-License-Identifier: MIT // Forked from Merit Circle pragma solidity 0.8.7; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Votes.sol"; import "@openzeppelin/contracts/utils/math/SafeCast.sol"; import "../interfaces/IBasePool.sol"; import "../interfaces/IFancyStakingPool.sol"; import "./AbstractRewards.sol"; import "../interfaces/IMintableBurnableERC20.sol"; abstract contract BasePool is ERC20Votes, AbstractRewards, IBasePool { using SafeERC20 for IMintableBurnableERC20; using SafeCast for uint256; using SafeCast for int256; address public liquidityMiningManager; IMintableBurnableERC20 public immutable depositToken; IFancyStakingPool public immutable escrowPool; uint256 public immutable escrowDuration; // escrow duration in seconds bool public sFNCEnabled; event RewardsClaimed( address indexed _from, address indexed _receiver, uint256 _escrowedAmount, uint256 _sFNCAmount ); constructor( string memory _name, string memory _symbol, address _depositToken, address _liquidityMiningManager, address _escrowPool, uint256 _escrowDuration ) ERC20Permit(_name) ERC20(_name, _symbol) AbstractRewards(balanceOf, totalSupply) { } function _mint(address _account, uint256 _amount) internal virtual override { } function _burn(address _account, uint256 _amount) internal virtual override { } function _transfer( address _from, address _to, uint256 _value ) internal virtual override { } function distributeRewards(uint256 _amount) external override { } function setSFNCClaiming(bool _sFNCEnabled) external override { } function claimRewards(address _receiver, bool useEscrowPool) external { require(<FILL_ME>) uint256 rewardAmount = _prepareCollect(_msgSender()); if (useEscrowPool) { escrowPool.deposit(rewardAmount, escrowDuration, _receiver); emit RewardsClaimed(_msgSender(), _receiver, rewardAmount, 0); } else { emit RewardsClaimed(_msgSender(), _receiver, 0, rewardAmount); } } }
useEscrowPool||sFNCEnabled,"sFNC is not enabled"
357,655
useEscrowPool||sFNCEnabled
null
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ require(<FILL_ME>) require(owner_slave_amount >= 1); require(!player_info[msg.sender].unmovable,"不可移動"); uint16 random = uint16((keccak256(abi.encodePacked(now, random_seed)))); random_seed.add(1); if(player_info[msg.sender].city == 0){ player_info[msg.sender].city = 1; } uint16 in_city = player_info[msg.sender].city; uint16 tot_domains = inquire_city_totdomains(in_city); uint16 go_domains_id = random % tot_domains; player_info[msg.sender].domain = go_domains_id; address city_address = owner_slave[in_city]; address domain_owner = ERC721_interface(city_address).ownerOf(go_domains_id); if (domain_owner != 0x0){ if(domain_owner == msg.sender){ player_info[msg.sender].build = true; } else{ player_info[msg.sender].unmovable = true; player_info[msg.sender].reward = false; } } emit RollDice(msg.sender, in_city, go_domains_id, player_info[msg.sender].unmovable); } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
!all_stop
357,678
!all_stop
"不可移動"
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ require(!all_stop); require(owner_slave_amount >= 1); require(<FILL_ME>) uint16 random = uint16((keccak256(abi.encodePacked(now, random_seed)))); random_seed.add(1); if(player_info[msg.sender].city == 0){ player_info[msg.sender].city = 1; } uint16 in_city = player_info[msg.sender].city; uint16 tot_domains = inquire_city_totdomains(in_city); uint16 go_domains_id = random % tot_domains; player_info[msg.sender].domain = go_domains_id; address city_address = owner_slave[in_city]; address domain_owner = ERC721_interface(city_address).ownerOf(go_domains_id); if (domain_owner != 0x0){ if(domain_owner == msg.sender){ player_info[msg.sender].build = true; } else{ player_info[msg.sender].unmovable = true; player_info[msg.sender].reward = false; } } emit RollDice(msg.sender, in_city, go_domains_id, player_info[msg.sender].unmovable); } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
!player_info[msg.sender].unmovable,"不可移動"
357,678
!player_info[msg.sender].unmovable
"不可移動"
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ require(!all_stop); require(owner_slave_amount >= 1); require(<FILL_ME>) uint16 random = uint16((keccak256(abi.encodePacked(now, random_seed)))); random_seed.add(1); uint16 tot_domains = inquire_city_totdomains(go_city); uint16 go_domains_id = random % tot_domains; player_info[_sender].city = go_city; player_info[_sender].domain = go_domains_id; address city_address = owner_slave[go_city]; address domain_owner = ERC721_interface(city_address).ownerOf(go_domains_id); if (domain_owner != 0x0){ if(domain_owner == _sender){ player_info[_sender].build = true; } else{ player_info[_sender].unmovable = true; player_info[msg.sender].reward = false; } } emit Change_city(_sender, go_city, go_domains_id, player_info[_sender].unmovable); } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
!player_info[_sender].unmovable,"不可移動"
357,678
!player_info[_sender].unmovable
null
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ require(!all_stop); require(<FILL_ME>) uint random = uint((keccak256(abi.encodePacked(now, random_seed)))); uint random2 = uint((keccak256(abi.encodePacked(random_seed, msg.sender)))); random_seed = random_seed.add(1); address _address = inquire_slave_address(player_info[msg.sender].city); if(player_info[msg.sender].unmovable == false){ (,uint8 _star) = slave(_address).inquire_domain_level_star(player_info[msg.sender].domain); if(_star <= 1){ _star = 1; } probability = probability.div(2**(uint(_star)-1)); uint8[] memory buildings = slave(_address).inquire_tot_domain_building(player_info[msg.sender].domain); for(uint8 i=0;i< buildings.length;i++){ if(buildings[i] == 8 ){ probability = probability.div(10).mul(9); break; } } } uint lotto_number = random % probability; uint player_number = random2 % probability; probability = 1000000; if(lotto_number == player_number){ msg.sender.transfer(address(this).balance.div(10)); } player_info[msg.sender].lotto = false; emit PlayLotto(msg.sender, player_number, lotto_number); } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
player_info[msg.sender].lotto
357,678
player_info[msg.sender].lotto
"檢查不可移動"
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ require(!all_stop); require(<FILL_ME>) uint16 city = player_info[msg.sender].city; uint16 domains_id = player_info[msg.sender].domain; address city_address = owner_slave[city]; address domain_owner = ERC721_interface(city_address).ownerOf(domains_id); if (domain_owner == 0x0){ revert("不用付手續費"); } (uint8 _level,uint8 _star) = slave(city_address).inquire_domain_level_star(domains_id); uint _payRoadETH_amount = payRoadETH_amount(_level, _star); require(msg.value == _payRoadETH_amount); player_info[msg.sender].unmovable = false; uint payRent_ETH_50toOwner = msg.value.div(10).mul(5); uint payRent_ETH_10toTeam = msg.value.div(10); uint payRent_ETH_20toCity = msg.value.div(10).mul(2); uint payRent_ETH_20toPool = msg.value.div(10).mul(2); uint pay = payRent_ETH_50toOwner + payRent_ETH_10toTeam + payRent_ETH_20toCity + payRent_ETH_20toPool; require(msg.value == pay); domain_owner.transfer(payRent_ETH_50toOwner); manager.transfer(payRent_ETH_10toTeam); city_address.transfer(payRent_ETH_20toCity); player_info[msg.sender].lotto = true; player_info[msg.sender].reward = true; emit PayEth(msg.sender, msg.value, city, domains_id); } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
player_info[msg.sender].unmovable,"檢查不可移動"
357,678
player_info[msg.sender].unmovable
"檢查不可移動"
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ require(!all_stop); require(<FILL_ME>) uint16 city = player_info[_sender].city; uint16 domains_id = player_info[_sender].domain; address city_address = owner_slave[city]; address domain_owner = ERC721_interface(city_address).ownerOf(domains_id); if(domain_owner == 0x0){ revert("空地不用付手續費"); } (uint8 _level,uint8 _star) = slave(city_address).inquire_domain_level_star(domains_id); uint _payARINA_amount = payARINA_amount(_level, _star); require(_value == _payARINA_amount,"金額不對"); ERC20_interface arina = ERC20_interface(arina_contract); require(arina.transferFrom(_sender, domain_owner, _value),"交易失敗"); player_info[_sender].unmovable = false; player_info[_sender].reward = true; emit PayArina(_sender, _value, city, domains_id); } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
player_info[_sender].unmovable,"檢查不可移動"
357,678
player_info[_sender].unmovable
"交易失敗"
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ require(!all_stop); require(player_info[_sender].unmovable,"檢查不可移動"); uint16 city = player_info[_sender].city; uint16 domains_id = player_info[_sender].domain; address city_address = owner_slave[city]; address domain_owner = ERC721_interface(city_address).ownerOf(domains_id); if(domain_owner == 0x0){ revert("空地不用付手續費"); } (uint8 _level,uint8 _star) = slave(city_address).inquire_domain_level_star(domains_id); uint _payARINA_amount = payARINA_amount(_level, _star); require(_value == _payARINA_amount,"金額不對"); ERC20_interface arina = ERC20_interface(arina_contract); require(<FILL_ME>) player_info[_sender].unmovable = false; player_info[_sender].reward = true; emit PayArina(_sender, _value, city, domains_id); } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
arina.transferFrom(_sender,domain_owner,_value),"交易失敗"
357,678
arina.transferFrom(_sender,domain_owner,_value)
null
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ require(!all_stop); uint16 city = player_info[_sender].city; uint16 domains_id = player_info[_sender].domain; address city_address = owner_slave[city]; address domain_owner = ERC721_interface(city_address).ownerOf(domains_id); if(domain_owner != 0x0){ revert("空地才能用Arina買"); } uint _buyLandARINA_amount = buyLandARINA_amount(); require(_value == _buyLandARINA_amount,"金額不對"); ERC20_interface arina = ERC20_interface(arina_contract); require(<FILL_ME>) slave(city_address).transfer_master(_sender, domains_id); trade(trade_address).set_city_pool(_value,city); player_info[_sender].unmovable = false; emit BuyArina(_sender, _value, city, domains_id); } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
arina.transferFrom(_sender,trade_address,_value)
357,678
arina.transferFrom(_sender,trade_address,_value)
"不能建設"
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { require(!all_stop); require(<FILL_ME>) uint16 city = player_info[_sender].city; uint16 domains_id = player_info[_sender].domain; address city_address = owner_slave[city]; address domain_owner = ERC721_interface(city_address).ownerOf(domains_id); require(_sender == domain_owner,"擁有者不是自己"); slave(city_address).domain_build(domains_id, _building); player_info[_sender].build = false; emit Build(_sender, _building,_arina); } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
player_info[_sender].build==true,"不能建設"
357,678
player_info[_sender].build==true
null
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ require(!all_stop); if(inquire_owner(_city,_domains_id) != msg.sender){ require(!player_info[msg.sender].unmovable,"不可移動"); require(_city == player_info[msg.sender].city && _domains_id == player_info[msg.sender].domain); require(<FILL_ME>) player_info[msg.sender].reward = false; } address city_address = owner_slave[_city]; slave(city_address).domain_reward(_class, msg.sender, _domains_id); } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
player_info[msg.sender].reward==true
357,678
player_info[msg.sender].reward==true
null
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ require(msg.value == 0.1 ether); require(<FILL_ME>) require(msg.sender == _owner); bytes32 bytes_old_name = addressToName[msg.sender]; member[bytes_old_name] = 0x0; if(keccak256(abi.encodePacked(new_name)) == keccak256(abi.encodePacked(""))) { revert(); } bytes32 bytes_new_name = stringToBytes32(new_name); member[bytes_new_name] = msg.sender; addressToName[msg.sender] = bytes_new_name; emit set_name(msg.sender,msg.value); } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
addressToName[msg.sender].length!=0
357,678
addressToName[msg.sender].length!=0
"交易失敗"
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ require(_tokenContract == arina_contract); bytes1 action = _extraData[0]; if (action == 0x0){ _payRent_ARINA(_sender, _value); } else if(action == 0x1){ _buyLand_ARINA(_sender, _value); } else if(action == 0x2){ require(_value == 100*10**8); uint16 _city = uint16(_extraData[1]); address[] memory checkPlayer; checkPlayer = checkBuildingPlayer(player_info[_sender].city,17); if(checkPlayer.length != 0){ for(uint8 i=0;i<checkPlayer.length;i++){ require(<FILL_ME>) } }else{ require(ERC20_interface(arina_contract).transferFrom(_sender, trade_address, _value),"交易失敗"); trade(trade_address).set_city_pool(_value,player_info[_sender].city); } change_city(_sender, _city); } else if(action == 0x3){ uint8 _building = uint8(_extraData[1]); uint build_value = inquire_type_price(_building); require(_value == build_value,"金額不對"); require(ERC20_interface(arina_contract).transferFrom(_sender, trade_address, _value),"交易失敗"); trade(trade_address).set_city_pool(_value,player_info[_sender].city); _build(_sender, _building,_value); } else{revert();} } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
ERC20_interface(arina_contract).transferFrom(_sender,checkPlayer[i],_value.div(checkPlayer.length)),"交易失敗"
357,678
ERC20_interface(arina_contract).transferFrom(_sender,checkPlayer[i],_value.div(checkPlayer.length))
"交易失敗"
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ require(_tokenContract == arina_contract); bytes1 action = _extraData[0]; if (action == 0x0){ _payRent_ARINA(_sender, _value); } else if(action == 0x1){ _buyLand_ARINA(_sender, _value); } else if(action == 0x2){ require(_value == 100*10**8); uint16 _city = uint16(_extraData[1]); address[] memory checkPlayer; checkPlayer = checkBuildingPlayer(player_info[_sender].city,17); if(checkPlayer.length != 0){ for(uint8 i=0;i<checkPlayer.length;i++){ require(ERC20_interface(arina_contract).transferFrom(_sender, checkPlayer[i], _value.div(checkPlayer.length)),"交易失敗"); } }else{ require(<FILL_ME>) trade(trade_address).set_city_pool(_value,player_info[_sender].city); } change_city(_sender, _city); } else if(action == 0x3){ uint8 _building = uint8(_extraData[1]); uint build_value = inquire_type_price(_building); require(_value == build_value,"金額不對"); require(ERC20_interface(arina_contract).transferFrom(_sender, trade_address, _value),"交易失敗"); trade(trade_address).set_city_pool(_value,player_info[_sender].city); _build(_sender, _building,_value); } else{revert();} } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
ERC20_interface(arina_contract).transferFrom(_sender,trade_address,_value),"交易失敗"
357,678
ERC20_interface(arina_contract).transferFrom(_sender,trade_address,_value)
null
pragma solidity ^0.4.25; library SafeMath{ function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } } library SafeMath16{ function add(uint16 a, uint16 b) internal pure returns (uint16) { } function sub(uint16 a, uint16 b) internal pure returns (uint16) { } function mul(uint16 a, uint16 b) internal pure returns (uint16) { } function div(uint16 a, uint16 b) internal pure returns (uint16) { } } contract owned { address public manager; constructor() public{ } modifier onlymanager{ } function transferownership(address _new_manager) public onlymanager { } } contract byt_str { function stringToBytes32(string memory source) pure public returns (bytes32 result) { } function bytes32ToString(bytes32 x) pure public returns (string) { } } interface ERC20_interface { function decimals() external view returns(uint8); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns(bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success) ; } interface ERC721_interface{ function balanceOf(address _owner) external view returns (uint256); function ownerOf(uint256 _tokenId) external view returns (address); function safeTransferFrom(address _from, address _to, uint256 _tokenId, bytes data) external payable; function safeTransferFrom(address _from, address _to, uint256 _tokenId) external payable; function transferFrom(address _from, address _to, uint256 _tokenId) external payable; function approve(address _approved, uint256 _tokenId) external payable; function setApprovalForAll(address _operator, bool _approved) external; function getApproved(uint256 _tokenId) external view returns (address); function isApprovedForAll(address _owner, address _operator) external view returns (bool); } interface slave{ function master_address() external view returns(address); function transferMayorship(address new_mayor) external; function city_number() external view returns(uint16); function area_number() external view returns(uint8); function inquire_totdomains_amount() external view returns(uint16); function inquire_domain_level_star(uint16 _id) external view returns(uint8, uint8); function inquire_domain_building(uint16 _id, uint8 _index) external view returns(uint8); function inquire_tot_domain_attribute(uint16 _id) external view returns(uint8[5]); function inquire_domain_cooltime(uint16 _id) external view returns(uint); function inquire_mayor_cooltime() external view returns(uint); function inquire_tot_domain_building(uint16 _id) external view returns(uint8[]); function inquire_own_domain(address _sender) external view returns(uint16[]); function inquire_land_info(uint16 _city, uint16 _id) external view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8); function inquire_building_limit(uint8 _building) external view returns(uint8); function domain_build(uint16 _id, uint8 _building) external; function reconstruction(uint16 _id, uint8 _index, uint8 _building)external; function set_domian_attribute(uint16 _id, uint8 _index) external; function domain_all_reward(uint8 _class, address _user) external; function mayor_reward(address _user) external; function inquire_mayor_address() external view returns(address); function domain_reward(uint8 _class, address _user, uint16 _id) external; function transfer_master(address _to, uint16 _id) external; function retrieve_domain(address _user, uint _id) external; function at_Area() external view returns(string); function set_domain_cooltime(uint _cooltime) external; } interface trade{ function set_city_pool(uint _arina, uint16 _city )external; function inquire_pool(uint16 _city) external view returns(uint); function exchange_arina(uint _arina, uint16 _city, address _target) external; } contract master is owned, byt_str { using SafeMath for uint; using SafeMath16 for uint16; address arina_contract = 0xe6987cd613dfda0995a95b3e6acbabececd41376; address GIC_contract = 0x340e85491c5f581360811d0ce5cc7476c72900ba; address trade_address; address mix_address; uint16 public owner_slave_amount = 0; uint random_seed; uint public probability = 1000000; bool public all_stop = false; struct _info{ uint16 city; uint16 domain; bool unmovable; bool lotto; bool build; bool reward; } address[] public owner_slave; mapping (uint8 => string) public area; mapping (uint8 => string) public building_type; mapping (uint8 => uint) public building_price; mapping(address => _info) public player_info; mapping(bytes32 => address) public member; mapping(address => bytes32) public addressToName; event set_name(address indexed player, uint value); event FirstSign(address indexed player,uint time); event RollDice(address indexed player, uint16 city, uint16 id, bool unmovable); event Change_city(address indexed player, uint16 city, uint16 id, bool unmovable); event Fly(address indexed player, uint16 city, uint16 id, bool unmovable); event PlayLotto(address indexed player,uint player_number, uint lotto_number); event PayArina(address indexed player, uint value, uint16 city, uint16 id); event BuyArina(address indexed player, uint value, uint16 city, uint16 id); event PayEth(address indexed player, uint value, uint16 city, uint16 id); event BuyEth(address indexed player, uint value, uint16 city, uint16 id); event Build(address indexed player, uint8 building, uint value); event Reconstruction(address indexed player, uint8 building, uint value); function register(string _name) public{ } function() public payable{} function rollDice() external{ } function change_city(address _sender, uint16 go_city) private{ } function fly(uint16 _city, uint16 _domain) public payable{ } function playLotto() external{ } function payRoadETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandETH_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function payARINA_amount(uint8 _level, uint8 _star) public pure returns(uint){ } function buyLandARINA_amount() public pure returns(uint){ } function payRent_ETH() external payable{ } function buyLand_ETH() external payable{ } function _payRent_ARINA(address _sender, uint _value) private{ } function _buyLand_ARINA(address _sender, uint _value) private{ } function _build(address _sender, uint8 _building,uint _arina) private { } function reconstruction(uint8 _index, uint8 _building)public payable{ } function domain_attribute(uint16 _city,uint16 _id, uint8 _index) public{ } function reward(uint8 _class, uint16 _city, uint16 _domains_id) public{ } function all_reward(uint8 _class,uint16 _city) public{ } function mayor_all_reward(uint16 _city) public{ } function set_member_name(address _owner, string new_name) payable public{ } function exchange(uint16 _city,uint _value) payable public{ } function checkBuildingPlayer(uint16 _city,uint8 building) public view returns(address[] ){ } function inquire_owner(uint16 _city, uint16 _domain) public view returns(address){ } function inquire_have_owner(uint16 _city, uint16 _domain) public view returns(bool){ } function inquire_domain_level_star(uint16 _city, uint16 _domain) public view returns(uint8, uint8){ } function inquire_slave_address(uint16 _slave) public view returns(address){ } function inquire_city_totdomains(uint16 _index) public view returns(uint16){ } function inquire_location(address _address) public view returns(uint16, uint16){ } function inquire_status(address _address) public view returns(bool, bool, bool){ } function inquire_type(uint8 _typeid) public view returns(string){ } function inquire_type_price(uint8 _typeid) public view returns(uint){ } function inquire_building(uint16 _slave, uint16 _domain, uint8 _index) public view returns(uint8){ } function inquire_building_amount(uint16 _slave,uint8 _building) public view returns(uint8){ } function inquire_tot_attribute(uint16 _slave, uint16 _domain) public view returns(uint8[5]){ } function inquire_cooltime(uint16 _slave, uint16 _domain) public view returns(uint){ } function inquire_tot_building(uint16 _slave, uint16 _domain) public view returns(uint8[]){ } function inquire_own_domain(uint16 _city) public view returns(uint16[]){ } function inquire_land_info(uint16 _city, uint16 _id) public view returns(uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8,uint8){ } function inquire_GIClevel(address _address) view public returns(uint8 _level){ } function receiveApproval(address _sender, uint256 _value, address _tokenContract, bytes _extraData) public{ } function set_all_stop(bool _stop) public onlymanager{ } function withdraw_all_ETH() public onlymanager{ } function withdraw_all_arina() public onlymanager{ } function withdraw_ETH(uint _eth_wei) public onlymanager{ } function withdraw_arina(uint _arina) public onlymanager{ } function set_arina_address(address _arina_address) public onlymanager{ } function set_slave_mayor(uint16 _index, address newMayor_address) public onlymanager{ } function push_slave_address(address _address) external onlymanager{ require(<FILL_ME>) owner_slave.push(_address); owner_slave_amount = owner_slave_amount.add(1); } function change_slave_address(uint16 _index, address _address) external onlymanager{ } function set_building_type(uint8 _type, string _name) public onlymanager{ } function set_type_price(uint8 _type, uint _price) public onlymanager{ } function set_trade_address(address _trade_address) public onlymanager{ } function set_mix_address(address _mix_address) public onlymanager{ } function set_cooltime(uint16 _index, uint _cooltime) public onlymanager{ } constructor() public{ } }
slave(_address).master_address()==address(this)
357,678
slave(_address).master_address()==address(this)
"AUTHORIZED_ADDRESS_MISMATCH"
/* Copyright 2018 ZeroEx Intl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.4.24; contract MixinAuthorizable is Ownable, MAuthorizable { /// @dev Only authorized addresses can invoke functions with this modifier. modifier onlyAuthorized { } mapping (address => bool) public authorized; address[] public authorities; /// @dev Authorizes an address. /// @param target Address to authorize. function addAuthorizedAddress(address target) external onlyOwner { } /// @dev Removes authorizion of an address. /// @param target Address to remove authorization from. function removeAuthorizedAddress(address target) external onlyOwner { } /// @dev Removes authorizion of an address. /// @param target Address to remove authorization from. /// @param index Index of target in authorities array. function removeAuthorizedAddressAtIndex( address target, uint256 index ) external onlyOwner { require( authorized[target], "TARGET_NOT_AUTHORIZED" ); require( index < authorities.length, "INDEX_OUT_OF_BOUNDS" ); require(<FILL_ME>) delete authorized[target]; authorities[index] = authorities[authorities.length - 1]; authorities.length -= 1; emit AuthorizedAddressRemoved(target, msg.sender); } /// @dev Gets all authorized addresses. /// @return Array of authorized addresses. function getAuthorizedAddresses() external view returns (address[] memory) { } }
authorities[index]==target,"AUTHORIZED_ADDRESS_MISMATCH"
357,690
authorities[index]==target
"Exceeds max per wallet"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; interface ERC721Tradable { function mintTo(address _to, uint256 _quantity) external; function setHiddenMetadataUri(string memory _hiddenMetadataUri) external; function setUriPrefix(string memory _uriPrefix) external; function transferOwnership(address _to) external; } interface IMintPass { function whitelisted(address _address) external view returns (bool); } contract Minter is Ownable { uint256 public availableSupply = 6337; uint256 public constant WL_PRICE = 0.15 ether; uint256 public constant PUBLIC_PRICE = 0.17 ether; uint256 public constant MAX_PER_TX = 5; uint256 public MAX_PER_WALLET = 5; bool public mintEnded = false; bool public mintPaused = true; bool public whitelistedOnly = true; mapping(address => uint256) public mintedSale; mapping(address => bool) public whitelisted; address public immutable erc721; constructor(address _erc721) { } /** * @dev Mint N amount of ERC721 tokens */ function mint(uint256 _quantity) public payable { require(_quantity > 0, "Mint atleast 1 token"); require(_quantity <= MAX_PER_TX, "Exceeds max per transaction"); require(mintPaused == false, "Minting is currently paused"); require(mintEnded == false, "Minting has ended"); if (whitelistedOnly == true) { require(whitelisted[msg.sender] == true, "Address not whitelisted"); require(<FILL_ME>) require(msg.value >= WL_PRICE * _quantity, "Insufficient funds"); } else { require( mintedSale[msg.sender] + _quantity <= MAX_PER_WALLET, "Exceeds max per wallet" ); require( msg.value >= PUBLIC_PRICE * _quantity, "Insufficient funds" ); } mintedSale[msg.sender] += _quantity; ERC721Tradable(erc721).mintTo(msg.sender, _quantity); } /** * @dev Withdraw ether to multisig safe */ function withdraw() external onlyOwner { } /** * ------------ CONFIGURATION ------------ */ /** * @dev Sets the addresses that are allowed to mint during wl-only */ function setWhitelisted(address[] memory _addresses, bool _state) external onlyOwner { } /** * @dev Close sale permanently */ function endMint() external onlyOwner { } /** * @dev Pause/unpause sale */ function setPaused(bool _state) external onlyOwner { } /** * @dev Set state to wl-only sale */ function setWhitelistedOnly(bool _state) external onlyOwner { } /** * @dev Recovers the ERC721 token */ function recoverERC721Ownership() external onlyOwner { } /** * @dev Sets the amount of ERC721 can be purchased per wallet */ function setMaxPerWallet(uint256 _maxPerWallet) external onlyOwner { } }
mintedSale[msg.sender]+_quantity<=MAX_PER_WALLET,"Exceeds max per wallet"
357,738
mintedSale[msg.sender]+_quantity<=MAX_PER_WALLET
"Altcoin transfer failed"
pragma solidity = 0.5.16; contract AltcoinsPurchaseProxy is Ownable { using SafeMath for uint256; event PurchasedViaProxy ( address indexed owner, address operator, uint256 indexed lotId, uint256 indexed quantity, uint256 pricePaid, address tokenAddress, address referrer ); struct PurchaseForVars { uint256 altcoinConversionRate; uint256 altcoinPrice; uint256 altcoinPriceWithoutDiscount; uint256 stablecoinConversionRate; uint256 stablecoinPrice; uint256 stablecoinPriceWithoutDiscount; } uint256 private constant PERCENT_PRECISION = 10000; uint256 private constant MULTI_PURCHASE_DISCOUNT_STEP = 5; FixedSupplyCratesSale _saleContract; mapping (address => uint256) public _stableCoinRates; constructor(FixedSupplyCratesSale saleContract) public { } function addAltcoin(address altcoinAddress, uint256 stableCoinRate) external onlyOwner { } function purchaseFor( address payable destination, uint256 lotId, ERC20Capped altcoinAddress, uint256 quantity, uint256 maxTokenAmount, uint256 minConversionRate, address payable referrer ) external { PurchaseForVars memory vars; ( vars.altcoinConversionRate, vars.altcoinPrice, vars.altcoinPriceWithoutDiscount ) = getPrice(lotId, quantity, ERC20(address(altcoinAddress)), destination); require(vars.altcoinConversionRate != 0, "Altcoin not supported"); require(minConversionRate >= vars.altcoinConversionRate, "Min rate too low"); //TODO check it's correct require(vars.altcoinPrice <= maxTokenAmount, "Price above max token amount"); ( vars.stablecoinConversionRate, vars.stablecoinPrice, vars.stablecoinPriceWithoutDiscount ) = getPrice(lotId, quantity, _saleContract._stableCoinAddress(), destination); require(<FILL_ME>) require(ERC20(address(_saleContract._stableCoinAddress())).approve(address(_saleContract), vars.stablecoinPrice), "Approval failed"); _saleContract.purchaseFor( destination, lotId, ERC20Capped(address(_saleContract._stableCoinAddress())), quantity, vars.stablecoinPrice, vars.stablecoinConversionRate, referrer ); emit PurchasedViaProxy( destination, msg.sender, lotId, quantity, vars.altcoinPrice, address(altcoinAddress), referrer ); } function getPrice( uint256 lotId, uint256 quantity, ERC20 tokenAddress, address destination ) public view returns ( uint256 minConversionRate, uint256 lotPrice, uint256 lotPriceWithoutDiscount ) { } function ceilingDiv(uint256 a, uint256 b) internal pure returns (uint256 c) { } function _nthPurchaseDiscount(uint lotPrice, uint quantity, uint cratesPurchased) private view returns(uint) { } function _getPriceWithDiscounts(uint256 lotPrice, uint quantity, uint cratesPurchased) private view returns(uint price, uint discount) { } function _fixTokenDecimals( ERC20 _src, ERC20 _dest, uint256 _unfixedDestAmount, bool _ceiling ) internal view returns (uint256 _destTokenAmount) { } function balance() external view returns(uint256) { } function withdraw(address to, uint256 quantity) external onlyOwner { } }
altcoinAddress.transferFrom(msg.sender,_saleContract._payoutWallet(),vars.altcoinPrice),"Altcoin transfer failed"
357,873
altcoinAddress.transferFrom(msg.sender,_saleContract._payoutWallet(),vars.altcoinPrice)
"Approval failed"
pragma solidity = 0.5.16; contract AltcoinsPurchaseProxy is Ownable { using SafeMath for uint256; event PurchasedViaProxy ( address indexed owner, address operator, uint256 indexed lotId, uint256 indexed quantity, uint256 pricePaid, address tokenAddress, address referrer ); struct PurchaseForVars { uint256 altcoinConversionRate; uint256 altcoinPrice; uint256 altcoinPriceWithoutDiscount; uint256 stablecoinConversionRate; uint256 stablecoinPrice; uint256 stablecoinPriceWithoutDiscount; } uint256 private constant PERCENT_PRECISION = 10000; uint256 private constant MULTI_PURCHASE_DISCOUNT_STEP = 5; FixedSupplyCratesSale _saleContract; mapping (address => uint256) public _stableCoinRates; constructor(FixedSupplyCratesSale saleContract) public { } function addAltcoin(address altcoinAddress, uint256 stableCoinRate) external onlyOwner { } function purchaseFor( address payable destination, uint256 lotId, ERC20Capped altcoinAddress, uint256 quantity, uint256 maxTokenAmount, uint256 minConversionRate, address payable referrer ) external { PurchaseForVars memory vars; ( vars.altcoinConversionRate, vars.altcoinPrice, vars.altcoinPriceWithoutDiscount ) = getPrice(lotId, quantity, ERC20(address(altcoinAddress)), destination); require(vars.altcoinConversionRate != 0, "Altcoin not supported"); require(minConversionRate >= vars.altcoinConversionRate, "Min rate too low"); //TODO check it's correct require(vars.altcoinPrice <= maxTokenAmount, "Price above max token amount"); ( vars.stablecoinConversionRate, vars.stablecoinPrice, vars.stablecoinPriceWithoutDiscount ) = getPrice(lotId, quantity, _saleContract._stableCoinAddress(), destination); require(altcoinAddress.transferFrom(msg.sender, _saleContract._payoutWallet(), vars.altcoinPrice), "Altcoin transfer failed"); require(<FILL_ME>) _saleContract.purchaseFor( destination, lotId, ERC20Capped(address(_saleContract._stableCoinAddress())), quantity, vars.stablecoinPrice, vars.stablecoinConversionRate, referrer ); emit PurchasedViaProxy( destination, msg.sender, lotId, quantity, vars.altcoinPrice, address(altcoinAddress), referrer ); } function getPrice( uint256 lotId, uint256 quantity, ERC20 tokenAddress, address destination ) public view returns ( uint256 minConversionRate, uint256 lotPrice, uint256 lotPriceWithoutDiscount ) { } function ceilingDiv(uint256 a, uint256 b) internal pure returns (uint256 c) { } function _nthPurchaseDiscount(uint lotPrice, uint quantity, uint cratesPurchased) private view returns(uint) { } function _getPriceWithDiscounts(uint256 lotPrice, uint quantity, uint cratesPurchased) private view returns(uint price, uint discount) { } function _fixTokenDecimals( ERC20 _src, ERC20 _dest, uint256 _unfixedDestAmount, bool _ceiling ) internal view returns (uint256 _destTokenAmount) { } function balance() external view returns(uint256) { } function withdraw(address to, uint256 quantity) external onlyOwner { } }
ERC20(address(_saleContract._stableCoinAddress())).approve(address(_saleContract),vars.stablecoinPrice),"Approval failed"
357,873
ERC20(address(_saleContract._stableCoinAddress())).approve(address(_saleContract),vars.stablecoinPrice)
null
pragma solidity = 0.5.16; contract AltcoinsPurchaseProxy is Ownable { using SafeMath for uint256; event PurchasedViaProxy ( address indexed owner, address operator, uint256 indexed lotId, uint256 indexed quantity, uint256 pricePaid, address tokenAddress, address referrer ); struct PurchaseForVars { uint256 altcoinConversionRate; uint256 altcoinPrice; uint256 altcoinPriceWithoutDiscount; uint256 stablecoinConversionRate; uint256 stablecoinPrice; uint256 stablecoinPriceWithoutDiscount; } uint256 private constant PERCENT_PRECISION = 10000; uint256 private constant MULTI_PURCHASE_DISCOUNT_STEP = 5; FixedSupplyCratesSale _saleContract; mapping (address => uint256) public _stableCoinRates; constructor(FixedSupplyCratesSale saleContract) public { } function addAltcoin(address altcoinAddress, uint256 stableCoinRate) external onlyOwner { } function purchaseFor( address payable destination, uint256 lotId, ERC20Capped altcoinAddress, uint256 quantity, uint256 maxTokenAmount, uint256 minConversionRate, address payable referrer ) external { } function getPrice( uint256 lotId, uint256 quantity, ERC20 tokenAddress, address destination ) public view returns ( uint256 minConversionRate, uint256 lotPrice, uint256 lotPriceWithoutDiscount ) { } function ceilingDiv(uint256 a, uint256 b) internal pure returns (uint256 c) { } function _nthPurchaseDiscount(uint lotPrice, uint quantity, uint cratesPurchased) private view returns(uint) { } function _getPriceWithDiscounts(uint256 lotPrice, uint quantity, uint cratesPurchased) private view returns(uint price, uint discount) { } function _fixTokenDecimals( ERC20 _src, ERC20 _dest, uint256 _unfixedDestAmount, bool _ceiling ) internal view returns (uint256 _destTokenAmount) { } function balance() external view returns(uint256) { } function withdraw(address to, uint256 quantity) external onlyOwner { if (quantity == 0) { // Withdraw all quantity = ERC20(_saleContract._stableCoinAddress()).balanceOf(address(this)); } require(<FILL_ME>) } }
ERC20(_saleContract._stableCoinAddress()).transfer(to,quantity)
357,873
ERC20(_saleContract._stableCoinAddress()).transfer(to,quantity)
null
/** * Crowdsale for m+plus coin phase 1 * * Based on OpenZeppelin framework. * https://openzeppelin.org **/ pragma solidity ^0.4.18; /** * Safe Math library from OpenZeppelin framework * https://openzeppelin.org * * @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) { } } // ERC20 interface contract ERC20 { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); 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); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Crowdsale for m+plus coin phase 1 */ contract MplusCrowdsaleA { using SafeMath for uint256; // Number of stages uint256 internal constant NUM_STAGES = 4; // 02/20/2018 - 03/16/2018 uint256 internal constant ICO_START1 = 1519056000; // 03/17/2018 - 04/01/2018 uint256 internal constant ICO_START2 = 1521216000; // 04/02/2018 - 04/16/2018 uint256 internal constant ICO_START3 = 1522598400; // 04/17/2018 - 05/01/2018 uint256 internal constant ICO_START4 = 1523894400; // 05/01/2018 uint256 internal constant ICO_END = 1525190399; // Exchange rate for each term periods uint256 internal constant ICO_RATE1 = 20000; uint256 internal constant ICO_RATE2 = 18000; uint256 internal constant ICO_RATE3 = 17000; uint256 internal constant ICO_RATE4 = 16000; // Funding goal and soft cap in Token //uint256 internal constant HARD_CAP = 2000000000 * (10 ** 18); // Cap for each term periods in ETH // Exchange rate for each term periods uint256 internal constant ICO_CAP1 = 14000 * (10 ** 18); uint256 internal constant ICO_CAP2 = 21000 * (10 ** 18); uint256 internal constant ICO_CAP3 = 28000 * (10 ** 18); uint256 internal constant ICO_CAP4 = 35000 * (10 ** 18); // Caps per a purchase uint256 internal constant MIN_CAP = (10 ** 17); uint256 internal constant MAX_CAP = 1000 * (10 ** 18); // Owner of this contract address internal owner; // The token being sold ERC20 public tokenReward; // Tokens will be transfered from this address address internal tokenOwner; // Address where funds are collected address internal wallet; // Stage of ICO uint256 public stage = 0; // Amount of tokens sold uint256 public tokensSold = 0; // Amount of raised money in wei uint256 public weiRaised = 0; // Event for token purchase logging event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); event IcoStageStarted(uint256 stage); event IcoEnded(); /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } function MplusCrowdsaleA(address _tokenAddress, address _wallet) public { } // Fallback function can be used to buy tokens function () external payable { } // Low level token purchase function function buyTokens(address _beneficiary) public payable { require(_beneficiary != address(0)); require(msg.value >= MIN_CAP); require(msg.value <= MAX_CAP); require(now >= ICO_START1); require(now <= ICO_END); require(stage <= NUM_STAGES); determineCurrentStage(); uint256 weiAmount = msg.value; // calculate token amount to be created uint256 tokens = getTokenAmount(weiAmount); require(tokens > 0); // Update totals weiRaised = weiRaised.add(weiAmount); tokensSold = tokensSold.add(tokens); checkCap(); TokenPurchase(msg.sender, _beneficiary, weiAmount, tokens); require(<FILL_ME>) forwardFunds(); } // Send ether to the fund collection wallet function forwardFunds() internal { } // Determine the current stage by term period function determineCurrentStage() internal { } // Check cap and change the stage function checkCap() internal { } // Get ammount of tokens function getTokenAmount(uint256 _weiAmount) internal view returns (uint256) { } }
tokenReward.transferFrom(tokenOwner,_beneficiary,tokens)
357,919
tokenReward.transferFrom(tokenOwner,_beneficiary,tokens)
"Nothing happened"
// contracts/PumpkinJack.sol // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; interface IPrize { function getPrize(address winner, uint8 amount, uint8 class) external; } interface IBrainz { function balanceOf(address tokenOwner) external view returns (uint balance); } /** @dev PumpkinJack gives used to manage pumpkin tokens for giveaways and team reserve */ contract PumpkinJack is ERC721Enumerable { // phrase hash to [prize amount, class] mapping(bytes32 => uint8[2]) magicWords; // pumpkin ID to [prize amount, class] mapping(uint => uint8[2]) tokenIdToData; address constant burnAddress=0x000000000000000000000000000000000D15ea5E; address public _owner; address prizeAddress; address brainzAddress; string[2] pumpkinSVG; constructor() ERC721 ("PumpkinJack", "PUMPJCK") { } function tokenURI(uint256 _tokenId) public view override returns (string memory) { } /** @dev Return amount of BRAIN$ on the contract */ function brainsSacrificed() external view returns(uint256){ } /** @dev Burn Pumpkin token to mint Prize tokens with no cost @param _tokenId Pumpkin ID to burn */ function breakPumpkin(uint _tokenId) external { } /** @dev Check if secret phrase exists with no gas cost @param _secret Phrase string */ function whispWords(string memory _secret) external view returns(string memory) { } /** @dev Get Pumpkin token for corresponding secret phrase @param _secret Phrase string */ function sayWords(string memory _secret) external { bytes32 secretHash=sha256(bytes(_secret)); uint8[2] memory data = magicWords[secretHash]; require(<FILL_ME>) delete magicWords[secretHash]; uint mintId = totalSupply(); tokenIdToData[mintId]=data; _mint(msg.sender, mintId); } /** @dev Remove the secret phrase @param _hash Phrase sha256 hash */ function removeMagicWords(bytes32 _hash) external onlyOwner { } /** @dev Add secret phrase @param _hash Phrase sha256 hash @param _prize Amount of tokens to get after Pumpkin will be burned @param _class MF class to spawn (0-mili, 1-sci, 3-random) */ function addMagicWords(bytes32 _hash, uint8 _prize, uint8 _class) external onlyOwner { } /** @dev Set addresses @param _brainsAddress BRAIN$ address used to check contract balance @param _prizeAddress MF address used to mint tokens */ function setAddress(address _brainsAddress, address _prizeAddress) external onlyOwner { } /** @dev Add Pumpkin SVG @param _svg SVG string @param _broken Broken version or not */ function setSVG(string memory _svg, bool _broken) external onlyOwner { } /** @dev Modifier to allow action to be performed by contract owner only */ modifier onlyOwner() { } // Utility functions string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** @dev Encode bytes as base64 string */ function encode(bytes memory data) internal pure returns (string memory) { } /** @dev Get string representation of uint */ function _toString(uint256 value) internal pure returns (string memory) { } }
data[0]>0,"Nothing happened"
357,934
data[0]>0
"purchase exceeds max supply"
contract RumbleKongLeague is ERC721, Ownable { using SafeMath for uint256; string public RKL_PROVENANCE; uint256 public constant kongPrice = 0.08 ether; uint256 public constant maxKongPurchase = 20; uint256 public constant MAX_KONGS = 10_000; uint256 public REVEAL_TIMESTAMP; bool public saleIsActive = false; uint256 public startingIndexBlock; uint256 public startingIndex; bool private alreadyReserved = false; constructor(uint256 saleStart) ERC721("RumbleKongLeague", "RKL") { } function mintKong(uint256 numberOfTokens) external payable { } function setStartingIndex() external { } function _verifyMintKong(uint256 numberOfTokens) private { require(saleIsActive, "sale not active"); require(numberOfTokens <= maxKongPurchase, "minting more than 20"); require(<FILL_ME>) require( kongPrice.mul(numberOfTokens) <= msg.value, "not enough ether sent" ); } function _setStartingIndexBlock() private { } function _verifySetStartingIndex() private { } function setRevealTimestamp(uint256 revealTimeStamp) external onlyOwner { } function setProvenanceHash(string memory provenanceHash) external onlyOwner { } function setBaseURI(string memory baseURI) external onlyOwner { } function flipSaleState() external onlyOwner { } function emergencySetStartingIndexBlock() external onlyOwner { } function withdraw() external onlyOwner { } function reserveKongs() external onlyOwner { } }
totalSupply().add(numberOfTokens)<=MAX_KONGS,"purchase exceeds max supply"
357,949
totalSupply().add(numberOfTokens)<=MAX_KONGS
"not enough ether sent"
contract RumbleKongLeague is ERC721, Ownable { using SafeMath for uint256; string public RKL_PROVENANCE; uint256 public constant kongPrice = 0.08 ether; uint256 public constant maxKongPurchase = 20; uint256 public constant MAX_KONGS = 10_000; uint256 public REVEAL_TIMESTAMP; bool public saleIsActive = false; uint256 public startingIndexBlock; uint256 public startingIndex; bool private alreadyReserved = false; constructor(uint256 saleStart) ERC721("RumbleKongLeague", "RKL") { } function mintKong(uint256 numberOfTokens) external payable { } function setStartingIndex() external { } function _verifyMintKong(uint256 numberOfTokens) private { require(saleIsActive, "sale not active"); require(numberOfTokens <= maxKongPurchase, "minting more than 20"); require( totalSupply().add(numberOfTokens) <= MAX_KONGS, "purchase exceeds max supply" ); require(<FILL_ME>) } function _setStartingIndexBlock() private { } function _verifySetStartingIndex() private { } function setRevealTimestamp(uint256 revealTimeStamp) external onlyOwner { } function setProvenanceHash(string memory provenanceHash) external onlyOwner { } function setBaseURI(string memory baseURI) external onlyOwner { } function flipSaleState() external onlyOwner { } function emergencySetStartingIndexBlock() external onlyOwner { } function withdraw() external onlyOwner { } function reserveKongs() external onlyOwner { } }
kongPrice.mul(numberOfTokens)<=msg.value,"not enough ether sent"
357,949
kongPrice.mul(numberOfTokens)<=msg.value
"cant reserve multiple times"
contract RumbleKongLeague is ERC721, Ownable { using SafeMath for uint256; string public RKL_PROVENANCE; uint256 public constant kongPrice = 0.08 ether; uint256 public constant maxKongPurchase = 20; uint256 public constant MAX_KONGS = 10_000; uint256 public REVEAL_TIMESTAMP; bool public saleIsActive = false; uint256 public startingIndexBlock; uint256 public startingIndex; bool private alreadyReserved = false; constructor(uint256 saleStart) ERC721("RumbleKongLeague", "RKL") { } function mintKong(uint256 numberOfTokens) external payable { } function setStartingIndex() external { } function _verifyMintKong(uint256 numberOfTokens) private { } function _setStartingIndexBlock() private { } function _verifySetStartingIndex() private { } function setRevealTimestamp(uint256 revealTimeStamp) external onlyOwner { } function setProvenanceHash(string memory provenanceHash) external onlyOwner { } function setBaseURI(string memory baseURI) external onlyOwner { } function flipSaleState() external onlyOwner { } function emergencySetStartingIndexBlock() external onlyOwner { } function withdraw() external onlyOwner { } function reserveKongs() external onlyOwner { require(<FILL_ME>) for (uint256 i = 0; i < 30; i++) { _safeMint(msg.sender, i); } alreadyReserved = true; } }
!alreadyReserved,"cant reserve multiple times"
357,949
!alreadyReserved
"CSWAP: no simultaneous txes"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "@openzeppelin/contracts/GSN/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./external/IUniswapV2Router02.sol"; import "./external/IUniswapV2Factory.sol"; library CSWAPConstants { string private constant _name = "CardSwap"; string private constant _symbol = "CSWAP"; uint8 private constant _decimals = 18; function getName() internal pure returns (string memory) { } function getSymbol() internal pure returns (string memory) { } function getDecimals() internal pure returns (uint8) { } } contract CSWAP is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; uint256 _totalSupply; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) private _isWhitelisted; mapping (address => uint256) private _lastTx; IUniswapV2Router02 public uniRouter; IUniswapV2Factory public uniFactory; address public launchPool; address public farmer; constructor () public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } function mint(address account, uint256 amount) public onlyFarmer returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) private restrict(sender, recipient) { } function _approve(address owner, address spender, uint256 amount) private { } function whitelistAccount(address account) external onlyOwner() { } // Contract ownership has to be mandatorily moved to a multisig to ensure no malicious activity can be performed function setFarmer(address _farmer) external onlyOwner() { } modifier restrict(address sender, address recipient) { if (!_isWhitelisted[sender] && !_isWhitelisted[recipient]) { require(<FILL_ME>) _lastTx[sender] = now; _lastTx[recipient] = now; } else if (!_isWhitelisted[recipient]){ require(_lastTx[recipient] < now, "CSWAP: no simultaneous txes"); _lastTx[recipient] = now; } else if (!_isWhitelisted[sender]) { require(_lastTx[sender] < now, "CSWAP: no simultaneous txes"); _lastTx[sender] = now; } _; } modifier onlyFarmer() { } }
_lastTx[sender]<now&&_lastTx[recipient]<now,"CSWAP: no simultaneous txes"
357,969
_lastTx[sender]<now&&_lastTx[recipient]<now
"CSWAP: no simultaneous txes"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "@openzeppelin/contracts/GSN/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./external/IUniswapV2Router02.sol"; import "./external/IUniswapV2Factory.sol"; library CSWAPConstants { string private constant _name = "CardSwap"; string private constant _symbol = "CSWAP"; uint8 private constant _decimals = 18; function getName() internal pure returns (string memory) { } function getSymbol() internal pure returns (string memory) { } function getDecimals() internal pure returns (uint8) { } } contract CSWAP is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; uint256 _totalSupply; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) private _isWhitelisted; mapping (address => uint256) private _lastTx; IUniswapV2Router02 public uniRouter; IUniswapV2Factory public uniFactory; address public launchPool; address public farmer; constructor () public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } function mint(address account, uint256 amount) public onlyFarmer returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) private restrict(sender, recipient) { } function _approve(address owner, address spender, uint256 amount) private { } function whitelistAccount(address account) external onlyOwner() { } // Contract ownership has to be mandatorily moved to a multisig to ensure no malicious activity can be performed function setFarmer(address _farmer) external onlyOwner() { } modifier restrict(address sender, address recipient) { if (!_isWhitelisted[sender] && !_isWhitelisted[recipient]) { require(_lastTx[sender] < now && _lastTx[recipient] < now, "CSWAP: no simultaneous txes"); _lastTx[sender] = now; _lastTx[recipient] = now; } else if (!_isWhitelisted[recipient]){ require(<FILL_ME>) _lastTx[recipient] = now; } else if (!_isWhitelisted[sender]) { require(_lastTx[sender] < now, "CSWAP: no simultaneous txes"); _lastTx[sender] = now; } _; } modifier onlyFarmer() { } }
_lastTx[recipient]<now,"CSWAP: no simultaneous txes"
357,969
_lastTx[recipient]<now
"CSWAP: no simultaneous txes"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "@openzeppelin/contracts/GSN/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./external/IUniswapV2Router02.sol"; import "./external/IUniswapV2Factory.sol"; library CSWAPConstants { string private constant _name = "CardSwap"; string private constant _symbol = "CSWAP"; uint8 private constant _decimals = 18; function getName() internal pure returns (string memory) { } function getSymbol() internal pure returns (string memory) { } function getDecimals() internal pure returns (uint8) { } } contract CSWAP is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; uint256 _totalSupply; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) private _isWhitelisted; mapping (address => uint256) private _lastTx; IUniswapV2Router02 public uniRouter; IUniswapV2Factory public uniFactory; address public launchPool; address public farmer; constructor () public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } function mint(address account, uint256 amount) public onlyFarmer returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) private restrict(sender, recipient) { } function _approve(address owner, address spender, uint256 amount) private { } function whitelistAccount(address account) external onlyOwner() { } // Contract ownership has to be mandatorily moved to a multisig to ensure no malicious activity can be performed function setFarmer(address _farmer) external onlyOwner() { } modifier restrict(address sender, address recipient) { if (!_isWhitelisted[sender] && !_isWhitelisted[recipient]) { require(_lastTx[sender] < now && _lastTx[recipient] < now, "CSWAP: no simultaneous txes"); _lastTx[sender] = now; _lastTx[recipient] = now; } else if (!_isWhitelisted[recipient]){ require(_lastTx[recipient] < now, "CSWAP: no simultaneous txes"); _lastTx[recipient] = now; } else if (!_isWhitelisted[sender]) { require(<FILL_ME>) _lastTx[sender] = now; } _; } modifier onlyFarmer() { } }
_lastTx[sender]<now,"CSWAP: no simultaneous txes"
357,969
_lastTx[sender]<now
"CSWAP: Not the farming contract"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.12; import "@openzeppelin/contracts/GSN/Context.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./external/IUniswapV2Router02.sol"; import "./external/IUniswapV2Factory.sol"; library CSWAPConstants { string private constant _name = "CardSwap"; string private constant _symbol = "CSWAP"; uint8 private constant _decimals = 18; function getName() internal pure returns (string memory) { } function getSymbol() internal pure returns (string memory) { } function getDecimals() internal pure returns (uint8) { } } contract CSWAP is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; uint256 _totalSupply; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) private _isWhitelisted; mapping (address => uint256) private _lastTx; IUniswapV2Router02 public uniRouter; IUniswapV2Factory public uniFactory; address public launchPool; address public farmer; constructor () public { } function name() public view returns (string memory) { } function symbol() public view returns (string memory) { } function decimals() public view returns (uint8) { } function totalSupply() public view override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { } function mint(address account, uint256 amount) public onlyFarmer returns (bool) { } function _transfer(address sender, address recipient, uint256 amount) private restrict(sender, recipient) { } function _approve(address owner, address spender, uint256 amount) private { } function whitelistAccount(address account) external onlyOwner() { } // Contract ownership has to be mandatorily moved to a multisig to ensure no malicious activity can be performed function setFarmer(address _farmer) external onlyOwner() { } modifier restrict(address sender, address recipient) { } modifier onlyFarmer() { require(<FILL_ME>) _; } }
_msgSender()==farmer,"CSWAP: Not the farming contract"
357,969
_msgSender()==farmer
'Sold out'
@v4.3.1 pragma solidity 0.8.4; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } /** * @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 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, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting 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 subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * 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 integer division of two unsigned integers, reverting 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), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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) { } } interface IReferral { /** * @dev Record referral. */ function recordReferral(address user, address referrer) external; /** * @dev Record referral share. */ function recordReferralShare(address referrer, uint256 share) external; /** * @dev Get the referrer address that referred the user. */ function getReferrer(address user) external view returns (address); } contract Nfts is Ownable { using SafeMath for uint256; uint256 public price = 10000000 gwei; uint256 public priceStep = 10000000 gwei; uint256 public maxSupply = 100; uint256 public premint = 30; uint256 public totalSupply = premint; uint16 public refShare = 1000; // in basis points, so it's 10% uint256 public startTime = 0; IReferral public referralContract; event Mint( address indexed user, uint256 fromId, uint256 amount ); event ReferralSharePaid( address indexed user, address indexed referrer, uint256 shareAmount ); function getNextPrice() internal returns (uint) { } function mint(address _referrer) external payable { require(block.timestamp >= startTime); if ( msg.value > 0 && address(referralContract) != address(0) && _referrer != address(0) && _referrer != msg.sender ) { referralContract.recordReferral(msg.sender, _referrer); } uint rest = msg.value; uint currentPrice = getNextPrice(); uint prevTotalSupply = totalSupply; while (currentPrice <= rest) { require(<FILL_ME>) totalSupply++; rest -= currentPrice; currentPrice = getNextPrice(); } uint256 amount = totalSupply - prevTotalSupply; if (amount > 0) { emit Mint(msg.sender, prevTotalSupply, amount); } payable(msg.sender).transfer(rest); payReferral(msg.sender, msg.value - rest); } // Update the referral contract address by the owner function setReferralAddress(IReferral _referralAddress) public onlyOwner { } // Pay referral share to the referrer who referred this user. function payReferral(address _to, uint256 _amount) internal { } } contract Referral is IReferral, Ownable { mapping(address => bool) public operators; mapping(address => address) public referrers; // user address => referrer address mapping(address => uint256) public referralsCount; // referrer address => referrals count mapping(address => uint256) public totalReferralShares; // referrer address => total referral commissions event ReferralRecorded(address indexed user, address indexed referrer); event ReferralShareRecorded(address indexed referrer, uint256 commission); event OperatorUpdated(address indexed operator, bool indexed status); modifier onlyOperator() { } function recordReferral(address _user, address _referrer) public override onlyOperator { } function recordReferralShare(address _referrer, uint256 _share) public override onlyOperator { } // Get the referrer address that referred the user function getReferrer(address _user) public view override returns (address) { } // Update the status of the operator function updateOperator(address _operator, bool _status) external onlyOwner { } }
this.totalSupply()<maxSupply,'Sold out'
358,046
this.totalSupply()<maxSupply
null
pragma solidity ^0.4.18; library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } } contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { } /** * @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) onlyOwner { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event Burn(address indexed from, uint256 value); } contract ROKToken is ERC20, Ownable { using SafeMath for uint256; string public constant name = "ROK Token"; string public constant symbol = "ROK"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 100000000000000000000000000; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Contructor that gives msg.sender all of existing tokens. */ function ROKToken() { } /** * @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 constant returns (uint256 balance) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } function unlockTransfer(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 constant returns (uint256 remaining) { } /** * 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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } function burn(uint256 _value) public returns (bool success){ } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { } /** * @dev modifier to allow actions only when the contract IS NOT paused */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused { } } contract PullPayment { using SafeMath for uint256; mapping (address => uint256) public payments; uint256 public totalPayments; /** * @dev Called by the payer to store the sent amount as credit to be pulled. * @param dest The destination address of the funds. * @param amount The amount to transfer. */ function asyncSend(address dest, uint256 amount) internal { } /** * @dev withdraw accumulated balance, called by payee. */ function withdrawPayments() { } } /* * Crowdsale Smart Contract for the Rockchain project * Author: Yosra Helal [email protected] * Contributor: Christophe Ozcan [email protected] * * * MultiSig advisors Keys (3/5) * * Christophe OZCAN 0x75dcB0Ba77e5f99f8ce6F01338Cb235DFE94260c * Jeff GUILBAULT 0x94ddC32c61BC9a799CdDea87e6a1D1316198b0Fa * Mark HAHNEL 0xFaE39043B8698CaA4F1417659B00737fa19b8ECC * Sébastien COLLIGNON 0xd70280108EaF321E100276F6D1b105Ee088CB016 * Sébastien JEHAN 0xE4b0A48D3b1adA17000Fd080cd42DB3e8231752c * * */ contract Crowdsale is Pausable, PullPayment { using SafeMath for uint256; address public owner; ROKToken public rok; address public escrow; // Address of Escrow Provider Wallet address public bounty ; // Address dedicated for bounty services address public team; // Adress for ROK token allocated to the team uint256 public rateETH_ROK; // Rate Ether per ROK token uint256 public constant minimumPurchase = 0.1 ether; // Minimum purchase size of incoming ETH uint256 public constant maxFundingGoal = 100000 ether; // Maximum goal in Ether raised uint256 public constant minFundingGoal = 18000 ether; // Minimum funding goal in Ether raised uint256 public constant startDate = 1509534000; // epoch timestamp representing the start date (1st november 2017 11:00 gmt) uint256 public constant deadline = 1512126000; // epoch timestamp representing the end date (1st december 2017 11:00 gmt) uint256 public constant refundeadline = 1515927600; // epoch timestamp representing the end date of refund period (14th january 2018 11:00 gmt) uint256 public savedBalance = 0; // Total amount raised in ETH uint256 public savedBalanceToken = 0; // Total ROK Token allocated bool public crowdsaleclosed = false; // To finalize crowdsale mapping (address => uint256) balances; // Balances in incoming Ether mapping (address => uint256) balancesRokToken; // Balances in ROK mapping (address => bool) KYClist; // Events to record new contributions event Contribution(address indexed _contributor, uint256 indexed _value, uint256 indexed _tokens); // Event to record each time Ether is paid out event PayEther( address indexed _receiver, uint256 indexed _value, uint256 indexed _timestamp ); // Event to record when tokens are burned. event BurnTokens( uint256 indexed _value, uint256 indexed _timestamp ); // Initialization function Crowdsale(){ } // Default Function, delegates to contribute function (for ease of use) // WARNING: Not compatible with smart contract invocation, will exceed gas stipend! // Only use from external accounts function() payable whenNotPaused{ } // Contribute Function, accepts incoming payments and tracks balances for each contributors function contribute(address contributor) internal{ require(isStarted()); require(<FILL_ME>) assert((savedBalance.add(msg.value)) <= maxFundingGoal); assert(msg.value >= minimumPurchase); balances[contributor] = balances[contributor].add(msg.value); savedBalance = savedBalance.add(msg.value); uint256 Roktoken = rateETH_ROK.mul(msg.value) + getBonus(rateETH_ROK.mul(msg.value)); uint256 RokToSend = (Roktoken.mul(80)).div(100); balancesRokToken[contributor] = balancesRokToken[contributor].add(RokToSend); savedBalanceToken = savedBalanceToken.add(Roktoken); escrow.transfer(msg.value); PayEther(escrow, msg.value, now); } // Function to check if crowdsale has started yet function isStarted() constant returns (bool) { } // Function to check if crowdsale is complete ( function isComplete() constant returns (bool) { } // Function to view current token balance of the crowdsale contract function tokenBalance() constant returns (uint256 balance) { } // Function to check if crowdsale has been successful (has incoming contribution balance met, or exceeded the minimum goal?) function isSuccessful() constant returns (bool) { } // Function to check the Ether balance of a contributor function checkEthBalance(address _contributor) constant returns (uint256 balance) { } // Function to check the current Tokens Sold in the ICO function checkRokSold() constant returns (uint256 total) { } // Function to check the current Tokens affected to the team function checkRokTeam() constant returns (uint256 totalteam) { } // Function to check the current Tokens affected to bounty function checkRokBounty() constant returns (uint256 totalbounty) { } // Function to check the refund period is over function refundPeriodOver() constant returns (bool){ } // Function to check the refund period is over function refundPeriodStart() constant returns (bool){ } // function to check percentage of goal achieved function percentOfGoal() constant returns (uint16 goalPercent) { } // Calcul the ROK bonus according to the investment period function getBonus(uint256 amount) internal constant returns (uint256) { } // Function to set the balance of a sender function setBalance(address sender,uint256 value) internal{ } // Only owner will finalize the crowdsale function finalize() onlyOwner { } // Function to pay out function payout() onlyOwner { } //Function to pay Team function payTeam() internal { } //Function to update KYC list function updateKYClist(address[] allowed) onlyOwner{ } //Function to claim ROK tokens function claim() public{ } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "refund" function of the Crowdsale contract * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function refund() public { } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "partialRefund" function of the Crowdsale contract with the partial amount of ETH to be refunded (value will be renseigned in WEI) * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function partialRefund(uint256 value) public { } }
!isComplete()
358,075
!isComplete()
null
pragma solidity ^0.4.18; library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } } contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { } /** * @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) onlyOwner { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event Burn(address indexed from, uint256 value); } contract ROKToken is ERC20, Ownable { using SafeMath for uint256; string public constant name = "ROK Token"; string public constant symbol = "ROK"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 100000000000000000000000000; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Contructor that gives msg.sender all of existing tokens. */ function ROKToken() { } /** * @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 constant returns (uint256 balance) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } function unlockTransfer(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 constant returns (uint256 remaining) { } /** * 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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } function burn(uint256 _value) public returns (bool success){ } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { } /** * @dev modifier to allow actions only when the contract IS NOT paused */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused { } } contract PullPayment { using SafeMath for uint256; mapping (address => uint256) public payments; uint256 public totalPayments; /** * @dev Called by the payer to store the sent amount as credit to be pulled. * @param dest The destination address of the funds. * @param amount The amount to transfer. */ function asyncSend(address dest, uint256 amount) internal { } /** * @dev withdraw accumulated balance, called by payee. */ function withdrawPayments() { } } /* * Crowdsale Smart Contract for the Rockchain project * Author: Yosra Helal [email protected] * Contributor: Christophe Ozcan [email protected] * * * MultiSig advisors Keys (3/5) * * Christophe OZCAN 0x75dcB0Ba77e5f99f8ce6F01338Cb235DFE94260c * Jeff GUILBAULT 0x94ddC32c61BC9a799CdDea87e6a1D1316198b0Fa * Mark HAHNEL 0xFaE39043B8698CaA4F1417659B00737fa19b8ECC * Sébastien COLLIGNON 0xd70280108EaF321E100276F6D1b105Ee088CB016 * Sébastien JEHAN 0xE4b0A48D3b1adA17000Fd080cd42DB3e8231752c * * */ contract Crowdsale is Pausable, PullPayment { using SafeMath for uint256; address public owner; ROKToken public rok; address public escrow; // Address of Escrow Provider Wallet address public bounty ; // Address dedicated for bounty services address public team; // Adress for ROK token allocated to the team uint256 public rateETH_ROK; // Rate Ether per ROK token uint256 public constant minimumPurchase = 0.1 ether; // Minimum purchase size of incoming ETH uint256 public constant maxFundingGoal = 100000 ether; // Maximum goal in Ether raised uint256 public constant minFundingGoal = 18000 ether; // Minimum funding goal in Ether raised uint256 public constant startDate = 1509534000; // epoch timestamp representing the start date (1st november 2017 11:00 gmt) uint256 public constant deadline = 1512126000; // epoch timestamp representing the end date (1st december 2017 11:00 gmt) uint256 public constant refundeadline = 1515927600; // epoch timestamp representing the end date of refund period (14th january 2018 11:00 gmt) uint256 public savedBalance = 0; // Total amount raised in ETH uint256 public savedBalanceToken = 0; // Total ROK Token allocated bool public crowdsaleclosed = false; // To finalize crowdsale mapping (address => uint256) balances; // Balances in incoming Ether mapping (address => uint256) balancesRokToken; // Balances in ROK mapping (address => bool) KYClist; // Events to record new contributions event Contribution(address indexed _contributor, uint256 indexed _value, uint256 indexed _tokens); // Event to record each time Ether is paid out event PayEther( address indexed _receiver, uint256 indexed _value, uint256 indexed _timestamp ); // Event to record when tokens are burned. event BurnTokens( uint256 indexed _value, uint256 indexed _timestamp ); // Initialization function Crowdsale(){ } // Default Function, delegates to contribute function (for ease of use) // WARNING: Not compatible with smart contract invocation, will exceed gas stipend! // Only use from external accounts function() payable whenNotPaused{ } // Contribute Function, accepts incoming payments and tracks balances for each contributors function contribute(address contributor) internal{ } // Function to check if crowdsale has started yet function isStarted() constant returns (bool) { } // Function to check if crowdsale is complete ( function isComplete() constant returns (bool) { } // Function to view current token balance of the crowdsale contract function tokenBalance() constant returns (uint256 balance) { } // Function to check if crowdsale has been successful (has incoming contribution balance met, or exceeded the minimum goal?) function isSuccessful() constant returns (bool) { } // Function to check the Ether balance of a contributor function checkEthBalance(address _contributor) constant returns (uint256 balance) { } // Function to check the current Tokens Sold in the ICO function checkRokSold() constant returns (uint256 total) { } // Function to check the current Tokens affected to the team function checkRokTeam() constant returns (uint256 totalteam) { } // Function to check the current Tokens affected to bounty function checkRokBounty() constant returns (uint256 totalbounty) { } // Function to check the refund period is over function refundPeriodOver() constant returns (bool){ } // Function to check the refund period is over function refundPeriodStart() constant returns (bool){ } // function to check percentage of goal achieved function percentOfGoal() constant returns (uint16 goalPercent) { } // Calcul the ROK bonus according to the investment period function getBonus(uint256 amount) internal constant returns (uint256) { } // Function to set the balance of a sender function setBalance(address sender,uint256 value) internal{ } // Only owner will finalize the crowdsale function finalize() onlyOwner { } // Function to pay out function payout() onlyOwner { } //Function to pay Team function payTeam() internal { } //Function to update KYC list function updateKYClist(address[] allowed) onlyOwner{ } //Function to claim ROK tokens function claim() public{ require(<FILL_ME>) require(checkEthBalance(msg.sender) > 0); if(checkEthBalance(msg.sender) <= (3 ether)){ rok.transfer(msg.sender,balancesRokToken[msg.sender]); balancesRokToken[msg.sender] = 0; } else{ require(KYClist[msg.sender] == true); rok.transfer(msg.sender,balancesRokToken[msg.sender]); balancesRokToken[msg.sender] = 0; } } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "refund" function of the Crowdsale contract * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function refund() public { } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "partialRefund" function of the Crowdsale contract with the partial amount of ETH to be refunded (value will be renseigned in WEI) * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function partialRefund(uint256 value) public { } }
isComplete()
358,075
isComplete()
null
pragma solidity ^0.4.18; library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } } contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { } /** * @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) onlyOwner { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event Burn(address indexed from, uint256 value); } contract ROKToken is ERC20, Ownable { using SafeMath for uint256; string public constant name = "ROK Token"; string public constant symbol = "ROK"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 100000000000000000000000000; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Contructor that gives msg.sender all of existing tokens. */ function ROKToken() { } /** * @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 constant returns (uint256 balance) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } function unlockTransfer(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 constant returns (uint256 remaining) { } /** * 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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } function burn(uint256 _value) public returns (bool success){ } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { } /** * @dev modifier to allow actions only when the contract IS NOT paused */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused { } } contract PullPayment { using SafeMath for uint256; mapping (address => uint256) public payments; uint256 public totalPayments; /** * @dev Called by the payer to store the sent amount as credit to be pulled. * @param dest The destination address of the funds. * @param amount The amount to transfer. */ function asyncSend(address dest, uint256 amount) internal { } /** * @dev withdraw accumulated balance, called by payee. */ function withdrawPayments() { } } /* * Crowdsale Smart Contract for the Rockchain project * Author: Yosra Helal [email protected] * Contributor: Christophe Ozcan [email protected] * * * MultiSig advisors Keys (3/5) * * Christophe OZCAN 0x75dcB0Ba77e5f99f8ce6F01338Cb235DFE94260c * Jeff GUILBAULT 0x94ddC32c61BC9a799CdDea87e6a1D1316198b0Fa * Mark HAHNEL 0xFaE39043B8698CaA4F1417659B00737fa19b8ECC * Sébastien COLLIGNON 0xd70280108EaF321E100276F6D1b105Ee088CB016 * Sébastien JEHAN 0xE4b0A48D3b1adA17000Fd080cd42DB3e8231752c * * */ contract Crowdsale is Pausable, PullPayment { using SafeMath for uint256; address public owner; ROKToken public rok; address public escrow; // Address of Escrow Provider Wallet address public bounty ; // Address dedicated for bounty services address public team; // Adress for ROK token allocated to the team uint256 public rateETH_ROK; // Rate Ether per ROK token uint256 public constant minimumPurchase = 0.1 ether; // Minimum purchase size of incoming ETH uint256 public constant maxFundingGoal = 100000 ether; // Maximum goal in Ether raised uint256 public constant minFundingGoal = 18000 ether; // Minimum funding goal in Ether raised uint256 public constant startDate = 1509534000; // epoch timestamp representing the start date (1st november 2017 11:00 gmt) uint256 public constant deadline = 1512126000; // epoch timestamp representing the end date (1st december 2017 11:00 gmt) uint256 public constant refundeadline = 1515927600; // epoch timestamp representing the end date of refund period (14th january 2018 11:00 gmt) uint256 public savedBalance = 0; // Total amount raised in ETH uint256 public savedBalanceToken = 0; // Total ROK Token allocated bool public crowdsaleclosed = false; // To finalize crowdsale mapping (address => uint256) balances; // Balances in incoming Ether mapping (address => uint256) balancesRokToken; // Balances in ROK mapping (address => bool) KYClist; // Events to record new contributions event Contribution(address indexed _contributor, uint256 indexed _value, uint256 indexed _tokens); // Event to record each time Ether is paid out event PayEther( address indexed _receiver, uint256 indexed _value, uint256 indexed _timestamp ); // Event to record when tokens are burned. event BurnTokens( uint256 indexed _value, uint256 indexed _timestamp ); // Initialization function Crowdsale(){ } // Default Function, delegates to contribute function (for ease of use) // WARNING: Not compatible with smart contract invocation, will exceed gas stipend! // Only use from external accounts function() payable whenNotPaused{ } // Contribute Function, accepts incoming payments and tracks balances for each contributors function contribute(address contributor) internal{ } // Function to check if crowdsale has started yet function isStarted() constant returns (bool) { } // Function to check if crowdsale is complete ( function isComplete() constant returns (bool) { } // Function to view current token balance of the crowdsale contract function tokenBalance() constant returns (uint256 balance) { } // Function to check if crowdsale has been successful (has incoming contribution balance met, or exceeded the minimum goal?) function isSuccessful() constant returns (bool) { } // Function to check the Ether balance of a contributor function checkEthBalance(address _contributor) constant returns (uint256 balance) { } // Function to check the current Tokens Sold in the ICO function checkRokSold() constant returns (uint256 total) { } // Function to check the current Tokens affected to the team function checkRokTeam() constant returns (uint256 totalteam) { } // Function to check the current Tokens affected to bounty function checkRokBounty() constant returns (uint256 totalbounty) { } // Function to check the refund period is over function refundPeriodOver() constant returns (bool){ } // Function to check the refund period is over function refundPeriodStart() constant returns (bool){ } // function to check percentage of goal achieved function percentOfGoal() constant returns (uint16 goalPercent) { } // Calcul the ROK bonus according to the investment period function getBonus(uint256 amount) internal constant returns (uint256) { } // Function to set the balance of a sender function setBalance(address sender,uint256 value) internal{ } // Only owner will finalize the crowdsale function finalize() onlyOwner { } // Function to pay out function payout() onlyOwner { } //Function to pay Team function payTeam() internal { } //Function to update KYC list function updateKYClist(address[] allowed) onlyOwner{ } //Function to claim ROK tokens function claim() public{ require(isComplete()); require(<FILL_ME>) if(checkEthBalance(msg.sender) <= (3 ether)){ rok.transfer(msg.sender,balancesRokToken[msg.sender]); balancesRokToken[msg.sender] = 0; } else{ require(KYClist[msg.sender] == true); rok.transfer(msg.sender,balancesRokToken[msg.sender]); balancesRokToken[msg.sender] = 0; } } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "refund" function of the Crowdsale contract * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function refund() public { } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "partialRefund" function of the Crowdsale contract with the partial amount of ETH to be refunded (value will be renseigned in WEI) * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function partialRefund(uint256 value) public { } }
checkEthBalance(msg.sender)>0
358,075
checkEthBalance(msg.sender)>0
null
pragma solidity ^0.4.18; library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } } contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { } /** * @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) onlyOwner { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event Burn(address indexed from, uint256 value); } contract ROKToken is ERC20, Ownable { using SafeMath for uint256; string public constant name = "ROK Token"; string public constant symbol = "ROK"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 100000000000000000000000000; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Contructor that gives msg.sender all of existing tokens. */ function ROKToken() { } /** * @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 constant returns (uint256 balance) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } function unlockTransfer(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 constant returns (uint256 remaining) { } /** * 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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } function burn(uint256 _value) public returns (bool success){ } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { } /** * @dev modifier to allow actions only when the contract IS NOT paused */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused { } } contract PullPayment { using SafeMath for uint256; mapping (address => uint256) public payments; uint256 public totalPayments; /** * @dev Called by the payer to store the sent amount as credit to be pulled. * @param dest The destination address of the funds. * @param amount The amount to transfer. */ function asyncSend(address dest, uint256 amount) internal { } /** * @dev withdraw accumulated balance, called by payee. */ function withdrawPayments() { } } /* * Crowdsale Smart Contract for the Rockchain project * Author: Yosra Helal [email protected] * Contributor: Christophe Ozcan [email protected] * * * MultiSig advisors Keys (3/5) * * Christophe OZCAN 0x75dcB0Ba77e5f99f8ce6F01338Cb235DFE94260c * Jeff GUILBAULT 0x94ddC32c61BC9a799CdDea87e6a1D1316198b0Fa * Mark HAHNEL 0xFaE39043B8698CaA4F1417659B00737fa19b8ECC * Sébastien COLLIGNON 0xd70280108EaF321E100276F6D1b105Ee088CB016 * Sébastien JEHAN 0xE4b0A48D3b1adA17000Fd080cd42DB3e8231752c * * */ contract Crowdsale is Pausable, PullPayment { using SafeMath for uint256; address public owner; ROKToken public rok; address public escrow; // Address of Escrow Provider Wallet address public bounty ; // Address dedicated for bounty services address public team; // Adress for ROK token allocated to the team uint256 public rateETH_ROK; // Rate Ether per ROK token uint256 public constant minimumPurchase = 0.1 ether; // Minimum purchase size of incoming ETH uint256 public constant maxFundingGoal = 100000 ether; // Maximum goal in Ether raised uint256 public constant minFundingGoal = 18000 ether; // Minimum funding goal in Ether raised uint256 public constant startDate = 1509534000; // epoch timestamp representing the start date (1st november 2017 11:00 gmt) uint256 public constant deadline = 1512126000; // epoch timestamp representing the end date (1st december 2017 11:00 gmt) uint256 public constant refundeadline = 1515927600; // epoch timestamp representing the end date of refund period (14th january 2018 11:00 gmt) uint256 public savedBalance = 0; // Total amount raised in ETH uint256 public savedBalanceToken = 0; // Total ROK Token allocated bool public crowdsaleclosed = false; // To finalize crowdsale mapping (address => uint256) balances; // Balances in incoming Ether mapping (address => uint256) balancesRokToken; // Balances in ROK mapping (address => bool) KYClist; // Events to record new contributions event Contribution(address indexed _contributor, uint256 indexed _value, uint256 indexed _tokens); // Event to record each time Ether is paid out event PayEther( address indexed _receiver, uint256 indexed _value, uint256 indexed _timestamp ); // Event to record when tokens are burned. event BurnTokens( uint256 indexed _value, uint256 indexed _timestamp ); // Initialization function Crowdsale(){ } // Default Function, delegates to contribute function (for ease of use) // WARNING: Not compatible with smart contract invocation, will exceed gas stipend! // Only use from external accounts function() payable whenNotPaused{ } // Contribute Function, accepts incoming payments and tracks balances for each contributors function contribute(address contributor) internal{ } // Function to check if crowdsale has started yet function isStarted() constant returns (bool) { } // Function to check if crowdsale is complete ( function isComplete() constant returns (bool) { } // Function to view current token balance of the crowdsale contract function tokenBalance() constant returns (uint256 balance) { } // Function to check if crowdsale has been successful (has incoming contribution balance met, or exceeded the minimum goal?) function isSuccessful() constant returns (bool) { } // Function to check the Ether balance of a contributor function checkEthBalance(address _contributor) constant returns (uint256 balance) { } // Function to check the current Tokens Sold in the ICO function checkRokSold() constant returns (uint256 total) { } // Function to check the current Tokens affected to the team function checkRokTeam() constant returns (uint256 totalteam) { } // Function to check the current Tokens affected to bounty function checkRokBounty() constant returns (uint256 totalbounty) { } // Function to check the refund period is over function refundPeriodOver() constant returns (bool){ } // Function to check the refund period is over function refundPeriodStart() constant returns (bool){ } // function to check percentage of goal achieved function percentOfGoal() constant returns (uint16 goalPercent) { } // Calcul the ROK bonus according to the investment period function getBonus(uint256 amount) internal constant returns (uint256) { } // Function to set the balance of a sender function setBalance(address sender,uint256 value) internal{ } // Only owner will finalize the crowdsale function finalize() onlyOwner { } // Function to pay out function payout() onlyOwner { } //Function to pay Team function payTeam() internal { } //Function to update KYC list function updateKYClist(address[] allowed) onlyOwner{ } //Function to claim ROK tokens function claim() public{ require(isComplete()); require(checkEthBalance(msg.sender) > 0); if(checkEthBalance(msg.sender) <= (3 ether)){ rok.transfer(msg.sender,balancesRokToken[msg.sender]); balancesRokToken[msg.sender] = 0; } else{ require(<FILL_ME>) rok.transfer(msg.sender,balancesRokToken[msg.sender]); balancesRokToken[msg.sender] = 0; } } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "refund" function of the Crowdsale contract * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function refund() public { } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "partialRefund" function of the Crowdsale contract with the partial amount of ETH to be refunded (value will be renseigned in WEI) * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function partialRefund(uint256 value) public { } }
KYClist[msg.sender]==true
358,075
KYClist[msg.sender]==true
null
pragma solidity ^0.4.18; library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } } contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { } /** * @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) onlyOwner { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event Burn(address indexed from, uint256 value); } contract ROKToken is ERC20, Ownable { using SafeMath for uint256; string public constant name = "ROK Token"; string public constant symbol = "ROK"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 100000000000000000000000000; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Contructor that gives msg.sender all of existing tokens. */ function ROKToken() { } /** * @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 constant returns (uint256 balance) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } function unlockTransfer(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 constant returns (uint256 remaining) { } /** * 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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } function burn(uint256 _value) public returns (bool success){ } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { } /** * @dev modifier to allow actions only when the contract IS NOT paused */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused { } } contract PullPayment { using SafeMath for uint256; mapping (address => uint256) public payments; uint256 public totalPayments; /** * @dev Called by the payer to store the sent amount as credit to be pulled. * @param dest The destination address of the funds. * @param amount The amount to transfer. */ function asyncSend(address dest, uint256 amount) internal { } /** * @dev withdraw accumulated balance, called by payee. */ function withdrawPayments() { } } /* * Crowdsale Smart Contract for the Rockchain project * Author: Yosra Helal [email protected] * Contributor: Christophe Ozcan [email protected] * * * MultiSig advisors Keys (3/5) * * Christophe OZCAN 0x75dcB0Ba77e5f99f8ce6F01338Cb235DFE94260c * Jeff GUILBAULT 0x94ddC32c61BC9a799CdDea87e6a1D1316198b0Fa * Mark HAHNEL 0xFaE39043B8698CaA4F1417659B00737fa19b8ECC * Sébastien COLLIGNON 0xd70280108EaF321E100276F6D1b105Ee088CB016 * Sébastien JEHAN 0xE4b0A48D3b1adA17000Fd080cd42DB3e8231752c * * */ contract Crowdsale is Pausable, PullPayment { using SafeMath for uint256; address public owner; ROKToken public rok; address public escrow; // Address of Escrow Provider Wallet address public bounty ; // Address dedicated for bounty services address public team; // Adress for ROK token allocated to the team uint256 public rateETH_ROK; // Rate Ether per ROK token uint256 public constant minimumPurchase = 0.1 ether; // Minimum purchase size of incoming ETH uint256 public constant maxFundingGoal = 100000 ether; // Maximum goal in Ether raised uint256 public constant minFundingGoal = 18000 ether; // Minimum funding goal in Ether raised uint256 public constant startDate = 1509534000; // epoch timestamp representing the start date (1st november 2017 11:00 gmt) uint256 public constant deadline = 1512126000; // epoch timestamp representing the end date (1st december 2017 11:00 gmt) uint256 public constant refundeadline = 1515927600; // epoch timestamp representing the end date of refund period (14th january 2018 11:00 gmt) uint256 public savedBalance = 0; // Total amount raised in ETH uint256 public savedBalanceToken = 0; // Total ROK Token allocated bool public crowdsaleclosed = false; // To finalize crowdsale mapping (address => uint256) balances; // Balances in incoming Ether mapping (address => uint256) balancesRokToken; // Balances in ROK mapping (address => bool) KYClist; // Events to record new contributions event Contribution(address indexed _contributor, uint256 indexed _value, uint256 indexed _tokens); // Event to record each time Ether is paid out event PayEther( address indexed _receiver, uint256 indexed _value, uint256 indexed _timestamp ); // Event to record when tokens are burned. event BurnTokens( uint256 indexed _value, uint256 indexed _timestamp ); // Initialization function Crowdsale(){ } // Default Function, delegates to contribute function (for ease of use) // WARNING: Not compatible with smart contract invocation, will exceed gas stipend! // Only use from external accounts function() payable whenNotPaused{ } // Contribute Function, accepts incoming payments and tracks balances for each contributors function contribute(address contributor) internal{ } // Function to check if crowdsale has started yet function isStarted() constant returns (bool) { } // Function to check if crowdsale is complete ( function isComplete() constant returns (bool) { } // Function to view current token balance of the crowdsale contract function tokenBalance() constant returns (uint256 balance) { } // Function to check if crowdsale has been successful (has incoming contribution balance met, or exceeded the minimum goal?) function isSuccessful() constant returns (bool) { } // Function to check the Ether balance of a contributor function checkEthBalance(address _contributor) constant returns (uint256 balance) { } // Function to check the current Tokens Sold in the ICO function checkRokSold() constant returns (uint256 total) { } // Function to check the current Tokens affected to the team function checkRokTeam() constant returns (uint256 totalteam) { } // Function to check the current Tokens affected to bounty function checkRokBounty() constant returns (uint256 totalbounty) { } // Function to check the refund period is over function refundPeriodOver() constant returns (bool){ } // Function to check the refund period is over function refundPeriodStart() constant returns (bool){ } // function to check percentage of goal achieved function percentOfGoal() constant returns (uint16 goalPercent) { } // Calcul the ROK bonus according to the investment period function getBonus(uint256 amount) internal constant returns (uint256) { } // Function to set the balance of a sender function setBalance(address sender,uint256 value) internal{ } // Only owner will finalize the crowdsale function finalize() onlyOwner { } // Function to pay out function payout() onlyOwner { } //Function to pay Team function payTeam() internal { } //Function to update KYC list function updateKYClist(address[] allowed) onlyOwner{ } //Function to claim ROK tokens function claim() public{ } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "refund" function of the Crowdsale contract * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function refund() public { require(!isSuccessful()); require(<FILL_ME>) require(!refundPeriodOver()); require(checkEthBalance(msg.sender) > 0); uint ETHToSend = checkEthBalance(msg.sender); setBalance(msg.sender,0); asyncSend(msg.sender, ETHToSend); } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "partialRefund" function of the Crowdsale contract with the partial amount of ETH to be refunded (value will be renseigned in WEI) * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function partialRefund(uint256 value) public { } }
refundPeriodStart()
358,075
refundPeriodStart()
null
pragma solidity ^0.4.18; library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } } contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { } /** * @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) onlyOwner { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event Burn(address indexed from, uint256 value); } contract ROKToken is ERC20, Ownable { using SafeMath for uint256; string public constant name = "ROK Token"; string public constant symbol = "ROK"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 100000000000000000000000000; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Contructor that gives msg.sender all of existing tokens. */ function ROKToken() { } /** * @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 constant returns (uint256 balance) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } function unlockTransfer(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 constant returns (uint256 remaining) { } /** * 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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } function burn(uint256 _value) public returns (bool success){ } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { } /** * @dev modifier to allow actions only when the contract IS NOT paused */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused { } } contract PullPayment { using SafeMath for uint256; mapping (address => uint256) public payments; uint256 public totalPayments; /** * @dev Called by the payer to store the sent amount as credit to be pulled. * @param dest The destination address of the funds. * @param amount The amount to transfer. */ function asyncSend(address dest, uint256 amount) internal { } /** * @dev withdraw accumulated balance, called by payee. */ function withdrawPayments() { } } /* * Crowdsale Smart Contract for the Rockchain project * Author: Yosra Helal [email protected] * Contributor: Christophe Ozcan [email protected] * * * MultiSig advisors Keys (3/5) * * Christophe OZCAN 0x75dcB0Ba77e5f99f8ce6F01338Cb235DFE94260c * Jeff GUILBAULT 0x94ddC32c61BC9a799CdDea87e6a1D1316198b0Fa * Mark HAHNEL 0xFaE39043B8698CaA4F1417659B00737fa19b8ECC * Sébastien COLLIGNON 0xd70280108EaF321E100276F6D1b105Ee088CB016 * Sébastien JEHAN 0xE4b0A48D3b1adA17000Fd080cd42DB3e8231752c * * */ contract Crowdsale is Pausable, PullPayment { using SafeMath for uint256; address public owner; ROKToken public rok; address public escrow; // Address of Escrow Provider Wallet address public bounty ; // Address dedicated for bounty services address public team; // Adress for ROK token allocated to the team uint256 public rateETH_ROK; // Rate Ether per ROK token uint256 public constant minimumPurchase = 0.1 ether; // Minimum purchase size of incoming ETH uint256 public constant maxFundingGoal = 100000 ether; // Maximum goal in Ether raised uint256 public constant minFundingGoal = 18000 ether; // Minimum funding goal in Ether raised uint256 public constant startDate = 1509534000; // epoch timestamp representing the start date (1st november 2017 11:00 gmt) uint256 public constant deadline = 1512126000; // epoch timestamp representing the end date (1st december 2017 11:00 gmt) uint256 public constant refundeadline = 1515927600; // epoch timestamp representing the end date of refund period (14th january 2018 11:00 gmt) uint256 public savedBalance = 0; // Total amount raised in ETH uint256 public savedBalanceToken = 0; // Total ROK Token allocated bool public crowdsaleclosed = false; // To finalize crowdsale mapping (address => uint256) balances; // Balances in incoming Ether mapping (address => uint256) balancesRokToken; // Balances in ROK mapping (address => bool) KYClist; // Events to record new contributions event Contribution(address indexed _contributor, uint256 indexed _value, uint256 indexed _tokens); // Event to record each time Ether is paid out event PayEther( address indexed _receiver, uint256 indexed _value, uint256 indexed _timestamp ); // Event to record when tokens are burned. event BurnTokens( uint256 indexed _value, uint256 indexed _timestamp ); // Initialization function Crowdsale(){ } // Default Function, delegates to contribute function (for ease of use) // WARNING: Not compatible with smart contract invocation, will exceed gas stipend! // Only use from external accounts function() payable whenNotPaused{ } // Contribute Function, accepts incoming payments and tracks balances for each contributors function contribute(address contributor) internal{ } // Function to check if crowdsale has started yet function isStarted() constant returns (bool) { } // Function to check if crowdsale is complete ( function isComplete() constant returns (bool) { } // Function to view current token balance of the crowdsale contract function tokenBalance() constant returns (uint256 balance) { } // Function to check if crowdsale has been successful (has incoming contribution balance met, or exceeded the minimum goal?) function isSuccessful() constant returns (bool) { } // Function to check the Ether balance of a contributor function checkEthBalance(address _contributor) constant returns (uint256 balance) { } // Function to check the current Tokens Sold in the ICO function checkRokSold() constant returns (uint256 total) { } // Function to check the current Tokens affected to the team function checkRokTeam() constant returns (uint256 totalteam) { } // Function to check the current Tokens affected to bounty function checkRokBounty() constant returns (uint256 totalbounty) { } // Function to check the refund period is over function refundPeriodOver() constant returns (bool){ } // Function to check the refund period is over function refundPeriodStart() constant returns (bool){ } // function to check percentage of goal achieved function percentOfGoal() constant returns (uint16 goalPercent) { } // Calcul the ROK bonus according to the investment period function getBonus(uint256 amount) internal constant returns (uint256) { } // Function to set the balance of a sender function setBalance(address sender,uint256 value) internal{ } // Only owner will finalize the crowdsale function finalize() onlyOwner { } // Function to pay out function payout() onlyOwner { } //Function to pay Team function payTeam() internal { } //Function to update KYC list function updateKYClist(address[] allowed) onlyOwner{ } //Function to claim ROK tokens function claim() public{ } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "refund" function of the Crowdsale contract * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function refund() public { require(!isSuccessful()); require(refundPeriodStart()); require(<FILL_ME>) require(checkEthBalance(msg.sender) > 0); uint ETHToSend = checkEthBalance(msg.sender); setBalance(msg.sender,0); asyncSend(msg.sender, ETHToSend); } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "partialRefund" function of the Crowdsale contract with the partial amount of ETH to be refunded (value will be renseigned in WEI) * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function partialRefund(uint256 value) public { } }
!refundPeriodOver()
358,075
!refundPeriodOver()
null
pragma solidity ^0.4.18; library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } } contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { } /** * @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) onlyOwner { } } contract ERC20 { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); event Burn(address indexed from, uint256 value); } contract ROKToken is ERC20, Ownable { using SafeMath for uint256; string public constant name = "ROK Token"; string public constant symbol = "ROK"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 100000000000000000000000000; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Contructor that gives msg.sender all of existing tokens. */ function ROKToken() { } /** * @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 constant returns (uint256 balance) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } function unlockTransfer(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 constant returns (uint256 remaining) { } /** * 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 */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } function burn(uint256 _value) public returns (bool success){ } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { } /** * @dev modifier to allow actions only when the contract IS NOT paused */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused { } } contract PullPayment { using SafeMath for uint256; mapping (address => uint256) public payments; uint256 public totalPayments; /** * @dev Called by the payer to store the sent amount as credit to be pulled. * @param dest The destination address of the funds. * @param amount The amount to transfer. */ function asyncSend(address dest, uint256 amount) internal { } /** * @dev withdraw accumulated balance, called by payee. */ function withdrawPayments() { } } /* * Crowdsale Smart Contract for the Rockchain project * Author: Yosra Helal [email protected] * Contributor: Christophe Ozcan [email protected] * * * MultiSig advisors Keys (3/5) * * Christophe OZCAN 0x75dcB0Ba77e5f99f8ce6F01338Cb235DFE94260c * Jeff GUILBAULT 0x94ddC32c61BC9a799CdDea87e6a1D1316198b0Fa * Mark HAHNEL 0xFaE39043B8698CaA4F1417659B00737fa19b8ECC * Sébastien COLLIGNON 0xd70280108EaF321E100276F6D1b105Ee088CB016 * Sébastien JEHAN 0xE4b0A48D3b1adA17000Fd080cd42DB3e8231752c * * */ contract Crowdsale is Pausable, PullPayment { using SafeMath for uint256; address public owner; ROKToken public rok; address public escrow; // Address of Escrow Provider Wallet address public bounty ; // Address dedicated for bounty services address public team; // Adress for ROK token allocated to the team uint256 public rateETH_ROK; // Rate Ether per ROK token uint256 public constant minimumPurchase = 0.1 ether; // Minimum purchase size of incoming ETH uint256 public constant maxFundingGoal = 100000 ether; // Maximum goal in Ether raised uint256 public constant minFundingGoal = 18000 ether; // Minimum funding goal in Ether raised uint256 public constant startDate = 1509534000; // epoch timestamp representing the start date (1st november 2017 11:00 gmt) uint256 public constant deadline = 1512126000; // epoch timestamp representing the end date (1st december 2017 11:00 gmt) uint256 public constant refundeadline = 1515927600; // epoch timestamp representing the end date of refund period (14th january 2018 11:00 gmt) uint256 public savedBalance = 0; // Total amount raised in ETH uint256 public savedBalanceToken = 0; // Total ROK Token allocated bool public crowdsaleclosed = false; // To finalize crowdsale mapping (address => uint256) balances; // Balances in incoming Ether mapping (address => uint256) balancesRokToken; // Balances in ROK mapping (address => bool) KYClist; // Events to record new contributions event Contribution(address indexed _contributor, uint256 indexed _value, uint256 indexed _tokens); // Event to record each time Ether is paid out event PayEther( address indexed _receiver, uint256 indexed _value, uint256 indexed _timestamp ); // Event to record when tokens are burned. event BurnTokens( uint256 indexed _value, uint256 indexed _timestamp ); // Initialization function Crowdsale(){ } // Default Function, delegates to contribute function (for ease of use) // WARNING: Not compatible with smart contract invocation, will exceed gas stipend! // Only use from external accounts function() payable whenNotPaused{ } // Contribute Function, accepts incoming payments and tracks balances for each contributors function contribute(address contributor) internal{ } // Function to check if crowdsale has started yet function isStarted() constant returns (bool) { } // Function to check if crowdsale is complete ( function isComplete() constant returns (bool) { } // Function to view current token balance of the crowdsale contract function tokenBalance() constant returns (uint256 balance) { } // Function to check if crowdsale has been successful (has incoming contribution balance met, or exceeded the minimum goal?) function isSuccessful() constant returns (bool) { } // Function to check the Ether balance of a contributor function checkEthBalance(address _contributor) constant returns (uint256 balance) { } // Function to check the current Tokens Sold in the ICO function checkRokSold() constant returns (uint256 total) { } // Function to check the current Tokens affected to the team function checkRokTeam() constant returns (uint256 totalteam) { } // Function to check the current Tokens affected to bounty function checkRokBounty() constant returns (uint256 totalbounty) { } // Function to check the refund period is over function refundPeriodOver() constant returns (bool){ } // Function to check the refund period is over function refundPeriodStart() constant returns (bool){ } // function to check percentage of goal achieved function percentOfGoal() constant returns (uint16 goalPercent) { } // Calcul the ROK bonus according to the investment period function getBonus(uint256 amount) internal constant returns (uint256) { } // Function to set the balance of a sender function setBalance(address sender,uint256 value) internal{ } // Only owner will finalize the crowdsale function finalize() onlyOwner { } // Function to pay out function payout() onlyOwner { } //Function to pay Team function payTeam() internal { } //Function to update KYC list function updateKYClist(address[] allowed) onlyOwner{ } //Function to claim ROK tokens function claim() public{ } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "refund" function of the Crowdsale contract * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function refund() public { } /* When MIN_CAP is not reach the smart contract will be credited to make refund possible by backers * 1) backer call the "partialRefund" function of the Crowdsale contract with the partial amount of ETH to be refunded (value will be renseigned in WEI) * 2) backer call the "withdrawPayments" function of the Crowdsale contract to get a refund in ETH */ function partialRefund(uint256 value) public { require(!isSuccessful()); require(refundPeriodStart()); require(!refundPeriodOver()); require(<FILL_ME>) setBalance(msg.sender,checkEthBalance(msg.sender).sub(value)); asyncSend(msg.sender, value); } }
checkEthBalance(msg.sender)>=value
358,075
checkEthBalance(msg.sender)>=value
null
pragma solidity >=0.5.13 <0.6.0; //37, 248 interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract TESTFIVECOIN { string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; address public fundsWallet; uint256 public maximumTarget; uint256 public lastBlock; uint256 public rewardTimes; uint256 public genesisReward; uint256 public premined; uint256 public nRewarMod; uint256 public nWtime; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed from, uint256 value); constructor( uint256 initialSupply, string memory tokenName, string memory tokenSymbol ) public { } function _transfer(address _from, address _to, uint _value) internal { } 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 approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { } function burn(uint256 _value) public returns (bool success) { } function burnFrom(address _from, uint256 _value) public returns (bool success) { } function uintToString(uint256 v) internal pure returns(string memory str) { } function append(string memory a, string memory b) internal pure returns (string memory) { } function getblockhash() public view returns (uint256) { } function getspesificblockhash(uint256 _blocknumber) public view returns(uint256){ } function checkRewardStatus() public view returns (uint256, uint256) { } struct sdetails { uint256 _stocktime; uint256 _stockamount; } address[] totalminers; mapping (address => sdetails) nStockDetails; struct rewarddetails { uint256 _artyr; bool _didGetReward; } mapping (string => rewarddetails) nRewardDetails; struct nBlockDetails { uint256 _bTime; uint256 _tInvest; } mapping (uint256 => nBlockDetails) bBlockIteration; struct activeMiners { address bUser; } mapping(uint256 => activeMiners[]) aMiners; function numberofminer() view public returns (uint256) { } function nAddrHash() view public returns (uint256) { } function getmaximumAverage() public view returns(uint){ } function nMixAddrandBlock() public view returns(string memory) { } function becameaminer(uint256 mineamount) public returns (uint256) { uint256 realMineAmount = mineamount * 10 ** uint256(decimals); require(realMineAmount > getmaximumAverage() / 100); //Minimum maximum targes one percents neccessary. require(realMineAmount > 1 * 10 ** uint256(decimals)); //minimum 1 coin require require(<FILL_ME>) maximumTarget += realMineAmount; nStockDetails[msg.sender]._stocktime = now; nStockDetails[msg.sender]._stockamount = realMineAmount; totalminers.push(msg.sender); _transfer(msg.sender, address(this), realMineAmount); return 200; } function checkAddrMinerStatus(address _addr) view public returns(bool){ } function signfordailyreward(uint256 _bnumber) public returns (uint256) { } function getactiveminersnumber() view public returns(uint256) { } function getDailyReward() public returns(uint256) { } function getyourcoinsbackafterthreemonths() public returns(uint256) { } struct memoIncDetails { uint256 _receiveTime; uint256 _receiveAmount; address _senderAddr; string _senderMemo; } mapping(string => memoIncDetails[]) textPurchases; function nMixForeignAddrandBlock(address _addr) public view returns(string memory) { } function sendtokenwithmemo(uint256 _amount, address _to, string memory _memo) public returns(uint256) { } function checkmemopurchases(address _addr, uint256 _index) view public returns(uint256, uint256, string memory, address) { } function getmemotextcountforaddr(address _addr) view public returns(uint256) { } //end of the contract }
nStockDetails[msg.sender]._stocktime==0
358,093
nStockDetails[msg.sender]._stocktime==0
null
pragma solidity >=0.5.13 <0.6.0; //37, 248 interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract TESTFIVECOIN { string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; address public fundsWallet; uint256 public maximumTarget; uint256 public lastBlock; uint256 public rewardTimes; uint256 public genesisReward; uint256 public premined; uint256 public nRewarMod; uint256 public nWtime; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed from, uint256 value); constructor( uint256 initialSupply, string memory tokenName, string memory tokenSymbol ) public { } function _transfer(address _from, address _to, uint _value) internal { } 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 approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { } function burn(uint256 _value) public returns (bool success) { } function burnFrom(address _from, uint256 _value) public returns (bool success) { } function uintToString(uint256 v) internal pure returns(string memory str) { } function append(string memory a, string memory b) internal pure returns (string memory) { } function getblockhash() public view returns (uint256) { } function getspesificblockhash(uint256 _blocknumber) public view returns(uint256){ } function checkRewardStatus() public view returns (uint256, uint256) { } struct sdetails { uint256 _stocktime; uint256 _stockamount; } address[] totalminers; mapping (address => sdetails) nStockDetails; struct rewarddetails { uint256 _artyr; bool _didGetReward; } mapping (string => rewarddetails) nRewardDetails; struct nBlockDetails { uint256 _bTime; uint256 _tInvest; } mapping (uint256 => nBlockDetails) bBlockIteration; struct activeMiners { address bUser; } mapping(uint256 => activeMiners[]) aMiners; function numberofminer() view public returns (uint256) { } function nAddrHash() view public returns (uint256) { } function getmaximumAverage() public view returns(uint){ } function nMixAddrandBlock() public view returns(string memory) { } function becameaminer(uint256 mineamount) public returns (uint256) { } function checkAddrMinerStatus(address _addr) view public returns(bool){ } function signfordailyreward(uint256 _bnumber) public returns (uint256) { require(<FILL_ME>) require((block.number-1) - _bnumber < 100); require(uint256(blockhash(_bnumber)) % nRewarMod == 1); require(nRewardDetails[nMixAddrandBlock()]._artyr == 0); //Register this block for reward. if(bBlockIteration[lastBlock]._bTime < now + 180){ lastBlock += 1; bBlockIteration[lastBlock]._bTime = now; } bBlockIteration[lastBlock]._tInvest += nStockDetails[msg.sender]._stockamount; nRewardDetails[nMixAddrandBlock()]._artyr = now; nRewardDetails[nMixAddrandBlock()]._didGetReward = false; aMiners[lastBlock].push(activeMiners(msg.sender)); return 200; } function getactiveminersnumber() view public returns(uint256) { } function getDailyReward() public returns(uint256) { } function getyourcoinsbackafterthreemonths() public returns(uint256) { } struct memoIncDetails { uint256 _receiveTime; uint256 _receiveAmount; address _senderAddr; string _senderMemo; } mapping(string => memoIncDetails[]) textPurchases; function nMixForeignAddrandBlock(address _addr) public view returns(string memory) { } function sendtokenwithmemo(uint256 _amount, address _to, string memory _memo) public returns(uint256) { } function checkmemopurchases(address _addr, uint256 _index) view public returns(uint256, uint256, string memory, address) { } function getmemotextcountforaddr(address _addr) view public returns(uint256) { } //end of the contract }
checkAddrMinerStatus(msg.sender)==true
358,093
checkAddrMinerStatus(msg.sender)==true
null
pragma solidity >=0.5.13 <0.6.0; //37, 248 interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract TESTFIVECOIN { string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; address public fundsWallet; uint256 public maximumTarget; uint256 public lastBlock; uint256 public rewardTimes; uint256 public genesisReward; uint256 public premined; uint256 public nRewarMod; uint256 public nWtime; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed from, uint256 value); constructor( uint256 initialSupply, string memory tokenName, string memory tokenSymbol ) public { } function _transfer(address _from, address _to, uint _value) internal { } 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 approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { } function burn(uint256 _value) public returns (bool success) { } function burnFrom(address _from, uint256 _value) public returns (bool success) { } function uintToString(uint256 v) internal pure returns(string memory str) { } function append(string memory a, string memory b) internal pure returns (string memory) { } function getblockhash() public view returns (uint256) { } function getspesificblockhash(uint256 _blocknumber) public view returns(uint256){ } function checkRewardStatus() public view returns (uint256, uint256) { } struct sdetails { uint256 _stocktime; uint256 _stockamount; } address[] totalminers; mapping (address => sdetails) nStockDetails; struct rewarddetails { uint256 _artyr; bool _didGetReward; } mapping (string => rewarddetails) nRewardDetails; struct nBlockDetails { uint256 _bTime; uint256 _tInvest; } mapping (uint256 => nBlockDetails) bBlockIteration; struct activeMiners { address bUser; } mapping(uint256 => activeMiners[]) aMiners; function numberofminer() view public returns (uint256) { } function nAddrHash() view public returns (uint256) { } function getmaximumAverage() public view returns(uint){ } function nMixAddrandBlock() public view returns(string memory) { } function becameaminer(uint256 mineamount) public returns (uint256) { } function checkAddrMinerStatus(address _addr) view public returns(bool){ } function signfordailyreward(uint256 _bnumber) public returns (uint256) { require(checkAddrMinerStatus(msg.sender) == true); require(<FILL_ME>) require(uint256(blockhash(_bnumber)) % nRewarMod == 1); require(nRewardDetails[nMixAddrandBlock()]._artyr == 0); //Register this block for reward. if(bBlockIteration[lastBlock]._bTime < now + 180){ lastBlock += 1; bBlockIteration[lastBlock]._bTime = now; } bBlockIteration[lastBlock]._tInvest += nStockDetails[msg.sender]._stockamount; nRewardDetails[nMixAddrandBlock()]._artyr = now; nRewardDetails[nMixAddrandBlock()]._didGetReward = false; aMiners[lastBlock].push(activeMiners(msg.sender)); return 200; } function getactiveminersnumber() view public returns(uint256) { } function getDailyReward() public returns(uint256) { } function getyourcoinsbackafterthreemonths() public returns(uint256) { } struct memoIncDetails { uint256 _receiveTime; uint256 _receiveAmount; address _senderAddr; string _senderMemo; } mapping(string => memoIncDetails[]) textPurchases; function nMixForeignAddrandBlock(address _addr) public view returns(string memory) { } function sendtokenwithmemo(uint256 _amount, address _to, string memory _memo) public returns(uint256) { } function checkmemopurchases(address _addr, uint256 _index) view public returns(uint256, uint256, string memory, address) { } function getmemotextcountforaddr(address _addr) view public returns(uint256) { } //end of the contract }
(block.number-1)-_bnumber<100
358,093
(block.number-1)-_bnumber<100
null
pragma solidity >=0.5.13 <0.6.0; //37, 248 interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract TESTFIVECOIN { string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; address public fundsWallet; uint256 public maximumTarget; uint256 public lastBlock; uint256 public rewardTimes; uint256 public genesisReward; uint256 public premined; uint256 public nRewarMod; uint256 public nWtime; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed from, uint256 value); constructor( uint256 initialSupply, string memory tokenName, string memory tokenSymbol ) public { } function _transfer(address _from, address _to, uint _value) internal { } 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 approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { } function burn(uint256 _value) public returns (bool success) { } function burnFrom(address _from, uint256 _value) public returns (bool success) { } function uintToString(uint256 v) internal pure returns(string memory str) { } function append(string memory a, string memory b) internal pure returns (string memory) { } function getblockhash() public view returns (uint256) { } function getspesificblockhash(uint256 _blocknumber) public view returns(uint256){ } function checkRewardStatus() public view returns (uint256, uint256) { } struct sdetails { uint256 _stocktime; uint256 _stockamount; } address[] totalminers; mapping (address => sdetails) nStockDetails; struct rewarddetails { uint256 _artyr; bool _didGetReward; } mapping (string => rewarddetails) nRewardDetails; struct nBlockDetails { uint256 _bTime; uint256 _tInvest; } mapping (uint256 => nBlockDetails) bBlockIteration; struct activeMiners { address bUser; } mapping(uint256 => activeMiners[]) aMiners; function numberofminer() view public returns (uint256) { } function nAddrHash() view public returns (uint256) { } function getmaximumAverage() public view returns(uint){ } function nMixAddrandBlock() public view returns(string memory) { } function becameaminer(uint256 mineamount) public returns (uint256) { } function checkAddrMinerStatus(address _addr) view public returns(bool){ } function signfordailyreward(uint256 _bnumber) public returns (uint256) { require(checkAddrMinerStatus(msg.sender) == true); require((block.number-1) - _bnumber < 100); require(<FILL_ME>) require(nRewardDetails[nMixAddrandBlock()]._artyr == 0); //Register this block for reward. if(bBlockIteration[lastBlock]._bTime < now + 180){ lastBlock += 1; bBlockIteration[lastBlock]._bTime = now; } bBlockIteration[lastBlock]._tInvest += nStockDetails[msg.sender]._stockamount; nRewardDetails[nMixAddrandBlock()]._artyr = now; nRewardDetails[nMixAddrandBlock()]._didGetReward = false; aMiners[lastBlock].push(activeMiners(msg.sender)); return 200; } function getactiveminersnumber() view public returns(uint256) { } function getDailyReward() public returns(uint256) { } function getyourcoinsbackafterthreemonths() public returns(uint256) { } struct memoIncDetails { uint256 _receiveTime; uint256 _receiveAmount; address _senderAddr; string _senderMemo; } mapping(string => memoIncDetails[]) textPurchases; function nMixForeignAddrandBlock(address _addr) public view returns(string memory) { } function sendtokenwithmemo(uint256 _amount, address _to, string memory _memo) public returns(uint256) { } function checkmemopurchases(address _addr, uint256 _index) view public returns(uint256, uint256, string memory, address) { } function getmemotextcountforaddr(address _addr) view public returns(uint256) { } //end of the contract }
uint256(blockhash(_bnumber))%nRewarMod==1
358,093
uint256(blockhash(_bnumber))%nRewarMod==1
null
pragma solidity >=0.5.13 <0.6.0; //37, 248 interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract TESTFIVECOIN { string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; address public fundsWallet; uint256 public maximumTarget; uint256 public lastBlock; uint256 public rewardTimes; uint256 public genesisReward; uint256 public premined; uint256 public nRewarMod; uint256 public nWtime; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed from, uint256 value); constructor( uint256 initialSupply, string memory tokenName, string memory tokenSymbol ) public { } function _transfer(address _from, address _to, uint _value) internal { } 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 approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { } function burn(uint256 _value) public returns (bool success) { } function burnFrom(address _from, uint256 _value) public returns (bool success) { } function uintToString(uint256 v) internal pure returns(string memory str) { } function append(string memory a, string memory b) internal pure returns (string memory) { } function getblockhash() public view returns (uint256) { } function getspesificblockhash(uint256 _blocknumber) public view returns(uint256){ } function checkRewardStatus() public view returns (uint256, uint256) { } struct sdetails { uint256 _stocktime; uint256 _stockamount; } address[] totalminers; mapping (address => sdetails) nStockDetails; struct rewarddetails { uint256 _artyr; bool _didGetReward; } mapping (string => rewarddetails) nRewardDetails; struct nBlockDetails { uint256 _bTime; uint256 _tInvest; } mapping (uint256 => nBlockDetails) bBlockIteration; struct activeMiners { address bUser; } mapping(uint256 => activeMiners[]) aMiners; function numberofminer() view public returns (uint256) { } function nAddrHash() view public returns (uint256) { } function getmaximumAverage() public view returns(uint){ } function nMixAddrandBlock() public view returns(string memory) { } function becameaminer(uint256 mineamount) public returns (uint256) { } function checkAddrMinerStatus(address _addr) view public returns(bool){ } function signfordailyreward(uint256 _bnumber) public returns (uint256) { require(checkAddrMinerStatus(msg.sender) == true); require((block.number-1) - _bnumber < 100); require(uint256(blockhash(_bnumber)) % nRewarMod == 1); require(<FILL_ME>) //Register this block for reward. if(bBlockIteration[lastBlock]._bTime < now + 180){ lastBlock += 1; bBlockIteration[lastBlock]._bTime = now; } bBlockIteration[lastBlock]._tInvest += nStockDetails[msg.sender]._stockamount; nRewardDetails[nMixAddrandBlock()]._artyr = now; nRewardDetails[nMixAddrandBlock()]._didGetReward = false; aMiners[lastBlock].push(activeMiners(msg.sender)); return 200; } function getactiveminersnumber() view public returns(uint256) { } function getDailyReward() public returns(uint256) { } function getyourcoinsbackafterthreemonths() public returns(uint256) { } struct memoIncDetails { uint256 _receiveTime; uint256 _receiveAmount; address _senderAddr; string _senderMemo; } mapping(string => memoIncDetails[]) textPurchases; function nMixForeignAddrandBlock(address _addr) public view returns(string memory) { } function sendtokenwithmemo(uint256 _amount, address _to, string memory _memo) public returns(uint256) { } function checkmemopurchases(address _addr, uint256 _index) view public returns(uint256, uint256, string memory, address) { } function getmemotextcountforaddr(address _addr) view public returns(uint256) { } //end of the contract }
nRewardDetails[nMixAddrandBlock()]._artyr==0
358,093
nRewardDetails[nMixAddrandBlock()]._artyr==0
null
pragma solidity >=0.5.13 <0.6.0; //37, 248 interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract TESTFIVECOIN { string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; address public fundsWallet; uint256 public maximumTarget; uint256 public lastBlock; uint256 public rewardTimes; uint256 public genesisReward; uint256 public premined; uint256 public nRewarMod; uint256 public nWtime; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed from, uint256 value); constructor( uint256 initialSupply, string memory tokenName, string memory tokenSymbol ) public { } function _transfer(address _from, address _to, uint _value) internal { } 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 approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { } function burn(uint256 _value) public returns (bool success) { } function burnFrom(address _from, uint256 _value) public returns (bool success) { } function uintToString(uint256 v) internal pure returns(string memory str) { } function append(string memory a, string memory b) internal pure returns (string memory) { } function getblockhash() public view returns (uint256) { } function getspesificblockhash(uint256 _blocknumber) public view returns(uint256){ } function checkRewardStatus() public view returns (uint256, uint256) { } struct sdetails { uint256 _stocktime; uint256 _stockamount; } address[] totalminers; mapping (address => sdetails) nStockDetails; struct rewarddetails { uint256 _artyr; bool _didGetReward; } mapping (string => rewarddetails) nRewardDetails; struct nBlockDetails { uint256 _bTime; uint256 _tInvest; } mapping (uint256 => nBlockDetails) bBlockIteration; struct activeMiners { address bUser; } mapping(uint256 => activeMiners[]) aMiners; function numberofminer() view public returns (uint256) { } function nAddrHash() view public returns (uint256) { } function getmaximumAverage() public view returns(uint){ } function nMixAddrandBlock() public view returns(string memory) { } function becameaminer(uint256 mineamount) public returns (uint256) { } function checkAddrMinerStatus(address _addr) view public returns(bool){ } function signfordailyreward(uint256 _bnumber) public returns (uint256) { } function getactiveminersnumber() view public returns(uint256) { } function getDailyReward() public returns(uint256) { require(checkAddrMinerStatus(msg.sender) == true); require(<FILL_ME>) uint256 totalRA = nRewarMod * 10 ** uint256(decimals) / 2 ** (lastBlock/5); //2 years equals 730 days... omgbbqhax uint256 usersReward = (totalRA * (nStockDetails[msg.sender]._stockamount * 100) / bBlockIteration[lastBlock]._tInvest) / 100; nRewardDetails[nMixAddrandBlock()]._didGetReward = true; _transfer(address(this), msg.sender, usersReward); return usersReward; } function getyourcoinsbackafterthreemonths() public returns(uint256) { } struct memoIncDetails { uint256 _receiveTime; uint256 _receiveAmount; address _senderAddr; string _senderMemo; } mapping(string => memoIncDetails[]) textPurchases; function nMixForeignAddrandBlock(address _addr) public view returns(string memory) { } function sendtokenwithmemo(uint256 _amount, address _to, string memory _memo) public returns(uint256) { } function checkmemopurchases(address _addr, uint256 _index) view public returns(uint256, uint256, string memory, address) { } function getmemotextcountforaddr(address _addr) view public returns(uint256) { } //end of the contract }
nRewardDetails[nMixAddrandBlock()]._didGetReward==false
358,093
nRewardDetails[nMixAddrandBlock()]._didGetReward==false
null
pragma solidity >=0.5.13 <0.6.0; //37, 248 interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract TESTFIVECOIN { string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; address public fundsWallet; uint256 public maximumTarget; uint256 public lastBlock; uint256 public rewardTimes; uint256 public genesisReward; uint256 public premined; uint256 public nRewarMod; uint256 public nWtime; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed from, uint256 value); constructor( uint256 initialSupply, string memory tokenName, string memory tokenSymbol ) public { } function _transfer(address _from, address _to, uint _value) internal { } 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 approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { } function burn(uint256 _value) public returns (bool success) { } function burnFrom(address _from, uint256 _value) public returns (bool success) { } function uintToString(uint256 v) internal pure returns(string memory str) { } function append(string memory a, string memory b) internal pure returns (string memory) { } function getblockhash() public view returns (uint256) { } function getspesificblockhash(uint256 _blocknumber) public view returns(uint256){ } function checkRewardStatus() public view returns (uint256, uint256) { } struct sdetails { uint256 _stocktime; uint256 _stockamount; } address[] totalminers; mapping (address => sdetails) nStockDetails; struct rewarddetails { uint256 _artyr; bool _didGetReward; } mapping (string => rewarddetails) nRewardDetails; struct nBlockDetails { uint256 _bTime; uint256 _tInvest; } mapping (uint256 => nBlockDetails) bBlockIteration; struct activeMiners { address bUser; } mapping(uint256 => activeMiners[]) aMiners; function numberofminer() view public returns (uint256) { } function nAddrHash() view public returns (uint256) { } function getmaximumAverage() public view returns(uint){ } function nMixAddrandBlock() public view returns(string memory) { } function becameaminer(uint256 mineamount) public returns (uint256) { } function checkAddrMinerStatus(address _addr) view public returns(bool){ } function signfordailyreward(uint256 _bnumber) public returns (uint256) { } function getactiveminersnumber() view public returns(uint256) { } function getDailyReward() public returns(uint256) { } function getyourcoinsbackafterthreemonths() public returns(uint256) { require(<FILL_ME>) _transfer(address(this),msg.sender,nStockDetails[msg.sender]._stockamount); return nStockDetails[msg.sender]._stockamount; } struct memoIncDetails { uint256 _receiveTime; uint256 _receiveAmount; address _senderAddr; string _senderMemo; } mapping(string => memoIncDetails[]) textPurchases; function nMixForeignAddrandBlock(address _addr) public view returns(string memory) { } function sendtokenwithmemo(uint256 _amount, address _to, string memory _memo) public returns(uint256) { } function checkmemopurchases(address _addr, uint256 _index) view public returns(uint256, uint256, string memory, address) { } function getmemotextcountforaddr(address _addr) view public returns(uint256) { } //end of the contract }
nRewardDetails[nMixAddrandBlock()]._artyr>now+360
358,093
nRewardDetails[nMixAddrandBlock()]._artyr>now+360
null
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.4; import "./Ownable.sol"; interface IERC20 { function transfer(address recipient, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } contract CRDNetworkAirdropV2 is Ownable { mapping (address => bool) private addressRecord; address public tokenAddress; uint public rewardAmount; constructor(address _tokenAddress, uint _rewardAmount) Ownable() { } function claimReward() public { require(<FILL_ME>) IERC20(tokenAddress).transfer(msg.sender, rewardAmount); addressRecord[msg.sender] = false; } function checkStatus(address _address) public view returns(bool, uint) { } function setReward(uint _rewardAmount) public onlyOwner { } function setToken(address _tokenAddress) public onlyOwner { } function setAccounts(address[] memory _records) public onlyOwner { } function transferToken( uint _amount) public onlyOwner returns (bool){ } }
addressRecord[msg.sender]==true
358,161
addressRecord[msg.sender]==true
"Sold Out"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/[email protected]/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract LittleBois is ERC721, ERC721Enumerable, ERC721Burnable, Ownable { using SafeMath for uint256; using Strings for uint256; // Set variables uint256 public LBois_SUPPLY = 6666; uint256 public LBois_PRICE = 60000000000000000 wei; bool private _saleActive = false; bool private _presaleActive = false; uint256 public constant presale_supply = 666; uint256 public maxtxinpresale = 15; uint256 public maxtxinsale = 20; string private _metaBaseUri = ""; // Public Functions constructor() ERC721("Little Bois", "LBois") { } function mint(uint16 numberOfTokens) public payable { require(isSaleActive(), "LBois sale not active"); require(<FILL_ME>) require(LBois_PRICE.mul(numberOfTokens) <= msg.value, "Ether amount sent is incorrect"); require(numberOfTokens<=20, "Max 20 are allowed" ); _mintTokens(numberOfTokens); } function premint(uint16 numberOfTokens) public payable { } function Giveaway(address to, uint16 numberOfTokens) external onlyOwner { } function isSaleActive() public view returns (bool) { } function ispreSaleActive() public view returns (bool) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } // Owner Functions function Flipsalestatus() external onlyOwner { } function Flippresalestatus() external onlyOwner { } function setMetaBaseURI(string memory baseURI) external onlyOwner { } function setsupply(uint256 _LBoisupply ) external onlyOwner { } function withdrawAll() external onlyOwner { } // Internal Functions function _mintTokens(uint16 numberOfTokens) internal { } function _baseURI() override internal view returns (string memory) { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
totalSupply().add(numberOfTokens)<=LBois_SUPPLY,"Sold Out"
358,175
totalSupply().add(numberOfTokens)<=LBois_SUPPLY
"Ether amount sent is incorrect"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/[email protected]/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract LittleBois is ERC721, ERC721Enumerable, ERC721Burnable, Ownable { using SafeMath for uint256; using Strings for uint256; // Set variables uint256 public LBois_SUPPLY = 6666; uint256 public LBois_PRICE = 60000000000000000 wei; bool private _saleActive = false; bool private _presaleActive = false; uint256 public constant presale_supply = 666; uint256 public maxtxinpresale = 15; uint256 public maxtxinsale = 20; string private _metaBaseUri = ""; // Public Functions constructor() ERC721("Little Bois", "LBois") { } function mint(uint16 numberOfTokens) public payable { require(isSaleActive(), "LBois sale not active"); require(totalSupply().add(numberOfTokens) <= LBois_SUPPLY, "Sold Out"); require(<FILL_ME>) require(numberOfTokens<=20, "Max 20 are allowed" ); _mintTokens(numberOfTokens); } function premint(uint16 numberOfTokens) public payable { } function Giveaway(address to, uint16 numberOfTokens) external onlyOwner { } function isSaleActive() public view returns (bool) { } function ispreSaleActive() public view returns (bool) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } // Owner Functions function Flipsalestatus() external onlyOwner { } function Flippresalestatus() external onlyOwner { } function setMetaBaseURI(string memory baseURI) external onlyOwner { } function setsupply(uint256 _LBoisupply ) external onlyOwner { } function withdrawAll() external onlyOwner { } // Internal Functions function _mintTokens(uint16 numberOfTokens) internal { } function _baseURI() override internal view returns (string memory) { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
LBois_PRICE.mul(numberOfTokens)<=msg.value,"Ether amount sent is incorrect"
358,175
LBois_PRICE.mul(numberOfTokens)<=msg.value
"Presale Of LBois is not active"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/[email protected]/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract LittleBois is ERC721, ERC721Enumerable, ERC721Burnable, Ownable { using SafeMath for uint256; using Strings for uint256; // Set variables uint256 public LBois_SUPPLY = 6666; uint256 public LBois_PRICE = 60000000000000000 wei; bool private _saleActive = false; bool private _presaleActive = false; uint256 public constant presale_supply = 666; uint256 public maxtxinpresale = 15; uint256 public maxtxinsale = 20; string private _metaBaseUri = ""; // Public Functions constructor() ERC721("Little Bois", "LBois") { } function mint(uint16 numberOfTokens) public payable { } function premint(uint16 numberOfTokens) public payable { require(<FILL_ME>) require(totalSupply().add(numberOfTokens) <= presale_supply, "Insufficient supply, Try in public sale"); require(LBois_PRICE.mul(numberOfTokens) <= msg.value, "Ether amount sent is incorrect"); require(numberOfTokens<=15, "Max 15 are allowed" ); _mintTokens(numberOfTokens); } function Giveaway(address to, uint16 numberOfTokens) external onlyOwner { } function isSaleActive() public view returns (bool) { } function ispreSaleActive() public view returns (bool) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } // Owner Functions function Flipsalestatus() external onlyOwner { } function Flippresalestatus() external onlyOwner { } function setMetaBaseURI(string memory baseURI) external onlyOwner { } function setsupply(uint256 _LBoisupply ) external onlyOwner { } function withdrawAll() external onlyOwner { } // Internal Functions function _mintTokens(uint16 numberOfTokens) internal { } function _baseURI() override internal view returns (string memory) { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
ispreSaleActive(),"Presale Of LBois is not active"
358,175
ispreSaleActive()
"Insufficient supply, Try in public sale"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/[email protected]/access/Ownable.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; contract LittleBois is ERC721, ERC721Enumerable, ERC721Burnable, Ownable { using SafeMath for uint256; using Strings for uint256; // Set variables uint256 public LBois_SUPPLY = 6666; uint256 public LBois_PRICE = 60000000000000000 wei; bool private _saleActive = false; bool private _presaleActive = false; uint256 public constant presale_supply = 666; uint256 public maxtxinpresale = 15; uint256 public maxtxinsale = 20; string private _metaBaseUri = ""; // Public Functions constructor() ERC721("Little Bois", "LBois") { } function mint(uint16 numberOfTokens) public payable { } function premint(uint16 numberOfTokens) public payable { require(ispreSaleActive(), "Presale Of LBois is not active"); require(<FILL_ME>) require(LBois_PRICE.mul(numberOfTokens) <= msg.value, "Ether amount sent is incorrect"); require(numberOfTokens<=15, "Max 15 are allowed" ); _mintTokens(numberOfTokens); } function Giveaway(address to, uint16 numberOfTokens) external onlyOwner { } function isSaleActive() public view returns (bool) { } function ispreSaleActive() public view returns (bool) { } function tokenURI(uint256 tokenId) override public view returns (string memory) { } // Owner Functions function Flipsalestatus() external onlyOwner { } function Flippresalestatus() external onlyOwner { } function setMetaBaseURI(string memory baseURI) external onlyOwner { } function setsupply(uint256 _LBoisupply ) external onlyOwner { } function withdrawAll() external onlyOwner { } // Internal Functions function _mintTokens(uint16 numberOfTokens) internal { } function _baseURI() override internal view returns (string memory) { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
totalSupply().add(numberOfTokens)<=presale_supply,"Insufficient supply, Try in public sale"
358,175
totalSupply().add(numberOfTokens)<=presale_supply
"already initialized"
pragma solidity ^0.5.0; contract LPTokenWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public uni_lp = IERC20(0x9Ca884A5dF7ABe4619035596D39D912A1A02340D); uint256 private _totalSupply; mapping(address => uint256) private _balances; function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function stake(uint256 amount) public { } function withdraw(uint256 amount) public { } } interface BENTO { function bentosScalingFactor() external returns (uint256); function mint(address to, uint256 amount) external; } contract BENTOIncentivizer is LPTokenWrapper, IRewardDistributionRecipient { IERC20 public bento = IERC20(0x8a727D058761F021Ea100a1c7b92536aC27b762A); uint256 public constant DURATION = 7776000; // 30 Days uint256 public initreward = 100 * 10**3 * 10**18; // 100k uint256 public starttime = 1599580800 + 12 hours; // 2020-08-20 12:00:00 (UTC +00:00) uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event RewardPaid(address indexed user, uint256 reward); modifier updateReward(address account) { } function lastTimeRewardApplicable() public view returns (uint256) { } function rewardPerToken() public view returns (uint256) { } function earned(address account) public view returns (uint256) { } // stake visibility is public as overriding LPTokenWrapper's stake() function function stake(uint256 amount) public updateReward(msg.sender) checkhalve checkStart { } function withdraw(uint256 amount) public updateReward(msg.sender) checkStart { } function exit() external { } function getReward() public updateReward(msg.sender) checkhalve checkStart { } modifier checkhalve() { } modifier checkStart(){ } function checkRate() internal view returns (uint256) { } function notifyRewardAmount(uint256 reward) external onlyRewardDistribution updateReward(address(0)) { if (block.timestamp > starttime) { if (block.timestamp >= periodFinish) { rewardRate = reward.div(DURATION); } else { uint256 remaining = periodFinish.sub(block.timestamp); uint256 leftover = remaining.mul(rewardRate); rewardRate = reward.add(leftover).div(DURATION); } lastUpdateTime = block.timestamp; periodFinish = block.timestamp.add(DURATION); emit RewardAdded(reward); } else { require(<FILL_ME>) bento.mint(address(this), initreward); rewardRate = initreward.div(DURATION); lastUpdateTime = starttime; periodFinish = starttime.add(DURATION); emit RewardAdded(reward); } // avoid overflow to lock assets checkRate(); } // This function allows governance to take unsupported tokens out of the // contract, since this one exists longer than the other pools. // This is in an effort to make someone whole, should they seriously // mess up. There is no guarantee governance will vote to return these. // It also allows for removal of airdropped tokens. function governanceRecoverUnsupported(IERC20 _token, uint256 amount, address to) external { } }
bento.balanceOf(address(this))==0,"already initialized"
358,326
bento.balanceOf(address(this))==0
"Out of limited."
pragma solidity 0.6.12; // MasterChef is the master of BTF contract MasterChef is Ownable { uint256 public constant DURATION = 7 days; uint256 public TotalSupply = 1000000 * 1e18; uint256 public initReward = 100000 * 1e18; uint256 public periodFinish = 0; using SafeMath for uint256; using SafeERC20 for IERC20; uint256 public rewardRate = 0; address public rewardReferral; uint256 public constant referralMax = 10000; // 1% uint256 public referralPercent = 100; // Fees 20% in total // - 15% devFundFee for development fund // - 5% comFundFee for community fund address public devAddr; uint256 public devFundFee = 1500; uint256 public constant devFundMax = 10000; address public comAddr; uint256 public comFundFee = 500; uint256 public constant comFundMax = 10000; address public timelock; // Info of each user. struct UserInfo { uint256 amount; uint256 rewardPerTokenPaid; uint256 rewards; } // Info of each pool. struct PoolInfo { IERC20 lpToken; uint256 allocPoint; uint256 lastUpdateTime; uint256 rewardPerTokenStored; } // The BTF TOKEN! BTFToken public btf; // The migrator contract. It has a lot of power. Can only be set through governance (owner). IMigratorChef public migrator; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Total allocation poitns. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The block number when BTF mining starts. uint256 public startBlock; // add the same LP token only once mapping(address => bool) lpExists; event RewardAdded(uint256 reward); event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount); constructor(BTFToken _btf, uint256 _startBlock, address _devAddr, address _comAddr, address _timelock) public { } function setRewardReferral(address _rewardReferral) external onlyOwner { } function setReferralPercent(uint256 _referralPercent) external onlyOwner { } function setDevFundFee(uint256 _devFundFee) external { } // Update developer address by the previous dev. function dev(address _devAddr) external { } function setComFundFee(uint256 _comFundFee) external { } // Update community address by timelock. function com(address _comAddr) external { } function setTimelock(address _timelock) external { } modifier reduceHalve() { require(<FILL_ME>) if (periodFinish == 0) { periodFinish = block.timestamp.add(DURATION); uint256 _comReward = initReward.mul(comFundFee).div(comFundMax); uint256 _devReward = initReward.mul(devFundFee).div(devFundMax); uint256 _initReward = initReward.sub(_comReward).sub(_devReward); rewardRate = _initReward.div(DURATION); btf.mint(address(this), _initReward); btf.mint(comAddr, _comReward); btf.mint(devAddr, _devReward); } else if (block.timestamp >= periodFinish) { initReward = initReward.sub(initReward.mul(10).div(100)); uint256 _comReward = initReward.mul(comFundFee).div(comFundMax); uint256 _devReward = initReward.mul(devFundFee).div(devFundMax); uint256 _initReward = initReward.sub(_comReward).sub(_devReward); rewardRate = _initReward.div(DURATION); btf.mint(address(this), _initReward); btf.mint(comAddr, _comReward); btf.mint(devAddr, _devReward); periodFinish = block.timestamp.add(DURATION); emit RewardAdded(initReward); } _; } modifier checkStart(){ } modifier updateReward(uint256 _pid, address _user) { } function lastTimeRewardApplicable() public view returns (uint256) { } function rewardPerToken(uint256 _pid) public view returns (uint256) { } function earned(uint256 _pid, address _user) public view returns (uint256) { } // Add a new lp to the pool. Can only be called by the owner. function add(uint256 _allocPoint, IERC20 _lpToken) public onlyOwner { } function poolLength() external view returns (uint256) { } // Update the given pool's BTF allocation point. Can only be called by the owner. function set(uint256 _pid, uint256 _allocPoint) public onlyOwner { } // View function to see pending BTFs on frontend. function pendingBTF(uint256 _pid, address _user) external view returns (uint256) { } function _getReward(uint256 _pid, address _user) private { } // Deposit LP tokens to MasterChef for BTF allocation. function deposit(uint256 _pid, uint256 _amount, address referrer) public updateReward(_pid, msg.sender) reduceHalve checkStart { } // Withdraw LP tokens from MasterChef. function withdraw(uint256 _pid, uint256 _amount) public updateReward(_pid, msg.sender) reduceHalve checkStart { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public { } // Set the migrator contract. Can only be called by the owner. function setMigrator(IMigratorChef _migrator) public onlyOwner { } // Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good. function migrate(uint256 _pid) public { } }
btf.totalSupply()<=TotalSupply,"Out of limited."
358,353
btf.totalSupply()<=TotalSupply
"do not add the same lp token more than once"
pragma solidity 0.6.12; // MasterChef is the master of BTF contract MasterChef is Ownable { uint256 public constant DURATION = 7 days; uint256 public TotalSupply = 1000000 * 1e18; uint256 public initReward = 100000 * 1e18; uint256 public periodFinish = 0; using SafeMath for uint256; using SafeERC20 for IERC20; uint256 public rewardRate = 0; address public rewardReferral; uint256 public constant referralMax = 10000; // 1% uint256 public referralPercent = 100; // Fees 20% in total // - 15% devFundFee for development fund // - 5% comFundFee for community fund address public devAddr; uint256 public devFundFee = 1500; uint256 public constant devFundMax = 10000; address public comAddr; uint256 public comFundFee = 500; uint256 public constant comFundMax = 10000; address public timelock; // Info of each user. struct UserInfo { uint256 amount; uint256 rewardPerTokenPaid; uint256 rewards; } // Info of each pool. struct PoolInfo { IERC20 lpToken; uint256 allocPoint; uint256 lastUpdateTime; uint256 rewardPerTokenStored; } // The BTF TOKEN! BTFToken public btf; // The migrator contract. It has a lot of power. Can only be set through governance (owner). IMigratorChef public migrator; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Total allocation poitns. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The block number when BTF mining starts. uint256 public startBlock; // add the same LP token only once mapping(address => bool) lpExists; event RewardAdded(uint256 reward); event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event EmergencyWithdraw(address indexed user, uint256 indexed pid, uint256 amount); constructor(BTFToken _btf, uint256 _startBlock, address _devAddr, address _comAddr, address _timelock) public { } function setRewardReferral(address _rewardReferral) external onlyOwner { } function setReferralPercent(uint256 _referralPercent) external onlyOwner { } function setDevFundFee(uint256 _devFundFee) external { } // Update developer address by the previous dev. function dev(address _devAddr) external { } function setComFundFee(uint256 _comFundFee) external { } // Update community address by timelock. function com(address _comAddr) external { } function setTimelock(address _timelock) external { } modifier reduceHalve() { } modifier checkStart(){ } modifier updateReward(uint256 _pid, address _user) { } function lastTimeRewardApplicable() public view returns (uint256) { } function rewardPerToken(uint256 _pid) public view returns (uint256) { } function earned(uint256 _pid, address _user) public view returns (uint256) { } // Add a new lp to the pool. Can only be called by the owner. function add(uint256 _allocPoint, IERC20 _lpToken) public onlyOwner { require(<FILL_ME>) totalAllocPoint = totalAllocPoint.add(_allocPoint); poolInfo.push(PoolInfo({ lpToken : _lpToken, allocPoint : _allocPoint, lastUpdateTime : 0, rewardPerTokenStored : 0 })); lpExists[address(_lpToken)] = true; } function poolLength() external view returns (uint256) { } // Update the given pool's BTF allocation point. Can only be called by the owner. function set(uint256 _pid, uint256 _allocPoint) public onlyOwner { } // View function to see pending BTFs on frontend. function pendingBTF(uint256 _pid, address _user) external view returns (uint256) { } function _getReward(uint256 _pid, address _user) private { } // Deposit LP tokens to MasterChef for BTF allocation. function deposit(uint256 _pid, uint256 _amount, address referrer) public updateReward(_pid, msg.sender) reduceHalve checkStart { } // Withdraw LP tokens from MasterChef. function withdraw(uint256 _pid, uint256 _amount) public updateReward(_pid, msg.sender) reduceHalve checkStart { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public { } // Set the migrator contract. Can only be called by the owner. function setMigrator(IMigratorChef _migrator) public onlyOwner { } // Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good. function migrate(uint256 _pid) public { } }
!lpExists[address(_lpToken)],"do not add the same lp token more than once"
358,353
!lpExists[address(_lpToken)]
null
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.4.11; /** * Math operations with safety checks */ library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } function max64(uint64 a, uint64 b) internal constant returns (uint64) { } function min64(uint64 a, uint64 b) internal constant returns (uint64) { } function max256(uint256 a, uint256 b) internal constant returns (uint256) { } function min256(uint256 a, uint256 b) internal constant returns (uint256) { } function assert(bool assertion) internal { } } contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @dev send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint _value) returns (bool success) {} /// @dev send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint _value) returns (bool success) {} /// @dev `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint _value) returns (bool success) {} /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint remaining) {} /// Event for a successful transfer. event Transfer(address indexed _from, address indexed _to, uint _value); /// Event for a successful Approval. event Approval(address indexed _owner, address indexed _spender, uint _value); } /// @title Mid-Team Holding Incentive Program /// @author Daniel Wang - <[email protected]>, Kongliang Zhong - <[email protected]>. /// For more information, please visit https://loopring.org. contract LRCMidTermHoldingContract { using SafeMath for uint; address public lrcTokenAddress = 0x0; address public owner = 0x0; uint public rate = 7500; // Some stats uint public lrcReceived = 0; uint public lrcSent = 0; uint public ethReceived = 0; uint public ethSent = 0; mapping (address => uint) lrcBalances; // each user's lrc balance /* * EVENTS */ /// Emitted for each sucuessful deposit. uint public depositId = 0; event Deposit(uint _depositId, address _addr, uint _ethAmount, uint _lrcAmount); /// Emitted for each sucuessful withdrawal. uint public withdrawId = 0; event Withdrawal(uint _withdrawId, address _addr, uint _ethAmount, uint _lrcAmount); /// Emitted when ETH are drained and LRC are drained by owner. event Drained(uint _ethAmount, uint _lrcAmount); /// Emitted when rate changed by owner. event RateChanged(uint _oldRate, uint _newRate); /// CONSTRUCTOR /// @dev Initialize and start the contract. /// @param _lrcTokenAddress LRC ERC20 token address /// @param _owner Owner of this contract function LRCMidTermHoldingContract(address _lrcTokenAddress, address _owner) { } /* * PUBLIC FUNCTIONS */ /// @dev Get back ETH to `owner`. /// @param _rate New rate function setRate(uint _rate) public { } /// @dev Get back ETH to `owner`. /// @param _ethAmount Amount of ETH to drain back to owner function drain(uint _ethAmount) public payable { require(msg.sender == owner); require(_ethAmount >= 0); uint ethAmount = _ethAmount.min256(this.balance); if (ethAmount > 0){ require(<FILL_ME>) } var lrcToken = Token(lrcTokenAddress); uint lrcAmount = lrcToken.balanceOf(address(this)) - lrcReceived + lrcSent; if (lrcAmount > 0){ require(lrcToken.transfer(owner, lrcAmount)); } Drained(ethAmount, lrcAmount); } /// @dev This default function allows simple usage. function () payable { } /// @dev Deposit LRC for ETH. /// If user send x ETH, this method will try to transfer `x * 100 * 6500` LRC from /// the user's address and send `x * 100` ETH to the user. function depositLRC() payable { } /// @dev Withdrawal LRC with ETH transfer. function withdrawLRC() payable { } }
owner.send(ethAmount)
358,404
owner.send(ethAmount)
null
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.4.11; /** * Math operations with safety checks */ library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } function max64(uint64 a, uint64 b) internal constant returns (uint64) { } function min64(uint64 a, uint64 b) internal constant returns (uint64) { } function max256(uint256 a, uint256 b) internal constant returns (uint256) { } function min256(uint256 a, uint256 b) internal constant returns (uint256) { } function assert(bool assertion) internal { } } contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @dev send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint _value) returns (bool success) {} /// @dev send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint _value) returns (bool success) {} /// @dev `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint _value) returns (bool success) {} /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint remaining) {} /// Event for a successful transfer. event Transfer(address indexed _from, address indexed _to, uint _value); /// Event for a successful Approval. event Approval(address indexed _owner, address indexed _spender, uint _value); } /// @title Mid-Team Holding Incentive Program /// @author Daniel Wang - <[email protected]>, Kongliang Zhong - <[email protected]>. /// For more information, please visit https://loopring.org. contract LRCMidTermHoldingContract { using SafeMath for uint; address public lrcTokenAddress = 0x0; address public owner = 0x0; uint public rate = 7500; // Some stats uint public lrcReceived = 0; uint public lrcSent = 0; uint public ethReceived = 0; uint public ethSent = 0; mapping (address => uint) lrcBalances; // each user's lrc balance /* * EVENTS */ /// Emitted for each sucuessful deposit. uint public depositId = 0; event Deposit(uint _depositId, address _addr, uint _ethAmount, uint _lrcAmount); /// Emitted for each sucuessful withdrawal. uint public withdrawId = 0; event Withdrawal(uint _withdrawId, address _addr, uint _ethAmount, uint _lrcAmount); /// Emitted when ETH are drained and LRC are drained by owner. event Drained(uint _ethAmount, uint _lrcAmount); /// Emitted when rate changed by owner. event RateChanged(uint _oldRate, uint _newRate); /// CONSTRUCTOR /// @dev Initialize and start the contract. /// @param _lrcTokenAddress LRC ERC20 token address /// @param _owner Owner of this contract function LRCMidTermHoldingContract(address _lrcTokenAddress, address _owner) { } /* * PUBLIC FUNCTIONS */ /// @dev Get back ETH to `owner`. /// @param _rate New rate function setRate(uint _rate) public { } /// @dev Get back ETH to `owner`. /// @param _ethAmount Amount of ETH to drain back to owner function drain(uint _ethAmount) public payable { require(msg.sender == owner); require(_ethAmount >= 0); uint ethAmount = _ethAmount.min256(this.balance); if (ethAmount > 0){ require(owner.send(ethAmount)); } var lrcToken = Token(lrcTokenAddress); uint lrcAmount = lrcToken.balanceOf(address(this)) - lrcReceived + lrcSent; if (lrcAmount > 0){ require(<FILL_ME>) } Drained(ethAmount, lrcAmount); } /// @dev This default function allows simple usage. function () payable { } /// @dev Deposit LRC for ETH. /// If user send x ETH, this method will try to transfer `x * 100 * 6500` LRC from /// the user's address and send `x * 100` ETH to the user. function depositLRC() payable { } /// @dev Withdrawal LRC with ETH transfer. function withdrawLRC() payable { } }
lrcToken.transfer(owner,lrcAmount)
358,404
lrcToken.transfer(owner,lrcAmount)
null
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.4.11; /** * Math operations with safety checks */ library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } function max64(uint64 a, uint64 b) internal constant returns (uint64) { } function min64(uint64 a, uint64 b) internal constant returns (uint64) { } function max256(uint256 a, uint256 b) internal constant returns (uint256) { } function min256(uint256 a, uint256 b) internal constant returns (uint256) { } function assert(bool assertion) internal { } } contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @dev send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint _value) returns (bool success) {} /// @dev send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint _value) returns (bool success) {} /// @dev `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint _value) returns (bool success) {} /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint remaining) {} /// Event for a successful transfer. event Transfer(address indexed _from, address indexed _to, uint _value); /// Event for a successful Approval. event Approval(address indexed _owner, address indexed _spender, uint _value); } /// @title Mid-Team Holding Incentive Program /// @author Daniel Wang - <[email protected]>, Kongliang Zhong - <[email protected]>. /// For more information, please visit https://loopring.org. contract LRCMidTermHoldingContract { using SafeMath for uint; address public lrcTokenAddress = 0x0; address public owner = 0x0; uint public rate = 7500; // Some stats uint public lrcReceived = 0; uint public lrcSent = 0; uint public ethReceived = 0; uint public ethSent = 0; mapping (address => uint) lrcBalances; // each user's lrc balance /* * EVENTS */ /// Emitted for each sucuessful deposit. uint public depositId = 0; event Deposit(uint _depositId, address _addr, uint _ethAmount, uint _lrcAmount); /// Emitted for each sucuessful withdrawal. uint public withdrawId = 0; event Withdrawal(uint _withdrawId, address _addr, uint _ethAmount, uint _lrcAmount); /// Emitted when ETH are drained and LRC are drained by owner. event Drained(uint _ethAmount, uint _lrcAmount); /// Emitted when rate changed by owner. event RateChanged(uint _oldRate, uint _newRate); /// CONSTRUCTOR /// @dev Initialize and start the contract. /// @param _lrcTokenAddress LRC ERC20 token address /// @param _owner Owner of this contract function LRCMidTermHoldingContract(address _lrcTokenAddress, address _owner) { } /* * PUBLIC FUNCTIONS */ /// @dev Get back ETH to `owner`. /// @param _rate New rate function setRate(uint _rate) public { } /// @dev Get back ETH to `owner`. /// @param _ethAmount Amount of ETH to drain back to owner function drain(uint _ethAmount) public payable { } /// @dev This default function allows simple usage. function () payable { } /// @dev Deposit LRC for ETH. /// If user send x ETH, this method will try to transfer `x * 100 * 6500` LRC from /// the user's address and send `x * 100` ETH to the user. function depositLRC() payable { require(msg.sender != owner); require(msg.value == 0); var lrcToken = Token(lrcTokenAddress); uint lrcAmount = this.balance.mul(rate) .min256(lrcToken.balanceOf(msg.sender)) .min256(lrcToken.allowance(msg.sender, address(this))); uint ethAmount = lrcAmount.div(rate); require(lrcAmount > 0 && ethAmount > 0); require(<FILL_ME>) lrcBalances[msg.sender] += lrcAmount; lrcReceived += lrcAmount; ethSent += ethAmount; require(lrcToken.transferFrom(msg.sender, address(this), lrcAmount)); require(msg.sender.send(ethAmount)); Deposit( depositId++, msg.sender, ethAmount, lrcAmount ); } /// @dev Withdrawal LRC with ETH transfer. function withdrawLRC() payable { } }
ethAmount.mul(rate)<=lrcAmount
358,404
ethAmount.mul(rate)<=lrcAmount
null
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.4.11; /** * Math operations with safety checks */ library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } function max64(uint64 a, uint64 b) internal constant returns (uint64) { } function min64(uint64 a, uint64 b) internal constant returns (uint64) { } function max256(uint256 a, uint256 b) internal constant returns (uint256) { } function min256(uint256 a, uint256 b) internal constant returns (uint256) { } function assert(bool assertion) internal { } } contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @dev send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint _value) returns (bool success) {} /// @dev send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint _value) returns (bool success) {} /// @dev `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint _value) returns (bool success) {} /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint remaining) {} /// Event for a successful transfer. event Transfer(address indexed _from, address indexed _to, uint _value); /// Event for a successful Approval. event Approval(address indexed _owner, address indexed _spender, uint _value); } /// @title Mid-Team Holding Incentive Program /// @author Daniel Wang - <[email protected]>, Kongliang Zhong - <[email protected]>. /// For more information, please visit https://loopring.org. contract LRCMidTermHoldingContract { using SafeMath for uint; address public lrcTokenAddress = 0x0; address public owner = 0x0; uint public rate = 7500; // Some stats uint public lrcReceived = 0; uint public lrcSent = 0; uint public ethReceived = 0; uint public ethSent = 0; mapping (address => uint) lrcBalances; // each user's lrc balance /* * EVENTS */ /// Emitted for each sucuessful deposit. uint public depositId = 0; event Deposit(uint _depositId, address _addr, uint _ethAmount, uint _lrcAmount); /// Emitted for each sucuessful withdrawal. uint public withdrawId = 0; event Withdrawal(uint _withdrawId, address _addr, uint _ethAmount, uint _lrcAmount); /// Emitted when ETH are drained and LRC are drained by owner. event Drained(uint _ethAmount, uint _lrcAmount); /// Emitted when rate changed by owner. event RateChanged(uint _oldRate, uint _newRate); /// CONSTRUCTOR /// @dev Initialize and start the contract. /// @param _lrcTokenAddress LRC ERC20 token address /// @param _owner Owner of this contract function LRCMidTermHoldingContract(address _lrcTokenAddress, address _owner) { } /* * PUBLIC FUNCTIONS */ /// @dev Get back ETH to `owner`. /// @param _rate New rate function setRate(uint _rate) public { } /// @dev Get back ETH to `owner`. /// @param _ethAmount Amount of ETH to drain back to owner function drain(uint _ethAmount) public payable { } /// @dev This default function allows simple usage. function () payable { } /// @dev Deposit LRC for ETH. /// If user send x ETH, this method will try to transfer `x * 100 * 6500` LRC from /// the user's address and send `x * 100` ETH to the user. function depositLRC() payable { require(msg.sender != owner); require(msg.value == 0); var lrcToken = Token(lrcTokenAddress); uint lrcAmount = this.balance.mul(rate) .min256(lrcToken.balanceOf(msg.sender)) .min256(lrcToken.allowance(msg.sender, address(this))); uint ethAmount = lrcAmount.div(rate); require(lrcAmount > 0 && ethAmount > 0); require(ethAmount.mul(rate) <= lrcAmount); lrcBalances[msg.sender] += lrcAmount; lrcReceived += lrcAmount; ethSent += ethAmount; require(lrcToken.transferFrom(msg.sender, address(this), lrcAmount)); require(<FILL_ME>) Deposit( depositId++, msg.sender, ethAmount, lrcAmount ); } /// @dev Withdrawal LRC with ETH transfer. function withdrawLRC() payable { } }
msg.sender.send(ethAmount)
358,404
msg.sender.send(ethAmount)
null
/* Copyright 2017 Loopring Project Ltd (Loopring Foundation). Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ pragma solidity ^0.4.11; /** * Math operations with safety checks */ library SafeMath { function mul(uint a, uint b) internal returns (uint) { } function div(uint a, uint b) internal returns (uint) { } function sub(uint a, uint b) internal returns (uint) { } function add(uint a, uint b) internal returns (uint) { } function max64(uint64 a, uint64 b) internal constant returns (uint64) { } function min64(uint64 a, uint64 b) internal constant returns (uint64) { } function max256(uint256 a, uint256 b) internal constant returns (uint256) { } function min256(uint256 a, uint256 b) internal constant returns (uint256) { } function assert(bool assertion) internal { } } contract Token { /// @return total amount of tokens function totalSupply() constant returns (uint supply) {} /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint balance) {} /// @dev send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint _value) returns (bool success) {} /// @dev send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint _value) returns (bool success) {} /// @dev `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint _value) returns (bool success) {} /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint remaining) {} /// Event for a successful transfer. event Transfer(address indexed _from, address indexed _to, uint _value); /// Event for a successful Approval. event Approval(address indexed _owner, address indexed _spender, uint _value); } /// @title Mid-Team Holding Incentive Program /// @author Daniel Wang - <[email protected]>, Kongliang Zhong - <[email protected]>. /// For more information, please visit https://loopring.org. contract LRCMidTermHoldingContract { using SafeMath for uint; address public lrcTokenAddress = 0x0; address public owner = 0x0; uint public rate = 7500; // Some stats uint public lrcReceived = 0; uint public lrcSent = 0; uint public ethReceived = 0; uint public ethSent = 0; mapping (address => uint) lrcBalances; // each user's lrc balance /* * EVENTS */ /// Emitted for each sucuessful deposit. uint public depositId = 0; event Deposit(uint _depositId, address _addr, uint _ethAmount, uint _lrcAmount); /// Emitted for each sucuessful withdrawal. uint public withdrawId = 0; event Withdrawal(uint _withdrawId, address _addr, uint _ethAmount, uint _lrcAmount); /// Emitted when ETH are drained and LRC are drained by owner. event Drained(uint _ethAmount, uint _lrcAmount); /// Emitted when rate changed by owner. event RateChanged(uint _oldRate, uint _newRate); /// CONSTRUCTOR /// @dev Initialize and start the contract. /// @param _lrcTokenAddress LRC ERC20 token address /// @param _owner Owner of this contract function LRCMidTermHoldingContract(address _lrcTokenAddress, address _owner) { } /* * PUBLIC FUNCTIONS */ /// @dev Get back ETH to `owner`. /// @param _rate New rate function setRate(uint _rate) public { } /// @dev Get back ETH to `owner`. /// @param _ethAmount Amount of ETH to drain back to owner function drain(uint _ethAmount) public payable { } /// @dev This default function allows simple usage. function () payable { } /// @dev Deposit LRC for ETH. /// If user send x ETH, this method will try to transfer `x * 100 * 6500` LRC from /// the user's address and send `x * 100` ETH to the user. function depositLRC() payable { } /// @dev Withdrawal LRC with ETH transfer. function withdrawLRC() payable { require(msg.sender != owner); require(msg.value > 0); uint lrcAmount = msg.value.mul(rate) .min256(lrcBalances[msg.sender]); uint ethAmount = lrcAmount.div(rate); require(lrcAmount > 0 && ethAmount > 0); lrcBalances[msg.sender] -= lrcAmount; lrcSent += lrcAmount; ethReceived += ethAmount; require(Token(lrcTokenAddress).transfer(msg.sender, lrcAmount)); uint ethRefund = msg.value - ethAmount; if (ethRefund > 0) { require(<FILL_ME>) } Withdrawal( withdrawId++, msg.sender, ethAmount, lrcAmount ); } }
msg.sender.send(ethRefund)
358,404
msg.sender.send(ethRefund)
null
pragma solidity 0.5.9; /// "LockableToken" adds token locking functionality to ERC-20 smart contract. The authorized addresses (Cappers) are /// allowed to lock tokens from any token holder to prevent token transfers up to that amount. If a token holder is /// locked by multiple cappers, the maximum number is used as the amount of locked tokens. contract LockableToken is ERC20Base, CapperRole { using SafeMath for uint256; event TokenLocked(address indexed locker, address indexed owner, uint256 value); event TokenUnlocked(address indexed locker, address indexed owner, uint256 value); uint256 constant NOT_FOUND = uint256(-1); struct TokenLock { address locker; uint256 value; } mapping (address => TokenLock[]) _locks; function getLockedToken(address owner) public view returns (uint256) { } function getLockedTokenAt(address owner, address locker) public view returns (uint256) { } function unlockedBalanceOf(address owner) public view returns (uint256) { } function lock(address owner, uint256 value) public onlyCapper returns (bool) { uint256 index = _getTokenLockIndex(owner, msg.sender); if (index != NOT_FOUND) { uint256 currentLock = _locks[owner][index].value; require(<FILL_ME>) _locks[owner][index].value = currentLock.add(value); } else { require(balanceOf(owner) >= value); _locks[owner].push(TokenLock(msg.sender, value)); } emit TokenLocked(msg.sender, owner, value); return true; } function unlock(address owner, uint256 value) public returns (bool) { } function _getTokenLockIndex(address owner, address locker) internal view returns (uint256) { } function _transfer(address from, address to, uint256 value) internal { } function _burn(address account, uint256 value) internal { } }
balanceOf(owner)>=currentLock.add(value)
358,419
balanceOf(owner)>=currentLock.add(value)
null
pragma solidity 0.5.9; /// "LockableToken" adds token locking functionality to ERC-20 smart contract. The authorized addresses (Cappers) are /// allowed to lock tokens from any token holder to prevent token transfers up to that amount. If a token holder is /// locked by multiple cappers, the maximum number is used as the amount of locked tokens. contract LockableToken is ERC20Base, CapperRole { using SafeMath for uint256; event TokenLocked(address indexed locker, address indexed owner, uint256 value); event TokenUnlocked(address indexed locker, address indexed owner, uint256 value); uint256 constant NOT_FOUND = uint256(-1); struct TokenLock { address locker; uint256 value; } mapping (address => TokenLock[]) _locks; function getLockedToken(address owner) public view returns (uint256) { } function getLockedTokenAt(address owner, address locker) public view returns (uint256) { } function unlockedBalanceOf(address owner) public view returns (uint256) { } function lock(address owner, uint256 value) public onlyCapper returns (bool) { uint256 index = _getTokenLockIndex(owner, msg.sender); if (index != NOT_FOUND) { uint256 currentLock = _locks[owner][index].value; require(balanceOf(owner) >= currentLock.add(value)); _locks[owner][index].value = currentLock.add(value); } else { require(<FILL_ME>) _locks[owner].push(TokenLock(msg.sender, value)); } emit TokenLocked(msg.sender, owner, value); return true; } function unlock(address owner, uint256 value) public returns (bool) { } function _getTokenLockIndex(address owner, address locker) internal view returns (uint256) { } function _transfer(address from, address to, uint256 value) internal { } function _burn(address account, uint256 value) internal { } }
balanceOf(owner)>=value
358,419
balanceOf(owner)>=value
null
pragma solidity 0.5.9; /// "LockableToken" adds token locking functionality to ERC-20 smart contract. The authorized addresses (Cappers) are /// allowed to lock tokens from any token holder to prevent token transfers up to that amount. If a token holder is /// locked by multiple cappers, the maximum number is used as the amount of locked tokens. contract LockableToken is ERC20Base, CapperRole { using SafeMath for uint256; event TokenLocked(address indexed locker, address indexed owner, uint256 value); event TokenUnlocked(address indexed locker, address indexed owner, uint256 value); uint256 constant NOT_FOUND = uint256(-1); struct TokenLock { address locker; uint256 value; } mapping (address => TokenLock[]) _locks; function getLockedToken(address owner) public view returns (uint256) { } function getLockedTokenAt(address owner, address locker) public view returns (uint256) { } function unlockedBalanceOf(address owner) public view returns (uint256) { } function lock(address owner, uint256 value) public onlyCapper returns (bool) { } function unlock(address owner, uint256 value) public returns (bool) { uint256 index = _getTokenLockIndex(owner, msg.sender); require(index != NOT_FOUND); TokenLock[] storage locks = _locks[owner]; require(<FILL_ME>) locks[index].value = locks[index].value.sub(value); if (locks[index].value == 0) { if (index != locks.length - 1) { locks[index] = locks[locks.length - 1]; } locks.pop(); } emit TokenUnlocked(msg.sender, owner, value); return true; } function _getTokenLockIndex(address owner, address locker) internal view returns (uint256) { } function _transfer(address from, address to, uint256 value) internal { } function _burn(address account, uint256 value) internal { } }
locks[index].value>=value
358,419
locks[index].value>=value
null
pragma solidity 0.5.9; /// "LockableToken" adds token locking functionality to ERC-20 smart contract. The authorized addresses (Cappers) are /// allowed to lock tokens from any token holder to prevent token transfers up to that amount. If a token holder is /// locked by multiple cappers, the maximum number is used as the amount of locked tokens. contract LockableToken is ERC20Base, CapperRole { using SafeMath for uint256; event TokenLocked(address indexed locker, address indexed owner, uint256 value); event TokenUnlocked(address indexed locker, address indexed owner, uint256 value); uint256 constant NOT_FOUND = uint256(-1); struct TokenLock { address locker; uint256 value; } mapping (address => TokenLock[]) _locks; function getLockedToken(address owner) public view returns (uint256) { } function getLockedTokenAt(address owner, address locker) public view returns (uint256) { } function unlockedBalanceOf(address owner) public view returns (uint256) { } function lock(address owner, uint256 value) public onlyCapper returns (bool) { } function unlock(address owner, uint256 value) public returns (bool) { } function _getTokenLockIndex(address owner, address locker) internal view returns (uint256) { } function _transfer(address from, address to, uint256 value) internal { require(<FILL_ME>) super._transfer(from, to, value); } function _burn(address account, uint256 value) internal { } }
unlockedBalanceOf(from)>=value
358,419
unlockedBalanceOf(from)>=value
null
pragma solidity 0.5.9; /// "LockableToken" adds token locking functionality to ERC-20 smart contract. The authorized addresses (Cappers) are /// allowed to lock tokens from any token holder to prevent token transfers up to that amount. If a token holder is /// locked by multiple cappers, the maximum number is used as the amount of locked tokens. contract LockableToken is ERC20Base, CapperRole { using SafeMath for uint256; event TokenLocked(address indexed locker, address indexed owner, uint256 value); event TokenUnlocked(address indexed locker, address indexed owner, uint256 value); uint256 constant NOT_FOUND = uint256(-1); struct TokenLock { address locker; uint256 value; } mapping (address => TokenLock[]) _locks; function getLockedToken(address owner) public view returns (uint256) { } function getLockedTokenAt(address owner, address locker) public view returns (uint256) { } function unlockedBalanceOf(address owner) public view returns (uint256) { } function lock(address owner, uint256 value) public onlyCapper returns (bool) { } function unlock(address owner, uint256 value) public returns (bool) { } function _getTokenLockIndex(address owner, address locker) internal view returns (uint256) { } function _transfer(address from, address to, uint256 value) internal { } function _burn(address account, uint256 value) internal { require(<FILL_ME>) super._burn(account, value); } }
unlockedBalanceOf(account)>=value
358,419
unlockedBalanceOf(account)>=value
null
/** * GearProtocol's Liquidity Provider Vault * Smart contract to incentivize GEAR liquidity providers with a limited supply utility token, GearAutomatic (AUTO). * Official Website: https://www.GearProtocol.com */ pragma solidity ^0.6.0; interface ERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function approveAndCall(address spender, uint tokens, bytes calldata data) external returns (bool success); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function ceil(uint256 a, uint256 m) internal pure returns (uint256) { } } contract GearLPvault { using SafeMath for uint256; ERC20 constant liquidityToken = ERC20(0x850C581e52759Da131e06c37B5Af479a2E4e4525); ERC20 constant autoToken = ERC20(0xAD1F5e38edD65Cb2F0C447214f0A0Ea2c191CFD9); mapping (address => uint256) private balances; uint256 public fullUnitsFarmed_total = 0; uint256 public totalFarmers = 0; uint8 constant tokenDecimals = 18; mapping (address => bool) public isFarming; uint256 _totalRewardsPerUnit = 0; uint256 private farmingRewards = 0; mapping (address => uint256) private _totalRewardsPerUnit_positions; mapping (address => uint256) private _savedRewards; mapping (address => uint256) private _savedBalances; //these addresses won't be affected by harvest fee mapping(address => bool) public whitelistTo; event WhitelistTo(address _addr, bool _whitelisted); address cowner = msg.sender; uint256 public lastAutoDistribution = now; modifier onlyOwner() { } function totalSupply() public view returns (uint256) { } function balanceOf(address owner) public view returns (uint256) { } function AutoBalanceOf(address owner) public view returns (uint256) { } function fullUnitsFarmed(address owner) external view returns (uint256) { } function toFullUnits(uint256 valueWithDecimals) public pure returns (uint256) { } //Distribute a daily quota of AUTO token reward to all liquidity providers currently farming. function distributeAuto() external { } //catch up with the current total harvest rewards. function updateRewardsFor(address farmer) private { } //get all harvest rewards that have not been claimed yet function viewHarvest(address farmer) public view returns (uint256) { } //pay out unclaimed harvest rewards function harvest() public { updateRewardsFor(msg.sender); uint256 rewards = _savedRewards[msg.sender]; require(rewards > 0 && rewards <= balances[address(this)]); require(<FILL_ME>) _savedRewards[msg.sender] = 0; uint256 fivePercent = 0; uint256 reward = 0; if(!whitelistTo[msg.sender]) { fivePercent = rewards.mul(5).div(100); //set a minimum rate to prevent no harvest-fee-txs due to precision loss if(fivePercent == 0 && rewards > 0) fivePercent = 1; } reward = rewards.sub(fivePercent); // Distribute daily AUTO incentive if(lastAutoDistribution < now) { uint256 autoBalance = autoToken.balanceOf(address(this)); uint256 Percent = autoBalance.mul(1).div(200); if(fullUnitsFarmed_total > 0) farmingRewards = farmingRewards.add(Percent); //split up to rewards per unit in farm uint256 rewardsPerUnit = farmingRewards.div(fullUnitsFarmed_total); //apply reward _totalRewardsPerUnit = _totalRewardsPerUnit.add(rewardsPerUnit); balances[address(this)] = balances[address(this)].add(farmingRewards); farmingRewards = 0; lastAutoDistribution = lastAutoDistribution + 24 hours; } //transfer balances[address(this)] = balances[address(this)].sub(rewards); autoToken.transfer(msg.sender, reward); autoToken.transfer(cowner, fivePercent); } function enableFarming() public { } function disableFarming() public { } //enable farming function _enableFarming(address farmer) private { } //disable farming function _disableFarming(address farmer) private { } //disable farming for target address function disableFarmingFor(address farmer) public onlyOwner { } //withdraw tokens that were sent to this contract by accident function withdrawERC20Tokens(address tokenAddress, uint256 amount) public payable onlyOwner { } //no fees if receiver is whitelisted function setWhitelistedTo(address _addr, bool _whitelisted) external onlyOwner { } }
_savedBalances[msg.sender]==liquidityToken.balanceOf(msg.sender)
358,537
_savedBalances[msg.sender]==liquidityToken.balanceOf(msg.sender)
null
/** * GearProtocol's Liquidity Provider Vault * Smart contract to incentivize GEAR liquidity providers with a limited supply utility token, GearAutomatic (AUTO). * Official Website: https://www.GearProtocol.com */ pragma solidity ^0.6.0; interface ERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function approveAndCall(address spender, uint tokens, bytes calldata data) external returns (bool success); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function ceil(uint256 a, uint256 m) internal pure returns (uint256) { } } contract GearLPvault { using SafeMath for uint256; ERC20 constant liquidityToken = ERC20(0x850C581e52759Da131e06c37B5Af479a2E4e4525); ERC20 constant autoToken = ERC20(0xAD1F5e38edD65Cb2F0C447214f0A0Ea2c191CFD9); mapping (address => uint256) private balances; uint256 public fullUnitsFarmed_total = 0; uint256 public totalFarmers = 0; uint8 constant tokenDecimals = 18; mapping (address => bool) public isFarming; uint256 _totalRewardsPerUnit = 0; uint256 private farmingRewards = 0; mapping (address => uint256) private _totalRewardsPerUnit_positions; mapping (address => uint256) private _savedRewards; mapping (address => uint256) private _savedBalances; //these addresses won't be affected by harvest fee mapping(address => bool) public whitelistTo; event WhitelistTo(address _addr, bool _whitelisted); address cowner = msg.sender; uint256 public lastAutoDistribution = now; modifier onlyOwner() { } function totalSupply() public view returns (uint256) { } function balanceOf(address owner) public view returns (uint256) { } function AutoBalanceOf(address owner) public view returns (uint256) { } function fullUnitsFarmed(address owner) external view returns (uint256) { } function toFullUnits(uint256 valueWithDecimals) public pure returns (uint256) { } //Distribute a daily quota of AUTO token reward to all liquidity providers currently farming. function distributeAuto() external { } //catch up with the current total harvest rewards. function updateRewardsFor(address farmer) private { } //get all harvest rewards that have not been claimed yet function viewHarvest(address farmer) public view returns (uint256) { } //pay out unclaimed harvest rewards function harvest() public { } function enableFarming() public { } function disableFarming() public { } //enable farming function _enableFarming(address farmer) private { require(<FILL_ME>) updateRewardsFor(farmer); isFarming[farmer] = true; fullUnitsFarmed_total = fullUnitsFarmed_total.add(toFullUnits(liquidityToken.balanceOf(farmer))); _savedBalances[farmer] = liquidityToken.balanceOf(farmer); totalFarmers = totalFarmers.add(1); // Distribute daily AUTO incentive if(lastAutoDistribution < now) { uint256 autoBalance = autoToken.balanceOf(address(this)); uint256 Percent = autoBalance.mul(1).div(200); if(fullUnitsFarmed_total > 0) farmingRewards = farmingRewards.add(Percent); //split up to rewards per unit in farm uint256 rewardsPerUnit = farmingRewards.div(fullUnitsFarmed_total); //apply reward _totalRewardsPerUnit = _totalRewardsPerUnit.add(rewardsPerUnit); balances[address(this)] = balances[address(this)].add(farmingRewards); farmingRewards = 0; lastAutoDistribution = lastAutoDistribution + 24 hours; } } //disable farming function _disableFarming(address farmer) private { } //disable farming for target address function disableFarmingFor(address farmer) public onlyOwner { } //withdraw tokens that were sent to this contract by accident function withdrawERC20Tokens(address tokenAddress, uint256 amount) public payable onlyOwner { } //no fees if receiver is whitelisted function setWhitelistedTo(address _addr, bool _whitelisted) external onlyOwner { } }
!isFarming[farmer]
358,537
!isFarming[farmer]
null
/** * GearProtocol's Liquidity Provider Vault * Smart contract to incentivize GEAR liquidity providers with a limited supply utility token, GearAutomatic (AUTO). * Official Website: https://www.GearProtocol.com */ pragma solidity ^0.6.0; interface ERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function approveAndCall(address spender, uint tokens, bytes calldata data) external returns (bool success); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function ceil(uint256 a, uint256 m) internal pure returns (uint256) { } } contract GearLPvault { using SafeMath for uint256; ERC20 constant liquidityToken = ERC20(0x850C581e52759Da131e06c37B5Af479a2E4e4525); ERC20 constant autoToken = ERC20(0xAD1F5e38edD65Cb2F0C447214f0A0Ea2c191CFD9); mapping (address => uint256) private balances; uint256 public fullUnitsFarmed_total = 0; uint256 public totalFarmers = 0; uint8 constant tokenDecimals = 18; mapping (address => bool) public isFarming; uint256 _totalRewardsPerUnit = 0; uint256 private farmingRewards = 0; mapping (address => uint256) private _totalRewardsPerUnit_positions; mapping (address => uint256) private _savedRewards; mapping (address => uint256) private _savedBalances; //these addresses won't be affected by harvest fee mapping(address => bool) public whitelistTo; event WhitelistTo(address _addr, bool _whitelisted); address cowner = msg.sender; uint256 public lastAutoDistribution = now; modifier onlyOwner() { } function totalSupply() public view returns (uint256) { } function balanceOf(address owner) public view returns (uint256) { } function AutoBalanceOf(address owner) public view returns (uint256) { } function fullUnitsFarmed(address owner) external view returns (uint256) { } function toFullUnits(uint256 valueWithDecimals) public pure returns (uint256) { } //Distribute a daily quota of AUTO token reward to all liquidity providers currently farming. function distributeAuto() external { } //catch up with the current total harvest rewards. function updateRewardsFor(address farmer) private { } //get all harvest rewards that have not been claimed yet function viewHarvest(address farmer) public view returns (uint256) { } //pay out unclaimed harvest rewards function harvest() public { } function enableFarming() public { } function disableFarming() public { } //enable farming function _enableFarming(address farmer) private { } //disable farming function _disableFarming(address farmer) private { require(<FILL_ME>) harvest(); isFarming[farmer] = false; fullUnitsFarmed_total = fullUnitsFarmed_total.sub(toFullUnits(_savedBalances[farmer])); _savedBalances[farmer] = 0; totalFarmers = totalFarmers.sub(1); // Distribute daily AUTO incentive if(lastAutoDistribution < now) { uint256 autoBalance = autoToken.balanceOf(address(this)); uint256 Percent = autoBalance.mul(1).div(200); if(fullUnitsFarmed_total > 0) farmingRewards = farmingRewards.add(Percent); //split up to rewards per unit in farm uint256 rewardsPerUnit = farmingRewards.div(fullUnitsFarmed_total); //apply reward _totalRewardsPerUnit = _totalRewardsPerUnit.add(rewardsPerUnit); balances[address(this)] = balances[address(this)].add(farmingRewards); farmingRewards = 0; lastAutoDistribution = lastAutoDistribution + 24 hours; } } //disable farming for target address function disableFarmingFor(address farmer) public onlyOwner { } //withdraw tokens that were sent to this contract by accident function withdrawERC20Tokens(address tokenAddress, uint256 amount) public payable onlyOwner { } //no fees if receiver is whitelisted function setWhitelistedTo(address _addr, bool _whitelisted) external onlyOwner { } }
isFarming[farmer]
358,537
isFarming[farmer]
null
pragma solidity 0.4.25; contract E2D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { } // only people with profits modifier onlyStronghands() { require(<FILL_ME>) _; } // owner can: // -> change the name of the contract // -> change the name of the token // they CANNOT: // -> take funds // -> disable withdrawals // -> kill the contract // -> change the price of tokens modifier onlyOwner(){ } modifier onlyInitialInvestors(){ } /*============================== = EVENTS = ==============================*/ event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); event onPayDividends( uint256 dividends, uint256 profitPerShare ); // ERC20 event Transfer( address indexed from, address indexed to, uint256 tokens ); /*===================================== = CONFIGURABLES = =====================================*/ string public name = "E2D"; string public symbol = "E2D"; uint8 constant public decimals = 18; uint8 constant internal dividendFee_ = 10; uint256 constant internal tokenPriceInitial_ = 0.0000001 ether; uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether; uint256 constant internal magnitude = 2**64; address constant internal OWNER_ADDRESS = address(0x508b828440D72B0De506c86DB79D9E2c19810442); address constant internal OWNER_ADDRESS_2 = address(0x508b828440D72B0De506c86DB79D9E2c19810442); uint256 constant public INVESTOR_QUOTA = 0.01 ether; /*================================ = DATASETS = ================================*/ // amount of shares for each address (scaled number) mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => int256) internal payoutsTo_; uint256 internal tokenSupply_ = 0; uint256 internal profitPerShare_; uint256 internal totalInvestment_ = 0; uint256 internal totalGameDividends_ = 0; // smart contract owner address (see above on what they can do) address public ownerAddr; // initial investor list who can purchase tokens (this prevents a whale premine, it ensures a fairly distributed upper pyramid) mapping(address => bool) public initialInvestors; // when this is set to true, only allowed initialInvestors can purchase tokens. bool public initialState = true; /*======================================= = PUBLIC FUNCTIONS = =======================================*/ /* * -- APPLICATION ENTRY POINTS -- */ constructor() public { } /** * Converts all incoming ethereum to tokens for the caller */ function buy() public payable returns(uint256) { } /** * Fallback function to handle ethereum that was send straight to the contract */ function() public payable { } /** * Converts all of caller's dividends to tokens. */ function reinvest() public onlyStronghands() { } /** * Alias of sell() and withdraw(). */ function exit() public { } /** * Withdraws all of the callers earnings. */ function withdraw() public onlyStronghands() { } /** * Liquifies tokens to ethereum. */ function sell(uint256 _amountOfTokens) public onlyBagholders() { } /** * Transfer tokens from the caller to a new holder. * Remember, there's a 10% fee here as well. */ function transfer(address _toAddress, uint256 _amountOfTokens) public onlyBagholders() returns(bool) { } function payDividends() external payable { } /*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/ /** * In case the amassador quota is not met, the administrator can manually disable the ambassador phase. */ function disableInitialStage() public onlyOwner() { } /** * In case one of us dies, we need to replace ourselves. */ function setInitialInvestors(address _addr, bool _status) public onlyOwner() { } /** * If we want to rebrand, we can. */ function setName(string _name) public onlyOwner() { } /** * If we want to rebrand, we can. */ function setSymbol(string _symbol) public onlyOwner() { } /*---------- HELPERS AND CALCULATORS ----------*/ /** * Method to view the current Ethereum stored in the contract * Example: totalEthereumBalance() */ function totalEthereumBalance() public view returns(uint) { } /** * Retrieve the total token supply. */ function totalSupply() public view returns(uint256) { } /** * Retrieve the total Investment. */ function totalInvestment() public view returns(uint256) { } /** * Retrieve the total Game Dividends Paid. */ function totalGameDividends() public view returns(uint256) { } /** * Retrieve the tokens owned by the caller. */ function myTokens() public view returns(uint256) { } /** * Retrieve the dividends owned by the caller. */ function myDividends() public view returns(uint256) { } /** * Retrieve the token balance of any single address. */ function balanceOf(address _customerAddress) public view returns(uint256) { } /** * Retrieve the dividend balance of any single address. */ function dividendsOf(address _customerAddress) public view returns(uint256) { } /** * Return the sell price of 1 individual token. */ function sellPrice() public view returns(uint256) { } /** * Return the buy price of 1 individual token. */ function buyPrice() public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of buy orders. */ function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of sell orders. */ function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { } /*========================================== = INTERNAL FUNCTIONS = ==========================================*/ function purchaseTokens(uint256 _incomingEthereum) internal onlyInitialInvestors() returns(uint256) { } /** * Calculate Token price based on an amount of incoming ethereum * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256) { } /** * Calculate token sell value. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function tokensToEthereum_(uint256 _tokens) internal view returns(uint256) { } //This is where all your gas goes, sorry //Not sorry, you probably only paid 1 gwei function sqrt(uint x) internal pure returns (uint y) { } } /** * @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) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } }
myDividends()>0
358,606
myDividends()>0
"only allowed investor can invest!"
pragma solidity 0.4.25; contract E2D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { } // only people with profits modifier onlyStronghands() { } // owner can: // -> change the name of the contract // -> change the name of the token // they CANNOT: // -> take funds // -> disable withdrawals // -> kill the contract // -> change the price of tokens modifier onlyOwner(){ } modifier onlyInitialInvestors(){ if(initialState) { require(<FILL_ME>) _; } else { _; } } /*============================== = EVENTS = ==============================*/ event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); event onPayDividends( uint256 dividends, uint256 profitPerShare ); // ERC20 event Transfer( address indexed from, address indexed to, uint256 tokens ); /*===================================== = CONFIGURABLES = =====================================*/ string public name = "E2D"; string public symbol = "E2D"; uint8 constant public decimals = 18; uint8 constant internal dividendFee_ = 10; uint256 constant internal tokenPriceInitial_ = 0.0000001 ether; uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether; uint256 constant internal magnitude = 2**64; address constant internal OWNER_ADDRESS = address(0x508b828440D72B0De506c86DB79D9E2c19810442); address constant internal OWNER_ADDRESS_2 = address(0x508b828440D72B0De506c86DB79D9E2c19810442); uint256 constant public INVESTOR_QUOTA = 0.01 ether; /*================================ = DATASETS = ================================*/ // amount of shares for each address (scaled number) mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => int256) internal payoutsTo_; uint256 internal tokenSupply_ = 0; uint256 internal profitPerShare_; uint256 internal totalInvestment_ = 0; uint256 internal totalGameDividends_ = 0; // smart contract owner address (see above on what they can do) address public ownerAddr; // initial investor list who can purchase tokens (this prevents a whale premine, it ensures a fairly distributed upper pyramid) mapping(address => bool) public initialInvestors; // when this is set to true, only allowed initialInvestors can purchase tokens. bool public initialState = true; /*======================================= = PUBLIC FUNCTIONS = =======================================*/ /* * -- APPLICATION ENTRY POINTS -- */ constructor() public { } /** * Converts all incoming ethereum to tokens for the caller */ function buy() public payable returns(uint256) { } /** * Fallback function to handle ethereum that was send straight to the contract */ function() public payable { } /** * Converts all of caller's dividends to tokens. */ function reinvest() public onlyStronghands() { } /** * Alias of sell() and withdraw(). */ function exit() public { } /** * Withdraws all of the callers earnings. */ function withdraw() public onlyStronghands() { } /** * Liquifies tokens to ethereum. */ function sell(uint256 _amountOfTokens) public onlyBagholders() { } /** * Transfer tokens from the caller to a new holder. * Remember, there's a 10% fee here as well. */ function transfer(address _toAddress, uint256 _amountOfTokens) public onlyBagholders() returns(bool) { } function payDividends() external payable { } /*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/ /** * In case the amassador quota is not met, the administrator can manually disable the ambassador phase. */ function disableInitialStage() public onlyOwner() { } /** * In case one of us dies, we need to replace ourselves. */ function setInitialInvestors(address _addr, bool _status) public onlyOwner() { } /** * If we want to rebrand, we can. */ function setName(string _name) public onlyOwner() { } /** * If we want to rebrand, we can. */ function setSymbol(string _symbol) public onlyOwner() { } /*---------- HELPERS AND CALCULATORS ----------*/ /** * Method to view the current Ethereum stored in the contract * Example: totalEthereumBalance() */ function totalEthereumBalance() public view returns(uint) { } /** * Retrieve the total token supply. */ function totalSupply() public view returns(uint256) { } /** * Retrieve the total Investment. */ function totalInvestment() public view returns(uint256) { } /** * Retrieve the total Game Dividends Paid. */ function totalGameDividends() public view returns(uint256) { } /** * Retrieve the tokens owned by the caller. */ function myTokens() public view returns(uint256) { } /** * Retrieve the dividends owned by the caller. */ function myDividends() public view returns(uint256) { } /** * Retrieve the token balance of any single address. */ function balanceOf(address _customerAddress) public view returns(uint256) { } /** * Retrieve the dividend balance of any single address. */ function dividendsOf(address _customerAddress) public view returns(uint256) { } /** * Return the sell price of 1 individual token. */ function sellPrice() public view returns(uint256) { } /** * Return the buy price of 1 individual token. */ function buyPrice() public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of buy orders. */ function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of sell orders. */ function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { } /*========================================== = INTERNAL FUNCTIONS = ==========================================*/ function purchaseTokens(uint256 _incomingEthereum) internal onlyInitialInvestors() returns(uint256) { } /** * Calculate Token price based on an amount of incoming ethereum * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256) { } /** * Calculate token sell value. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function tokensToEthereum_(uint256 _tokens) internal view returns(uint256) { } //This is where all your gas goes, sorry //Not sorry, you probably only paid 1 gwei function sqrt(uint x) internal pure returns (uint y) { } } /** * @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) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } }
initialInvestors[msg.sender]==true,"only allowed investor can invest!"
358,606
initialInvestors[msg.sender]==true
"initial state or token > balance!"
pragma solidity 0.4.25; contract E2D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { } // only people with profits modifier onlyStronghands() { } // owner can: // -> change the name of the contract // -> change the name of the token // they CANNOT: // -> take funds // -> disable withdrawals // -> kill the contract // -> change the price of tokens modifier onlyOwner(){ } modifier onlyInitialInvestors(){ } /*============================== = EVENTS = ==============================*/ event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); event onPayDividends( uint256 dividends, uint256 profitPerShare ); // ERC20 event Transfer( address indexed from, address indexed to, uint256 tokens ); /*===================================== = CONFIGURABLES = =====================================*/ string public name = "E2D"; string public symbol = "E2D"; uint8 constant public decimals = 18; uint8 constant internal dividendFee_ = 10; uint256 constant internal tokenPriceInitial_ = 0.0000001 ether; uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether; uint256 constant internal magnitude = 2**64; address constant internal OWNER_ADDRESS = address(0x508b828440D72B0De506c86DB79D9E2c19810442); address constant internal OWNER_ADDRESS_2 = address(0x508b828440D72B0De506c86DB79D9E2c19810442); uint256 constant public INVESTOR_QUOTA = 0.01 ether; /*================================ = DATASETS = ================================*/ // amount of shares for each address (scaled number) mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => int256) internal payoutsTo_; uint256 internal tokenSupply_ = 0; uint256 internal profitPerShare_; uint256 internal totalInvestment_ = 0; uint256 internal totalGameDividends_ = 0; // smart contract owner address (see above on what they can do) address public ownerAddr; // initial investor list who can purchase tokens (this prevents a whale premine, it ensures a fairly distributed upper pyramid) mapping(address => bool) public initialInvestors; // when this is set to true, only allowed initialInvestors can purchase tokens. bool public initialState = true; /*======================================= = PUBLIC FUNCTIONS = =======================================*/ /* * -- APPLICATION ENTRY POINTS -- */ constructor() public { } /** * Converts all incoming ethereum to tokens for the caller */ function buy() public payable returns(uint256) { } /** * Fallback function to handle ethereum that was send straight to the contract */ function() public payable { } /** * Converts all of caller's dividends to tokens. */ function reinvest() public onlyStronghands() { } /** * Alias of sell() and withdraw(). */ function exit() public { } /** * Withdraws all of the callers earnings. */ function withdraw() public onlyStronghands() { } /** * Liquifies tokens to ethereum. */ function sell(uint256 _amountOfTokens) public onlyBagholders() { } /** * Transfer tokens from the caller to a new holder. * Remember, there's a 10% fee here as well. */ function transfer(address _toAddress, uint256 _amountOfTokens) public onlyBagholders() returns(bool) { // setup address _customerAddress = msg.sender; // make sure we have the requested tokens // also disables transfers until adminstrator phase is over require(<FILL_ME>) // withdraw all outstanding dividends first if(myDividends() > 0) withdraw(); // liquify 10% of the tokens that are transfered // these are dispersed to shareholders uint256 _tokenFee = SafeMath.div(_amountOfTokens, dividendFee_); uint256 _taxedTokens = SafeMath.sub(_amountOfTokens, _tokenFee); uint256 _dividends = tokensToEthereum_(_tokenFee); // burn the fee tokens tokenSupply_ = SafeMath.sub(tokenSupply_, _tokenFee); // exchange tokens tokenBalanceLedger_[_customerAddress] = SafeMath.sub(tokenBalanceLedger_[_customerAddress], _amountOfTokens); tokenBalanceLedger_[_toAddress] = SafeMath.add(tokenBalanceLedger_[_toAddress], _taxedTokens); // update dividend trackers payoutsTo_[_customerAddress] -= (int256) (profitPerShare_ * _amountOfTokens); payoutsTo_[_toAddress] += (int256) (profitPerShare_ * _taxedTokens); // disperse dividends among holders profitPerShare_ = SafeMath.add(profitPerShare_, (_dividends * magnitude) / tokenSupply_); // fire event emit Transfer(_customerAddress, _toAddress, _taxedTokens); // ERC20 return true; } function payDividends() external payable { } /*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/ /** * In case the amassador quota is not met, the administrator can manually disable the ambassador phase. */ function disableInitialStage() public onlyOwner() { } /** * In case one of us dies, we need to replace ourselves. */ function setInitialInvestors(address _addr, bool _status) public onlyOwner() { } /** * If we want to rebrand, we can. */ function setName(string _name) public onlyOwner() { } /** * If we want to rebrand, we can. */ function setSymbol(string _symbol) public onlyOwner() { } /*---------- HELPERS AND CALCULATORS ----------*/ /** * Method to view the current Ethereum stored in the contract * Example: totalEthereumBalance() */ function totalEthereumBalance() public view returns(uint) { } /** * Retrieve the total token supply. */ function totalSupply() public view returns(uint256) { } /** * Retrieve the total Investment. */ function totalInvestment() public view returns(uint256) { } /** * Retrieve the total Game Dividends Paid. */ function totalGameDividends() public view returns(uint256) { } /** * Retrieve the tokens owned by the caller. */ function myTokens() public view returns(uint256) { } /** * Retrieve the dividends owned by the caller. */ function myDividends() public view returns(uint256) { } /** * Retrieve the token balance of any single address. */ function balanceOf(address _customerAddress) public view returns(uint256) { } /** * Retrieve the dividend balance of any single address. */ function dividendsOf(address _customerAddress) public view returns(uint256) { } /** * Return the sell price of 1 individual token. */ function sellPrice() public view returns(uint256) { } /** * Return the buy price of 1 individual token. */ function buyPrice() public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of buy orders. */ function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of sell orders. */ function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { } /*========================================== = INTERNAL FUNCTIONS = ==========================================*/ function purchaseTokens(uint256 _incomingEthereum) internal onlyInitialInvestors() returns(uint256) { } /** * Calculate Token price based on an amount of incoming ethereum * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256) { } /** * Calculate token sell value. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function tokensToEthereum_(uint256 _tokens) internal view returns(uint256) { } //This is where all your gas goes, sorry //Not sorry, you probably only paid 1 gwei function sqrt(uint x) internal pure returns (uint y) { } } /** * @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) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } }
!initialState&&(_amountOfTokens<=tokenBalanceLedger_[_customerAddress]),"initial state or token > balance!"
358,606
!initialState&&(_amountOfTokens<=tokenBalanceLedger_[_customerAddress])
"token should be > 0!"
pragma solidity 0.4.25; contract E2D { /*================================= = MODIFIERS = =================================*/ // only people with tokens modifier onlyBagholders() { } // only people with profits modifier onlyStronghands() { } // owner can: // -> change the name of the contract // -> change the name of the token // they CANNOT: // -> take funds // -> disable withdrawals // -> kill the contract // -> change the price of tokens modifier onlyOwner(){ } modifier onlyInitialInvestors(){ } /*============================== = EVENTS = ==============================*/ event onTokenPurchase( address indexed customerAddress, uint256 incomingEthereum, uint256 tokensMinted ); event onTokenSell( address indexed customerAddress, uint256 tokensBurned, uint256 ethereumEarned ); event onReinvestment( address indexed customerAddress, uint256 ethereumReinvested, uint256 tokensMinted ); event onWithdraw( address indexed customerAddress, uint256 ethereumWithdrawn ); event onPayDividends( uint256 dividends, uint256 profitPerShare ); // ERC20 event Transfer( address indexed from, address indexed to, uint256 tokens ); /*===================================== = CONFIGURABLES = =====================================*/ string public name = "E2D"; string public symbol = "E2D"; uint8 constant public decimals = 18; uint8 constant internal dividendFee_ = 10; uint256 constant internal tokenPriceInitial_ = 0.0000001 ether; uint256 constant internal tokenPriceIncremental_ = 0.00000001 ether; uint256 constant internal magnitude = 2**64; address constant internal OWNER_ADDRESS = address(0x508b828440D72B0De506c86DB79D9E2c19810442); address constant internal OWNER_ADDRESS_2 = address(0x508b828440D72B0De506c86DB79D9E2c19810442); uint256 constant public INVESTOR_QUOTA = 0.01 ether; /*================================ = DATASETS = ================================*/ // amount of shares for each address (scaled number) mapping(address => uint256) internal tokenBalanceLedger_; mapping(address => int256) internal payoutsTo_; uint256 internal tokenSupply_ = 0; uint256 internal profitPerShare_; uint256 internal totalInvestment_ = 0; uint256 internal totalGameDividends_ = 0; // smart contract owner address (see above on what they can do) address public ownerAddr; // initial investor list who can purchase tokens (this prevents a whale premine, it ensures a fairly distributed upper pyramid) mapping(address => bool) public initialInvestors; // when this is set to true, only allowed initialInvestors can purchase tokens. bool public initialState = true; /*======================================= = PUBLIC FUNCTIONS = =======================================*/ /* * -- APPLICATION ENTRY POINTS -- */ constructor() public { } /** * Converts all incoming ethereum to tokens for the caller */ function buy() public payable returns(uint256) { } /** * Fallback function to handle ethereum that was send straight to the contract */ function() public payable { } /** * Converts all of caller's dividends to tokens. */ function reinvest() public onlyStronghands() { } /** * Alias of sell() and withdraw(). */ function exit() public { } /** * Withdraws all of the callers earnings. */ function withdraw() public onlyStronghands() { } /** * Liquifies tokens to ethereum. */ function sell(uint256 _amountOfTokens) public onlyBagholders() { } /** * Transfer tokens from the caller to a new holder. * Remember, there's a 10% fee here as well. */ function transfer(address _toAddress, uint256 _amountOfTokens) public onlyBagholders() returns(bool) { } function payDividends() external payable { } /*---------- ADMINISTRATOR ONLY FUNCTIONS ----------*/ /** * In case the amassador quota is not met, the administrator can manually disable the ambassador phase. */ function disableInitialStage() public onlyOwner() { } /** * In case one of us dies, we need to replace ourselves. */ function setInitialInvestors(address _addr, bool _status) public onlyOwner() { } /** * If we want to rebrand, we can. */ function setName(string _name) public onlyOwner() { } /** * If we want to rebrand, we can. */ function setSymbol(string _symbol) public onlyOwner() { } /*---------- HELPERS AND CALCULATORS ----------*/ /** * Method to view the current Ethereum stored in the contract * Example: totalEthereumBalance() */ function totalEthereumBalance() public view returns(uint) { } /** * Retrieve the total token supply. */ function totalSupply() public view returns(uint256) { } /** * Retrieve the total Investment. */ function totalInvestment() public view returns(uint256) { } /** * Retrieve the total Game Dividends Paid. */ function totalGameDividends() public view returns(uint256) { } /** * Retrieve the tokens owned by the caller. */ function myTokens() public view returns(uint256) { } /** * Retrieve the dividends owned by the caller. */ function myDividends() public view returns(uint256) { } /** * Retrieve the token balance of any single address. */ function balanceOf(address _customerAddress) public view returns(uint256) { } /** * Retrieve the dividend balance of any single address. */ function dividendsOf(address _customerAddress) public view returns(uint256) { } /** * Return the sell price of 1 individual token. */ function sellPrice() public view returns(uint256) { } /** * Return the buy price of 1 individual token. */ function buyPrice() public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of buy orders. */ function calculateTokensReceived(uint256 _ethereumToSpend) public view returns(uint256) { } /** * Function for the frontend to dynamically retrieve the price scaling of sell orders. */ function calculateEthereumReceived(uint256 _tokensToSell) public view returns(uint256) { } /*========================================== = INTERNAL FUNCTIONS = ==========================================*/ function purchaseTokens(uint256 _incomingEthereum) internal onlyInitialInvestors() returns(uint256) { // data setup address _customerAddress = msg.sender; uint256 _dividends = SafeMath.div(_incomingEthereum, dividendFee_); uint256 _taxedEthereum = SafeMath.sub(_incomingEthereum, _dividends); uint256 _amountOfTokens = ethereumToTokens_(_taxedEthereum); uint256 _fee = _dividends * magnitude; require(<FILL_ME>) // we can't give people infinite ethereum if(tokenSupply_ > 0) { // add tokens to the pool tokenSupply_ = SafeMath.add(tokenSupply_, _amountOfTokens); // take the amount of dividends gained through this transaction, and allocates them evenly to each shareholder profitPerShare_ += (_dividends * magnitude / (tokenSupply_)); // calculate the amount of tokens the customer receives over his purchase _fee = _fee - (_fee-(_amountOfTokens * (_dividends * magnitude / (tokenSupply_)))); } else { // add tokens to the pool tokenSupply_ = _amountOfTokens; } totalInvestment_ = SafeMath.add(totalInvestment_, _incomingEthereum); // update circulating supply & the ledger address for the customer tokenBalanceLedger_[_customerAddress] = SafeMath.add(tokenBalanceLedger_[_customerAddress], _amountOfTokens); // Tells the contract that the buyer doesn't deserve dividends for the tokens before they owned them; //really i know you think you do but you don't int256 _updatedPayouts = (int256) ((profitPerShare_ * _amountOfTokens) - _fee); payoutsTo_[_customerAddress] += _updatedPayouts; // disable initial stage if investor quota of 0.01 eth is reached if(address(this).balance >= INVESTOR_QUOTA) { initialState = false; } // fire event emit onTokenPurchase(_customerAddress, _incomingEthereum, _amountOfTokens); return _amountOfTokens; } /** * Calculate Token price based on an amount of incoming ethereum * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function ethereumToTokens_(uint256 _ethereum) internal view returns(uint256) { } /** * Calculate token sell value. * It's an algorithm, hopefully we gave you the whitepaper with it in scientific notation; * Some conversions occurred to prevent decimal errors or underflows / overflows in solidity code. */ function tokensToEthereum_(uint256 _tokens) internal view returns(uint256) { } //This is where all your gas goes, sorry //Not sorry, you probably only paid 1 gwei function sqrt(uint x) internal pure returns (uint y) { } } /** * @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) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } }
(_amountOfTokens>0&&(SafeMath.add(_amountOfTokens,tokenSupply_)>tokenSupply_)),"token should be > 0!"
358,606
(_amountOfTokens>0&&(SafeMath.add(_amountOfTokens,tokenSupply_)>tokenSupply_))
"Bad merkle proof"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract Wandernauts16 is Ownable, Pausable, IERC721Receiver { bytes32 public immutable root; IERC721 public immutable target; uint256 public immutable price; address payable public payoutAddress; constructor( bytes32 _root, address _target, uint256 _price, address payable _payoutAddress ) { } /// Unpause the contract. function pause() public onlyOwner { } /// Pause the contract. function unpause() public onlyOwner { } /// Set the payout address. /// @param _payoutAddress the new payout address function setPayoutAddress(address payable _payoutAddress) external onlyOwner { } /// Claim the balance of the contract. function claimBalance() external onlyOwner { } /// Withdraw a token from the contract /// @param to address to withdraw to /// @param tokenId id of the token function withdraw(address to, uint256 tokenId) external onlyOwner { } /// Buy a token stored in the contract. /// @param to address to send token to /// @param tokenId id of the token /// @param proof merkle proof for the purchase function buy( address to, uint256 tokenId, bytes32[] calldata proof ) external payable whenNotPaused { require(msg.value >= price, "Insufficient funds sent"); require(<FILL_ME>) target.safeTransferFrom(address(this), to, tokenId); } function _leaf(address account, uint256 tokenId) internal pure returns (bytes32) { } function _verify(bytes32 leaf, bytes32[] calldata proof) internal view returns (bool) { } /// IERC721Receiver implementation; only tokens from `target` are accepted. /// The tokens inside this contract will need to be enumerated off-chain. function onERC721Received( address, /* operator */ address, /* from */ uint256, /* tokenId */ bytes calldata /* data */ ) external view override returns (bytes4) { } }
_verify(_leaf(to,tokenId),proof),"Bad merkle proof"
358,653
_verify(_leaf(to,tokenId),proof)
null
pragma solidity ^0.4.24; /** * @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) { } } // token contract interface interface Token{ function balanceOf(address user) external returns(uint256); function transfer(address to, uint256 amount) external returns(bool); } contract Safe{ using SafeMath for uint256; // counter for signing transactions uint8 public count; uint256 internal end; uint256 internal timeOutAuthentication; // arrays of safe keys mapping (address => bool) internal safeKeys; address [] internal massSafeKeys = new address[](4); // array of keys that signed the transaction mapping (address => bool) internal signKeys; // free amount in safe uint256 internal freeAmount; // event transferring money to safe bool internal tranche; // fixing lockup in safe bool internal lockupIsSet; // lockup of safe uint256 internal mainLockup; address internal lastSafeKey; Token public token; // Amount of cells uint256 public countOfCell; // cell structure struct _Cell{ uint256 lockup; uint256 balance; bool exist; uint256 timeOfDeposit; } // cell addresses mapping (address => _Cell) internal userCells; event CreateCell(address indexed key); event Deposit(address indexed key, uint256 balance); event Delete(address indexed key); event Edit(address indexed key, uint256 lockup); event Withdraw(address indexed who, uint256 balance); event InternalTransfer(address indexed from, address indexed to, uint256 balance); modifier firstLevel() { } modifier secondLevel() { } modifier thirdLevel() { } constructor (address _first, address _second, address _third, address _fourth) public { } function AuthStart() public returns(bool){ require(<FILL_ME>) require(timeOutAuthentication >=0); require(!signKeys[msg.sender]); signKeys[msg.sender] = true; count++; end = now.add(timeOutAuthentication); lastSafeKey = msg.sender; return true; } // completion of operation with safe-keys function AuthEnd() public returns(bool){ } function getTimeOutAuthentication() firstLevel public view returns(uint256){ } function getFreeAmount() firstLevel public view returns(uint256){ } function getLockupCell(address _user) firstLevel public view returns(uint256){ } function getBalanceCell(address _user) firstLevel public view returns(uint256){ } function getExistCell(address _user) firstLevel public view returns(bool){ } function getSafeKey(uint i) firstLevel view public returns(address){ } // withdrawal tokens from safe for issuer function AssetWithdraw(address _to, uint256 _balance) secondLevel public returns(bool){ } function setCell(address _cell, uint256 _lockup) secondLevel public returns(bool){ } function deleteCell(address _key) secondLevel public returns(bool){ } // change parameters of the cell function editCell(address _key, uint256 _lockup) secondLevel public returns(bool){ } function depositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } function changeDepositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } // installation of a lockup for safe, // fixing free amount on balance, // token installation // (run once) function setContract(Token _token, uint256 _lockup) thirdLevel public returns(bool){ } // change of safe-key function changeKey(address _oldKey, address _newKey) thirdLevel public returns(bool){ } function setTimeOutAuthentication(uint256 _time) thirdLevel public returns(bool){ } function withdrawCell(uint256 _balance) public returns(bool){ } // transferring tokens from one cell to another function transferCell(address _to, uint256 _balance) public returns(bool){ } // information on balance of cell for holder function getInfoCellBalance() view public returns(uint256){ } // information on lockup of cell for holder function getInfoCellLockup() view public returns(uint256){ } function getMainBalance() public view returns(uint256){ } function getMainLockup() public view returns(uint256){ } function isTimeOver() view public returns(bool){ } }
safeKeys[msg.sender]
358,761
safeKeys[msg.sender]
null
pragma solidity ^0.4.24; /** * @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) { } } // token contract interface interface Token{ function balanceOf(address user) external returns(uint256); function transfer(address to, uint256 amount) external returns(bool); } contract Safe{ using SafeMath for uint256; // counter for signing transactions uint8 public count; uint256 internal end; uint256 internal timeOutAuthentication; // arrays of safe keys mapping (address => bool) internal safeKeys; address [] internal massSafeKeys = new address[](4); // array of keys that signed the transaction mapping (address => bool) internal signKeys; // free amount in safe uint256 internal freeAmount; // event transferring money to safe bool internal tranche; // fixing lockup in safe bool internal lockupIsSet; // lockup of safe uint256 internal mainLockup; address internal lastSafeKey; Token public token; // Amount of cells uint256 public countOfCell; // cell structure struct _Cell{ uint256 lockup; uint256 balance; bool exist; uint256 timeOfDeposit; } // cell addresses mapping (address => _Cell) internal userCells; event CreateCell(address indexed key); event Deposit(address indexed key, uint256 balance); event Delete(address indexed key); event Edit(address indexed key, uint256 lockup); event Withdraw(address indexed who, uint256 balance); event InternalTransfer(address indexed from, address indexed to, uint256 balance); modifier firstLevel() { } modifier secondLevel() { } modifier thirdLevel() { } constructor (address _first, address _second, address _third, address _fourth) public { } function AuthStart() public returns(bool){ require(safeKeys[msg.sender]); require(timeOutAuthentication >=0); require(<FILL_ME>) signKeys[msg.sender] = true; count++; end = now.add(timeOutAuthentication); lastSafeKey = msg.sender; return true; } // completion of operation with safe-keys function AuthEnd() public returns(bool){ } function getTimeOutAuthentication() firstLevel public view returns(uint256){ } function getFreeAmount() firstLevel public view returns(uint256){ } function getLockupCell(address _user) firstLevel public view returns(uint256){ } function getBalanceCell(address _user) firstLevel public view returns(uint256){ } function getExistCell(address _user) firstLevel public view returns(bool){ } function getSafeKey(uint i) firstLevel view public returns(address){ } // withdrawal tokens from safe for issuer function AssetWithdraw(address _to, uint256 _balance) secondLevel public returns(bool){ } function setCell(address _cell, uint256 _lockup) secondLevel public returns(bool){ } function deleteCell(address _key) secondLevel public returns(bool){ } // change parameters of the cell function editCell(address _key, uint256 _lockup) secondLevel public returns(bool){ } function depositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } function changeDepositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } // installation of a lockup for safe, // fixing free amount on balance, // token installation // (run once) function setContract(Token _token, uint256 _lockup) thirdLevel public returns(bool){ } // change of safe-key function changeKey(address _oldKey, address _newKey) thirdLevel public returns(bool){ } function setTimeOutAuthentication(uint256 _time) thirdLevel public returns(bool){ } function withdrawCell(uint256 _balance) public returns(bool){ } // transferring tokens from one cell to another function transferCell(address _to, uint256 _balance) public returns(bool){ } // information on balance of cell for holder function getInfoCellBalance() view public returns(uint256){ } // information on lockup of cell for holder function getInfoCellLockup() view public returns(uint256){ } function getMainBalance() public view returns(uint256){ } function getMainLockup() public view returns(uint256){ } function isTimeOver() view public returns(bool){ } }
!signKeys[msg.sender]
358,761
!signKeys[msg.sender]
null
pragma solidity ^0.4.24; /** * @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) { } } // token contract interface interface Token{ function balanceOf(address user) external returns(uint256); function transfer(address to, uint256 amount) external returns(bool); } contract Safe{ using SafeMath for uint256; // counter for signing transactions uint8 public count; uint256 internal end; uint256 internal timeOutAuthentication; // arrays of safe keys mapping (address => bool) internal safeKeys; address [] internal massSafeKeys = new address[](4); // array of keys that signed the transaction mapping (address => bool) internal signKeys; // free amount in safe uint256 internal freeAmount; // event transferring money to safe bool internal tranche; // fixing lockup in safe bool internal lockupIsSet; // lockup of safe uint256 internal mainLockup; address internal lastSafeKey; Token public token; // Amount of cells uint256 public countOfCell; // cell structure struct _Cell{ uint256 lockup; uint256 balance; bool exist; uint256 timeOfDeposit; } // cell addresses mapping (address => _Cell) internal userCells; event CreateCell(address indexed key); event Deposit(address indexed key, uint256 balance); event Delete(address indexed key); event Edit(address indexed key, uint256 lockup); event Withdraw(address indexed who, uint256 balance); event InternalTransfer(address indexed from, address indexed to, uint256 balance); modifier firstLevel() { } modifier secondLevel() { } modifier thirdLevel() { } constructor (address _first, address _second, address _third, address _fourth) public { } function AuthStart() public returns(bool){ } // completion of operation with safe-keys function AuthEnd() public returns(bool){ } function getTimeOutAuthentication() firstLevel public view returns(uint256){ } function getFreeAmount() firstLevel public view returns(uint256){ } function getLockupCell(address _user) firstLevel public view returns(uint256){ } function getBalanceCell(address _user) firstLevel public view returns(uint256){ } function getExistCell(address _user) firstLevel public view returns(bool){ } function getSafeKey(uint i) firstLevel view public returns(address){ } // withdrawal tokens from safe for issuer function AssetWithdraw(address _to, uint256 _balance) secondLevel public returns(bool){ } function setCell(address _cell, uint256 _lockup) secondLevel public returns(bool){ require(<FILL_ME>) require(!userCells[_cell].exist); require(_lockup >= mainLockup); userCells[_cell].lockup = _lockup; userCells[_cell].exist = true; countOfCell = countOfCell.add(1); emit CreateCell(_cell); return true; } function deleteCell(address _key) secondLevel public returns(bool){ } // change parameters of the cell function editCell(address _key, uint256 _lockup) secondLevel public returns(bool){ } function depositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } function changeDepositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } // installation of a lockup for safe, // fixing free amount on balance, // token installation // (run once) function setContract(Token _token, uint256 _lockup) thirdLevel public returns(bool){ } // change of safe-key function changeKey(address _oldKey, address _newKey) thirdLevel public returns(bool){ } function setTimeOutAuthentication(uint256 _time) thirdLevel public returns(bool){ } function withdrawCell(uint256 _balance) public returns(bool){ } // transferring tokens from one cell to another function transferCell(address _to, uint256 _balance) public returns(bool){ } // information on balance of cell for holder function getInfoCellBalance() view public returns(uint256){ } // information on lockup of cell for holder function getInfoCellLockup() view public returns(uint256){ } function getMainBalance() public view returns(uint256){ } function getMainLockup() public view returns(uint256){ } function isTimeOver() view public returns(bool){ } }
userCells[_cell].lockup==0&&userCells[_cell].balance==0
358,761
userCells[_cell].lockup==0&&userCells[_cell].balance==0
null
pragma solidity ^0.4.24; /** * @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) { } } // token contract interface interface Token{ function balanceOf(address user) external returns(uint256); function transfer(address to, uint256 amount) external returns(bool); } contract Safe{ using SafeMath for uint256; // counter for signing transactions uint8 public count; uint256 internal end; uint256 internal timeOutAuthentication; // arrays of safe keys mapping (address => bool) internal safeKeys; address [] internal massSafeKeys = new address[](4); // array of keys that signed the transaction mapping (address => bool) internal signKeys; // free amount in safe uint256 internal freeAmount; // event transferring money to safe bool internal tranche; // fixing lockup in safe bool internal lockupIsSet; // lockup of safe uint256 internal mainLockup; address internal lastSafeKey; Token public token; // Amount of cells uint256 public countOfCell; // cell structure struct _Cell{ uint256 lockup; uint256 balance; bool exist; uint256 timeOfDeposit; } // cell addresses mapping (address => _Cell) internal userCells; event CreateCell(address indexed key); event Deposit(address indexed key, uint256 balance); event Delete(address indexed key); event Edit(address indexed key, uint256 lockup); event Withdraw(address indexed who, uint256 balance); event InternalTransfer(address indexed from, address indexed to, uint256 balance); modifier firstLevel() { } modifier secondLevel() { } modifier thirdLevel() { } constructor (address _first, address _second, address _third, address _fourth) public { } function AuthStart() public returns(bool){ } // completion of operation with safe-keys function AuthEnd() public returns(bool){ } function getTimeOutAuthentication() firstLevel public view returns(uint256){ } function getFreeAmount() firstLevel public view returns(uint256){ } function getLockupCell(address _user) firstLevel public view returns(uint256){ } function getBalanceCell(address _user) firstLevel public view returns(uint256){ } function getExistCell(address _user) firstLevel public view returns(bool){ } function getSafeKey(uint i) firstLevel view public returns(address){ } // withdrawal tokens from safe for issuer function AssetWithdraw(address _to, uint256 _balance) secondLevel public returns(bool){ } function setCell(address _cell, uint256 _lockup) secondLevel public returns(bool){ require(userCells[_cell].lockup==0 && userCells[_cell].balance==0); require(<FILL_ME>) require(_lockup >= mainLockup); userCells[_cell].lockup = _lockup; userCells[_cell].exist = true; countOfCell = countOfCell.add(1); emit CreateCell(_cell); return true; } function deleteCell(address _key) secondLevel public returns(bool){ } // change parameters of the cell function editCell(address _key, uint256 _lockup) secondLevel public returns(bool){ } function depositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } function changeDepositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } // installation of a lockup for safe, // fixing free amount on balance, // token installation // (run once) function setContract(Token _token, uint256 _lockup) thirdLevel public returns(bool){ } // change of safe-key function changeKey(address _oldKey, address _newKey) thirdLevel public returns(bool){ } function setTimeOutAuthentication(uint256 _time) thirdLevel public returns(bool){ } function withdrawCell(uint256 _balance) public returns(bool){ } // transferring tokens from one cell to another function transferCell(address _to, uint256 _balance) public returns(bool){ } // information on balance of cell for holder function getInfoCellBalance() view public returns(uint256){ } // information on lockup of cell for holder function getInfoCellLockup() view public returns(uint256){ } function getMainBalance() public view returns(uint256){ } function getMainLockup() public view returns(uint256){ } function isTimeOver() view public returns(bool){ } }
!userCells[_cell].exist
358,761
!userCells[_cell].exist
null
pragma solidity ^0.4.24; /** * @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) { } } // token contract interface interface Token{ function balanceOf(address user) external returns(uint256); function transfer(address to, uint256 amount) external returns(bool); } contract Safe{ using SafeMath for uint256; // counter for signing transactions uint8 public count; uint256 internal end; uint256 internal timeOutAuthentication; // arrays of safe keys mapping (address => bool) internal safeKeys; address [] internal massSafeKeys = new address[](4); // array of keys that signed the transaction mapping (address => bool) internal signKeys; // free amount in safe uint256 internal freeAmount; // event transferring money to safe bool internal tranche; // fixing lockup in safe bool internal lockupIsSet; // lockup of safe uint256 internal mainLockup; address internal lastSafeKey; Token public token; // Amount of cells uint256 public countOfCell; // cell structure struct _Cell{ uint256 lockup; uint256 balance; bool exist; uint256 timeOfDeposit; } // cell addresses mapping (address => _Cell) internal userCells; event CreateCell(address indexed key); event Deposit(address indexed key, uint256 balance); event Delete(address indexed key); event Edit(address indexed key, uint256 lockup); event Withdraw(address indexed who, uint256 balance); event InternalTransfer(address indexed from, address indexed to, uint256 balance); modifier firstLevel() { } modifier secondLevel() { } modifier thirdLevel() { } constructor (address _first, address _second, address _third, address _fourth) public { } function AuthStart() public returns(bool){ } // completion of operation with safe-keys function AuthEnd() public returns(bool){ } function getTimeOutAuthentication() firstLevel public view returns(uint256){ } function getFreeAmount() firstLevel public view returns(uint256){ } function getLockupCell(address _user) firstLevel public view returns(uint256){ } function getBalanceCell(address _user) firstLevel public view returns(uint256){ } function getExistCell(address _user) firstLevel public view returns(bool){ } function getSafeKey(uint i) firstLevel view public returns(address){ } // withdrawal tokens from safe for issuer function AssetWithdraw(address _to, uint256 _balance) secondLevel public returns(bool){ } function setCell(address _cell, uint256 _lockup) secondLevel public returns(bool){ } function deleteCell(address _key) secondLevel public returns(bool){ require(<FILL_ME>) require(userCells[_key].exist); userCells[_key].lockup = 0; userCells[_key].exist = false; countOfCell = countOfCell.sub(1); emit Delete(_key); return true; } // change parameters of the cell function editCell(address _key, uint256 _lockup) secondLevel public returns(bool){ } function depositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } function changeDepositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } // installation of a lockup for safe, // fixing free amount on balance, // token installation // (run once) function setContract(Token _token, uint256 _lockup) thirdLevel public returns(bool){ } // change of safe-key function changeKey(address _oldKey, address _newKey) thirdLevel public returns(bool){ } function setTimeOutAuthentication(uint256 _time) thirdLevel public returns(bool){ } function withdrawCell(uint256 _balance) public returns(bool){ } // transferring tokens from one cell to another function transferCell(address _to, uint256 _balance) public returns(bool){ } // information on balance of cell for holder function getInfoCellBalance() view public returns(uint256){ } // information on lockup of cell for holder function getInfoCellLockup() view public returns(uint256){ } function getMainBalance() public view returns(uint256){ } function getMainLockup() public view returns(uint256){ } function isTimeOver() view public returns(bool){ } }
getBalanceCell(_key)==0
358,761
getBalanceCell(_key)==0
null
pragma solidity ^0.4.24; /** * @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) { } } // token contract interface interface Token{ function balanceOf(address user) external returns(uint256); function transfer(address to, uint256 amount) external returns(bool); } contract Safe{ using SafeMath for uint256; // counter for signing transactions uint8 public count; uint256 internal end; uint256 internal timeOutAuthentication; // arrays of safe keys mapping (address => bool) internal safeKeys; address [] internal massSafeKeys = new address[](4); // array of keys that signed the transaction mapping (address => bool) internal signKeys; // free amount in safe uint256 internal freeAmount; // event transferring money to safe bool internal tranche; // fixing lockup in safe bool internal lockupIsSet; // lockup of safe uint256 internal mainLockup; address internal lastSafeKey; Token public token; // Amount of cells uint256 public countOfCell; // cell structure struct _Cell{ uint256 lockup; uint256 balance; bool exist; uint256 timeOfDeposit; } // cell addresses mapping (address => _Cell) internal userCells; event CreateCell(address indexed key); event Deposit(address indexed key, uint256 balance); event Delete(address indexed key); event Edit(address indexed key, uint256 lockup); event Withdraw(address indexed who, uint256 balance); event InternalTransfer(address indexed from, address indexed to, uint256 balance); modifier firstLevel() { } modifier secondLevel() { } modifier thirdLevel() { } constructor (address _first, address _second, address _third, address _fourth) public { } function AuthStart() public returns(bool){ } // completion of operation with safe-keys function AuthEnd() public returns(bool){ } function getTimeOutAuthentication() firstLevel public view returns(uint256){ } function getFreeAmount() firstLevel public view returns(uint256){ } function getLockupCell(address _user) firstLevel public view returns(uint256){ } function getBalanceCell(address _user) firstLevel public view returns(uint256){ } function getExistCell(address _user) firstLevel public view returns(bool){ } function getSafeKey(uint i) firstLevel view public returns(address){ } // withdrawal tokens from safe for issuer function AssetWithdraw(address _to, uint256 _balance) secondLevel public returns(bool){ } function setCell(address _cell, uint256 _lockup) secondLevel public returns(bool){ } function deleteCell(address _key) secondLevel public returns(bool){ require(getBalanceCell(_key)==0); require(<FILL_ME>) userCells[_key].lockup = 0; userCells[_key].exist = false; countOfCell = countOfCell.sub(1); emit Delete(_key); return true; } // change parameters of the cell function editCell(address _key, uint256 _lockup) secondLevel public returns(bool){ } function depositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } function changeDepositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } // installation of a lockup for safe, // fixing free amount on balance, // token installation // (run once) function setContract(Token _token, uint256 _lockup) thirdLevel public returns(bool){ } // change of safe-key function changeKey(address _oldKey, address _newKey) thirdLevel public returns(bool){ } function setTimeOutAuthentication(uint256 _time) thirdLevel public returns(bool){ } function withdrawCell(uint256 _balance) public returns(bool){ } // transferring tokens from one cell to another function transferCell(address _to, uint256 _balance) public returns(bool){ } // information on balance of cell for holder function getInfoCellBalance() view public returns(uint256){ } // information on lockup of cell for holder function getInfoCellLockup() view public returns(uint256){ } function getMainBalance() public view returns(uint256){ } function getMainLockup() public view returns(uint256){ } function isTimeOver() view public returns(bool){ } }
userCells[_key].exist
358,761
userCells[_key].exist
null
pragma solidity ^0.4.24; /** * @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) { } } // token contract interface interface Token{ function balanceOf(address user) external returns(uint256); function transfer(address to, uint256 amount) external returns(bool); } contract Safe{ using SafeMath for uint256; // counter for signing transactions uint8 public count; uint256 internal end; uint256 internal timeOutAuthentication; // arrays of safe keys mapping (address => bool) internal safeKeys; address [] internal massSafeKeys = new address[](4); // array of keys that signed the transaction mapping (address => bool) internal signKeys; // free amount in safe uint256 internal freeAmount; // event transferring money to safe bool internal tranche; // fixing lockup in safe bool internal lockupIsSet; // lockup of safe uint256 internal mainLockup; address internal lastSafeKey; Token public token; // Amount of cells uint256 public countOfCell; // cell structure struct _Cell{ uint256 lockup; uint256 balance; bool exist; uint256 timeOfDeposit; } // cell addresses mapping (address => _Cell) internal userCells; event CreateCell(address indexed key); event Deposit(address indexed key, uint256 balance); event Delete(address indexed key); event Edit(address indexed key, uint256 lockup); event Withdraw(address indexed who, uint256 balance); event InternalTransfer(address indexed from, address indexed to, uint256 balance); modifier firstLevel() { } modifier secondLevel() { } modifier thirdLevel() { } constructor (address _first, address _second, address _third, address _fourth) public { } function AuthStart() public returns(bool){ } // completion of operation with safe-keys function AuthEnd() public returns(bool){ } function getTimeOutAuthentication() firstLevel public view returns(uint256){ } function getFreeAmount() firstLevel public view returns(uint256){ } function getLockupCell(address _user) firstLevel public view returns(uint256){ } function getBalanceCell(address _user) firstLevel public view returns(uint256){ } function getExistCell(address _user) firstLevel public view returns(bool){ } function getSafeKey(uint i) firstLevel view public returns(address){ } // withdrawal tokens from safe for issuer function AssetWithdraw(address _to, uint256 _balance) secondLevel public returns(bool){ } function setCell(address _cell, uint256 _lockup) secondLevel public returns(bool){ } function deleteCell(address _key) secondLevel public returns(bool){ } // change parameters of the cell function editCell(address _key, uint256 _lockup) secondLevel public returns(bool){ } function depositCell(address _key, uint256 _balance) secondLevel public returns(bool){ } function changeDepositCell(address _key, uint256 _balance) secondLevel public returns(bool){ require(<FILL_ME>) userCells[_key].balance = userCells[_key].balance.sub(_balance); freeAmount = freeAmount.add(_balance); return true; } // installation of a lockup for safe, // fixing free amount on balance, // token installation // (run once) function setContract(Token _token, uint256 _lockup) thirdLevel public returns(bool){ } // change of safe-key function changeKey(address _oldKey, address _newKey) thirdLevel public returns(bool){ } function setTimeOutAuthentication(uint256 _time) thirdLevel public returns(bool){ } function withdrawCell(uint256 _balance) public returns(bool){ } // transferring tokens from one cell to another function transferCell(address _to, uint256 _balance) public returns(bool){ } // information on balance of cell for holder function getInfoCellBalance() view public returns(uint256){ } // information on lockup of cell for holder function getInfoCellLockup() view public returns(uint256){ } function getMainBalance() public view returns(uint256){ } function getMainLockup() public view returns(uint256){ } function isTimeOver() view public returns(bool){ } }
userCells[_key].timeOfDeposit.add(1hours)>now
358,761
userCells[_key].timeOfDeposit.add(1hours)>now