comment
stringlengths
1
211
βŒ€
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
null
pragma solidity ^0.4.11; contract Challenge { address public owner; address public previous_owner; address public creator; bytes32 public flag_hash = 0xfa9b079005103147ac67299be9119fb4a47e29801f2d8d5025f36b248ce23695; function Challenge() public { } function withdraw() public { } function change_flag_hash(bytes32 data) public payable { } function check_flag(bytes32 data) public payable returns (bool) { require(msg.value > address(this).balance - msg.value); require(msg.sender != owner && msg.sender != previous_owner); require(<FILL_ME>) previous_owner = owner; owner = msg.sender; return true; } }
keccak256(data)==flag_hash
317,409
keccak256(data)==flag_hash
"Purchase would exceed max supply of tokens"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract nftattoo is ERC721, Ownable { bool public isActive = true; uint16 private totalSupply_ = 0; uint16 private nbFreeMint = 0; address payable public immutable shareholderAddress; uint16[] private forbiddenPixels; mapping(uint16 => uint16) idToPixel; mapping(address => uint16[]) ownerToPixel; uint16[] lstSold; constructor(address payable shareholderAddress_) ERC721("nftattoo", "PIXEL") { } function totalSupply() public view returns (uint16) { } function setNbFree(uint16 nbFree) external onlyOwner { } function setSaleState(bool newState) public onlyOwner { } function mint(uint16[] memory pixels) public payable { require(isActive, "Sale must be active to mint pixels"); require(<FILL_ME>) require( 0.069 ether * pixels.length <= msg.value, "Ether value sent is not correct" ); for (uint16 i = 0; i < pixels.length; i++) { for (uint8 j = 0; j < forbiddenPixels.length; j++) { require(pixels[i] != forbiddenPixels[j], "This pixel is not for sale!"); } uint16 mintIndex = totalSupply_ + 1; if (totalSupply_ < 4774) { idToPixel[mintIndex] = pixels[i]; ownerToPixel[msg.sender].push(pixels[i]); lstSold.push(pixels[i]); totalSupply_ = totalSupply_ + 1; _safeMint(msg.sender, pixels[i]); } } } function withdraw() public onlyOwner { } function soldPixels() public view returns (uint16[] memory) { } function owned(address ownerAddress) public view returns (uint16[] memory) { } /** * generates a base64 encoded metadata response without referencing off-chain content * @param tokenId the ID of the token to generate the metadata for * @return a base64 encoded JSON dictionary of the token's metadata and SVG */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } /* BASE 64 - Written by Brech Devos */ string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function base64(bytes memory data) internal pure returns (string memory) { } }
totalSupply_+pixels.length<=4774,"Purchase would exceed max supply of tokens"
317,420
totalSupply_+pixels.length<=4774
"Ether value sent is not correct"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract nftattoo is ERC721, Ownable { bool public isActive = true; uint16 private totalSupply_ = 0; uint16 private nbFreeMint = 0; address payable public immutable shareholderAddress; uint16[] private forbiddenPixels; mapping(uint16 => uint16) idToPixel; mapping(address => uint16[]) ownerToPixel; uint16[] lstSold; constructor(address payable shareholderAddress_) ERC721("nftattoo", "PIXEL") { } function totalSupply() public view returns (uint16) { } function setNbFree(uint16 nbFree) external onlyOwner { } function setSaleState(bool newState) public onlyOwner { } function mint(uint16[] memory pixels) public payable { require(isActive, "Sale must be active to mint pixels"); require( totalSupply_ + pixels.length <= 4774, "Purchase would exceed max supply of tokens" ); require(<FILL_ME>) for (uint16 i = 0; i < pixels.length; i++) { for (uint8 j = 0; j < forbiddenPixels.length; j++) { require(pixels[i] != forbiddenPixels[j], "This pixel is not for sale!"); } uint16 mintIndex = totalSupply_ + 1; if (totalSupply_ < 4774) { idToPixel[mintIndex] = pixels[i]; ownerToPixel[msg.sender].push(pixels[i]); lstSold.push(pixels[i]); totalSupply_ = totalSupply_ + 1; _safeMint(msg.sender, pixels[i]); } } } function withdraw() public onlyOwner { } function soldPixels() public view returns (uint16[] memory) { } function owned(address ownerAddress) public view returns (uint16[] memory) { } /** * generates a base64 encoded metadata response without referencing off-chain content * @param tokenId the ID of the token to generate the metadata for * @return a base64 encoded JSON dictionary of the token's metadata and SVG */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } /* BASE 64 - Written by Brech Devos */ string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function base64(bytes memory data) internal pure returns (string memory) { } }
0.069ether*pixels.length<=msg.value,"Ether value sent is not correct"
317,420
0.069ether*pixels.length<=msg.value
"This pixel is not for sale!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract nftattoo is ERC721, Ownable { bool public isActive = true; uint16 private totalSupply_ = 0; uint16 private nbFreeMint = 0; address payable public immutable shareholderAddress; uint16[] private forbiddenPixels; mapping(uint16 => uint16) idToPixel; mapping(address => uint16[]) ownerToPixel; uint16[] lstSold; constructor(address payable shareholderAddress_) ERC721("nftattoo", "PIXEL") { } function totalSupply() public view returns (uint16) { } function setNbFree(uint16 nbFree) external onlyOwner { } function setSaleState(bool newState) public onlyOwner { } function mint(uint16[] memory pixels) public payable { require(isActive, "Sale must be active to mint pixels"); require( totalSupply_ + pixels.length <= 4774, "Purchase would exceed max supply of tokens" ); require( 0.069 ether * pixels.length <= msg.value, "Ether value sent is not correct" ); for (uint16 i = 0; i < pixels.length; i++) { for (uint8 j = 0; j < forbiddenPixels.length; j++) { require(<FILL_ME>) } uint16 mintIndex = totalSupply_ + 1; if (totalSupply_ < 4774) { idToPixel[mintIndex] = pixels[i]; ownerToPixel[msg.sender].push(pixels[i]); lstSold.push(pixels[i]); totalSupply_ = totalSupply_ + 1; _safeMint(msg.sender, pixels[i]); } } } function withdraw() public onlyOwner { } function soldPixels() public view returns (uint16[] memory) { } function owned(address ownerAddress) public view returns (uint16[] memory) { } /** * generates a base64 encoded metadata response without referencing off-chain content * @param tokenId the ID of the token to generate the metadata for * @return a base64 encoded JSON dictionary of the token's metadata and SVG */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } /* BASE 64 - Written by Brech Devos */ string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function base64(bytes memory data) internal pure returns (string memory) { } }
pixels[i]!=forbiddenPixels[j],"This pixel is not for sale!"
317,420
pixels[i]!=forbiddenPixels[j]
null
pragma solidity 0.4.24; /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); event Transfer( address indexed from, address indexed to, uint256 value ); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title SafeMath * @dev Math operations with safety checks that revert on error */ library SafeMath { /** * @dev Multiplies two numbers, reverts on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers truncating the quotient, reverts on division by zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, reverts on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Divides two numbers and returns the remainder (unsigned integer modulo), * reverts when dividing by zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @title BITTOStandard * @dev the interface of BITTOStandard */ contract BITTOStandard { uint256 public stakeStartTime; uint256 public stakeMinAge; uint256 public stakeMaxAge; function mint() public returns (bool); function coinAge() constant public returns (uint256); function annualInterest() constant public returns (uint256); event Mint(address indexed _address, uint _reward); } /** * @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 private _owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @return the address of the owner. */ function owner() public view returns(address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns(bool) { } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { } } contract BITTO is IERC20, BITTOStandard, Ownable { using SafeMath for uint256; string public name = "BITTO"; string public symbol = "BITTO"; uint public decimals = 18; uint public chainStartTime; //chain start time uint public chainStartBlockNumber; //chain start block number uint public stakeStartTime; //stake start time uint public stakeMinAge = 10 days; // minimum age for coin age: 10D uint public stakeMaxAge = 180 days; // stake age of full weight: 180D uint public totalSupply; uint public maxTotalSupply; uint public totalInitialSupply; uint constant MIN_STAKING = 5000; // minium amount of token to stake uint constant STAKE_START_TIME = 1537228800; // 2018.9.18 uint constant STEP1_ENDTIME = 1552780800; // 2019.3.17 uint constant STEP2_ENDTIME = 1568332800; // 2019.9.13 uint constant STEP3_ENDTIME = 1583884800; // 2020.3.11 uint constant STEP4_ENDTIME = 1599436800; // 2020.9.7 uint constant STEP5_ENDTIME = 1914969600; // 2030.9.7 struct Period { uint start; uint end; uint interest; } mapping (uint => Period) periods; mapping(address => bool) public noPOSRewards; struct transferInStruct { uint128 amount; uint64 time; } mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) allowed; mapping(address => transferInStruct[]) transferIns; event Burn(address indexed burner, uint256 value); /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { } modifier canPoSMint() { } constructor() public { } function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) public returns (bool) { } function totalSupply() public view returns (uint256) { } function balanceOf(address _owner) constant public returns (uint256 balance) { } function transferFrom(address _from, address _to, uint256 _value) onlyPayloadSize(3 * 32) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance(address _owner, address _spender) constant public returns (uint256 remaining) { } function mint() canPoSMint public returns (bool) { } function getBlockNumber() view public returns (uint blockNumber) { } function coinAge() constant public returns (uint myCoinAge) { } function annualInterest() constant public returns (uint interest) { } function getProofOfStakeReward(address _address) public view returns (uint totalReward) { require((now >= stakeStartTime) && (stakeStartTime > 0)); require(<FILL_ME>) uint _now = now; totalReward = 0; for (uint i=0; i < getPeriodNumber(_now) + 1; i ++) { totalReward += (getCoinAgeofPeriod(_address, i, _now)).mul(periods[i].interest).div(100).div(365); } } function getPeriodNumber(uint _now) public view returns (uint periodNumber) { } function getCoinAgeofPeriod(address _address, uint _pid, uint _now) public view returns (uint _coinAge) { } function burn(uint256 _value) public { } /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function ownerBurnToken(uint _value) public onlyOwner { } /* Batch token transfer. Used by contract creator to distribute initial tokens to holders */ function batchTransfer(address[] _recipients, uint[] _values) onlyOwner public returns (bool) { } function disablePOSReward(address _account, bool _enabled) onlyOwner public { } }
!noPOSRewards[_address]
317,437
!noPOSRewards[_address]
"Too many HAYC"
pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } contract HAYC is ERC721URIStorage, Ownable { event MintHAYC (address indexed minter, uint256 startWith, uint256 times); uint256 public totalFreeHAYC; uint256 public totalPaidHAYC; uint256 public totalCount = 1500; uint256 public maxBatch = 15; uint256 public price = 40000000000000000; // 0.02 eth string public baseURI; bool public started; constructor(string memory name_, string memory symbol_, string memory baseURI_) ERC721(name_, symbol_) { } modifier mintEnabled() { } function totalFreeSupply() public view virtual returns (uint256) { } function totalPaidSupply() public view virtual returns (uint256) { } function _baseURI() internal view virtual override returns (string memory){ } function setBaseURI(string memory _newURI) public onlyOwner { } function changePrice(uint256 _newPrice) public onlyOwner { } function getPrice() public view virtual returns (uint256) { } function setTokenURI(uint256 _tokenId, string memory _tokenURI) public onlyOwner { } function setNormalStart(bool _start) public onlyOwner { } function mintHAYC(uint256 _times) payable public mintEnabled { require(_times >0 && _times <= maxBatch, "Incorrect number to mint"); require(<FILL_ME>) require(msg.value == _times * getPrice(), "Incorrect Value"); payable(owner()).transfer(msg.value); emit MintHAYC(_msgSender(), totalPaidHAYC+1+1500, _times); for(uint256 i=0; i< _times; i++){ _mint(_msgSender(), 1500 + 1 + totalPaidHAYC++); } } function mintFreeHAYC(uint256 _times) public mintEnabled { } function adminMint(uint256 _times) public onlyOwner { } function adminMintToAddress(address _addr) public onlyOwner { } }
totalPaidHAYC+_times<=totalCount,"Too many HAYC"
317,668
totalPaidHAYC+_times<=totalCount
"Too many HAYC"
pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } contract HAYC is ERC721URIStorage, Ownable { event MintHAYC (address indexed minter, uint256 startWith, uint256 times); uint256 public totalFreeHAYC; uint256 public totalPaidHAYC; uint256 public totalCount = 1500; uint256 public maxBatch = 15; uint256 public price = 40000000000000000; // 0.02 eth string public baseURI; bool public started; constructor(string memory name_, string memory symbol_, string memory baseURI_) ERC721(name_, symbol_) { } modifier mintEnabled() { } function totalFreeSupply() public view virtual returns (uint256) { } function totalPaidSupply() public view virtual returns (uint256) { } function _baseURI() internal view virtual override returns (string memory){ } function setBaseURI(string memory _newURI) public onlyOwner { } function changePrice(uint256 _newPrice) public onlyOwner { } function getPrice() public view virtual returns (uint256) { } function setTokenURI(uint256 _tokenId, string memory _tokenURI) public onlyOwner { } function setNormalStart(bool _start) public onlyOwner { } function mintHAYC(uint256 _times) payable public mintEnabled { } function mintFreeHAYC(uint256 _times) public mintEnabled { require(_times >0 && _times <= maxBatch, "Incorrect number to mint"); require(<FILL_ME>) emit MintHAYC(_msgSender(), totalFreeHAYC+1, _times); for(uint256 i=0; i< _times; i++){ _mint(_msgSender(), 1 + totalFreeHAYC++); } } function adminMint(uint256 _times) public onlyOwner { } function adminMintToAddress(address _addr) public onlyOwner { } }
totalFreeHAYC+_times<=totalCount,"Too many HAYC"
317,668
totalFreeHAYC+_times<=totalCount
"Mint amount will exceed total collection amount."
pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } } contract HAYC is ERC721URIStorage, Ownable { event MintHAYC (address indexed minter, uint256 startWith, uint256 times); uint256 public totalFreeHAYC; uint256 public totalPaidHAYC; uint256 public totalCount = 1500; uint256 public maxBatch = 15; uint256 public price = 40000000000000000; // 0.02 eth string public baseURI; bool public started; constructor(string memory name_, string memory symbol_, string memory baseURI_) ERC721(name_, symbol_) { } modifier mintEnabled() { } function totalFreeSupply() public view virtual returns (uint256) { } function totalPaidSupply() public view virtual returns (uint256) { } function _baseURI() internal view virtual override returns (string memory){ } function setBaseURI(string memory _newURI) public onlyOwner { } function changePrice(uint256 _newPrice) public onlyOwner { } function getPrice() public view virtual returns (uint256) { } function setTokenURI(uint256 _tokenId, string memory _tokenURI) public onlyOwner { } function setNormalStart(bool _start) public onlyOwner { } function mintHAYC(uint256 _times) payable public mintEnabled { } function mintFreeHAYC(uint256 _times) public mintEnabled { } function adminMint(uint256 _times) public onlyOwner { } function adminMintToAddress(address _addr) public onlyOwner { require(<FILL_ME>) emit MintHAYC(_addr, totalFreeHAYC+1, 1); _mint(_addr, 1 + totalFreeHAYC++); } }
totalFreeHAYC+1<=totalCount,"Mint amount will exceed total collection amount."
317,668
totalFreeHAYC+1<=totalCount
"Signature verification failed"
pragma solidity ^0.8.0; contract Signed is Delegated{ using Strings for uint256; using ECDSA for bytes32; string private _secret; address private _signer; function setSecret( string calldata secret ) external onlyOwner{ } function setSigner( address signer ) external onlyOwner{ } function createHash() internal view returns ( bytes32 ){ } function getSigner( bytes32 hash, bytes memory signature ) internal pure returns( address ){ } function isAuthorizedSigner( address extracted ) internal view virtual returns( bool ){ } function verifySignature( bytes calldata signature ) internal view { address extracted = getSigner( createHash(), signature ); require(<FILL_ME>) } }
isAuthorizedSigner(extracted),"Signature verification failed"
317,708
isAuthorizedSigner(extracted)
"BlaaToken: Issued exceeds maximum supply"
pragma solidity ^0.5.0; import "./Ownable.sol"; import "./Math.sol"; import "./ERC20.sol"; import "./ERC20Detailed.sol"; import "./LockAmount.sol"; contract BlaaToken is ERC20, ERC20Detailed, LockAmount { using Math for uint256; uint256 private _maxSupply; constructor(string memory name, string memory symbol, uint8 decimals, uint256 maximumSupply) public ERC20Detailed(name, symbol, decimals) { } /** * @dev μ΅œλŒ€ κ³΅κΈ‰λŸ‰ */ function maxSupply() public view returns (uint256) { } /** * @dev μ‚¬μš©κ°€λŠ₯ μž”μ•‘μ‘°νšŒ */ function availableBalanceOf(address account) public view returns (uint256) { } /** * @dev ADMIN λ°œν–‰ */ function mint(address account, uint256 amount) onlyOwner public returns (bool) { require(<FILL_ME>) _mint(account, amount); return true; } /** * @dev ADMIN μ†Œκ° */ function burn(uint256 amount) onlyOwner public returns (bool){ } /** * @dev ERC20 _transfer() μž¬μ •μ˜ */ function _transfer(address sender, address recipient, uint256 amount) internal { } /** * @dev λ½κΈˆμ•‘μ‘°νšŒ */ function getLockedAmount(address account) public view returns (uint256) { } }
_totalSupply.add(amount)<=_maxSupply,"BlaaToken: Issued exceeds maximum supply"
317,741
_totalSupply.add(amount)<=_maxSupply
"BlaaToken: exceeded amount available"
pragma solidity ^0.5.0; import "./Ownable.sol"; import "./Math.sol"; import "./ERC20.sol"; import "./ERC20Detailed.sol"; import "./LockAmount.sol"; contract BlaaToken is ERC20, ERC20Detailed, LockAmount { using Math for uint256; uint256 private _maxSupply; constructor(string memory name, string memory symbol, uint8 decimals, uint256 maximumSupply) public ERC20Detailed(name, symbol, decimals) { } /** * @dev μ΅œλŒ€ κ³΅κΈ‰λŸ‰ */ function maxSupply() public view returns (uint256) { } /** * @dev μ‚¬μš©κ°€λŠ₯ μž”μ•‘μ‘°νšŒ */ function availableBalanceOf(address account) public view returns (uint256) { } /** * @dev ADMIN λ°œν–‰ */ function mint(address account, uint256 amount) onlyOwner public returns (bool) { } /** * @dev ADMIN μ†Œκ° */ function burn(uint256 amount) onlyOwner public returns (bool){ } /** * @dev ERC20 _transfer() μž¬μ •μ˜ */ function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "BlaaToken: transfer from the zero address"); require(recipient != address(0), "BlaaToken: transfer to the zero address"); uint256 lockedAmount = getLockedAmountOfLockTable(sender); require(<FILL_ME>) _balances[sender] = _balances[sender].sub(amount, "BlaaToken: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** * @dev λ½κΈˆμ•‘μ‘°νšŒ */ function getLockedAmount(address account) public view returns (uint256) { } }
_balances[sender].sub(amount)>=lockedAmount,"BlaaToken: exceeded amount available"
317,741
_balances[sender].sub(amount)>=lockedAmount
"Early mint full"
//SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Noun Cats – The Invisibles $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!lllllllll>---------~!!!!!$$$$jjjjjt|||||||||ruuuuuuuuurjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj{!!!!; )$$$$$$$$$C!!!!]jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$xjjjjj$$$$$$$$$!!!!!l;;;;;;;;;~)))))))))?!!!!!$$$$jjjjj|{{{{{{{{{nYYYYYYYYYnjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // Contract by: @backseats_eth /// Noun Cats is two 5,000 piece collections. This is part one: The Invisibles. The goal is to acquire your Nounterpart, in this case, The Cat, from the forthcoming collection /// and either work solo or with the Nounterpart owner to interact with a contract to mint something completely new! contract NounCatsInvisibles is ERC721, Ownable { using ECDSA for bytes32; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; uint256 public price = 0.075 ether; // We're giving away 500 free Invisibles! uint256 public constant MAX_EARLY_SALE_SUPPLY = 500; // We go one over the actual max supply because < is cheaper than <= gas-wise. uint256 public constant MAX_SUPPLY = 5001; // Tracking which nonces have been used from the server mapping(string => bool) public usedNonces; // Tracking which addresses have minted their 1 free Invisible Noun Cat mapping(address => bool) public didMintEarly; // Tracking how many mints an address has done in pre-sale. Can mint up to 3 mapping(address => uint) public allowListMintCount; // The Merkle tree root for minting a free Invisible Noun Cat to certain addresses bytes32 public freeSaleMerkleRoot; // The Merkle tree root of our allow list addresses. Cheaper than storing an array of addresses or encrypted addresses on-chain bytes32 public allowListMerkleRoot; // The address of the private key that creates nonces and signs signatures for mint address public systemAddress; // The IPFS URI where our data can be found string public _baseTokenURI; // Tracking whether we've minted our 25 Invisibles yet bool public teamMintFinished; // An enum and associated variable tracking the state of the mint enum MintState { CLOSED, EARLY, ALLOWLIST, OPEN } MintState public _mintState; // Constructor constructor() ERC721("Noun Cats Invisibles", "INVISINOUNS") {} // Mint Functions /// @notice The first 500 Noun Cats are free! Each wallet can only mint 1. function mintEarly(bytes32[] calldata _merkleProof) external { require(_mintState == MintState.EARLY, "Early mint closed"); require(<FILL_ME>) require(!didMintEarly[msg.sender], 'Already minted'); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, freeSaleMerkleRoot, leaf), 'Not on the list'); didMintEarly[msg.sender] = true; _tokenSupply.increment(); _mint(msg.sender, totalSupply()); } /// @notice Function requires a Merkle proof and will only work if called from the minting site. /// Allows the allowList minter to come back and mint again if they mint under 3 max mints in the first transaction(s). function allowListMint(bytes32[] calldata _merkleProof, uint _amount) external payable { } /// @notice Mint up to 10 Invisible Noun Cats in a transaction function publicMint(string calldata _nonce, uint _amount, bytes calldata _signature) external payable { } /// @notice Allows the team to mint Invisibles to a destination address function promoMint(address _to, uint _amount) external onlyOwner { } /// @notice Allows the team to do a one-time mint of 25 Invisibles for events, giveaways, collabs, fun future things, etc. /// We like surprises. function teamMint() external onlyOwner { } function mint(address _to, uint _amount) private { } function totalSupply() public view returns (uint) { } /// @notice Checks if the private key that singed the nonce matches the system address of the contract function isValidSignature(bytes32 hash, bytes calldata signature) internal view returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } // Ownable Functions function setSystemAddress(address _systemAddress) external onlyOwner { } function setBaseURI(string calldata _baseURI) external onlyOwner { } function setFreeSaleMerkleRoot(bytes32 _root) external onlyOwner { } function setAllowListMerkleRoot(bytes32 _root) external onlyOwner { } function setMintState(uint256 status) external onlyOwner { } // Important: Set new price in wei (i.e. 50000000000000000 for 0.05 ETH) function setPrice(uint _newPrice) external onlyOwner { } function withdraw() external onlyOwner { } }
totalSupply()<MAX_EARLY_SALE_SUPPLY,"Early mint full"
317,770
totalSupply()<MAX_EARLY_SALE_SUPPLY
'Already minted'
//SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Noun Cats – The Invisibles $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!lllllllll>---------~!!!!!$$$$jjjjjt|||||||||ruuuuuuuuurjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj{!!!!; )$$$$$$$$$C!!!!]jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$xjjjjj$$$$$$$$$!!!!!l;;;;;;;;;~)))))))))?!!!!!$$$$jjjjj|{{{{{{{{{nYYYYYYYYYnjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // Contract by: @backseats_eth /// Noun Cats is two 5,000 piece collections. This is part one: The Invisibles. The goal is to acquire your Nounterpart, in this case, The Cat, from the forthcoming collection /// and either work solo or with the Nounterpart owner to interact with a contract to mint something completely new! contract NounCatsInvisibles is ERC721, Ownable { using ECDSA for bytes32; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; uint256 public price = 0.075 ether; // We're giving away 500 free Invisibles! uint256 public constant MAX_EARLY_SALE_SUPPLY = 500; // We go one over the actual max supply because < is cheaper than <= gas-wise. uint256 public constant MAX_SUPPLY = 5001; // Tracking which nonces have been used from the server mapping(string => bool) public usedNonces; // Tracking which addresses have minted their 1 free Invisible Noun Cat mapping(address => bool) public didMintEarly; // Tracking how many mints an address has done in pre-sale. Can mint up to 3 mapping(address => uint) public allowListMintCount; // The Merkle tree root for minting a free Invisible Noun Cat to certain addresses bytes32 public freeSaleMerkleRoot; // The Merkle tree root of our allow list addresses. Cheaper than storing an array of addresses or encrypted addresses on-chain bytes32 public allowListMerkleRoot; // The address of the private key that creates nonces and signs signatures for mint address public systemAddress; // The IPFS URI where our data can be found string public _baseTokenURI; // Tracking whether we've minted our 25 Invisibles yet bool public teamMintFinished; // An enum and associated variable tracking the state of the mint enum MintState { CLOSED, EARLY, ALLOWLIST, OPEN } MintState public _mintState; // Constructor constructor() ERC721("Noun Cats Invisibles", "INVISINOUNS") {} // Mint Functions /// @notice The first 500 Noun Cats are free! Each wallet can only mint 1. function mintEarly(bytes32[] calldata _merkleProof) external { require(_mintState == MintState.EARLY, "Early mint closed"); require(totalSupply() < MAX_EARLY_SALE_SUPPLY, "Early mint full"); require(<FILL_ME>) bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, freeSaleMerkleRoot, leaf), 'Not on the list'); didMintEarly[msg.sender] = true; _tokenSupply.increment(); _mint(msg.sender, totalSupply()); } /// @notice Function requires a Merkle proof and will only work if called from the minting site. /// Allows the allowList minter to come back and mint again if they mint under 3 max mints in the first transaction(s). function allowListMint(bytes32[] calldata _merkleProof, uint _amount) external payable { } /// @notice Mint up to 10 Invisible Noun Cats in a transaction function publicMint(string calldata _nonce, uint _amount, bytes calldata _signature) external payable { } /// @notice Allows the team to mint Invisibles to a destination address function promoMint(address _to, uint _amount) external onlyOwner { } /// @notice Allows the team to do a one-time mint of 25 Invisibles for events, giveaways, collabs, fun future things, etc. /// We like surprises. function teamMint() external onlyOwner { } function mint(address _to, uint _amount) private { } function totalSupply() public view returns (uint) { } /// @notice Checks if the private key that singed the nonce matches the system address of the contract function isValidSignature(bytes32 hash, bytes calldata signature) internal view returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } // Ownable Functions function setSystemAddress(address _systemAddress) external onlyOwner { } function setBaseURI(string calldata _baseURI) external onlyOwner { } function setFreeSaleMerkleRoot(bytes32 _root) external onlyOwner { } function setAllowListMerkleRoot(bytes32 _root) external onlyOwner { } function setMintState(uint256 status) external onlyOwner { } // Important: Set new price in wei (i.e. 50000000000000000 for 0.05 ETH) function setPrice(uint _newPrice) external onlyOwner { } function withdraw() external onlyOwner { } }
!didMintEarly[msg.sender],'Already minted'
317,770
!didMintEarly[msg.sender]
'Not on the list'
//SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Noun Cats – The Invisibles $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!lllllllll>---------~!!!!!$$$$jjjjjt|||||||||ruuuuuuuuurjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj{!!!!; )$$$$$$$$$C!!!!]jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$xjjjjj$$$$$$$$$!!!!!l;;;;;;;;;~)))))))))?!!!!!$$$$jjjjj|{{{{{{{{{nYYYYYYYYYnjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // Contract by: @backseats_eth /// Noun Cats is two 5,000 piece collections. This is part one: The Invisibles. The goal is to acquire your Nounterpart, in this case, The Cat, from the forthcoming collection /// and either work solo or with the Nounterpart owner to interact with a contract to mint something completely new! contract NounCatsInvisibles is ERC721, Ownable { using ECDSA for bytes32; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; uint256 public price = 0.075 ether; // We're giving away 500 free Invisibles! uint256 public constant MAX_EARLY_SALE_SUPPLY = 500; // We go one over the actual max supply because < is cheaper than <= gas-wise. uint256 public constant MAX_SUPPLY = 5001; // Tracking which nonces have been used from the server mapping(string => bool) public usedNonces; // Tracking which addresses have minted their 1 free Invisible Noun Cat mapping(address => bool) public didMintEarly; // Tracking how many mints an address has done in pre-sale. Can mint up to 3 mapping(address => uint) public allowListMintCount; // The Merkle tree root for minting a free Invisible Noun Cat to certain addresses bytes32 public freeSaleMerkleRoot; // The Merkle tree root of our allow list addresses. Cheaper than storing an array of addresses or encrypted addresses on-chain bytes32 public allowListMerkleRoot; // The address of the private key that creates nonces and signs signatures for mint address public systemAddress; // The IPFS URI where our data can be found string public _baseTokenURI; // Tracking whether we've minted our 25 Invisibles yet bool public teamMintFinished; // An enum and associated variable tracking the state of the mint enum MintState { CLOSED, EARLY, ALLOWLIST, OPEN } MintState public _mintState; // Constructor constructor() ERC721("Noun Cats Invisibles", "INVISINOUNS") {} // Mint Functions /// @notice The first 500 Noun Cats are free! Each wallet can only mint 1. function mintEarly(bytes32[] calldata _merkleProof) external { require(_mintState == MintState.EARLY, "Early mint closed"); require(totalSupply() < MAX_EARLY_SALE_SUPPLY, "Early mint full"); require(!didMintEarly[msg.sender], 'Already minted'); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(<FILL_ME>) didMintEarly[msg.sender] = true; _tokenSupply.increment(); _mint(msg.sender, totalSupply()); } /// @notice Function requires a Merkle proof and will only work if called from the minting site. /// Allows the allowList minter to come back and mint again if they mint under 3 max mints in the first transaction(s). function allowListMint(bytes32[] calldata _merkleProof, uint _amount) external payable { } /// @notice Mint up to 10 Invisible Noun Cats in a transaction function publicMint(string calldata _nonce, uint _amount, bytes calldata _signature) external payable { } /// @notice Allows the team to mint Invisibles to a destination address function promoMint(address _to, uint _amount) external onlyOwner { } /// @notice Allows the team to do a one-time mint of 25 Invisibles for events, giveaways, collabs, fun future things, etc. /// We like surprises. function teamMint() external onlyOwner { } function mint(address _to, uint _amount) private { } function totalSupply() public view returns (uint) { } /// @notice Checks if the private key that singed the nonce matches the system address of the contract function isValidSignature(bytes32 hash, bytes calldata signature) internal view returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } // Ownable Functions function setSystemAddress(address _systemAddress) external onlyOwner { } function setBaseURI(string calldata _baseURI) external onlyOwner { } function setFreeSaleMerkleRoot(bytes32 _root) external onlyOwner { } function setAllowListMerkleRoot(bytes32 _root) external onlyOwner { } function setMintState(uint256 status) external onlyOwner { } // Important: Set new price in wei (i.e. 50000000000000000 for 0.05 ETH) function setPrice(uint _newPrice) external onlyOwner { } function withdraw() external onlyOwner { } }
MerkleProof.verify(_merkleProof,freeSaleMerkleRoot,leaf),'Not on the list'
317,770
MerkleProof.verify(_merkleProof,freeSaleMerkleRoot,leaf)
"Can only mint 3"
//SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Noun Cats – The Invisibles $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!lllllllll>---------~!!!!!$$$$jjjjjt|||||||||ruuuuuuuuurjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj{!!!!; )$$$$$$$$$C!!!!]jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$xjjjjj$$$$$$$$$!!!!!l;;;;;;;;;~)))))))))?!!!!!$$$$jjjjj|{{{{{{{{{nYYYYYYYYYnjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // Contract by: @backseats_eth /// Noun Cats is two 5,000 piece collections. This is part one: The Invisibles. The goal is to acquire your Nounterpart, in this case, The Cat, from the forthcoming collection /// and either work solo or with the Nounterpart owner to interact with a contract to mint something completely new! contract NounCatsInvisibles is ERC721, Ownable { using ECDSA for bytes32; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; uint256 public price = 0.075 ether; // We're giving away 500 free Invisibles! uint256 public constant MAX_EARLY_SALE_SUPPLY = 500; // We go one over the actual max supply because < is cheaper than <= gas-wise. uint256 public constant MAX_SUPPLY = 5001; // Tracking which nonces have been used from the server mapping(string => bool) public usedNonces; // Tracking which addresses have minted their 1 free Invisible Noun Cat mapping(address => bool) public didMintEarly; // Tracking how many mints an address has done in pre-sale. Can mint up to 3 mapping(address => uint) public allowListMintCount; // The Merkle tree root for minting a free Invisible Noun Cat to certain addresses bytes32 public freeSaleMerkleRoot; // The Merkle tree root of our allow list addresses. Cheaper than storing an array of addresses or encrypted addresses on-chain bytes32 public allowListMerkleRoot; // The address of the private key that creates nonces and signs signatures for mint address public systemAddress; // The IPFS URI where our data can be found string public _baseTokenURI; // Tracking whether we've minted our 25 Invisibles yet bool public teamMintFinished; // An enum and associated variable tracking the state of the mint enum MintState { CLOSED, EARLY, ALLOWLIST, OPEN } MintState public _mintState; // Constructor constructor() ERC721("Noun Cats Invisibles", "INVISINOUNS") {} // Mint Functions /// @notice The first 500 Noun Cats are free! Each wallet can only mint 1. function mintEarly(bytes32[] calldata _merkleProof) external { } /// @notice Function requires a Merkle proof and will only work if called from the minting site. /// Allows the allowList minter to come back and mint again if they mint under 3 max mints in the first transaction(s). function allowListMint(bytes32[] calldata _merkleProof, uint _amount) external payable { require(_mintState == MintState.ALLOWLIST, "Allow list mint closed"); require(<FILL_ME>) require(totalSupply() + _amount < MAX_SUPPLY, "Exceeds max supply"); require(price * _amount == msg.value, "Wrong ETH amount"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, allowListMerkleRoot, leaf), 'Not on the list'); allowListMintCount[msg.sender] = allowListMintCount[msg.sender] + _amount; mint(msg.sender, _amount); } /// @notice Mint up to 10 Invisible Noun Cats in a transaction function publicMint(string calldata _nonce, uint _amount, bytes calldata _signature) external payable { } /// @notice Allows the team to mint Invisibles to a destination address function promoMint(address _to, uint _amount) external onlyOwner { } /// @notice Allows the team to do a one-time mint of 25 Invisibles for events, giveaways, collabs, fun future things, etc. /// We like surprises. function teamMint() external onlyOwner { } function mint(address _to, uint _amount) private { } function totalSupply() public view returns (uint) { } /// @notice Checks if the private key that singed the nonce matches the system address of the contract function isValidSignature(bytes32 hash, bytes calldata signature) internal view returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } // Ownable Functions function setSystemAddress(address _systemAddress) external onlyOwner { } function setBaseURI(string calldata _baseURI) external onlyOwner { } function setFreeSaleMerkleRoot(bytes32 _root) external onlyOwner { } function setAllowListMerkleRoot(bytes32 _root) external onlyOwner { } function setMintState(uint256 status) external onlyOwner { } // Important: Set new price in wei (i.e. 50000000000000000 for 0.05 ETH) function setPrice(uint _newPrice) external onlyOwner { } function withdraw() external onlyOwner { } }
allowListMintCount[msg.sender]+_amount<4,"Can only mint 3"
317,770
allowListMintCount[msg.sender]+_amount<4
"Wrong ETH amount"
//SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Noun Cats – The Invisibles $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!lllllllll>---------~!!!!!$$$$jjjjjt|||||||||ruuuuuuuuurjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj{!!!!; )$$$$$$$$$C!!!!]jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$xjjjjj$$$$$$$$$!!!!!l;;;;;;;;;~)))))))))?!!!!!$$$$jjjjj|{{{{{{{{{nYYYYYYYYYnjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // Contract by: @backseats_eth /// Noun Cats is two 5,000 piece collections. This is part one: The Invisibles. The goal is to acquire your Nounterpart, in this case, The Cat, from the forthcoming collection /// and either work solo or with the Nounterpart owner to interact with a contract to mint something completely new! contract NounCatsInvisibles is ERC721, Ownable { using ECDSA for bytes32; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; uint256 public price = 0.075 ether; // We're giving away 500 free Invisibles! uint256 public constant MAX_EARLY_SALE_SUPPLY = 500; // We go one over the actual max supply because < is cheaper than <= gas-wise. uint256 public constant MAX_SUPPLY = 5001; // Tracking which nonces have been used from the server mapping(string => bool) public usedNonces; // Tracking which addresses have minted their 1 free Invisible Noun Cat mapping(address => bool) public didMintEarly; // Tracking how many mints an address has done in pre-sale. Can mint up to 3 mapping(address => uint) public allowListMintCount; // The Merkle tree root for minting a free Invisible Noun Cat to certain addresses bytes32 public freeSaleMerkleRoot; // The Merkle tree root of our allow list addresses. Cheaper than storing an array of addresses or encrypted addresses on-chain bytes32 public allowListMerkleRoot; // The address of the private key that creates nonces and signs signatures for mint address public systemAddress; // The IPFS URI where our data can be found string public _baseTokenURI; // Tracking whether we've minted our 25 Invisibles yet bool public teamMintFinished; // An enum and associated variable tracking the state of the mint enum MintState { CLOSED, EARLY, ALLOWLIST, OPEN } MintState public _mintState; // Constructor constructor() ERC721("Noun Cats Invisibles", "INVISINOUNS") {} // Mint Functions /// @notice The first 500 Noun Cats are free! Each wallet can only mint 1. function mintEarly(bytes32[] calldata _merkleProof) external { } /// @notice Function requires a Merkle proof and will only work if called from the minting site. /// Allows the allowList minter to come back and mint again if they mint under 3 max mints in the first transaction(s). function allowListMint(bytes32[] calldata _merkleProof, uint _amount) external payable { require(_mintState == MintState.ALLOWLIST, "Allow list mint closed"); require(allowListMintCount[msg.sender] + _amount < 4, "Can only mint 3"); require(totalSupply() + _amount < MAX_SUPPLY, "Exceeds max supply"); require(<FILL_ME>) bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(MerkleProof.verify(_merkleProof, allowListMerkleRoot, leaf), 'Not on the list'); allowListMintCount[msg.sender] = allowListMintCount[msg.sender] + _amount; mint(msg.sender, _amount); } /// @notice Mint up to 10 Invisible Noun Cats in a transaction function publicMint(string calldata _nonce, uint _amount, bytes calldata _signature) external payable { } /// @notice Allows the team to mint Invisibles to a destination address function promoMint(address _to, uint _amount) external onlyOwner { } /// @notice Allows the team to do a one-time mint of 25 Invisibles for events, giveaways, collabs, fun future things, etc. /// We like surprises. function teamMint() external onlyOwner { } function mint(address _to, uint _amount) private { } function totalSupply() public view returns (uint) { } /// @notice Checks if the private key that singed the nonce matches the system address of the contract function isValidSignature(bytes32 hash, bytes calldata signature) internal view returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } // Ownable Functions function setSystemAddress(address _systemAddress) external onlyOwner { } function setBaseURI(string calldata _baseURI) external onlyOwner { } function setFreeSaleMerkleRoot(bytes32 _root) external onlyOwner { } function setAllowListMerkleRoot(bytes32 _root) external onlyOwner { } function setMintState(uint256 status) external onlyOwner { } // Important: Set new price in wei (i.e. 50000000000000000 for 0.05 ETH) function setPrice(uint _newPrice) external onlyOwner { } function withdraw() external onlyOwner { } }
price*_amount==msg.value,"Wrong ETH amount"
317,770
price*_amount==msg.value
'Not on the list'
//SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Noun Cats – The Invisibles $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!lllllllll>---------~!!!!!$$$$jjjjjt|||||||||ruuuuuuuuurjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj{!!!!; )$$$$$$$$$C!!!!]jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$xjjjjj$$$$$$$$$!!!!!l;;;;;;;;;~)))))))))?!!!!!$$$$jjjjj|{{{{{{{{{nYYYYYYYYYnjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // Contract by: @backseats_eth /// Noun Cats is two 5,000 piece collections. This is part one: The Invisibles. The goal is to acquire your Nounterpart, in this case, The Cat, from the forthcoming collection /// and either work solo or with the Nounterpart owner to interact with a contract to mint something completely new! contract NounCatsInvisibles is ERC721, Ownable { using ECDSA for bytes32; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; uint256 public price = 0.075 ether; // We're giving away 500 free Invisibles! uint256 public constant MAX_EARLY_SALE_SUPPLY = 500; // We go one over the actual max supply because < is cheaper than <= gas-wise. uint256 public constant MAX_SUPPLY = 5001; // Tracking which nonces have been used from the server mapping(string => bool) public usedNonces; // Tracking which addresses have minted their 1 free Invisible Noun Cat mapping(address => bool) public didMintEarly; // Tracking how many mints an address has done in pre-sale. Can mint up to 3 mapping(address => uint) public allowListMintCount; // The Merkle tree root for minting a free Invisible Noun Cat to certain addresses bytes32 public freeSaleMerkleRoot; // The Merkle tree root of our allow list addresses. Cheaper than storing an array of addresses or encrypted addresses on-chain bytes32 public allowListMerkleRoot; // The address of the private key that creates nonces and signs signatures for mint address public systemAddress; // The IPFS URI where our data can be found string public _baseTokenURI; // Tracking whether we've minted our 25 Invisibles yet bool public teamMintFinished; // An enum and associated variable tracking the state of the mint enum MintState { CLOSED, EARLY, ALLOWLIST, OPEN } MintState public _mintState; // Constructor constructor() ERC721("Noun Cats Invisibles", "INVISINOUNS") {} // Mint Functions /// @notice The first 500 Noun Cats are free! Each wallet can only mint 1. function mintEarly(bytes32[] calldata _merkleProof) external { } /// @notice Function requires a Merkle proof and will only work if called from the minting site. /// Allows the allowList minter to come back and mint again if they mint under 3 max mints in the first transaction(s). function allowListMint(bytes32[] calldata _merkleProof, uint _amount) external payable { require(_mintState == MintState.ALLOWLIST, "Allow list mint closed"); require(allowListMintCount[msg.sender] + _amount < 4, "Can only mint 3"); require(totalSupply() + _amount < MAX_SUPPLY, "Exceeds max supply"); require(price * _amount == msg.value, "Wrong ETH amount"); bytes32 leaf = keccak256(abi.encodePacked(msg.sender)); require(<FILL_ME>) allowListMintCount[msg.sender] = allowListMintCount[msg.sender] + _amount; mint(msg.sender, _amount); } /// @notice Mint up to 10 Invisible Noun Cats in a transaction function publicMint(string calldata _nonce, uint _amount, bytes calldata _signature) external payable { } /// @notice Allows the team to mint Invisibles to a destination address function promoMint(address _to, uint _amount) external onlyOwner { } /// @notice Allows the team to do a one-time mint of 25 Invisibles for events, giveaways, collabs, fun future things, etc. /// We like surprises. function teamMint() external onlyOwner { } function mint(address _to, uint _amount) private { } function totalSupply() public view returns (uint) { } /// @notice Checks if the private key that singed the nonce matches the system address of the contract function isValidSignature(bytes32 hash, bytes calldata signature) internal view returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } // Ownable Functions function setSystemAddress(address _systemAddress) external onlyOwner { } function setBaseURI(string calldata _baseURI) external onlyOwner { } function setFreeSaleMerkleRoot(bytes32 _root) external onlyOwner { } function setAllowListMerkleRoot(bytes32 _root) external onlyOwner { } function setMintState(uint256 status) external onlyOwner { } // Important: Set new price in wei (i.e. 50000000000000000 for 0.05 ETH) function setPrice(uint _newPrice) external onlyOwner { } function withdraw() external onlyOwner { } }
MerkleProof.verify(_merkleProof,allowListMerkleRoot,leaf),'Not on the list'
317,770
MerkleProof.verify(_merkleProof,allowListMerkleRoot,leaf)
"Nonce already used"
//SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Noun Cats – The Invisibles $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!lllllllll>---------~!!!!!$$$$jjjjjt|||||||||ruuuuuuuuurjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj{!!!!; )$$$$$$$$$C!!!!]jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$xjjjjj$$$$$$$$$!!!!!l;;;;;;;;;~)))))))))?!!!!!$$$$jjjjj|{{{{{{{{{nYYYYYYYYYnjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // Contract by: @backseats_eth /// Noun Cats is two 5,000 piece collections. This is part one: The Invisibles. The goal is to acquire your Nounterpart, in this case, The Cat, from the forthcoming collection /// and either work solo or with the Nounterpart owner to interact with a contract to mint something completely new! contract NounCatsInvisibles is ERC721, Ownable { using ECDSA for bytes32; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; uint256 public price = 0.075 ether; // We're giving away 500 free Invisibles! uint256 public constant MAX_EARLY_SALE_SUPPLY = 500; // We go one over the actual max supply because < is cheaper than <= gas-wise. uint256 public constant MAX_SUPPLY = 5001; // Tracking which nonces have been used from the server mapping(string => bool) public usedNonces; // Tracking which addresses have minted their 1 free Invisible Noun Cat mapping(address => bool) public didMintEarly; // Tracking how many mints an address has done in pre-sale. Can mint up to 3 mapping(address => uint) public allowListMintCount; // The Merkle tree root for minting a free Invisible Noun Cat to certain addresses bytes32 public freeSaleMerkleRoot; // The Merkle tree root of our allow list addresses. Cheaper than storing an array of addresses or encrypted addresses on-chain bytes32 public allowListMerkleRoot; // The address of the private key that creates nonces and signs signatures for mint address public systemAddress; // The IPFS URI where our data can be found string public _baseTokenURI; // Tracking whether we've minted our 25 Invisibles yet bool public teamMintFinished; // An enum and associated variable tracking the state of the mint enum MintState { CLOSED, EARLY, ALLOWLIST, OPEN } MintState public _mintState; // Constructor constructor() ERC721("Noun Cats Invisibles", "INVISINOUNS") {} // Mint Functions /// @notice The first 500 Noun Cats are free! Each wallet can only mint 1. function mintEarly(bytes32[] calldata _merkleProof) external { } /// @notice Function requires a Merkle proof and will only work if called from the minting site. /// Allows the allowList minter to come back and mint again if they mint under 3 max mints in the first transaction(s). function allowListMint(bytes32[] calldata _merkleProof, uint _amount) external payable { } /// @notice Mint up to 10 Invisible Noun Cats in a transaction function publicMint(string calldata _nonce, uint _amount, bytes calldata _signature) external payable { require(_mintState == MintState.OPEN, "Mint closed"); require(msg.sender == tx.origin, "Real users only"); require(_amount < 11, "Wrong amount"); require(totalSupply() + _amount < MAX_SUPPLY, 'Exceeds max supply'); require(price * _amount == msg.value, "Wrong ETH amount"); require(<FILL_ME>) require(isValidSignature(keccak256(abi.encodePacked(msg.sender, _amount, _nonce)), _signature), "Invalid signature"); usedNonces[_nonce] = true; mint(msg.sender, _amount); } /// @notice Allows the team to mint Invisibles to a destination address function promoMint(address _to, uint _amount) external onlyOwner { } /// @notice Allows the team to do a one-time mint of 25 Invisibles for events, giveaways, collabs, fun future things, etc. /// We like surprises. function teamMint() external onlyOwner { } function mint(address _to, uint _amount) private { } function totalSupply() public view returns (uint) { } /// @notice Checks if the private key that singed the nonce matches the system address of the contract function isValidSignature(bytes32 hash, bytes calldata signature) internal view returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } // Ownable Functions function setSystemAddress(address _systemAddress) external onlyOwner { } function setBaseURI(string calldata _baseURI) external onlyOwner { } function setFreeSaleMerkleRoot(bytes32 _root) external onlyOwner { } function setAllowListMerkleRoot(bytes32 _root) external onlyOwner { } function setMintState(uint256 status) external onlyOwner { } // Important: Set new price in wei (i.e. 50000000000000000 for 0.05 ETH) function setPrice(uint _newPrice) external onlyOwner { } function withdraw() external onlyOwner { } }
!usedNonces[_nonce],"Nonce already used"
317,770
!usedNonces[_nonce]
"Invalid signature"
//SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Noun Cats – The Invisibles $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!lllllllll>---------~!!!!!$$$$jjjjjt|||||||||ruuuuuuuuurjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj{!!!!; )$$$$$$$$$C!!!!]jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$xjjjjj$$$$$$$$$!!!!!l;;;;;;;;;~)))))))))?!!!!!$$$$jjjjj|{{{{{{{{{nYYYYYYYYYnjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // Contract by: @backseats_eth /// Noun Cats is two 5,000 piece collections. This is part one: The Invisibles. The goal is to acquire your Nounterpart, in this case, The Cat, from the forthcoming collection /// and either work solo or with the Nounterpart owner to interact with a contract to mint something completely new! contract NounCatsInvisibles is ERC721, Ownable { using ECDSA for bytes32; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; uint256 public price = 0.075 ether; // We're giving away 500 free Invisibles! uint256 public constant MAX_EARLY_SALE_SUPPLY = 500; // We go one over the actual max supply because < is cheaper than <= gas-wise. uint256 public constant MAX_SUPPLY = 5001; // Tracking which nonces have been used from the server mapping(string => bool) public usedNonces; // Tracking which addresses have minted their 1 free Invisible Noun Cat mapping(address => bool) public didMintEarly; // Tracking how many mints an address has done in pre-sale. Can mint up to 3 mapping(address => uint) public allowListMintCount; // The Merkle tree root for minting a free Invisible Noun Cat to certain addresses bytes32 public freeSaleMerkleRoot; // The Merkle tree root of our allow list addresses. Cheaper than storing an array of addresses or encrypted addresses on-chain bytes32 public allowListMerkleRoot; // The address of the private key that creates nonces and signs signatures for mint address public systemAddress; // The IPFS URI where our data can be found string public _baseTokenURI; // Tracking whether we've minted our 25 Invisibles yet bool public teamMintFinished; // An enum and associated variable tracking the state of the mint enum MintState { CLOSED, EARLY, ALLOWLIST, OPEN } MintState public _mintState; // Constructor constructor() ERC721("Noun Cats Invisibles", "INVISINOUNS") {} // Mint Functions /// @notice The first 500 Noun Cats are free! Each wallet can only mint 1. function mintEarly(bytes32[] calldata _merkleProof) external { } /// @notice Function requires a Merkle proof and will only work if called from the minting site. /// Allows the allowList minter to come back and mint again if they mint under 3 max mints in the first transaction(s). function allowListMint(bytes32[] calldata _merkleProof, uint _amount) external payable { } /// @notice Mint up to 10 Invisible Noun Cats in a transaction function publicMint(string calldata _nonce, uint _amount, bytes calldata _signature) external payable { require(_mintState == MintState.OPEN, "Mint closed"); require(msg.sender == tx.origin, "Real users only"); require(_amount < 11, "Wrong amount"); require(totalSupply() + _amount < MAX_SUPPLY, 'Exceeds max supply'); require(price * _amount == msg.value, "Wrong ETH amount"); require(!usedNonces[_nonce], "Nonce already used"); require(<FILL_ME>) usedNonces[_nonce] = true; mint(msg.sender, _amount); } /// @notice Allows the team to mint Invisibles to a destination address function promoMint(address _to, uint _amount) external onlyOwner { } /// @notice Allows the team to do a one-time mint of 25 Invisibles for events, giveaways, collabs, fun future things, etc. /// We like surprises. function teamMint() external onlyOwner { } function mint(address _to, uint _amount) private { } function totalSupply() public view returns (uint) { } /// @notice Checks if the private key that singed the nonce matches the system address of the contract function isValidSignature(bytes32 hash, bytes calldata signature) internal view returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } // Ownable Functions function setSystemAddress(address _systemAddress) external onlyOwner { } function setBaseURI(string calldata _baseURI) external onlyOwner { } function setFreeSaleMerkleRoot(bytes32 _root) external onlyOwner { } function setAllowListMerkleRoot(bytes32 _root) external onlyOwner { } function setMintState(uint256 status) external onlyOwner { } // Important: Set new price in wei (i.e. 50000000000000000 for 0.05 ETH) function setPrice(uint _newPrice) external onlyOwner { } function withdraw() external onlyOwner { } }
isValidSignature(keccak256(abi.encodePacked(msg.sender,_amount,_nonce)),_signature),"Invalid signature"
317,770
isValidSignature(keccak256(abi.encodePacked(msg.sender,_amount,_nonce)),_signature)
"Already minted our Cats"
//SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Noun Cats – The Invisibles $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!lllllllll>---------~!!!!!$$$$jjjjjt|||||||||ruuuuuuuuurjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj{!!!!; )$$$$$$$$$C!!!!]jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$xjjjjj$$$$$$$$$!!!!!l;;;;;;;;;~)))))))))?!!!!!$$$$jjjjj|{{{{{{{{{nYYYYYYYYYnjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // Contract by: @backseats_eth /// Noun Cats is two 5,000 piece collections. This is part one: The Invisibles. The goal is to acquire your Nounterpart, in this case, The Cat, from the forthcoming collection /// and either work solo or with the Nounterpart owner to interact with a contract to mint something completely new! contract NounCatsInvisibles is ERC721, Ownable { using ECDSA for bytes32; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; uint256 public price = 0.075 ether; // We're giving away 500 free Invisibles! uint256 public constant MAX_EARLY_SALE_SUPPLY = 500; // We go one over the actual max supply because < is cheaper than <= gas-wise. uint256 public constant MAX_SUPPLY = 5001; // Tracking which nonces have been used from the server mapping(string => bool) public usedNonces; // Tracking which addresses have minted their 1 free Invisible Noun Cat mapping(address => bool) public didMintEarly; // Tracking how many mints an address has done in pre-sale. Can mint up to 3 mapping(address => uint) public allowListMintCount; // The Merkle tree root for minting a free Invisible Noun Cat to certain addresses bytes32 public freeSaleMerkleRoot; // The Merkle tree root of our allow list addresses. Cheaper than storing an array of addresses or encrypted addresses on-chain bytes32 public allowListMerkleRoot; // The address of the private key that creates nonces and signs signatures for mint address public systemAddress; // The IPFS URI where our data can be found string public _baseTokenURI; // Tracking whether we've minted our 25 Invisibles yet bool public teamMintFinished; // An enum and associated variable tracking the state of the mint enum MintState { CLOSED, EARLY, ALLOWLIST, OPEN } MintState public _mintState; // Constructor constructor() ERC721("Noun Cats Invisibles", "INVISINOUNS") {} // Mint Functions /// @notice The first 500 Noun Cats are free! Each wallet can only mint 1. function mintEarly(bytes32[] calldata _merkleProof) external { } /// @notice Function requires a Merkle proof and will only work if called from the minting site. /// Allows the allowList minter to come back and mint again if they mint under 3 max mints in the first transaction(s). function allowListMint(bytes32[] calldata _merkleProof, uint _amount) external payable { } /// @notice Mint up to 10 Invisible Noun Cats in a transaction function publicMint(string calldata _nonce, uint _amount, bytes calldata _signature) external payable { } /// @notice Allows the team to mint Invisibles to a destination address function promoMint(address _to, uint _amount) external onlyOwner { } /// @notice Allows the team to do a one-time mint of 25 Invisibles for events, giveaways, collabs, fun future things, etc. /// We like surprises. function teamMint() external onlyOwner { require(<FILL_ME>) require(totalSupply() + 25 < MAX_SUPPLY, 'Exceeds max supply'); teamMintFinished = true; mint(msg.sender, 25); } function mint(address _to, uint _amount) private { } function totalSupply() public view returns (uint) { } /// @notice Checks if the private key that singed the nonce matches the system address of the contract function isValidSignature(bytes32 hash, bytes calldata signature) internal view returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } // Ownable Functions function setSystemAddress(address _systemAddress) external onlyOwner { } function setBaseURI(string calldata _baseURI) external onlyOwner { } function setFreeSaleMerkleRoot(bytes32 _root) external onlyOwner { } function setAllowListMerkleRoot(bytes32 _root) external onlyOwner { } function setMintState(uint256 status) external onlyOwner { } // Important: Set new price in wei (i.e. 50000000000000000 for 0.05 ETH) function setPrice(uint _newPrice) external onlyOwner { } function withdraw() external onlyOwner { } }
!teamMintFinished,"Already minted our Cats"
317,770
!teamMintFinished
'Exceeds max supply'
//SPDX-License-Identifier: MIT pragma solidity 0.8.10; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Noun Cats – The Invisibles $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!lllllllll>---------~!!!!!$$$$jjjjjt|||||||||ruuuuuuuuurjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj{!!!!; )$$$$$$$$$C!!!!]jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjjjjjjjjjjj)!!!!; )$$$$$$$$$C!!!![jjjjjjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$jjjjjj$$$$$$$$$!!!!!; )$$$$$$$$$C!!!!!$$$$jjjjj> J$$$$$$$$$Jjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$xjjjjj$$$$$$$$$!!!!!l;;;;;;;;;~)))))))))?!!!!!$$$$jjjjj|{{{{{{{{{nYYYYYYYYYnjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!$$$$jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ // Contract by: @backseats_eth /// Noun Cats is two 5,000 piece collections. This is part one: The Invisibles. The goal is to acquire your Nounterpart, in this case, The Cat, from the forthcoming collection /// and either work solo or with the Nounterpart owner to interact with a contract to mint something completely new! contract NounCatsInvisibles is ERC721, Ownable { using ECDSA for bytes32; using Counters for Counters.Counter; Counters.Counter private _tokenSupply; uint256 public price = 0.075 ether; // We're giving away 500 free Invisibles! uint256 public constant MAX_EARLY_SALE_SUPPLY = 500; // We go one over the actual max supply because < is cheaper than <= gas-wise. uint256 public constant MAX_SUPPLY = 5001; // Tracking which nonces have been used from the server mapping(string => bool) public usedNonces; // Tracking which addresses have minted their 1 free Invisible Noun Cat mapping(address => bool) public didMintEarly; // Tracking how many mints an address has done in pre-sale. Can mint up to 3 mapping(address => uint) public allowListMintCount; // The Merkle tree root for minting a free Invisible Noun Cat to certain addresses bytes32 public freeSaleMerkleRoot; // The Merkle tree root of our allow list addresses. Cheaper than storing an array of addresses or encrypted addresses on-chain bytes32 public allowListMerkleRoot; // The address of the private key that creates nonces and signs signatures for mint address public systemAddress; // The IPFS URI where our data can be found string public _baseTokenURI; // Tracking whether we've minted our 25 Invisibles yet bool public teamMintFinished; // An enum and associated variable tracking the state of the mint enum MintState { CLOSED, EARLY, ALLOWLIST, OPEN } MintState public _mintState; // Constructor constructor() ERC721("Noun Cats Invisibles", "INVISINOUNS") {} // Mint Functions /// @notice The first 500 Noun Cats are free! Each wallet can only mint 1. function mintEarly(bytes32[] calldata _merkleProof) external { } /// @notice Function requires a Merkle proof and will only work if called from the minting site. /// Allows the allowList minter to come back and mint again if they mint under 3 max mints in the first transaction(s). function allowListMint(bytes32[] calldata _merkleProof, uint _amount) external payable { } /// @notice Mint up to 10 Invisible Noun Cats in a transaction function publicMint(string calldata _nonce, uint _amount, bytes calldata _signature) external payable { } /// @notice Allows the team to mint Invisibles to a destination address function promoMint(address _to, uint _amount) external onlyOwner { } /// @notice Allows the team to do a one-time mint of 25 Invisibles for events, giveaways, collabs, fun future things, etc. /// We like surprises. function teamMint() external onlyOwner { require(!teamMintFinished, "Already minted our Cats"); require(<FILL_ME>) teamMintFinished = true; mint(msg.sender, 25); } function mint(address _to, uint _amount) private { } function totalSupply() public view returns (uint) { } /// @notice Checks if the private key that singed the nonce matches the system address of the contract function isValidSignature(bytes32 hash, bytes calldata signature) internal view returns (bool) { } function _baseURI() internal view virtual override returns (string memory) { } // Ownable Functions function setSystemAddress(address _systemAddress) external onlyOwner { } function setBaseURI(string calldata _baseURI) external onlyOwner { } function setFreeSaleMerkleRoot(bytes32 _root) external onlyOwner { } function setAllowListMerkleRoot(bytes32 _root) external onlyOwner { } function setMintState(uint256 status) external onlyOwner { } // Important: Set new price in wei (i.e. 50000000000000000 for 0.05 ETH) function setPrice(uint _newPrice) external onlyOwner { } function withdraw() external onlyOwner { } }
totalSupply()+25<MAX_SUPPLY,'Exceeds max supply'
317,770
totalSupply()+25<MAX_SUPPLY
null
pragma solidity ^0.4.24; /** * @title Ownable */ contract Ownable { address public owner; struct Admins { mapping(address=>bool) isAdmin; } Admins internal admins; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } function addAdmin(address candidate) public onlyOwner returns(bool) { } function removeAdmin(address candidate) public onlyOwner returns(bool) { } function checkAdmin(address candidate) public onlyOwner view returns(bool) { } modifier onlyAdmins() { require(<FILL_ME>) _; } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } 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 Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ constructor(uint256 totalSupply) public { } function totalSupply() public view returns (uint256) { } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } function batchTransfer(address[] _receivers, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { } } contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { } } contract StandardToken is DetailedERC20('Gold Features Coin Token','GFCT',18), BasicToken(10000000000000000000000000000) { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint256 _addedValue ) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint256 _subtractedValue ) public returns (bool) { } function recoverLost( address lost, uint256 amount ) public returns (bool) { } } contract GFCT_Token is StandardToken, Pausable { function transfer( address _to, uint256 _value ) public whenNotPaused returns (bool) { } function batchTransfer ( address[] _receivers, uint256 _value ) public whenNotPaused onlyAdmins returns (bool) { } function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { } function approve( address _spender, uint256 _value ) public whenNotPaused returns (bool) { } function increaseApproval( address _spender, uint _addedValue ) public whenNotPaused returns (bool success) { } function decreaseApproval( address _spender, uint _subtractedValue ) public whenNotPaused returns (bool success) { } function recoverLost( address lost, uint256 amount ) public whenNotPaused onlyOwner returns(bool) { } }
admins.isAdmin[msg.sender]==true
317,836
admins.isAdmin[msg.sender]==true
null
pragma solidity ^0.4.17; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract Ownable { address public owner; function Ownable() public { } modifier onlyOwner() { } function transferOwnership(address newOwner) public onlyOwner { } } contract Migrations { address public owner; uint public last_completed_migration; modifier restricted() { } function Migrations() public { } function setCompleted(uint completed) public restricted { } function upgrade(address new_address) public restricted { } } contract ERC20Standard { // total amount of tokens function totalSupply() public constant returns (uint256) ; /* * Events */ event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); /* * Public functions */ function transfer(address _to, uint256 _value) public returns (bool); function transferFrom(address _from, address _to, uint256 _value) public returns (bool); function approve(address _spender, uint256 _value) public returns (bool); function balanceOf(address _owner) public constant returns (uint256); function allowance(address _owner, address _spender) public constant returns (uint256); } contract ERC20StandardToken is ERC20Standard { using SafeMath for uint256; /* * Storage */ mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowances; function transfer(address to, uint256 value) public returns (bool){ } function transferFrom(address from, address to, uint256 value) public returns (bool){ } function approve(address spender, uint256 value) public returns (bool){ require(<FILL_ME>) allowances[msg.sender][spender] = value; Approval(msg.sender, spender, value); return true; } function allowance(address owner, address spender) public constant returns (uint256){ } function balanceOf(address owner) public constant returns (uint256){ } } contract WEChainCommunity is ERC20StandardToken, Ownable { // token information string public constant name = "WEChainCommunity"; string public constant symbol = "WECC"; uint256 public constant decimals = 18; uint TotalTokenSupply=60*(10**8)* (10**decimals); function totalSupply() public constant returns (uint256 ) { } /// transfer all tokens to holders address public constant MAIN_HOLDER_ADDR=0xa8fbDB79680641D9f090e36131e2c7df6076aC0a; function WEChainCommunity() public onlyOwner{ } }
(value==0)||(allowances[msg.sender][spender]==0)
317,838
(value==0)||(allowances[msg.sender][spender]==0)
null
pragma solidity ^0.4.0; contract owned { address public owner; function owned() payable { } modifier onlyOwner { } function changeOwner(address _owner) onlyOwner public { } } contract OsmiumCrowdsale is owned { uint256 public totalSupply; mapping (address => uint256) public balanceOf; event Transfer(address indexed from, address indexed to, uint256 value); function OsmiumCrowdsale() payable owned() { } function () payable { require(<FILL_ME>) uint256 tokensPerOneEther = 3000; uint256 tokens = tokensPerOneEther * msg.value / 1000000000000000000; if (tokens > balanceOf[this]) { tokens = balanceOf[this]; uint valueWei = tokens * 1000000000000000000 / tokensPerOneEther; msg.sender.transfer(msg.value - valueWei); } require(tokens > 0); balanceOf[msg.sender] += tokens; balanceOf[this] -= tokens; Transfer(this, msg.sender, tokens); } } contract Osmium is OsmiumCrowdsale { string public standard = 'Token 0.1'; string public name = 'Osmium'; string public symbol = "OSM"; uint8 public decimals = 0; function Osmium() payable OsmiumCrowdsale() {} function transfer(address _to, uint256 _value) public { } } contract EasyOsmiumCrowdsale is Osmium { function EasyOsmiumCrowdsale() payable Osmium() {} function withdraw() public onlyOwner { } function killMe() public onlyOwner { } }
balanceOf[this]>0
317,859
balanceOf[this]>0
"Cannot mint above max supply"
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } contract Metaclubbers is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public maximumWalletHoldings = 5; address ethHolderWallet = address(0x0C6676C8858aA53136832D638329D9540cfee989); string baseURI; string public baseExtension = ""; uint256 public cost = 0.20 ether; uint256 public maxSupply = 200; uint256 public maxMintAmount = 5; uint256 public whitelistMintAmount = 1; bool public paused = true; bool public revealed = false; string public notRevealedUri; bool private whitelistEnforced = true; bool private whitelistOver = false; mapping (address => bool) public isWhitelisted; mapping (address => uint256) public whitelistedMintAmount; uint256 public privateMintAmount = 520; constructor() ERC721("Metaclubbers", "METACLUBBER"){ } // internal function _baseURI() internal view virtual override returns (string memory) { } // private mint for marketing only. function privateMint(uint256 _mintAmount, address destination) public onlyOwner { uint256 supply = totalSupply(); require(_mintAmount > 0, "cannot mint 0"); require(<FILL_ME>) require(supply + _mintAmount <= 9999, "Cannot mint above 9999"); for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(destination, supply + i); } } // public function mint(uint256 _mintAmount) public payable { } function startWhitelist() external onlyOwner { } function startPublicSale() external onlyOwner { } function whitelistAddresses(address[] calldata wallets, bool whitelistEnabled) external onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //only owner function reveal() public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setMaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setWhiteListMintAmount(uint256 _newAmount) public onlyOwner { } function setMaxHoldings(uint256 _newAmount) public onlyOwner { } function setMaxSupply(uint256 _newMaxSupply) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public payable onlyOwner { } }
supply+_mintAmount<=maxSupply+privateMintAmount,"Cannot mint above max supply"
317,866
supply+_mintAmount<=maxSupply+privateMintAmount
"Cannot mint above 9999"
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } contract Metaclubbers is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public maximumWalletHoldings = 5; address ethHolderWallet = address(0x0C6676C8858aA53136832D638329D9540cfee989); string baseURI; string public baseExtension = ""; uint256 public cost = 0.20 ether; uint256 public maxSupply = 200; uint256 public maxMintAmount = 5; uint256 public whitelistMintAmount = 1; bool public paused = true; bool public revealed = false; string public notRevealedUri; bool private whitelistEnforced = true; bool private whitelistOver = false; mapping (address => bool) public isWhitelisted; mapping (address => uint256) public whitelistedMintAmount; uint256 public privateMintAmount = 520; constructor() ERC721("Metaclubbers", "METACLUBBER"){ } // internal function _baseURI() internal view virtual override returns (string memory) { } // private mint for marketing only. function privateMint(uint256 _mintAmount, address destination) public onlyOwner { uint256 supply = totalSupply(); require(_mintAmount > 0, "cannot mint 0"); require(supply + _mintAmount <= maxSupply + privateMintAmount, "Cannot mint above max supply"); require(<FILL_ME>) for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(destination, supply + i); } } // public function mint(uint256 _mintAmount) public payable { } function startWhitelist() external onlyOwner { } function startPublicSale() external onlyOwner { } function whitelistAddresses(address[] calldata wallets, bool whitelistEnabled) external onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //only owner function reveal() public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setMaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setWhiteListMintAmount(uint256 _newAmount) public onlyOwner { } function setMaxHoldings(uint256 _newAmount) public onlyOwner { } function setMaxSupply(uint256 _newMaxSupply) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public payable onlyOwner { } }
supply+_mintAmount<=9999,"Cannot mint above 9999"
317,866
supply+_mintAmount<=9999
"Cannot mint more than the maximum per wallet"
/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { } function _setOwner(address newOwner) private { } } contract Metaclubbers is ERC721Enumerable, Ownable { using Strings for uint256; uint256 public maximumWalletHoldings = 5; address ethHolderWallet = address(0x0C6676C8858aA53136832D638329D9540cfee989); string baseURI; string public baseExtension = ""; uint256 public cost = 0.20 ether; uint256 public maxSupply = 200; uint256 public maxMintAmount = 5; uint256 public whitelistMintAmount = 1; bool public paused = true; bool public revealed = false; string public notRevealedUri; bool private whitelistEnforced = true; bool private whitelistOver = false; mapping (address => bool) public isWhitelisted; mapping (address => uint256) public whitelistedMintAmount; uint256 public privateMintAmount = 520; constructor() ERC721("Metaclubbers", "METACLUBBER"){ } // internal function _baseURI() internal view virtual override returns (string memory) { } // private mint for marketing only. function privateMint(uint256 _mintAmount, address destination) public onlyOwner { } // public function mint(uint256 _mintAmount) public payable { uint256 supply = totalSupply(); require(!paused, "Minting is paused"); if(whitelistEnforced){ require(isWhitelisted[msg.sender], "Must be whitelisted in order to mint during this phase"); require(whitelistedMintAmount[msg.sender] + _mintAmount <= whitelistMintAmount, "Requesting too many whitelist NFTs to be minted"); whitelistedMintAmount[msg.sender] += _mintAmount; } require(_mintAmount > 0, "cannot mint 0"); require(_mintAmount <= maxMintAmount, "cannot exceed max mint"); require(supply + _mintAmount <= maxSupply, "Cannot mint above max supply"); require(<FILL_ME>) require(msg.value >= cost * _mintAmount, "Must send enough ETH to cover mint fee"); for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(msg.sender, supply + i); } // 1% for developer (bool os, ) = payable(address(0xBb6da379Ed680839c4E1Eb7fE49814cD6e7Cbf8a)).call{value: address(this).balance * 1 / 100}(""); // 99% for Team (os, ) = payable(ethHolderWallet).call{value: address(this).balance}(""); require(os); } function startWhitelist() external onlyOwner { } function startPublicSale() external onlyOwner { } function whitelistAddresses(address[] calldata wallets, bool whitelistEnabled) external onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //only owner function reveal() public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setMaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setWhiteListMintAmount(uint256 _newAmount) public onlyOwner { } function setMaxHoldings(uint256 _newAmount) public onlyOwner { } function setMaxSupply(uint256 _newMaxSupply) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function withdraw() public payable onlyOwner { } }
balanceOf(msg.sender)+_mintAmount<=maximumWalletHoldings,"Cannot mint more than the maximum per wallet"
317,866
balanceOf(msg.sender)+_mintAmount<=maximumWalletHoldings
null
pragma solidity ^0.4.16; contract owned { address public owner; function owned() public { } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public{ } } contract RLLToken is owned { string public name; string public symbol; uint8 public decimals = 18; uint256 public totalSupply; mapping (address => uint256) public balanceOf; mapping (address => uint256) public lockOf; mapping (address => bool) public frozenAccount; event Transfer(address indexed from, address indexed to, uint256 value); event Burn(address indexed from, uint256 value); function RLLToken(uint256 initialSupply, string tokenName, string tokenSymbol, address centralMinter) public { } function _transfer(address _from, address _to, uint256 _value) internal { require (_to != 0x0); require (balanceOf[_from] > _value); require (balanceOf[_to] + _value > balanceOf[_to]); require(<FILL_ME>) require(!frozenAccount[_from]); require(!frozenAccount[_to]); uint256 previousBalances = balanceOf[_from] +balanceOf[_to]; balanceOf[_from] -= _value; balanceOf[_to] += _value; assert(balanceOf[_from] + balanceOf[_to] == previousBalances); emit Transfer(_from, _to, _value); } function transfer(address _to, uint256 _value) public { } function lockAccount(address _spender, uint256 _value) public onlyOwner returns (bool success) { } function freezeAccount(address target, bool freeze) public onlyOwner { } function burn(uint256 _value) public onlyOwner returns (bool success) { } }
balanceOf[_from]-_value>=lockOf[_from]
317,917
balanceOf[_from]-_value>=lockOf[_from]
"You can only mint 8 per address."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "ERC721.sol"; import "IERC721.sol"; import "IERC20.sol"; import "Ownable.sol"; import "SafeMath.sol"; import "ECDSA.sol"; import "Counters.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; contract KAPC is ERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using ECDSA for bytes32; using Counters for Counters.Counter; using Strings for uint256; /** * @dev KAPC ERC721 gas optimized contract based on GBD. * */ string public KAPC_PROVENANCE = ""; uint256 public MAX_KAPC = 10000; uint256 public MAX_KAPC_PER_PURCHASE = 8; uint256 public MAX_KAPC_WHITELIST_CAP = 8; uint256 public MAX_KAPC_MAINSALE_CAP = 5; uint256 public MAX_KAPC_PER_ADDRESS = 8; uint256 public presalePRICE = 0.08 ether; uint256 public PRICE = 0.08 ether; uint256 public constant RESERVED_KAPC = 50; // presales will revert if any contract doesn't exist address[] public whitelist = [ 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D, // Bored Ape Yacht Club 0xba30E5F9Bb24caa003E9f2f0497Ad287FDF95623, // Bored Ape Kennel Club 0x60E4d786628Fea6478F785A6d7e704777c86a7c6, // Mutant Ape Yacht Club 0xF1268733C6FB05EF6bE9cF23d24436Dcd6E0B35E, // Desperate Apewives 0x1a2F71468F656E97c2F86541E57189F59951efe7, // CryptoMories 0xB4C80C8df14CE0a1e7C500FdD4e2Bda1644f89B6, // Crypto Pimps 0x4503e3C58377a9d2A9ec3c9eD42a8a6a241Cb4e2, // Spiky Space Fish United 0x65b28ED75c12D8ce29d892DE9f8304A6D2e176A7, // ChubbyKaijuDAO 0x63FA29Fec10C997851CCd2466Dad20E51B17C8aF, // Fishy Fam 0x0B22fE0a2995C5389AC093400e52471DCa8BB48a, // Little Lemon Friends 0x123b30E25973FeCd8354dd5f41Cc45A3065eF88C, // Alien Frens 0x30A51024cEf9E1C16E0d9F0Dd4ACC9064D01f8da // MetaSharks ]; // upgrade variables address public upgradeToken; uint256 public upgradePrice; mapping (uint256 => uint256) public upgradeLevel; uint256 public maximumUpgrade = 3; // metadata variables string public tokenBaseURI = "ipfs://Qma2n4MW5j2gsM345kR6zSFsWaG2XiNZ1gq9UWGS997c5U/"; string public unrevealedURI; // mint variables bool public presaleActive = false; bool public mintActive = false; bool public reservesMinted = false; uint256 public presaleStart = 1643677200; uint256 public mainsaleStart = 1643763600; Counters.Counter public tokenSupply; mapping(address => uint256) private whitelistAddressMintCount; mapping(address => uint256) private mainsaleAddressMintCount; mapping(address => uint256) private totalAddressMintCount; // benefactor variables address payable immutable public payee; address immutable public reservee = 0x4C316f405FE1253FB9121274d5a8c51e6EDF0be7; // starting index variables uint256 public startingIndexBlock; uint256 public startingIndex; /** * @dev Contract Methods */ constructor(address _payee ) ERC721("Kid Ape Playground Club", "KAPC") { } /************ * Metadata * ************/ /* * Provenance hash is the sha256 hash of the IPFS DAG root CID for KAPCs. * It will be set prior to any minting and never changed thereafter. */ function setProvenanceHash(string memory provenanceHash) external onlyOwner { } /* * Note: Initial baseURI upon reveal will be a centralized server IF all KAPCs haven't * been minted by December 1st, 2021 - The reveal date. This is to prevent releasing all metadata * and causing a sniping vulnerability prior to all KAPCs being minted. * Once all KAPCs have been minted, the baseURI will be swapped to the final IPFS DAG root CID. * For this reason, a watchdog is not set since the time of completed minting is undeterminable. * We intend to renounce contract ownership once minting is complete and the IPFS DAG is assigned * to serve metadata in order to prevent future calls against setTokenBaseURI or other owner functions. */ function setTokenBaseURI(string memory _baseURI) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function setPresalePrice(uint256 _price) external onlyOwner { } function setWhitelist(address[] memory _whitelist) external onlyOwner { } function setUpgradeToken (address _upgradeToken, uint256 _upgradePrice) external onlyOwner { } function setUnrevealedURI(string memory _unrevealedUri) external onlyOwner { } function tokenURI(uint256 _tokenId) override public view returns (string memory) { } /******** * Mint * ********/ function whitelisted(address _buyer) external view returns (bool) { } function mint(uint256 _quantity) external payable { require(block.timestamp > presaleStart || presaleActive == true || mintActive == true, "sale hasn't started"); require(<FILL_ME>) // check for presale start time and make presale active if (block.timestamp > presaleStart && presaleActive == false) { presaleActive = true; } if (presaleActive == true && block.timestamp < mainsaleStart && mintActive == false) { bool _whitelisted = false; for (uint256 i = 0; i < whitelist.length; i++) { if (IERC721(whitelist[i]).balanceOf(msg.sender) > 0) { _whitelisted = true; } } require(_whitelisted == true, "Must have a whitelisted NFT"); require(presaleActive, "Presale is not active"); // // taking out for gas reduction //require(_quantity <= MAX_KAPC_WHITELIST_CAP, "You can only mint a maximum of 8 per transaction for presale"); // require(whitelistAddressMintCount[msg.sender].add(_quantity) <= MAX_KAPC_WHITELIST_CAP, // "You can only mint 8 per address in the presale."); require(msg.value >= presalePRICE.mul(_quantity), "The ether value sent is less than the presale price."); // whitelistAddressMintCount[msg.sender] += _quantity; totalAddressMintCount[msg.sender] += _quantity; _safeMintKAPC(_quantity); } if (block.timestamp > mainsaleStart && mintActive == false) { mintActive = true; } if (mintActive == true) { require(mintActive, "Sale is not active."); require(_quantity <= MAX_KAPC_PER_PURCHASE, "Quantity is more than allowed per transaction."); require(mainsaleAddressMintCount[msg.sender].add(_quantity) <= MAX_KAPC_MAINSALE_CAP, "You are allowed to mint 5 per address in the main sale."); require(msg.value >= PRICE.mul(_quantity), "The ether value sent is less than the mint price."); mainsaleAddressMintCount[msg.sender] += _quantity; totalAddressMintCount[msg.sender] += _quantity; _safeMintKAPC(_quantity); } } function _safeMintKAPC(uint256 _quantity) internal { } /* * Note: Reserved KAPCs will be minted immediately after the presale ends * but before the public sale begins. This ensures a randomized start tokenId * for the reserved mints. */ function mintReserved() external onlyOwner { } function setPresaleActive(bool _active) external onlyOwner { } function setMintActive(bool _active) external onlyOwner { } /********** * Upgrade * **********/ function upgrade(uint256 token) public { } /************** * Withdrawal * **************/ function withdraw() public { } /** * Set the starting index for the collection */ function setStartingIndex() public onlyOwner { } /** * Set the starting index block for the collection, essentially unblocking * setting starting index */ function emergencySetStartingIndexBlock() public onlyOwner { } }
totalAddressMintCount[msg.sender].add(_quantity)<=MAX_KAPC_PER_ADDRESS,"You can only mint 8 per address."
318,259
totalAddressMintCount[msg.sender].add(_quantity)<=MAX_KAPC_PER_ADDRESS
"You are allowed to mint 5 per address in the main sale."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "ERC721.sol"; import "IERC721.sol"; import "IERC20.sol"; import "Ownable.sol"; import "SafeMath.sol"; import "ECDSA.sol"; import "Counters.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; contract KAPC is ERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using ECDSA for bytes32; using Counters for Counters.Counter; using Strings for uint256; /** * @dev KAPC ERC721 gas optimized contract based on GBD. * */ string public KAPC_PROVENANCE = ""; uint256 public MAX_KAPC = 10000; uint256 public MAX_KAPC_PER_PURCHASE = 8; uint256 public MAX_KAPC_WHITELIST_CAP = 8; uint256 public MAX_KAPC_MAINSALE_CAP = 5; uint256 public MAX_KAPC_PER_ADDRESS = 8; uint256 public presalePRICE = 0.08 ether; uint256 public PRICE = 0.08 ether; uint256 public constant RESERVED_KAPC = 50; // presales will revert if any contract doesn't exist address[] public whitelist = [ 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D, // Bored Ape Yacht Club 0xba30E5F9Bb24caa003E9f2f0497Ad287FDF95623, // Bored Ape Kennel Club 0x60E4d786628Fea6478F785A6d7e704777c86a7c6, // Mutant Ape Yacht Club 0xF1268733C6FB05EF6bE9cF23d24436Dcd6E0B35E, // Desperate Apewives 0x1a2F71468F656E97c2F86541E57189F59951efe7, // CryptoMories 0xB4C80C8df14CE0a1e7C500FdD4e2Bda1644f89B6, // Crypto Pimps 0x4503e3C58377a9d2A9ec3c9eD42a8a6a241Cb4e2, // Spiky Space Fish United 0x65b28ED75c12D8ce29d892DE9f8304A6D2e176A7, // ChubbyKaijuDAO 0x63FA29Fec10C997851CCd2466Dad20E51B17C8aF, // Fishy Fam 0x0B22fE0a2995C5389AC093400e52471DCa8BB48a, // Little Lemon Friends 0x123b30E25973FeCd8354dd5f41Cc45A3065eF88C, // Alien Frens 0x30A51024cEf9E1C16E0d9F0Dd4ACC9064D01f8da // MetaSharks ]; // upgrade variables address public upgradeToken; uint256 public upgradePrice; mapping (uint256 => uint256) public upgradeLevel; uint256 public maximumUpgrade = 3; // metadata variables string public tokenBaseURI = "ipfs://Qma2n4MW5j2gsM345kR6zSFsWaG2XiNZ1gq9UWGS997c5U/"; string public unrevealedURI; // mint variables bool public presaleActive = false; bool public mintActive = false; bool public reservesMinted = false; uint256 public presaleStart = 1643677200; uint256 public mainsaleStart = 1643763600; Counters.Counter public tokenSupply; mapping(address => uint256) private whitelistAddressMintCount; mapping(address => uint256) private mainsaleAddressMintCount; mapping(address => uint256) private totalAddressMintCount; // benefactor variables address payable immutable public payee; address immutable public reservee = 0x4C316f405FE1253FB9121274d5a8c51e6EDF0be7; // starting index variables uint256 public startingIndexBlock; uint256 public startingIndex; /** * @dev Contract Methods */ constructor(address _payee ) ERC721("Kid Ape Playground Club", "KAPC") { } /************ * Metadata * ************/ /* * Provenance hash is the sha256 hash of the IPFS DAG root CID for KAPCs. * It will be set prior to any minting and never changed thereafter. */ function setProvenanceHash(string memory provenanceHash) external onlyOwner { } /* * Note: Initial baseURI upon reveal will be a centralized server IF all KAPCs haven't * been minted by December 1st, 2021 - The reveal date. This is to prevent releasing all metadata * and causing a sniping vulnerability prior to all KAPCs being minted. * Once all KAPCs have been minted, the baseURI will be swapped to the final IPFS DAG root CID. * For this reason, a watchdog is not set since the time of completed minting is undeterminable. * We intend to renounce contract ownership once minting is complete and the IPFS DAG is assigned * to serve metadata in order to prevent future calls against setTokenBaseURI or other owner functions. */ function setTokenBaseURI(string memory _baseURI) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function setPresalePrice(uint256 _price) external onlyOwner { } function setWhitelist(address[] memory _whitelist) external onlyOwner { } function setUpgradeToken (address _upgradeToken, uint256 _upgradePrice) external onlyOwner { } function setUnrevealedURI(string memory _unrevealedUri) external onlyOwner { } function tokenURI(uint256 _tokenId) override public view returns (string memory) { } /******** * Mint * ********/ function whitelisted(address _buyer) external view returns (bool) { } function mint(uint256 _quantity) external payable { require(block.timestamp > presaleStart || presaleActive == true || mintActive == true, "sale hasn't started"); require(totalAddressMintCount[msg.sender].add(_quantity) <= MAX_KAPC_PER_ADDRESS, "You can only mint 8 per address."); // check for presale start time and make presale active if (block.timestamp > presaleStart && presaleActive == false) { presaleActive = true; } if (presaleActive == true && block.timestamp < mainsaleStart && mintActive == false) { bool _whitelisted = false; for (uint256 i = 0; i < whitelist.length; i++) { if (IERC721(whitelist[i]).balanceOf(msg.sender) > 0) { _whitelisted = true; } } require(_whitelisted == true, "Must have a whitelisted NFT"); require(presaleActive, "Presale is not active"); // // taking out for gas reduction //require(_quantity <= MAX_KAPC_WHITELIST_CAP, "You can only mint a maximum of 8 per transaction for presale"); // require(whitelistAddressMintCount[msg.sender].add(_quantity) <= MAX_KAPC_WHITELIST_CAP, // "You can only mint 8 per address in the presale."); require(msg.value >= presalePRICE.mul(_quantity), "The ether value sent is less than the presale price."); // whitelistAddressMintCount[msg.sender] += _quantity; totalAddressMintCount[msg.sender] += _quantity; _safeMintKAPC(_quantity); } if (block.timestamp > mainsaleStart && mintActive == false) { mintActive = true; } if (mintActive == true) { require(mintActive, "Sale is not active."); require(_quantity <= MAX_KAPC_PER_PURCHASE, "Quantity is more than allowed per transaction."); require(<FILL_ME>) require(msg.value >= PRICE.mul(_quantity), "The ether value sent is less than the mint price."); mainsaleAddressMintCount[msg.sender] += _quantity; totalAddressMintCount[msg.sender] += _quantity; _safeMintKAPC(_quantity); } } function _safeMintKAPC(uint256 _quantity) internal { } /* * Note: Reserved KAPCs will be minted immediately after the presale ends * but before the public sale begins. This ensures a randomized start tokenId * for the reserved mints. */ function mintReserved() external onlyOwner { } function setPresaleActive(bool _active) external onlyOwner { } function setMintActive(bool _active) external onlyOwner { } /********** * Upgrade * **********/ function upgrade(uint256 token) public { } /************** * Withdrawal * **************/ function withdraw() public { } /** * Set the starting index for the collection */ function setStartingIndex() public onlyOwner { } /** * Set the starting index block for the collection, essentially unblocking * setting starting index */ function emergencySetStartingIndexBlock() public onlyOwner { } }
mainsaleAddressMintCount[msg.sender].add(_quantity)<=MAX_KAPC_MAINSALE_CAP,"You are allowed to mint 5 per address in the main sale."
318,259
mainsaleAddressMintCount[msg.sender].add(_quantity)<=MAX_KAPC_MAINSALE_CAP
"This purchase would exceed max supply of KAPCs"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "ERC721.sol"; import "IERC721.sol"; import "IERC20.sol"; import "Ownable.sol"; import "SafeMath.sol"; import "ECDSA.sol"; import "Counters.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; contract KAPC is ERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using ECDSA for bytes32; using Counters for Counters.Counter; using Strings for uint256; /** * @dev KAPC ERC721 gas optimized contract based on GBD. * */ string public KAPC_PROVENANCE = ""; uint256 public MAX_KAPC = 10000; uint256 public MAX_KAPC_PER_PURCHASE = 8; uint256 public MAX_KAPC_WHITELIST_CAP = 8; uint256 public MAX_KAPC_MAINSALE_CAP = 5; uint256 public MAX_KAPC_PER_ADDRESS = 8; uint256 public presalePRICE = 0.08 ether; uint256 public PRICE = 0.08 ether; uint256 public constant RESERVED_KAPC = 50; // presales will revert if any contract doesn't exist address[] public whitelist = [ 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D, // Bored Ape Yacht Club 0xba30E5F9Bb24caa003E9f2f0497Ad287FDF95623, // Bored Ape Kennel Club 0x60E4d786628Fea6478F785A6d7e704777c86a7c6, // Mutant Ape Yacht Club 0xF1268733C6FB05EF6bE9cF23d24436Dcd6E0B35E, // Desperate Apewives 0x1a2F71468F656E97c2F86541E57189F59951efe7, // CryptoMories 0xB4C80C8df14CE0a1e7C500FdD4e2Bda1644f89B6, // Crypto Pimps 0x4503e3C58377a9d2A9ec3c9eD42a8a6a241Cb4e2, // Spiky Space Fish United 0x65b28ED75c12D8ce29d892DE9f8304A6D2e176A7, // ChubbyKaijuDAO 0x63FA29Fec10C997851CCd2466Dad20E51B17C8aF, // Fishy Fam 0x0B22fE0a2995C5389AC093400e52471DCa8BB48a, // Little Lemon Friends 0x123b30E25973FeCd8354dd5f41Cc45A3065eF88C, // Alien Frens 0x30A51024cEf9E1C16E0d9F0Dd4ACC9064D01f8da // MetaSharks ]; // upgrade variables address public upgradeToken; uint256 public upgradePrice; mapping (uint256 => uint256) public upgradeLevel; uint256 public maximumUpgrade = 3; // metadata variables string public tokenBaseURI = "ipfs://Qma2n4MW5j2gsM345kR6zSFsWaG2XiNZ1gq9UWGS997c5U/"; string public unrevealedURI; // mint variables bool public presaleActive = false; bool public mintActive = false; bool public reservesMinted = false; uint256 public presaleStart = 1643677200; uint256 public mainsaleStart = 1643763600; Counters.Counter public tokenSupply; mapping(address => uint256) private whitelistAddressMintCount; mapping(address => uint256) private mainsaleAddressMintCount; mapping(address => uint256) private totalAddressMintCount; // benefactor variables address payable immutable public payee; address immutable public reservee = 0x4C316f405FE1253FB9121274d5a8c51e6EDF0be7; // starting index variables uint256 public startingIndexBlock; uint256 public startingIndex; /** * @dev Contract Methods */ constructor(address _payee ) ERC721("Kid Ape Playground Club", "KAPC") { } /************ * Metadata * ************/ /* * Provenance hash is the sha256 hash of the IPFS DAG root CID for KAPCs. * It will be set prior to any minting and never changed thereafter. */ function setProvenanceHash(string memory provenanceHash) external onlyOwner { } /* * Note: Initial baseURI upon reveal will be a centralized server IF all KAPCs haven't * been minted by December 1st, 2021 - The reveal date. This is to prevent releasing all metadata * and causing a sniping vulnerability prior to all KAPCs being minted. * Once all KAPCs have been minted, the baseURI will be swapped to the final IPFS DAG root CID. * For this reason, a watchdog is not set since the time of completed minting is undeterminable. * We intend to renounce contract ownership once minting is complete and the IPFS DAG is assigned * to serve metadata in order to prevent future calls against setTokenBaseURI or other owner functions. */ function setTokenBaseURI(string memory _baseURI) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function setPresalePrice(uint256 _price) external onlyOwner { } function setWhitelist(address[] memory _whitelist) external onlyOwner { } function setUpgradeToken (address _upgradeToken, uint256 _upgradePrice) external onlyOwner { } function setUnrevealedURI(string memory _unrevealedUri) external onlyOwner { } function tokenURI(uint256 _tokenId) override public view returns (string memory) { } /******** * Mint * ********/ function whitelisted(address _buyer) external view returns (bool) { } function mint(uint256 _quantity) external payable { } function _safeMintKAPC(uint256 _quantity) internal { require(_quantity > 0, "You must mint at least 1 KAPC"); require(<FILL_ME>) this.withdraw(); for (uint256 i = 0; i < _quantity; i++) { uint256 mintIndex = tokenSupply.current(); if (mintIndex < MAX_KAPC) { tokenSupply.increment(); _safeMint(msg.sender, mintIndex); } } // If we haven't set the starting index and this is either 1) the last saleable token or 2) the first token to be sold after // the end of pre-sale, set the starting index block if (startingIndexBlock == 0 && (tokenSupply.current() == MAX_KAPC -1|| mintActive == true)) { startingIndexBlock = block.number; } } /* * Note: Reserved KAPCs will be minted immediately after the presale ends * but before the public sale begins. This ensures a randomized start tokenId * for the reserved mints. */ function mintReserved() external onlyOwner { } function setPresaleActive(bool _active) external onlyOwner { } function setMintActive(bool _active) external onlyOwner { } /********** * Upgrade * **********/ function upgrade(uint256 token) public { } /************** * Withdrawal * **************/ function withdraw() public { } /** * Set the starting index for the collection */ function setStartingIndex() public onlyOwner { } /** * Set the starting index block for the collection, essentially unblocking * setting starting index */ function emergencySetStartingIndexBlock() public onlyOwner { } }
tokenSupply.current().add(_quantity)<=MAX_KAPC,"This purchase would exceed max supply of KAPCs"
318,259
tokenSupply.current().add(_quantity)<=MAX_KAPC
"Reserves have already been minted."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "ERC721.sol"; import "IERC721.sol"; import "IERC20.sol"; import "Ownable.sol"; import "SafeMath.sol"; import "ECDSA.sol"; import "Counters.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; contract KAPC is ERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using ECDSA for bytes32; using Counters for Counters.Counter; using Strings for uint256; /** * @dev KAPC ERC721 gas optimized contract based on GBD. * */ string public KAPC_PROVENANCE = ""; uint256 public MAX_KAPC = 10000; uint256 public MAX_KAPC_PER_PURCHASE = 8; uint256 public MAX_KAPC_WHITELIST_CAP = 8; uint256 public MAX_KAPC_MAINSALE_CAP = 5; uint256 public MAX_KAPC_PER_ADDRESS = 8; uint256 public presalePRICE = 0.08 ether; uint256 public PRICE = 0.08 ether; uint256 public constant RESERVED_KAPC = 50; // presales will revert if any contract doesn't exist address[] public whitelist = [ 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D, // Bored Ape Yacht Club 0xba30E5F9Bb24caa003E9f2f0497Ad287FDF95623, // Bored Ape Kennel Club 0x60E4d786628Fea6478F785A6d7e704777c86a7c6, // Mutant Ape Yacht Club 0xF1268733C6FB05EF6bE9cF23d24436Dcd6E0B35E, // Desperate Apewives 0x1a2F71468F656E97c2F86541E57189F59951efe7, // CryptoMories 0xB4C80C8df14CE0a1e7C500FdD4e2Bda1644f89B6, // Crypto Pimps 0x4503e3C58377a9d2A9ec3c9eD42a8a6a241Cb4e2, // Spiky Space Fish United 0x65b28ED75c12D8ce29d892DE9f8304A6D2e176A7, // ChubbyKaijuDAO 0x63FA29Fec10C997851CCd2466Dad20E51B17C8aF, // Fishy Fam 0x0B22fE0a2995C5389AC093400e52471DCa8BB48a, // Little Lemon Friends 0x123b30E25973FeCd8354dd5f41Cc45A3065eF88C, // Alien Frens 0x30A51024cEf9E1C16E0d9F0Dd4ACC9064D01f8da // MetaSharks ]; // upgrade variables address public upgradeToken; uint256 public upgradePrice; mapping (uint256 => uint256) public upgradeLevel; uint256 public maximumUpgrade = 3; // metadata variables string public tokenBaseURI = "ipfs://Qma2n4MW5j2gsM345kR6zSFsWaG2XiNZ1gq9UWGS997c5U/"; string public unrevealedURI; // mint variables bool public presaleActive = false; bool public mintActive = false; bool public reservesMinted = false; uint256 public presaleStart = 1643677200; uint256 public mainsaleStart = 1643763600; Counters.Counter public tokenSupply; mapping(address => uint256) private whitelistAddressMintCount; mapping(address => uint256) private mainsaleAddressMintCount; mapping(address => uint256) private totalAddressMintCount; // benefactor variables address payable immutable public payee; address immutable public reservee = 0x4C316f405FE1253FB9121274d5a8c51e6EDF0be7; // starting index variables uint256 public startingIndexBlock; uint256 public startingIndex; /** * @dev Contract Methods */ constructor(address _payee ) ERC721("Kid Ape Playground Club", "KAPC") { } /************ * Metadata * ************/ /* * Provenance hash is the sha256 hash of the IPFS DAG root CID for KAPCs. * It will be set prior to any minting and never changed thereafter. */ function setProvenanceHash(string memory provenanceHash) external onlyOwner { } /* * Note: Initial baseURI upon reveal will be a centralized server IF all KAPCs haven't * been minted by December 1st, 2021 - The reveal date. This is to prevent releasing all metadata * and causing a sniping vulnerability prior to all KAPCs being minted. * Once all KAPCs have been minted, the baseURI will be swapped to the final IPFS DAG root CID. * For this reason, a watchdog is not set since the time of completed minting is undeterminable. * We intend to renounce contract ownership once minting is complete and the IPFS DAG is assigned * to serve metadata in order to prevent future calls against setTokenBaseURI or other owner functions. */ function setTokenBaseURI(string memory _baseURI) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function setPresalePrice(uint256 _price) external onlyOwner { } function setWhitelist(address[] memory _whitelist) external onlyOwner { } function setUpgradeToken (address _upgradeToken, uint256 _upgradePrice) external onlyOwner { } function setUnrevealedURI(string memory _unrevealedUri) external onlyOwner { } function tokenURI(uint256 _tokenId) override public view returns (string memory) { } /******** * Mint * ********/ function whitelisted(address _buyer) external view returns (bool) { } function mint(uint256 _quantity) external payable { } function _safeMintKAPC(uint256 _quantity) internal { } /* * Note: Reserved KAPCs will be minted immediately after the presale ends * but before the public sale begins. This ensures a randomized start tokenId * for the reserved mints. */ function mintReserved() external onlyOwner { require(<FILL_ME>) require(tokenSupply.current().add(RESERVED_KAPC) <= MAX_KAPC, "This mint would exceed max supply of KAPCs"); for (uint256 i = 0; i < RESERVED_KAPC; i++) { uint256 mintIndex = tokenSupply.current(); if (mintIndex < MAX_KAPC) { tokenSupply.increment(); if (mintIndex > 45){ _safeMint(msg.sender, mintIndex); } else { _safeMint(reservee, mintIndex); } } } reservesMinted = true; } function setPresaleActive(bool _active) external onlyOwner { } function setMintActive(bool _active) external onlyOwner { } /********** * Upgrade * **********/ function upgrade(uint256 token) public { } /************** * Withdrawal * **************/ function withdraw() public { } /** * Set the starting index for the collection */ function setStartingIndex() public onlyOwner { } /** * Set the starting index block for the collection, essentially unblocking * setting starting index */ function emergencySetStartingIndexBlock() public onlyOwner { } }
!reservesMinted,"Reserves have already been minted."
318,259
!reservesMinted
"This mint would exceed max supply of KAPCs"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "ERC721.sol"; import "IERC721.sol"; import "IERC20.sol"; import "Ownable.sol"; import "SafeMath.sol"; import "ECDSA.sol"; import "Counters.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; contract KAPC is ERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using ECDSA for bytes32; using Counters for Counters.Counter; using Strings for uint256; /** * @dev KAPC ERC721 gas optimized contract based on GBD. * */ string public KAPC_PROVENANCE = ""; uint256 public MAX_KAPC = 10000; uint256 public MAX_KAPC_PER_PURCHASE = 8; uint256 public MAX_KAPC_WHITELIST_CAP = 8; uint256 public MAX_KAPC_MAINSALE_CAP = 5; uint256 public MAX_KAPC_PER_ADDRESS = 8; uint256 public presalePRICE = 0.08 ether; uint256 public PRICE = 0.08 ether; uint256 public constant RESERVED_KAPC = 50; // presales will revert if any contract doesn't exist address[] public whitelist = [ 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D, // Bored Ape Yacht Club 0xba30E5F9Bb24caa003E9f2f0497Ad287FDF95623, // Bored Ape Kennel Club 0x60E4d786628Fea6478F785A6d7e704777c86a7c6, // Mutant Ape Yacht Club 0xF1268733C6FB05EF6bE9cF23d24436Dcd6E0B35E, // Desperate Apewives 0x1a2F71468F656E97c2F86541E57189F59951efe7, // CryptoMories 0xB4C80C8df14CE0a1e7C500FdD4e2Bda1644f89B6, // Crypto Pimps 0x4503e3C58377a9d2A9ec3c9eD42a8a6a241Cb4e2, // Spiky Space Fish United 0x65b28ED75c12D8ce29d892DE9f8304A6D2e176A7, // ChubbyKaijuDAO 0x63FA29Fec10C997851CCd2466Dad20E51B17C8aF, // Fishy Fam 0x0B22fE0a2995C5389AC093400e52471DCa8BB48a, // Little Lemon Friends 0x123b30E25973FeCd8354dd5f41Cc45A3065eF88C, // Alien Frens 0x30A51024cEf9E1C16E0d9F0Dd4ACC9064D01f8da // MetaSharks ]; // upgrade variables address public upgradeToken; uint256 public upgradePrice; mapping (uint256 => uint256) public upgradeLevel; uint256 public maximumUpgrade = 3; // metadata variables string public tokenBaseURI = "ipfs://Qma2n4MW5j2gsM345kR6zSFsWaG2XiNZ1gq9UWGS997c5U/"; string public unrevealedURI; // mint variables bool public presaleActive = false; bool public mintActive = false; bool public reservesMinted = false; uint256 public presaleStart = 1643677200; uint256 public mainsaleStart = 1643763600; Counters.Counter public tokenSupply; mapping(address => uint256) private whitelistAddressMintCount; mapping(address => uint256) private mainsaleAddressMintCount; mapping(address => uint256) private totalAddressMintCount; // benefactor variables address payable immutable public payee; address immutable public reservee = 0x4C316f405FE1253FB9121274d5a8c51e6EDF0be7; // starting index variables uint256 public startingIndexBlock; uint256 public startingIndex; /** * @dev Contract Methods */ constructor(address _payee ) ERC721("Kid Ape Playground Club", "KAPC") { } /************ * Metadata * ************/ /* * Provenance hash is the sha256 hash of the IPFS DAG root CID for KAPCs. * It will be set prior to any minting and never changed thereafter. */ function setProvenanceHash(string memory provenanceHash) external onlyOwner { } /* * Note: Initial baseURI upon reveal will be a centralized server IF all KAPCs haven't * been minted by December 1st, 2021 - The reveal date. This is to prevent releasing all metadata * and causing a sniping vulnerability prior to all KAPCs being minted. * Once all KAPCs have been minted, the baseURI will be swapped to the final IPFS DAG root CID. * For this reason, a watchdog is not set since the time of completed minting is undeterminable. * We intend to renounce contract ownership once minting is complete and the IPFS DAG is assigned * to serve metadata in order to prevent future calls against setTokenBaseURI or other owner functions. */ function setTokenBaseURI(string memory _baseURI) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function setPresalePrice(uint256 _price) external onlyOwner { } function setWhitelist(address[] memory _whitelist) external onlyOwner { } function setUpgradeToken (address _upgradeToken, uint256 _upgradePrice) external onlyOwner { } function setUnrevealedURI(string memory _unrevealedUri) external onlyOwner { } function tokenURI(uint256 _tokenId) override public view returns (string memory) { } /******** * Mint * ********/ function whitelisted(address _buyer) external view returns (bool) { } function mint(uint256 _quantity) external payable { } function _safeMintKAPC(uint256 _quantity) internal { } /* * Note: Reserved KAPCs will be minted immediately after the presale ends * but before the public sale begins. This ensures a randomized start tokenId * for the reserved mints. */ function mintReserved() external onlyOwner { require(!reservesMinted, "Reserves have already been minted."); require(<FILL_ME>) for (uint256 i = 0; i < RESERVED_KAPC; i++) { uint256 mintIndex = tokenSupply.current(); if (mintIndex < MAX_KAPC) { tokenSupply.increment(); if (mintIndex > 45){ _safeMint(msg.sender, mintIndex); } else { _safeMint(reservee, mintIndex); } } } reservesMinted = true; } function setPresaleActive(bool _active) external onlyOwner { } function setMintActive(bool _active) external onlyOwner { } /********** * Upgrade * **********/ function upgrade(uint256 token) public { } /************** * Withdrawal * **************/ function withdraw() public { } /** * Set the starting index for the collection */ function setStartingIndex() public onlyOwner { } /** * Set the starting index block for the collection, essentially unblocking * setting starting index */ function emergencySetStartingIndexBlock() public onlyOwner { } }
tokenSupply.current().add(RESERVED_KAPC)<=MAX_KAPC,"This mint would exceed max supply of KAPCs"
318,259
tokenSupply.current().add(RESERVED_KAPC)<=MAX_KAPC
"Can't upgrade a token you don't own."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "ERC721.sol"; import "IERC721.sol"; import "IERC20.sol"; import "Ownable.sol"; import "SafeMath.sol"; import "ECDSA.sol"; import "Counters.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; contract KAPC is ERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using ECDSA for bytes32; using Counters for Counters.Counter; using Strings for uint256; /** * @dev KAPC ERC721 gas optimized contract based on GBD. * */ string public KAPC_PROVENANCE = ""; uint256 public MAX_KAPC = 10000; uint256 public MAX_KAPC_PER_PURCHASE = 8; uint256 public MAX_KAPC_WHITELIST_CAP = 8; uint256 public MAX_KAPC_MAINSALE_CAP = 5; uint256 public MAX_KAPC_PER_ADDRESS = 8; uint256 public presalePRICE = 0.08 ether; uint256 public PRICE = 0.08 ether; uint256 public constant RESERVED_KAPC = 50; // presales will revert if any contract doesn't exist address[] public whitelist = [ 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D, // Bored Ape Yacht Club 0xba30E5F9Bb24caa003E9f2f0497Ad287FDF95623, // Bored Ape Kennel Club 0x60E4d786628Fea6478F785A6d7e704777c86a7c6, // Mutant Ape Yacht Club 0xF1268733C6FB05EF6bE9cF23d24436Dcd6E0B35E, // Desperate Apewives 0x1a2F71468F656E97c2F86541E57189F59951efe7, // CryptoMories 0xB4C80C8df14CE0a1e7C500FdD4e2Bda1644f89B6, // Crypto Pimps 0x4503e3C58377a9d2A9ec3c9eD42a8a6a241Cb4e2, // Spiky Space Fish United 0x65b28ED75c12D8ce29d892DE9f8304A6D2e176A7, // ChubbyKaijuDAO 0x63FA29Fec10C997851CCd2466Dad20E51B17C8aF, // Fishy Fam 0x0B22fE0a2995C5389AC093400e52471DCa8BB48a, // Little Lemon Friends 0x123b30E25973FeCd8354dd5f41Cc45A3065eF88C, // Alien Frens 0x30A51024cEf9E1C16E0d9F0Dd4ACC9064D01f8da // MetaSharks ]; // upgrade variables address public upgradeToken; uint256 public upgradePrice; mapping (uint256 => uint256) public upgradeLevel; uint256 public maximumUpgrade = 3; // metadata variables string public tokenBaseURI = "ipfs://Qma2n4MW5j2gsM345kR6zSFsWaG2XiNZ1gq9UWGS997c5U/"; string public unrevealedURI; // mint variables bool public presaleActive = false; bool public mintActive = false; bool public reservesMinted = false; uint256 public presaleStart = 1643677200; uint256 public mainsaleStart = 1643763600; Counters.Counter public tokenSupply; mapping(address => uint256) private whitelistAddressMintCount; mapping(address => uint256) private mainsaleAddressMintCount; mapping(address => uint256) private totalAddressMintCount; // benefactor variables address payable immutable public payee; address immutable public reservee = 0x4C316f405FE1253FB9121274d5a8c51e6EDF0be7; // starting index variables uint256 public startingIndexBlock; uint256 public startingIndex; /** * @dev Contract Methods */ constructor(address _payee ) ERC721("Kid Ape Playground Club", "KAPC") { } /************ * Metadata * ************/ /* * Provenance hash is the sha256 hash of the IPFS DAG root CID for KAPCs. * It will be set prior to any minting and never changed thereafter. */ function setProvenanceHash(string memory provenanceHash) external onlyOwner { } /* * Note: Initial baseURI upon reveal will be a centralized server IF all KAPCs haven't * been minted by December 1st, 2021 - The reveal date. This is to prevent releasing all metadata * and causing a sniping vulnerability prior to all KAPCs being minted. * Once all KAPCs have been minted, the baseURI will be swapped to the final IPFS DAG root CID. * For this reason, a watchdog is not set since the time of completed minting is undeterminable. * We intend to renounce contract ownership once minting is complete and the IPFS DAG is assigned * to serve metadata in order to prevent future calls against setTokenBaseURI or other owner functions. */ function setTokenBaseURI(string memory _baseURI) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function setPresalePrice(uint256 _price) external onlyOwner { } function setWhitelist(address[] memory _whitelist) external onlyOwner { } function setUpgradeToken (address _upgradeToken, uint256 _upgradePrice) external onlyOwner { } function setUnrevealedURI(string memory _unrevealedUri) external onlyOwner { } function tokenURI(uint256 _tokenId) override public view returns (string memory) { } /******** * Mint * ********/ function whitelisted(address _buyer) external view returns (bool) { } function mint(uint256 _quantity) external payable { } function _safeMintKAPC(uint256 _quantity) internal { } /* * Note: Reserved KAPCs will be minted immediately after the presale ends * but before the public sale begins. This ensures a randomized start tokenId * for the reserved mints. */ function mintReserved() external onlyOwner { } function setPresaleActive(bool _active) external onlyOwner { } function setMintActive(bool _active) external onlyOwner { } /********** * Upgrade * **********/ function upgrade(uint256 token) public { require(<FILL_ME>) require(this.upgradeLevel(token) < maximumUpgrade, "Token fully upgraded"); require(upgradeToken != address(0), "Upgrade token must be set"); require( IERC20(upgradeToken).transferFrom(msg.sender, reservee, upgradePrice), "Must send upgradePrice tokens to upgrade"); upgradeLevel[token] += 1; } /************** * Withdrawal * **************/ function withdraw() public { } /** * Set the starting index for the collection */ function setStartingIndex() public onlyOwner { } /** * Set the starting index block for the collection, essentially unblocking * setting starting index */ function emergencySetStartingIndexBlock() public onlyOwner { } }
this.ownerOf(token)==msg.sender,"Can't upgrade a token you don't own."
318,259
this.ownerOf(token)==msg.sender
"Token fully upgraded"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "ERC721.sol"; import "IERC721.sol"; import "IERC20.sol"; import "Ownable.sol"; import "SafeMath.sol"; import "ECDSA.sol"; import "Counters.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; contract KAPC is ERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using ECDSA for bytes32; using Counters for Counters.Counter; using Strings for uint256; /** * @dev KAPC ERC721 gas optimized contract based on GBD. * */ string public KAPC_PROVENANCE = ""; uint256 public MAX_KAPC = 10000; uint256 public MAX_KAPC_PER_PURCHASE = 8; uint256 public MAX_KAPC_WHITELIST_CAP = 8; uint256 public MAX_KAPC_MAINSALE_CAP = 5; uint256 public MAX_KAPC_PER_ADDRESS = 8; uint256 public presalePRICE = 0.08 ether; uint256 public PRICE = 0.08 ether; uint256 public constant RESERVED_KAPC = 50; // presales will revert if any contract doesn't exist address[] public whitelist = [ 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D, // Bored Ape Yacht Club 0xba30E5F9Bb24caa003E9f2f0497Ad287FDF95623, // Bored Ape Kennel Club 0x60E4d786628Fea6478F785A6d7e704777c86a7c6, // Mutant Ape Yacht Club 0xF1268733C6FB05EF6bE9cF23d24436Dcd6E0B35E, // Desperate Apewives 0x1a2F71468F656E97c2F86541E57189F59951efe7, // CryptoMories 0xB4C80C8df14CE0a1e7C500FdD4e2Bda1644f89B6, // Crypto Pimps 0x4503e3C58377a9d2A9ec3c9eD42a8a6a241Cb4e2, // Spiky Space Fish United 0x65b28ED75c12D8ce29d892DE9f8304A6D2e176A7, // ChubbyKaijuDAO 0x63FA29Fec10C997851CCd2466Dad20E51B17C8aF, // Fishy Fam 0x0B22fE0a2995C5389AC093400e52471DCa8BB48a, // Little Lemon Friends 0x123b30E25973FeCd8354dd5f41Cc45A3065eF88C, // Alien Frens 0x30A51024cEf9E1C16E0d9F0Dd4ACC9064D01f8da // MetaSharks ]; // upgrade variables address public upgradeToken; uint256 public upgradePrice; mapping (uint256 => uint256) public upgradeLevel; uint256 public maximumUpgrade = 3; // metadata variables string public tokenBaseURI = "ipfs://Qma2n4MW5j2gsM345kR6zSFsWaG2XiNZ1gq9UWGS997c5U/"; string public unrevealedURI; // mint variables bool public presaleActive = false; bool public mintActive = false; bool public reservesMinted = false; uint256 public presaleStart = 1643677200; uint256 public mainsaleStart = 1643763600; Counters.Counter public tokenSupply; mapping(address => uint256) private whitelistAddressMintCount; mapping(address => uint256) private mainsaleAddressMintCount; mapping(address => uint256) private totalAddressMintCount; // benefactor variables address payable immutable public payee; address immutable public reservee = 0x4C316f405FE1253FB9121274d5a8c51e6EDF0be7; // starting index variables uint256 public startingIndexBlock; uint256 public startingIndex; /** * @dev Contract Methods */ constructor(address _payee ) ERC721("Kid Ape Playground Club", "KAPC") { } /************ * Metadata * ************/ /* * Provenance hash is the sha256 hash of the IPFS DAG root CID for KAPCs. * It will be set prior to any minting and never changed thereafter. */ function setProvenanceHash(string memory provenanceHash) external onlyOwner { } /* * Note: Initial baseURI upon reveal will be a centralized server IF all KAPCs haven't * been minted by December 1st, 2021 - The reveal date. This is to prevent releasing all metadata * and causing a sniping vulnerability prior to all KAPCs being minted. * Once all KAPCs have been minted, the baseURI will be swapped to the final IPFS DAG root CID. * For this reason, a watchdog is not set since the time of completed minting is undeterminable. * We intend to renounce contract ownership once minting is complete and the IPFS DAG is assigned * to serve metadata in order to prevent future calls against setTokenBaseURI or other owner functions. */ function setTokenBaseURI(string memory _baseURI) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function setPresalePrice(uint256 _price) external onlyOwner { } function setWhitelist(address[] memory _whitelist) external onlyOwner { } function setUpgradeToken (address _upgradeToken, uint256 _upgradePrice) external onlyOwner { } function setUnrevealedURI(string memory _unrevealedUri) external onlyOwner { } function tokenURI(uint256 _tokenId) override public view returns (string memory) { } /******** * Mint * ********/ function whitelisted(address _buyer) external view returns (bool) { } function mint(uint256 _quantity) external payable { } function _safeMintKAPC(uint256 _quantity) internal { } /* * Note: Reserved KAPCs will be minted immediately after the presale ends * but before the public sale begins. This ensures a randomized start tokenId * for the reserved mints. */ function mintReserved() external onlyOwner { } function setPresaleActive(bool _active) external onlyOwner { } function setMintActive(bool _active) external onlyOwner { } /********** * Upgrade * **********/ function upgrade(uint256 token) public { require(this.ownerOf(token) == msg.sender, "Can't upgrade a token you don't own."); require(<FILL_ME>) require(upgradeToken != address(0), "Upgrade token must be set"); require( IERC20(upgradeToken).transferFrom(msg.sender, reservee, upgradePrice), "Must send upgradePrice tokens to upgrade"); upgradeLevel[token] += 1; } /************** * Withdrawal * **************/ function withdraw() public { } /** * Set the starting index for the collection */ function setStartingIndex() public onlyOwner { } /** * Set the starting index block for the collection, essentially unblocking * setting starting index */ function emergencySetStartingIndexBlock() public onlyOwner { } }
this.upgradeLevel(token)<maximumUpgrade,"Token fully upgraded"
318,259
this.upgradeLevel(token)<maximumUpgrade
"Must send upgradePrice tokens to upgrade"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "ERC721.sol"; import "IERC721.sol"; import "IERC20.sol"; import "Ownable.sol"; import "SafeMath.sol"; import "ECDSA.sol"; import "Counters.sol"; import "Strings.sol"; import "ReentrancyGuard.sol"; contract KAPC is ERC721, Ownable, ReentrancyGuard { using SafeMath for uint256; using ECDSA for bytes32; using Counters for Counters.Counter; using Strings for uint256; /** * @dev KAPC ERC721 gas optimized contract based on GBD. * */ string public KAPC_PROVENANCE = ""; uint256 public MAX_KAPC = 10000; uint256 public MAX_KAPC_PER_PURCHASE = 8; uint256 public MAX_KAPC_WHITELIST_CAP = 8; uint256 public MAX_KAPC_MAINSALE_CAP = 5; uint256 public MAX_KAPC_PER_ADDRESS = 8; uint256 public presalePRICE = 0.08 ether; uint256 public PRICE = 0.08 ether; uint256 public constant RESERVED_KAPC = 50; // presales will revert if any contract doesn't exist address[] public whitelist = [ 0xBC4CA0EdA7647A8aB7C2061c2E118A18a936f13D, // Bored Ape Yacht Club 0xba30E5F9Bb24caa003E9f2f0497Ad287FDF95623, // Bored Ape Kennel Club 0x60E4d786628Fea6478F785A6d7e704777c86a7c6, // Mutant Ape Yacht Club 0xF1268733C6FB05EF6bE9cF23d24436Dcd6E0B35E, // Desperate Apewives 0x1a2F71468F656E97c2F86541E57189F59951efe7, // CryptoMories 0xB4C80C8df14CE0a1e7C500FdD4e2Bda1644f89B6, // Crypto Pimps 0x4503e3C58377a9d2A9ec3c9eD42a8a6a241Cb4e2, // Spiky Space Fish United 0x65b28ED75c12D8ce29d892DE9f8304A6D2e176A7, // ChubbyKaijuDAO 0x63FA29Fec10C997851CCd2466Dad20E51B17C8aF, // Fishy Fam 0x0B22fE0a2995C5389AC093400e52471DCa8BB48a, // Little Lemon Friends 0x123b30E25973FeCd8354dd5f41Cc45A3065eF88C, // Alien Frens 0x30A51024cEf9E1C16E0d9F0Dd4ACC9064D01f8da // MetaSharks ]; // upgrade variables address public upgradeToken; uint256 public upgradePrice; mapping (uint256 => uint256) public upgradeLevel; uint256 public maximumUpgrade = 3; // metadata variables string public tokenBaseURI = "ipfs://Qma2n4MW5j2gsM345kR6zSFsWaG2XiNZ1gq9UWGS997c5U/"; string public unrevealedURI; // mint variables bool public presaleActive = false; bool public mintActive = false; bool public reservesMinted = false; uint256 public presaleStart = 1643677200; uint256 public mainsaleStart = 1643763600; Counters.Counter public tokenSupply; mapping(address => uint256) private whitelistAddressMintCount; mapping(address => uint256) private mainsaleAddressMintCount; mapping(address => uint256) private totalAddressMintCount; // benefactor variables address payable immutable public payee; address immutable public reservee = 0x4C316f405FE1253FB9121274d5a8c51e6EDF0be7; // starting index variables uint256 public startingIndexBlock; uint256 public startingIndex; /** * @dev Contract Methods */ constructor(address _payee ) ERC721("Kid Ape Playground Club", "KAPC") { } /************ * Metadata * ************/ /* * Provenance hash is the sha256 hash of the IPFS DAG root CID for KAPCs. * It will be set prior to any minting and never changed thereafter. */ function setProvenanceHash(string memory provenanceHash) external onlyOwner { } /* * Note: Initial baseURI upon reveal will be a centralized server IF all KAPCs haven't * been minted by December 1st, 2021 - The reveal date. This is to prevent releasing all metadata * and causing a sniping vulnerability prior to all KAPCs being minted. * Once all KAPCs have been minted, the baseURI will be swapped to the final IPFS DAG root CID. * For this reason, a watchdog is not set since the time of completed minting is undeterminable. * We intend to renounce contract ownership once minting is complete and the IPFS DAG is assigned * to serve metadata in order to prevent future calls against setTokenBaseURI or other owner functions. */ function setTokenBaseURI(string memory _baseURI) external onlyOwner { } function setPrice(uint256 _price) external onlyOwner { } function setPresalePrice(uint256 _price) external onlyOwner { } function setWhitelist(address[] memory _whitelist) external onlyOwner { } function setUpgradeToken (address _upgradeToken, uint256 _upgradePrice) external onlyOwner { } function setUnrevealedURI(string memory _unrevealedUri) external onlyOwner { } function tokenURI(uint256 _tokenId) override public view returns (string memory) { } /******** * Mint * ********/ function whitelisted(address _buyer) external view returns (bool) { } function mint(uint256 _quantity) external payable { } function _safeMintKAPC(uint256 _quantity) internal { } /* * Note: Reserved KAPCs will be minted immediately after the presale ends * but before the public sale begins. This ensures a randomized start tokenId * for the reserved mints. */ function mintReserved() external onlyOwner { } function setPresaleActive(bool _active) external onlyOwner { } function setMintActive(bool _active) external onlyOwner { } /********** * Upgrade * **********/ function upgrade(uint256 token) public { require(this.ownerOf(token) == msg.sender, "Can't upgrade a token you don't own."); require(this.upgradeLevel(token) < maximumUpgrade, "Token fully upgraded"); require(upgradeToken != address(0), "Upgrade token must be set"); require(<FILL_ME>) upgradeLevel[token] += 1; } /************** * Withdrawal * **************/ function withdraw() public { } /** * Set the starting index for the collection */ function setStartingIndex() public onlyOwner { } /** * Set the starting index block for the collection, essentially unblocking * setting starting index */ function emergencySetStartingIndexBlock() public onlyOwner { } }
IERC20(upgradeToken).transferFrom(msg.sender,reservee,upgradePrice),"Must send upgradePrice tokens to upgrade"
318,259
IERC20(upgradeToken).transferFrom(msg.sender,reservee,upgradePrice)
null
pragma solidity ^0.4.24; contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; function totalSupply() public view returns (uint256) { } function transfer(address _to, uint256 _value) public returns (bool) { } function balanceOf(address _owner) public view returns (uint256) { } } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { } function approve(address _spender, uint256 _value) public returns (bool) { } function allowance( address _owner, address _spender ) public view returns (uint256) { } function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { } function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { } } contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() public { } modifier onlyOwner() { } function renounceOwnership() public onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function _transferOwnership(address _newOwner) internal { } } contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { } modifier hasMintPermission() { } function mint( address _to, uint256 _amount ) hasMintPermission canMint public returns (bool) { } function finishMinting() onlyOwner canMint public returns (bool) { } } contract FreezableToken is StandardToken { mapping (bytes32 => uint64) internal chains; mapping (bytes32 => uint) internal freezings; mapping (address => uint) internal freezingBalance; event Freezed(address indexed to, uint64 release, uint amount); event Released(address indexed owner, uint amount); function balanceOf(address _owner) public view returns (uint256 balance) { } function actualBalanceOf(address _owner) public view returns (uint256 balance) { } function freezingBalanceOf(address _owner) public view returns (uint256 balance) { } function freezingCount(address _addr) public view returns (uint count) { } function getFreezing(address _addr, uint _index) public view returns (uint64 _release, uint _balance) { } function freezeTo(address _to, uint _amount, uint64 _until) public { } function releaseOnce() public { bytes32 headKey = toKey(msg.sender, 0); uint64 head = chains[headKey]; require(head != 0); require(<FILL_ME>) bytes32 currentKey = toKey(msg.sender, head); uint64 next = chains[currentKey]; uint amount = freezings[currentKey]; delete freezings[currentKey]; balances[msg.sender] = balances[msg.sender].add(amount); freezingBalance[msg.sender] = freezingBalance[msg.sender].sub(amount); if (next == 0) { delete chains[headKey]; } else { chains[headKey] = next; delete chains[currentKey]; } emit Released(msg.sender, amount); } function releaseAll() public returns (uint tokens) { } function toKey(address _addr, uint _release) internal pure returns (bytes32 result) { } function freeze(address _to, uint64 _until) internal { } } contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); function burn(uint256 _value) public { } function _burn(address _who, uint256 _value) internal { } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; modifier whenNotPaused() { } modifier whenPaused() { } function pause() onlyOwner whenNotPaused public { } function unpause() onlyOwner whenPaused public { } } contract FreezableMintableToken is FreezableToken, MintableToken { function mintAndFreeze(address _to, uint _amount, uint64 _until) public onlyOwner canMint returns (bool) { } } contract Consts { uint public constant TOKEN_DECIMALS = 4; uint8 public constant TOKEN_DECIMALS_UINT8 = 4; uint public constant TOKEN_DECIMAL_MULTIPLIER = 10 ** TOKEN_DECIMALS; string public constant TOKEN_NAME = "Vietnam Real Estate Crypto"; string public constant TOKEN_SYMBOL = "BDS coin"; bool public constant PAUSED = false; address public constant TARGET_USER = 0xbCFcB0299071Dc5f22176c17C1A2A67BA315D8a8; bool public constant CONTINUE_MINTING = false; } contract MainToken is Consts, FreezableMintableToken, BurnableToken, Pausable { event Initialized(); bool public initialized = false; constructor() public { } function name() public pure returns (string _name) { } function symbol() public pure returns (string _symbol) { } function decimals() public pure returns (uint8 _decimals) { } function transferFrom(address _from, address _to, uint256 _value) public returns (bool _success) { } function transfer(address _to, uint256 _value) public returns (bool _success) { } function init() private { } }
uint64(block.timestamp)>head
318,318
uint64(block.timestamp)>head
"User not allowed to make transaction at this time"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; import "./util.sol"; contract KOMAINU is Context, IBEP20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _isExcludedFromAutoLiquidity; mapping (address => bool) public _isExcludedToAutoLiquidity; mapping (address => bool) private _isBlacklisted; mapping (address => bool) private _isExcludedFromTransactionlock; mapping(address => uint256) private _transactionCheckpoint; address[] private _excluded; address public _developerWallet = 0x85A7A3bEDE7B86B4145CE7525336DdE69d4CfBf0; address public _developer2Wallet = 0x9019312749308b5162D111e3c3728459B88c069F; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 1000000000000 * 10**18; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "KOMAINU"; string private constant _symbol = "KINU"; uint8 private constant _decimals = 18; uint256 public _burnFee = 200; // 2% of every transaction is burned uint256 public _taxFee = 700; // 5% of every transaction is redistributed to holders + 2% burn Fee uint256 public _liquidityFee = 0; // 5% of every transaction is kept for liquidity uint256 public _developerFee = 200; // 2% of every transaction is sent to developer wallet uint256 private _previousBurnFee = _burnFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousLiquidityFee = _liquidityFee; uint256 private _previousDeveloperFee = _developerFee; uint256 public _maxTxAmount = 10000000000 * 10**18; uint256 public _numTokensSellToAddToLiquidity = 5000000000000000 * 10**18; uint256 public _transactionLockTime = 10; // liquidity bool public _swapAndLiquifyEnabled = true; bool private _inSwapAndLiquify; IUniswapV2Router02 public _uniswapV2Router; address public _uniswapV2Pair; event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 bnbReceived, uint256 tokensIntoLiqudity ); modifier transactionIsUnlocked(){ require(<FILL_ME>) _; } modifier lockTheSwap { } constructor (address cOwner) Ownable(cOwner) { } receive() external payable {} // BEP20 function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure 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 _approve(address owner, address spender, uint256 amount) private { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } // REFLECTION function deliver(uint256 tAmount) public { } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { } function excludeFromReward(address account) public onlyOwner { } function includeInReward(address account) external onlyOwner { } function totalFees() public view returns (uint256) { } function excludeFromFee(address account) public onlyOwner { } function includeInFee(address account) public onlyOwner { } function setTaxFeePercent(uint256 taxFee) external onlyOwner { } function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner { } function setBurnFeePercent(uint256 Fee) external onlyOwner() { } function setDeveloperFeePercent(uint256 developerFee) external onlyOwner { } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner { } function setMinLiquidityPercent(uint256 minLiquidityPercent) external onlyOwner { } function setSwapAndLiquifyEnabled(bool enabled) public onlyOwner { } function isExcludedFromFee(address account) public view returns(bool) { } function isExcludedFromReward(address account) public view returns (bool) { } function setExcludedFromAutoLiquidity(address a, bool b) external onlyOwner { } function setExcludedToAutoLiquidity(address a, bool b) external onlyOwner { } function setTransactionlockTime(uint256 transactiontime) public onlyOwner { } function excludedFromTransactionlockTime(address excludeAddress) public onlyOwner { } function includedInTransactionlockTime(address excludeAddress) public onlyOwner { } function getIsExcludedFromTransactionlock(address excludeAddress) public view returns (bool){ } function setUniswapRouter(address r) external onlyOwner { } function blacklistSingleWallet(address addresses) public onlyOwner(){ } function blacklistMultipleWallets(address[] calldata addresses) public onlyOwner(){ } function isBlacklisted(address addresses) public view returns (bool){ } function unBlacklistSingleWallet(address addresses) external onlyOwner(){ } function unBlacklistMultipleWallets(address[] calldata addresses) public onlyOwner(){ } function setUniswapPair(address p) external onlyOwner { } // TRANSFER function _transfer( address from, address to, uint256 amount ) private transactionIsUnlocked { } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { } function swapTokensForBnb(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private { } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { } function reflectFee(uint256 rFee, uint256 tFee) private { } function removeAllFee() private { } function restoreAllFee() private { } function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 tDeveloper, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } function takeTransactionFee(address to, uint256 tAmount, uint256 currentRate) private { } function _burn(address account, uint256 amount) private { } }
block.timestamp-_transactionCheckpoint[_msgSender()]>=_transactionLockTime||_isExcludedFromTransactionlock[_msgSender()],"User not allowed to make transaction at this time"
318,462
block.timestamp-_transactionCheckpoint[_msgSender()]>=_transactionLockTime||_isExcludedFromTransactionlock[_msgSender()]
"You are banned"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; import "./util.sol"; contract KOMAINU is Context, IBEP20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _isExcludedFromAutoLiquidity; mapping (address => bool) public _isExcludedToAutoLiquidity; mapping (address => bool) private _isBlacklisted; mapping (address => bool) private _isExcludedFromTransactionlock; mapping(address => uint256) private _transactionCheckpoint; address[] private _excluded; address public _developerWallet = 0x85A7A3bEDE7B86B4145CE7525336DdE69d4CfBf0; address public _developer2Wallet = 0x9019312749308b5162D111e3c3728459B88c069F; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 1000000000000 * 10**18; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "KOMAINU"; string private constant _symbol = "KINU"; uint8 private constant _decimals = 18; uint256 public _burnFee = 200; // 2% of every transaction is burned uint256 public _taxFee = 700; // 5% of every transaction is redistributed to holders + 2% burn Fee uint256 public _liquidityFee = 0; // 5% of every transaction is kept for liquidity uint256 public _developerFee = 200; // 2% of every transaction is sent to developer wallet uint256 private _previousBurnFee = _burnFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousLiquidityFee = _liquidityFee; uint256 private _previousDeveloperFee = _developerFee; uint256 public _maxTxAmount = 10000000000 * 10**18; uint256 public _numTokensSellToAddToLiquidity = 5000000000000000 * 10**18; uint256 public _transactionLockTime = 10; // liquidity bool public _swapAndLiquifyEnabled = true; bool private _inSwapAndLiquify; IUniswapV2Router02 public _uniswapV2Router; address public _uniswapV2Pair; event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 bnbReceived, uint256 tokensIntoLiqudity ); modifier transactionIsUnlocked(){ } modifier lockTheSwap { } constructor (address cOwner) Ownable(cOwner) { } receive() external payable {} // BEP20 function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure 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 _approve(address owner, address spender, uint256 amount) private { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } // REFLECTION function deliver(uint256 tAmount) public { } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { } function excludeFromReward(address account) public onlyOwner { } function includeInReward(address account) external onlyOwner { } function totalFees() public view returns (uint256) { } function excludeFromFee(address account) public onlyOwner { } function includeInFee(address account) public onlyOwner { } function setTaxFeePercent(uint256 taxFee) external onlyOwner { } function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner { } function setBurnFeePercent(uint256 Fee) external onlyOwner() { } function setDeveloperFeePercent(uint256 developerFee) external onlyOwner { } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner { } function setMinLiquidityPercent(uint256 minLiquidityPercent) external onlyOwner { } function setSwapAndLiquifyEnabled(bool enabled) public onlyOwner { } function isExcludedFromFee(address account) public view returns(bool) { } function isExcludedFromReward(address account) public view returns (bool) { } function setExcludedFromAutoLiquidity(address a, bool b) external onlyOwner { } function setExcludedToAutoLiquidity(address a, bool b) external onlyOwner { } function setTransactionlockTime(uint256 transactiontime) public onlyOwner { } function excludedFromTransactionlockTime(address excludeAddress) public onlyOwner { } function includedInTransactionlockTime(address excludeAddress) public onlyOwner { } function getIsExcludedFromTransactionlock(address excludeAddress) public view returns (bool){ } function setUniswapRouter(address r) external onlyOwner { } function blacklistSingleWallet(address addresses) public onlyOwner(){ } function blacklistMultipleWallets(address[] calldata addresses) public onlyOwner(){ } function isBlacklisted(address addresses) public view returns (bool){ } function unBlacklistSingleWallet(address addresses) external onlyOwner(){ } function unBlacklistMultipleWallets(address[] calldata addresses) public onlyOwner(){ } function setUniswapPair(address p) external onlyOwner { } // TRANSFER function _transfer( address from, address to, uint256 amount ) private transactionIsUnlocked { require(from != address(0), "BEP20: transfer from the zero address"); require(to != address(0), "BEP20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(<FILL_ME>) require(_isBlacklisted[to] == false, "The recipient is banned"); if (from != owner() && to != owner()) { require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); } /* - swapAndLiquify will be initiated when token balance of this contract has accumulated enough over the minimum number of tokens required. - don't get caught in a circular liquidity event. - don't swapAndLiquify if sender is uniswap pair. */ uint256 contractTokenBalance = balanceOf(address(this)); if (contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } bool isOverMinTokenBalance = contractTokenBalance >= _numTokensSellToAddToLiquidity; if ( isOverMinTokenBalance && !_inSwapAndLiquify && !_isExcludedFromAutoLiquidity[from] && !_isExcludedToAutoLiquidity[to] && _swapAndLiquifyEnabled ) { contractTokenBalance = _numTokensSellToAddToLiquidity; swapAndLiquify(contractTokenBalance); } bool takeFee = true; // if sender or recipient is excluded from fees, remove fees if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _transactionCheckpoint[_msgSender()] = block.timestamp; _tokenTransfer(from, to, amount, takeFee); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { } function swapTokensForBnb(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private { } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { } function reflectFee(uint256 rFee, uint256 tFee) private { } function removeAllFee() private { } function restoreAllFee() private { } function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 tDeveloper, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } function takeTransactionFee(address to, uint256 tAmount, uint256 currentRate) private { } function _burn(address account, uint256 amount) private { } }
_isBlacklisted[from]==false,"You are banned"
318,462
_isBlacklisted[from]==false
"The recipient is banned"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.3; import "./util.sol"; contract KOMAINU is Context, IBEP20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) public _isExcludedFromAutoLiquidity; mapping (address => bool) public _isExcludedToAutoLiquidity; mapping (address => bool) private _isBlacklisted; mapping (address => bool) private _isExcludedFromTransactionlock; mapping(address => uint256) private _transactionCheckpoint; address[] private _excluded; address public _developerWallet = 0x85A7A3bEDE7B86B4145CE7525336DdE69d4CfBf0; address public _developer2Wallet = 0x9019312749308b5162D111e3c3728459B88c069F; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 1000000000000 * 10**18; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "KOMAINU"; string private constant _symbol = "KINU"; uint8 private constant _decimals = 18; uint256 public _burnFee = 200; // 2% of every transaction is burned uint256 public _taxFee = 700; // 5% of every transaction is redistributed to holders + 2% burn Fee uint256 public _liquidityFee = 0; // 5% of every transaction is kept for liquidity uint256 public _developerFee = 200; // 2% of every transaction is sent to developer wallet uint256 private _previousBurnFee = _burnFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousLiquidityFee = _liquidityFee; uint256 private _previousDeveloperFee = _developerFee; uint256 public _maxTxAmount = 10000000000 * 10**18; uint256 public _numTokensSellToAddToLiquidity = 5000000000000000 * 10**18; uint256 public _transactionLockTime = 10; // liquidity bool public _swapAndLiquifyEnabled = true; bool private _inSwapAndLiquify; IUniswapV2Router02 public _uniswapV2Router; address public _uniswapV2Pair; event MinTokensBeforeSwapUpdated(uint256 minTokensBeforeSwap); event SwapAndLiquifyEnabledUpdated(bool enabled); event SwapAndLiquify( uint256 tokensSwapped, uint256 bnbReceived, uint256 tokensIntoLiqudity ); modifier transactionIsUnlocked(){ } modifier lockTheSwap { } constructor (address cOwner) Ownable(cOwner) { } receive() external payable {} // BEP20 function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure 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 _approve(address owner, address spender, uint256 amount) private { } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { } // REFLECTION function deliver(uint256 tAmount) public { } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { } function excludeFromReward(address account) public onlyOwner { } function includeInReward(address account) external onlyOwner { } function totalFees() public view returns (uint256) { } function excludeFromFee(address account) public onlyOwner { } function includeInFee(address account) public onlyOwner { } function setTaxFeePercent(uint256 taxFee) external onlyOwner { } function setLiquidityFeePercent(uint256 liquidityFee) external onlyOwner { } function setBurnFeePercent(uint256 Fee) external onlyOwner() { } function setDeveloperFeePercent(uint256 developerFee) external onlyOwner { } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner { } function setMinLiquidityPercent(uint256 minLiquidityPercent) external onlyOwner { } function setSwapAndLiquifyEnabled(bool enabled) public onlyOwner { } function isExcludedFromFee(address account) public view returns(bool) { } function isExcludedFromReward(address account) public view returns (bool) { } function setExcludedFromAutoLiquidity(address a, bool b) external onlyOwner { } function setExcludedToAutoLiquidity(address a, bool b) external onlyOwner { } function setTransactionlockTime(uint256 transactiontime) public onlyOwner { } function excludedFromTransactionlockTime(address excludeAddress) public onlyOwner { } function includedInTransactionlockTime(address excludeAddress) public onlyOwner { } function getIsExcludedFromTransactionlock(address excludeAddress) public view returns (bool){ } function setUniswapRouter(address r) external onlyOwner { } function blacklistSingleWallet(address addresses) public onlyOwner(){ } function blacklistMultipleWallets(address[] calldata addresses) public onlyOwner(){ } function isBlacklisted(address addresses) public view returns (bool){ } function unBlacklistSingleWallet(address addresses) external onlyOwner(){ } function unBlacklistMultipleWallets(address[] calldata addresses) public onlyOwner(){ } function setUniswapPair(address p) external onlyOwner { } // TRANSFER function _transfer( address from, address to, uint256 amount ) private transactionIsUnlocked { require(from != address(0), "BEP20: transfer from the zero address"); require(to != address(0), "BEP20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(_isBlacklisted[from] == false, "You are banned"); require(<FILL_ME>) if (from != owner() && to != owner()) { require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); } /* - swapAndLiquify will be initiated when token balance of this contract has accumulated enough over the minimum number of tokens required. - don't get caught in a circular liquidity event. - don't swapAndLiquify if sender is uniswap pair. */ uint256 contractTokenBalance = balanceOf(address(this)); if (contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } bool isOverMinTokenBalance = contractTokenBalance >= _numTokensSellToAddToLiquidity; if ( isOverMinTokenBalance && !_inSwapAndLiquify && !_isExcludedFromAutoLiquidity[from] && !_isExcludedToAutoLiquidity[to] && _swapAndLiquifyEnabled ) { contractTokenBalance = _numTokensSellToAddToLiquidity; swapAndLiquify(contractTokenBalance); } bool takeFee = true; // if sender or recipient is excluded from fees, remove fees if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _transactionCheckpoint[_msgSender()] = block.timestamp; _tokenTransfer(from, to, amount, takeFee); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { } function swapTokensForBnb(uint256 tokenAmount) private { } function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private { } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { } function _transferStandard(address sender, address recipient, uint256 tAmount) private { } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { } function reflectFee(uint256 rFee, uint256 tFee) private { } function removeAllFee() private { } function restoreAllFee() private { } function _getTValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 tDeveloper, uint256 currentRate) private pure returns (uint256, uint256, uint256) { } function _getRate() private view returns(uint256) { } function _getCurrentSupply() private view returns(uint256, uint256) { } function takeTransactionFee(address to, uint256 tAmount, uint256 currentRate) private { } function _burn(address account, uint256 amount) private { } }
_isBlacklisted[to]==false,"The recipient is banned"
318,462
_isBlacklisted[to]==false
null
pragma solidity ^0.4.25; /******************************************************************************* * * Copyright (c) 2019 Decentralization Authority MDAO. * Released under the MIT License. * * ZeroPriceIndex - Management system for maintaining the trade prices of * ERC tokens & collectibles listed within ZeroCache. * * Version 19.2.9 * * https://d14na.org * [email protected] */ /******************************************************************************* * * SafeMath */ library SafeMath { function add(uint a, uint b) internal pure returns (uint c) { } function sub(uint a, uint b) internal pure returns (uint c) { } function mul(uint a, uint b) internal pure returns (uint c) { } function div(uint a, uint b) internal pure returns (uint c) { } } /******************************************************************************* * * ERC Token Standard #20 Interface * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20-token-standard.md */ contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } /******************************************************************************* * * ApproveAndCallFallBack * * Contract function to receive approval and execute function in one call * (borrowed from MiniMeToken) */ contract ApproveAndCallFallBack { function approveAndCall(address spender, uint tokens, bytes data) public; function receiveApproval(address from, uint256 tokens, address token, bytes data) public; } /******************************************************************************* * * Owned contract */ contract Owned { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { } modifier onlyOwner { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } } /******************************************************************************* * * Zer0netDb Interface */ contract Zer0netDbInterface { /* Interface getters. */ function getAddress(bytes32 _key) external view returns (address); function getBool(bytes32 _key) external view returns (bool); function getBytes(bytes32 _key) external view returns (bytes); function getInt(bytes32 _key) external view returns (int); function getString(bytes32 _key) external view returns (string); function getUint(bytes32 _key) external view returns (uint); /* Interface setters. */ function setAddress(bytes32 _key, address _value) external; function setBool(bytes32 _key, bool _value) external; function setBytes(bytes32 _key, bytes _value) external; function setInt(bytes32 _key, int _value) external; function setString(bytes32 _key, string _value) external; function setUint(bytes32 _key, uint _value) external; /* Interface deletes. */ function deleteAddress(bytes32 _key) external; function deleteBool(bytes32 _key) external; function deleteBytes(bytes32 _key) external; function deleteInt(bytes32 _key) external; function deleteString(bytes32 _key) external; function deleteUint(bytes32 _key) external; } /******************************************************************************* * * @notice Zero(Cache) Price Index * * @dev Manages the current trade prices of ZeroCache tokens. */ contract ZeroPriceIndex is Owned { using SafeMath for uint; /* Initialize Zer0net Db contract. */ Zer0netDbInterface private _zer0netDb; /* Initialize price notification. */ event PriceSet( bytes32 indexed key, uint value ); /** * Set Zero(Cache) Price Index namespaces * * NOTE: Keep all namespaces lowercase. */ string private _NAMESPACE = 'zpi'; /* Set Dai Stablecoin (trade pair) base. */ string private _TRADE_PAIR_BASE = 'DAI'; /** * Initialize Core Tokens * * NOTE: All tokens are traded against DAI Stablecoin. */ string[3] _CORE_TOKENS = [ 'WETH', // Wrapped Ether '0GOLD', // ZeroGold '0xBTC' // 0xBitcoin Token ]; /*************************************************************************** * * Constructor */ constructor() public { } /** * @dev Only allow access to an authorized Zer0net administrator. */ modifier onlyAuthBy0Admin() { /* Verify write access is only permitted to authorized accounts. */ require(<FILL_ME>) _; // function code is inserted here } /** * Get Trade Price * * NOTE: All trades are made against DAI stablecoin. */ function tradePriceOf( string _token ) external view returns (uint price) { } /** * Get (All) Core Trade Prices * * NOTE: All trades are made against DAI stablecoin. */ function coreTradePrices() external view returns (uint[3] prices) { } /** * Set Trade Price * * NOTE: All trades are made against DAI stablecoin. * * Keys for trade pairs are encoded using the 'exact' symbol, * as listed in their respective contract: * * Wrapped Ether `0PI.WETH.DAI` * 0x3f1c44ba685cff388a95a3e7ae4b6f00efe4793f0629b97577c1aa17090665ad * * ZeroGold `0PI.0GOLD.DAI` * 0xeb7bb6c531569208c3173a7af7030a37a5a4b6d9f1518a8ae9ec655bde099fec * * 0xBitcoin Token `0PI.0xBTC.DAI` * 0xcaf604185158d62d93f6252c02ca8238aecf42f5560c4c98d13cd1391bc54d42 */ function setTradePrice( string _token, uint _value ) external onlyAuthBy0Admin returns (bool success) { } /** * Set Core Prices * * NOTE: All trades are made against DAI stablecoin. * * NOTE: Use of `string[]` is still experimental, * so we are required to `setCorePrices` by sending * `_values` in the proper format. */ function setAllCoreTradePrices( uint[] _values ) external onlyAuthBy0Admin returns (bool success) { } /** * THIS CONTRACT DOES NOT ACCEPT DIRECT ETHER */ function () public payable { } /** * Transfer Any ERC20 Token * * @notice Owner can transfer out any accidentally sent ERC20 tokens. * * @dev Provides an ERC20 interface, which allows for the recover * of any accidentally sent ERC20 tokens. */ function transferAnyERC20Token( address tokenAddress, uint tokens ) public onlyOwner returns (bool success) { } }
_zer0netDb.getBool(keccak256(abi.encodePacked(msg.sender,'.has.auth.for.zero.price.index')))==true
318,506
_zer0netDb.getBool(keccak256(abi.encodePacked(msg.sender,'.has.auth.for.zero.price.index')))==true
null
pragma solidity ^0.4.11; /** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they arrive. */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } contract 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) onlyOwner public { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant public returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) tokenBalances; /** * @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) constant public returns (uint256 balance) { } } //TODO: Change the name of the token contract XrpcToken is BasicToken,Ownable { using SafeMath for uint256; //TODO: Change the name and the symbol string public constant name = "XRPConnect"; string public constant symbol = "XRPC"; uint256 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 10000000; event Debug(string message, address addr, uint256 number); /** * @dev Contructor that gives msg.sender all of existing tokens. */ //TODO: Change the name of the constructor function XrpcToken(address wallet) public { } function mint(address wallet, address buyer, uint256 tokenAmount) public onlyOwner { require(<FILL_ME>) // checks if it has enough to sell tokenBalances[buyer] = tokenBalances[buyer].add(tokenAmount); // adds the amount to buyer's balance tokenBalances[wallet] = tokenBalances[wallet].sub(tokenAmount); // subtracts amount from seller's balance Transfer(wallet, buyer, tokenAmount); } function showMyTokenBalance(address addr) public view returns (uint tokenBalance) { } } contract Crowdsale { using SafeMath for uint256; // The token being sold XrpcToken public token; // start and end timestamps where investments are allowed (both inclusive) uint256 public startTime; uint256 public endTime; // address where funds are collected // address where tokens are deposited and from where we send tokens to buyers address public wallet; // how many token units a buyer gets per wei uint256 public rate; // amount of raised money in wei uint256 public weiRaised; // rates corresponding to each week in WEI not ETH (conversion is 1 ETH == 10^18 WEI) uint256 public week1Price = 2117; uint256 public week2Price = 1466; uint256 public week3Price = 1121; uint256 public week4Price = 907; bool ownerAmountPaid = false; /** * event for token purchase logging * @param purchaser who paid for the tokens * @param beneficiary who got the tokens * @param value weis paid for purchase * @param amount amount of tokens purchased */ event TokenPurchase(address indexed purchaser, address indexed beneficiary, uint256 value, uint256 amount); function Crowdsale(uint256 _startTime, address _wallet) public { } function sendOwnerShares(address wal) public { } // creates the token to be sold. // TODO: Change the name of the token function createTokenContract(address wall) internal returns (XrpcToken) { } // fallback function can be used to buy tokens function () public payable { } //determine the rate of the token w.r.t. time elapsed function determineRate() internal view returns (uint256 weekRate) { } // low level token purchase function // Minimum purchase can be of 1 ETH function buyTokens(address beneficiary) public payable { } // send ether to the fund collection wallet // override to create custom fund forwarding mechanisms function forwardFunds() internal { } // @return true if the transaction can buy tokens function validPurchase() internal constant returns (bool) { } // @return true if crowdsale event has ended function hasEnded() public constant returns (bool) { } }
tokenBalances[wallet]>=tokenAmount
318,530
tokenBalances[wallet]>=tokenAmount
null
pragma solidity ^0.4.25; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint) { } function max64(uint64 a, uint64 b) internal pure returns (uint64) { } function min64(uint64 a, uint64 b) internal pure returns (uint64) { } function max256(uint256 a, uint256 b) internal pure returns (uint256) { } function min256(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC20Basic { uint public totalSupply; function balanceOf(address who) public constant returns (uint); function transfer(address to, uint value) public; event Transfer(address indexed from, address indexed to, uint value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint); function transferFrom(address from, address to, uint value) public; function approve(address spender, uint value) public; event Approval(address indexed owner, address indexed spender, uint value); } contract BasicToken is ERC20Basic { using SafeMath for uint; mapping(address => uint) balances; function transfer(address _to, uint _value) public{ } function balanceOf(address _owner) public constant returns (uint balance) { } } contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) allowed; function transferFrom(address _from, address _to, uint _value) public { } function approve(address _spender, uint _value) public{ } /* Approves and then calls the receiving contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { approve(_spender,_value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn't have to include a contract in here just for this. //receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData) //it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead. //require(_spender.call(bytes4(keccak256("receiveApproval(address,uint256,address,bytes)")), abi.encode(msg.sender, _value, this, _extraData))); require(<FILL_ME>) return true; } function allowance(address _owner, address _spender) public constant returns (uint remaining) { } } contract Ownable { address public owner; function Ownable() public{ } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public{ } } contract BCT is StandardToken, Ownable{ string public constant name = "BlockCircle Token"; string public constant symbol = "BCT"; uint public constant decimals = 18; using SafeMath for uint; function BCT() public { } function burn() onlyOwner public returns (bool) { } }
_spender.call(abi.encodeWithSelector(bytes4(keccak256("receiveApproval(address,uint256,address,bytes)")),msg.sender,_value,this,_extraData))
318,548
_spender.call(abi.encodeWithSelector(bytes4(keccak256("receiveApproval(address,uint256,address,bytes)")),msg.sender,_value,this,_extraData))
null
pragma solidity ^0.4.25; library SafeMath { function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function add(uint a, uint b) internal pure returns (uint) { } function max64(uint64 a, uint64 b) internal pure returns (uint64) { } function min64(uint64 a, uint64 b) internal pure returns (uint64) { } function max256(uint256 a, uint256 b) internal pure returns (uint256) { } function min256(uint256 a, uint256 b) internal pure returns (uint256) { } } contract ERC20Basic { uint public totalSupply; function balanceOf(address who) public constant returns (uint); function transfer(address to, uint value) public; event Transfer(address indexed from, address indexed to, uint value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint); function transferFrom(address from, address to, uint value) public; function approve(address spender, uint value) public; event Approval(address indexed owner, address indexed spender, uint value); } contract BasicToken is ERC20Basic { using SafeMath for uint; mapping(address => uint) balances; function transfer(address _to, uint _value) public{ } function balanceOf(address _owner) public constant returns (uint balance) { } } contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) allowed; function transferFrom(address _from, address _to, uint _value) public { } function approve(address _spender, uint _value) public{ } /* Approves and then calls the receiving contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { } function allowance(address _owner, address _spender) public constant returns (uint remaining) { } } contract Ownable { address public owner; function Ownable() public{ } modifier onlyOwner { } function transferOwnership(address newOwner) onlyOwner public{ } } contract BCT is StandardToken, Ownable{ string public constant name = "BlockCircle Token"; string public constant symbol = "BCT"; uint public constant decimals = 18; using SafeMath for uint; function BCT() public { } function burn() onlyOwner public returns (bool) { uint256 _burnValue = totalSupply.mul(5).div(100);//5 percent tokens should be burned every year require(<FILL_ME>) require(totalSupply >= _burnValue); balances[msg.sender] = balances[msg.sender].sub(_burnValue); totalSupply = totalSupply.sub(_burnValue); Transfer(msg.sender, 0x0, _burnValue); return true; } }
balances[msg.sender]>=_burnValue
318,548
balances[msg.sender]>=_burnValue
null
contract InkPublicPresale is Ownable { using SafeMath for uint256; // Flag to indicate whether or not the presale is currently active or is paused. // This flag is used both before the presale is finalized as well as after. // Pausing the presale before finalize means that no further contributions can // be made. Pausing the presale after finalize means that no one can claim // XNK tokens. bool public active; // Flag to indicate whether or not contributions can be refunded. bool private refundable; // The global minimum contribution (in Wei) imposed on all contributors. uint256 public globalMin; // The global maximum contribution (in Wei) imposed on all contributors. // Contributor also have a personal max. When evaluating whether or not they // can make a contribution, the lower of the global max and personal max is // used. uint256 public globalMax; // The max amount of Ether (in Wei) that is available for contribution. uint256 public etherCap; // The running count of Ether (in Wei) that is already contributed. uint256 private etherContributed; // The running count of XNK that is purchased by contributors. uint256 private xnkPurchased; // The address of the XNK token contract. When this address is set, the // presale is considered finalized and no further contributions can be made. address public tokenAddress; // Max gas price for contributing transactions. uint256 public maxGasPrice; // Contributors storage mapping. mapping(address => Contributor) private contributors; struct Contributor { bool whitelisted; // The individual rate (in XNK). uint256 rate; // The individual max contribution (in Wei). uint256 max; // The amount (in Wei) the contributor has contributed. uint256 balance; } // The presale is considered finalized when the token address is set. modifier finalized { } // The presale is considered not finalized when the token address is not set. modifier notFinalized { } function InkPublicPresale() public { } function updateMaxGasPrice(uint256 _maxGasPrice) public onlyOwner { } // Returns the amount of Ether contributed by all contributors. function getEtherContributed() public view onlyOwner returns (uint256) { } // Returns the amount of XNK purchased by all contributes. function getXNKPurchased() public view onlyOwner returns (uint256) { } // Update the global ether cap. If the new cap is set to something less than // or equal to the current contributed ether (etherContributed), then no // new contributions can be made. function updateEtherCap(uint256 _newEtherCap) public notFinalized onlyOwner { } // Update the global max contribution. function updateGlobalMax(uint256 _globalMax) public notFinalized onlyOwner { } // Update the global minimum contribution. function updateGlobalMin(uint256 _globalMin) public notFinalized onlyOwner { } function updateTokenAddress(address _tokenAddress) public finalized onlyOwner { } // Pause the presale (disables contributions and token claiming). function pause() public onlyOwner { } // Resume the presale (enables contributions and token claiming). function resume() public onlyOwner { } // Allow contributors to call the refund function to get their contributions // returned to their whitelisted address. function enableRefund() public onlyOwner { require(<FILL_ME>) refundable = true; } // Disallow refunds (this is the case by default). function disableRefund() public onlyOwner { } // Add a contributor to the whitelist. function addContributor(address _account, uint256 _rate, uint256 _max) public onlyOwner notFinalized { } // Updates a contributor's rate and/or max. function updateContributor(address _account, uint256 _newRate, uint256 _newMax) public onlyOwner notFinalized { } // Remove the contributor from the whitelist. This also refunds their // contribution if they have made any. function removeContributor(address _account) public onlyOwner { } function withdrawXNK(address _to) public onlyOwner { } function withdrawEther(address _to) public finalized onlyOwner { } // Returns a contributor's balance. function balanceOf(address _account) public view returns (uint256) { } // When refunds are enabled, contributors can call this function get their // contributed Ether back. The contributor must still be whitelisted. function refund() public { } function airdrop(address _account) public finalized onlyOwner { } // Finalize the presale by specifying the XNK token's contract address. // No further contributions can be made. The presale will be in the // "token claiming" phase. function finalize(address _tokenAddress) public notFinalized onlyOwner { } // Fallback/payable method for contributions and token claiming. function () public payable { } // Process the contribution. function _processContribution() private { } // Process the token claim. function _processPayout(address _recipient) private { } }
!refundable
318,594
!refundable
null
contract InkPublicPresale is Ownable { using SafeMath for uint256; // Flag to indicate whether or not the presale is currently active or is paused. // This flag is used both before the presale is finalized as well as after. // Pausing the presale before finalize means that no further contributions can // be made. Pausing the presale after finalize means that no one can claim // XNK tokens. bool public active; // Flag to indicate whether or not contributions can be refunded. bool private refundable; // The global minimum contribution (in Wei) imposed on all contributors. uint256 public globalMin; // The global maximum contribution (in Wei) imposed on all contributors. // Contributor also have a personal max. When evaluating whether or not they // can make a contribution, the lower of the global max and personal max is // used. uint256 public globalMax; // The max amount of Ether (in Wei) that is available for contribution. uint256 public etherCap; // The running count of Ether (in Wei) that is already contributed. uint256 private etherContributed; // The running count of XNK that is purchased by contributors. uint256 private xnkPurchased; // The address of the XNK token contract. When this address is set, the // presale is considered finalized and no further contributions can be made. address public tokenAddress; // Max gas price for contributing transactions. uint256 public maxGasPrice; // Contributors storage mapping. mapping(address => Contributor) private contributors; struct Contributor { bool whitelisted; // The individual rate (in XNK). uint256 rate; // The individual max contribution (in Wei). uint256 max; // The amount (in Wei) the contributor has contributed. uint256 balance; } // The presale is considered finalized when the token address is set. modifier finalized { } // The presale is considered not finalized when the token address is not set. modifier notFinalized { } function InkPublicPresale() public { } function updateMaxGasPrice(uint256 _maxGasPrice) public onlyOwner { } // Returns the amount of Ether contributed by all contributors. function getEtherContributed() public view onlyOwner returns (uint256) { } // Returns the amount of XNK purchased by all contributes. function getXNKPurchased() public view onlyOwner returns (uint256) { } // Update the global ether cap. If the new cap is set to something less than // or equal to the current contributed ether (etherContributed), then no // new contributions can be made. function updateEtherCap(uint256 _newEtherCap) public notFinalized onlyOwner { } // Update the global max contribution. function updateGlobalMax(uint256 _globalMax) public notFinalized onlyOwner { } // Update the global minimum contribution. function updateGlobalMin(uint256 _globalMin) public notFinalized onlyOwner { } function updateTokenAddress(address _tokenAddress) public finalized onlyOwner { } // Pause the presale (disables contributions and token claiming). function pause() public onlyOwner { } // Resume the presale (enables contributions and token claiming). function resume() public onlyOwner { } // Allow contributors to call the refund function to get their contributions // returned to their whitelisted address. function enableRefund() public onlyOwner { } // Disallow refunds (this is the case by default). function disableRefund() public onlyOwner { } // Add a contributor to the whitelist. function addContributor(address _account, uint256 _rate, uint256 _max) public onlyOwner notFinalized { require(_account != address(0)); require(_rate > 0); require(_max >= globalMin); require(<FILL_ME>) contributors[_account].whitelisted = true; contributors[_account].max = _max; contributors[_account].rate = _rate; } // Updates a contributor's rate and/or max. function updateContributor(address _account, uint256 _newRate, uint256 _newMax) public onlyOwner notFinalized { } // Remove the contributor from the whitelist. This also refunds their // contribution if they have made any. function removeContributor(address _account) public onlyOwner { } function withdrawXNK(address _to) public onlyOwner { } function withdrawEther(address _to) public finalized onlyOwner { } // Returns a contributor's balance. function balanceOf(address _account) public view returns (uint256) { } // When refunds are enabled, contributors can call this function get their // contributed Ether back. The contributor must still be whitelisted. function refund() public { } function airdrop(address _account) public finalized onlyOwner { } // Finalize the presale by specifying the XNK token's contract address. // No further contributions can be made. The presale will be in the // "token claiming" phase. function finalize(address _tokenAddress) public notFinalized onlyOwner { } // Fallback/payable method for contributions and token claiming. function () public payable { } // Process the contribution. function _processContribution() private { } // Process the token claim. function _processPayout(address _recipient) private { } }
!contributors[_account].whitelisted
318,594
!contributors[_account].whitelisted
null
contract InkPublicPresale is Ownable { using SafeMath for uint256; // Flag to indicate whether or not the presale is currently active or is paused. // This flag is used both before the presale is finalized as well as after. // Pausing the presale before finalize means that no further contributions can // be made. Pausing the presale after finalize means that no one can claim // XNK tokens. bool public active; // Flag to indicate whether or not contributions can be refunded. bool private refundable; // The global minimum contribution (in Wei) imposed on all contributors. uint256 public globalMin; // The global maximum contribution (in Wei) imposed on all contributors. // Contributor also have a personal max. When evaluating whether or not they // can make a contribution, the lower of the global max and personal max is // used. uint256 public globalMax; // The max amount of Ether (in Wei) that is available for contribution. uint256 public etherCap; // The running count of Ether (in Wei) that is already contributed. uint256 private etherContributed; // The running count of XNK that is purchased by contributors. uint256 private xnkPurchased; // The address of the XNK token contract. When this address is set, the // presale is considered finalized and no further contributions can be made. address public tokenAddress; // Max gas price for contributing transactions. uint256 public maxGasPrice; // Contributors storage mapping. mapping(address => Contributor) private contributors; struct Contributor { bool whitelisted; // The individual rate (in XNK). uint256 rate; // The individual max contribution (in Wei). uint256 max; // The amount (in Wei) the contributor has contributed. uint256 balance; } // The presale is considered finalized when the token address is set. modifier finalized { } // The presale is considered not finalized when the token address is not set. modifier notFinalized { } function InkPublicPresale() public { } function updateMaxGasPrice(uint256 _maxGasPrice) public onlyOwner { } // Returns the amount of Ether contributed by all contributors. function getEtherContributed() public view onlyOwner returns (uint256) { } // Returns the amount of XNK purchased by all contributes. function getXNKPurchased() public view onlyOwner returns (uint256) { } // Update the global ether cap. If the new cap is set to something less than // or equal to the current contributed ether (etherContributed), then no // new contributions can be made. function updateEtherCap(uint256 _newEtherCap) public notFinalized onlyOwner { } // Update the global max contribution. function updateGlobalMax(uint256 _globalMax) public notFinalized onlyOwner { } // Update the global minimum contribution. function updateGlobalMin(uint256 _globalMin) public notFinalized onlyOwner { } function updateTokenAddress(address _tokenAddress) public finalized onlyOwner { } // Pause the presale (disables contributions and token claiming). function pause() public onlyOwner { } // Resume the presale (enables contributions and token claiming). function resume() public onlyOwner { } // Allow contributors to call the refund function to get their contributions // returned to their whitelisted address. function enableRefund() public onlyOwner { } // Disallow refunds (this is the case by default). function disableRefund() public onlyOwner { } // Add a contributor to the whitelist. function addContributor(address _account, uint256 _rate, uint256 _max) public onlyOwner notFinalized { } // Updates a contributor's rate and/or max. function updateContributor(address _account, uint256 _newRate, uint256 _newMax) public onlyOwner notFinalized { require(_account != address(0)); require(_newRate > 0); require(_newMax >= globalMin); require(<FILL_ME>) // Account for any changes in rate since we are keeping track of total XNK // purchased. if (contributors[_account].balance > 0 && contributors[_account].rate != _newRate) { // Put back the purchased XNK for the old rate. xnkPurchased = xnkPurchased.sub(contributors[_account].balance.mul(contributors[_account].rate)); // Purchase XNK at the new rate. xnkPurchased = xnkPurchased.add(contributors[_account].balance.mul(_newRate)); } contributors[_account].rate = _newRate; contributors[_account].max = _newMax; } // Remove the contributor from the whitelist. This also refunds their // contribution if they have made any. function removeContributor(address _account) public onlyOwner { } function withdrawXNK(address _to) public onlyOwner { } function withdrawEther(address _to) public finalized onlyOwner { } // Returns a contributor's balance. function balanceOf(address _account) public view returns (uint256) { } // When refunds are enabled, contributors can call this function get their // contributed Ether back. The contributor must still be whitelisted. function refund() public { } function airdrop(address _account) public finalized onlyOwner { } // Finalize the presale by specifying the XNK token's contract address. // No further contributions can be made. The presale will be in the // "token claiming" phase. function finalize(address _tokenAddress) public notFinalized onlyOwner { } // Fallback/payable method for contributions and token claiming. function () public payable { } // Process the contribution. function _processContribution() private { } // Process the token claim. function _processPayout(address _recipient) private { } }
contributors[_account].whitelisted
318,594
contributors[_account].whitelisted
null
contract InkPublicPresale is Ownable { using SafeMath for uint256; // Flag to indicate whether or not the presale is currently active or is paused. // This flag is used both before the presale is finalized as well as after. // Pausing the presale before finalize means that no further contributions can // be made. Pausing the presale after finalize means that no one can claim // XNK tokens. bool public active; // Flag to indicate whether or not contributions can be refunded. bool private refundable; // The global minimum contribution (in Wei) imposed on all contributors. uint256 public globalMin; // The global maximum contribution (in Wei) imposed on all contributors. // Contributor also have a personal max. When evaluating whether or not they // can make a contribution, the lower of the global max and personal max is // used. uint256 public globalMax; // The max amount of Ether (in Wei) that is available for contribution. uint256 public etherCap; // The running count of Ether (in Wei) that is already contributed. uint256 private etherContributed; // The running count of XNK that is purchased by contributors. uint256 private xnkPurchased; // The address of the XNK token contract. When this address is set, the // presale is considered finalized and no further contributions can be made. address public tokenAddress; // Max gas price for contributing transactions. uint256 public maxGasPrice; // Contributors storage mapping. mapping(address => Contributor) private contributors; struct Contributor { bool whitelisted; // The individual rate (in XNK). uint256 rate; // The individual max contribution (in Wei). uint256 max; // The amount (in Wei) the contributor has contributed. uint256 balance; } // The presale is considered finalized when the token address is set. modifier finalized { } // The presale is considered not finalized when the token address is not set. modifier notFinalized { } function InkPublicPresale() public { } function updateMaxGasPrice(uint256 _maxGasPrice) public onlyOwner { } // Returns the amount of Ether contributed by all contributors. function getEtherContributed() public view onlyOwner returns (uint256) { } // Returns the amount of XNK purchased by all contributes. function getXNKPurchased() public view onlyOwner returns (uint256) { } // Update the global ether cap. If the new cap is set to something less than // or equal to the current contributed ether (etherContributed), then no // new contributions can be made. function updateEtherCap(uint256 _newEtherCap) public notFinalized onlyOwner { } // Update the global max contribution. function updateGlobalMax(uint256 _globalMax) public notFinalized onlyOwner { } // Update the global minimum contribution. function updateGlobalMin(uint256 _globalMin) public notFinalized onlyOwner { } function updateTokenAddress(address _tokenAddress) public finalized onlyOwner { } // Pause the presale (disables contributions and token claiming). function pause() public onlyOwner { } // Resume the presale (enables contributions and token claiming). function resume() public onlyOwner { } // Allow contributors to call the refund function to get their contributions // returned to their whitelisted address. function enableRefund() public onlyOwner { } // Disallow refunds (this is the case by default). function disableRefund() public onlyOwner { } // Add a contributor to the whitelist. function addContributor(address _account, uint256 _rate, uint256 _max) public onlyOwner notFinalized { } // Updates a contributor's rate and/or max. function updateContributor(address _account, uint256 _newRate, uint256 _newMax) public onlyOwner notFinalized { } // Remove the contributor from the whitelist. This also refunds their // contribution if they have made any. function removeContributor(address _account) public onlyOwner { } function withdrawXNK(address _to) public onlyOwner { } function withdrawEther(address _to) public finalized onlyOwner { } // Returns a contributor's balance. function balanceOf(address _account) public view returns (uint256) { } // When refunds are enabled, contributors can call this function get their // contributed Ether back. The contributor must still be whitelisted. function refund() public { require(active); require(refundable); require(<FILL_ME>) uint256 balance = contributors[msg.sender].balance; require(balance > 0); contributors[msg.sender].balance = 0; etherContributed = etherContributed.sub(balance); xnkPurchased = xnkPurchased.sub(balance.mul(contributors[msg.sender].rate)); assert(msg.sender.call.value(balance)()); } function airdrop(address _account) public finalized onlyOwner { } // Finalize the presale by specifying the XNK token's contract address. // No further contributions can be made. The presale will be in the // "token claiming" phase. function finalize(address _tokenAddress) public notFinalized onlyOwner { } // Fallback/payable method for contributions and token claiming. function () public payable { } // Process the contribution. function _processContribution() private { } // Process the token claim. function _processPayout(address _recipient) private { } }
contributors[msg.sender].whitelisted
318,594
contributors[msg.sender].whitelisted
null
contract InkPublicPresale is Ownable { using SafeMath for uint256; // Flag to indicate whether or not the presale is currently active or is paused. // This flag is used both before the presale is finalized as well as after. // Pausing the presale before finalize means that no further contributions can // be made. Pausing the presale after finalize means that no one can claim // XNK tokens. bool public active; // Flag to indicate whether or not contributions can be refunded. bool private refundable; // The global minimum contribution (in Wei) imposed on all contributors. uint256 public globalMin; // The global maximum contribution (in Wei) imposed on all contributors. // Contributor also have a personal max. When evaluating whether or not they // can make a contribution, the lower of the global max and personal max is // used. uint256 public globalMax; // The max amount of Ether (in Wei) that is available for contribution. uint256 public etherCap; // The running count of Ether (in Wei) that is already contributed. uint256 private etherContributed; // The running count of XNK that is purchased by contributors. uint256 private xnkPurchased; // The address of the XNK token contract. When this address is set, the // presale is considered finalized and no further contributions can be made. address public tokenAddress; // Max gas price for contributing transactions. uint256 public maxGasPrice; // Contributors storage mapping. mapping(address => Contributor) private contributors; struct Contributor { bool whitelisted; // The individual rate (in XNK). uint256 rate; // The individual max contribution (in Wei). uint256 max; // The amount (in Wei) the contributor has contributed. uint256 balance; } // The presale is considered finalized when the token address is set. modifier finalized { } // The presale is considered not finalized when the token address is not set. modifier notFinalized { } function InkPublicPresale() public { } function updateMaxGasPrice(uint256 _maxGasPrice) public onlyOwner { } // Returns the amount of Ether contributed by all contributors. function getEtherContributed() public view onlyOwner returns (uint256) { } // Returns the amount of XNK purchased by all contributes. function getXNKPurchased() public view onlyOwner returns (uint256) { } // Update the global ether cap. If the new cap is set to something less than // or equal to the current contributed ether (etherContributed), then no // new contributions can be made. function updateEtherCap(uint256 _newEtherCap) public notFinalized onlyOwner { } // Update the global max contribution. function updateGlobalMax(uint256 _globalMax) public notFinalized onlyOwner { } // Update the global minimum contribution. function updateGlobalMin(uint256 _globalMin) public notFinalized onlyOwner { } function updateTokenAddress(address _tokenAddress) public finalized onlyOwner { } // Pause the presale (disables contributions and token claiming). function pause() public onlyOwner { } // Resume the presale (enables contributions and token claiming). function resume() public onlyOwner { } // Allow contributors to call the refund function to get their contributions // returned to their whitelisted address. function enableRefund() public onlyOwner { } // Disallow refunds (this is the case by default). function disableRefund() public onlyOwner { } // Add a contributor to the whitelist. function addContributor(address _account, uint256 _rate, uint256 _max) public onlyOwner notFinalized { } // Updates a contributor's rate and/or max. function updateContributor(address _account, uint256 _newRate, uint256 _newMax) public onlyOwner notFinalized { } // Remove the contributor from the whitelist. This also refunds their // contribution if they have made any. function removeContributor(address _account) public onlyOwner { } function withdrawXNK(address _to) public onlyOwner { } function withdrawEther(address _to) public finalized onlyOwner { } // Returns a contributor's balance. function balanceOf(address _account) public view returns (uint256) { } // When refunds are enabled, contributors can call this function get their // contributed Ether back. The contributor must still be whitelisted. function refund() public { } function airdrop(address _account) public finalized onlyOwner { } // Finalize the presale by specifying the XNK token's contract address. // No further contributions can be made. The presale will be in the // "token claiming" phase. function finalize(address _tokenAddress) public notFinalized onlyOwner { } // Fallback/payable method for contributions and token claiming. function () public payable { } // Process the contribution. function _processContribution() private { // Must be contributing a positive amount. require(msg.value > 0); // Limit the transaction's gas price. require(tx.gasprice <= maxGasPrice); // The sum of the contributor's total contributions must be higher than the // global minimum. require(<FILL_ME>) // The global contribution cap must be higher than what has been contributed // by everyone. Otherwise, there's zero room for any contribution. require(etherCap > etherContributed); // Make sure that this specific contribution does not take the total // contribution by everyone over the global contribution cap. require(msg.value <= etherCap.sub(etherContributed)); uint256 newBalance = contributors[msg.sender].balance.add(msg.value); // We limit the individual's contribution based on whichever is lower // between their individual max or the global max. if (globalMax <= contributors[msg.sender].max) { require(newBalance <= globalMax); } else { require(newBalance <= contributors[msg.sender].max); } // Increment the contributor's balance. contributors[msg.sender].balance = newBalance; // Increment the total amount of Ether contributed by everyone. etherContributed = etherContributed.add(msg.value); // Increment the total amount of XNK purchased by everyone. xnkPurchased = xnkPurchased.add(msg.value.mul(contributors[msg.sender].rate)); } // Process the token claim. function _processPayout(address _recipient) private { } }
contributors[msg.sender].balance.add(msg.value)>=globalMin
318,594
contributors[msg.sender].balance.add(msg.value)>=globalMin
"PitchSwap/overflow"
// Copyright (C) 2018 Rain <[email protected]> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity 0.5.12; contract LibNote { event LogNote( bytes4 indexed sig, address indexed usr, bytes32 indexed arg1, bytes32 indexed arg2, bytes data ) anonymous; modifier note { } } contract PitchLike { function transfer(address,uint) external returns (bool); function transferFrom(address,address,uint) external returns (bool); } contract Pitch2Like { function mint(address,uint) external; function burn(address,uint) external; } /* Here we provide *adapter* to swap Pitch tokens to the Pitch - v2 tokens. The adapters here are provided as working examples: - `PitchLike`: For well behaved ERC20 tokens, with simple transfer semantics. - `Pitch2Like`: For DAI-like tokens, with ability to mint and burn tokens. Adapter has two basic methods: - `join`: enter collateral into the system - `exit`: remove collateral from the system */ contract PitchSwap is LibNote { // --- Auth --- mapping (address => uint) public wards; function rely(address usr) external note auth { } function deny(address usr) external note auth { } modifier auth { } Pitch2Like public pitch2; PitchLike public pitch; uint public live; // Access Flag constructor(address pitch2_, address pitch_) public { } function cage() external note auth { } // In wad input we have 1E9 and will convert to 1E18 // we need to mul input wad to 1E9 (10**9) uint constant ONE = 10 ** 9; //10 ** 18; function mul(uint x, uint y) internal pure returns (uint z) { } function join(address usr, uint wad) external note { require(live == 1, "PitchSwap/not-live"); require(<FILL_ME>) // mul to get 18 decimals pitch2.mint(usr, mul(ONE, wad)); require(pitch.transferFrom(msg.sender, address(this), wad), "PitchSwap/failed-transfer"); } function exit(address usr, uint wad) external note { } }
int(wad)>=0,"PitchSwap/overflow"
318,617
int(wad)>=0
"PitchSwap/failed-transfer"
// Copyright (C) 2018 Rain <[email protected]> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity 0.5.12; contract LibNote { event LogNote( bytes4 indexed sig, address indexed usr, bytes32 indexed arg1, bytes32 indexed arg2, bytes data ) anonymous; modifier note { } } contract PitchLike { function transfer(address,uint) external returns (bool); function transferFrom(address,address,uint) external returns (bool); } contract Pitch2Like { function mint(address,uint) external; function burn(address,uint) external; } /* Here we provide *adapter* to swap Pitch tokens to the Pitch - v2 tokens. The adapters here are provided as working examples: - `PitchLike`: For well behaved ERC20 tokens, with simple transfer semantics. - `Pitch2Like`: For DAI-like tokens, with ability to mint and burn tokens. Adapter has two basic methods: - `join`: enter collateral into the system - `exit`: remove collateral from the system */ contract PitchSwap is LibNote { // --- Auth --- mapping (address => uint) public wards; function rely(address usr) external note auth { } function deny(address usr) external note auth { } modifier auth { } Pitch2Like public pitch2; PitchLike public pitch; uint public live; // Access Flag constructor(address pitch2_, address pitch_) public { } function cage() external note auth { } // In wad input we have 1E9 and will convert to 1E18 // we need to mul input wad to 1E9 (10**9) uint constant ONE = 10 ** 9; //10 ** 18; function mul(uint x, uint y) internal pure returns (uint z) { } function join(address usr, uint wad) external note { require(live == 1, "PitchSwap/not-live"); require(int(wad) >= 0, "PitchSwap/overflow"); // mul to get 18 decimals pitch2.mint(usr, mul(ONE, wad)); require(<FILL_ME>) } function exit(address usr, uint wad) external note { } }
pitch.transferFrom(msg.sender,address(this),wad),"PitchSwap/failed-transfer"
318,617
pitch.transferFrom(msg.sender,address(this),wad)
"PitchSwap/failed-transfer"
// Copyright (C) 2018 Rain <[email protected]> // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity 0.5.12; contract LibNote { event LogNote( bytes4 indexed sig, address indexed usr, bytes32 indexed arg1, bytes32 indexed arg2, bytes data ) anonymous; modifier note { } } contract PitchLike { function transfer(address,uint) external returns (bool); function transferFrom(address,address,uint) external returns (bool); } contract Pitch2Like { function mint(address,uint) external; function burn(address,uint) external; } /* Here we provide *adapter* to swap Pitch tokens to the Pitch - v2 tokens. The adapters here are provided as working examples: - `PitchLike`: For well behaved ERC20 tokens, with simple transfer semantics. - `Pitch2Like`: For DAI-like tokens, with ability to mint and burn tokens. Adapter has two basic methods: - `join`: enter collateral into the system - `exit`: remove collateral from the system */ contract PitchSwap is LibNote { // --- Auth --- mapping (address => uint) public wards; function rely(address usr) external note auth { } function deny(address usr) external note auth { } modifier auth { } Pitch2Like public pitch2; PitchLike public pitch; uint public live; // Access Flag constructor(address pitch2_, address pitch_) public { } function cage() external note auth { } // In wad input we have 1E9 and will convert to 1E18 // we need to mul input wad to 1E9 (10**9) uint constant ONE = 10 ** 9; //10 ** 18; function mul(uint x, uint y) internal pure returns (uint z) { } function join(address usr, uint wad) external note { } function exit(address usr, uint wad) external note { require(wad <= 2 ** 255, "PitchSwap/overflow"); // mul to get 18 decimals pitch2.burn(usr, mul(ONE, wad)); require(<FILL_ME>) } }
pitch.transfer(usr,wad),"PitchSwap/failed-transfer"
318,617
pitch.transfer(usr,wad)
"TOKEN_DOES_NOT_EXIST"
pragma solidity ^0.5.0; contract DmmController is IPausable, Pausable, CommonConstants, IDmmController, Ownable { using SafeMath for uint; using SafeERC20 for IERC20; using Address for address; /******************************** * Events */ event InterestRateInterfaceChanged(address previousInterestRateInterface, address newInterestRateInterface); event OffChainAssetValuatorChanged(address previousOffChainAssetValuator, address newOffChainAssetValuator); event OffChainCurrencyValuatorChanged(address previousOffChainCurrencyValuator, address newOffChainCurrencyValuator); event UnderlyingTokenValuatorChanged(address previousUnderlyingTokenValuator, address newUnderlyingTokenValuator); event MarketAdded(uint indexed dmmTokenId, address indexed dmmToken, address indexed underlyingToken); event DisableMarket(uint indexed dmmTokenId); event EnableMarket(uint indexed dmmTokenId); event MinCollateralizationChanged(uint previousMinCollateralization, uint newMinCollateralization); event MinReserveRatioChanged(uint previousMinReserveRatio, uint newMinReserveRatio); /******************************** * Controller Fields */ DmmBlacklistable public dmmBlacklistable; InterestRateInterface public interestRateInterface; IOffChainCurrencyValuator public offChainCurrencyValuator; IOffChainAssetValuator public offChainAssetsValuator; IUnderlyingTokenValuator public underlyingTokenValuator; IDmmTokenFactory public dmmTokenFactory; IDmmTokenFactory public dmmEtherFactory; uint public minCollateralization; uint public minReserveRatio; address public wethToken; /******************************** * DMM Account Management */ mapping(uint => address) public dmmTokenIdToDmmTokenAddressMap; mapping(address => uint) public dmmTokenAddressToDmmTokenIdMap; mapping(address => uint) public underlyingTokenAddressToDmmTokenIdMap; mapping(uint => address) public dmmTokenIdToUnderlyingTokenAddressMap; mapping(uint => bool) public dmmTokenIdToIsDisabledMap; uint[] public dmmTokenIds; /******************************** * Constants */ uint public constant COLLATERALIZATION_BASE_RATE = 1e18; uint public constant INTEREST_RATE_BASE_RATE = 1e18; uint public constant MIN_RESERVE_RATIO_BASE_RATE = 1e18; constructor( address _interestRateInterface, address _offChainAssetsValuator, address _offChainCurrencyValuator, address _underlyingTokenValuator, address _dmmEtherFactory, address _dmmTokenFactory, address _dmmBlacklistable, uint _minCollateralization, uint _minReserveRatio, address _wethToken ) public { } /***************** * Modifiers */ modifier whenNotPaused() { } modifier whenPaused() { } modifier checkTokenExists(uint dmmTokenId) { require(<FILL_ME>) _; } /********************** * Public Functions */ function transferOwnership(address newOwner) public onlyOwner { } function blacklistable() public view returns (Blacklistable) { } function addMarket( address underlyingToken, string memory symbol, string memory name, uint8 decimals, uint minMintAmount, uint minRedeemAmount, uint totalSupply ) public onlyOwner { } function addMarketFromExistingDmmToken( address dmmToken, address underlyingToken ) onlyOwner public { } function transferOwnershipToNewController( address newController ) onlyOwner public { } function enableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function disableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function setInterestRateInterface(address newInterestRateInterface) public whenNotPaused onlyOwner { } function setOffChainAssetValuator(address newOffChainAssetValuator) public whenNotPaused onlyOwner { } function setOffChainCurrencyValuator(address newOffChainCurrencyValuator) public whenNotPaused onlyOwner { } function setUnderlyingTokenValuator(address newUnderlyingTokenValuator) public whenNotPaused onlyOwner { } function setMinCollateralization(uint newMinCollateralization) public whenNotPaused onlyOwner { } function setMinReserveRatio(uint newMinReserveRatio) public whenNotPaused onlyOwner { } function increaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function decreaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminWithdrawFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminDepositFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function getTotalCollateralization() public view returns (uint) { } function getActiveCollateralization() public view returns (uint) { } function getInterestRateByUnderlyingTokenAddress(address underlyingToken) public view returns (uint) { } function getInterestRateByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (uint) { } function getInterestRateByDmmTokenAddress(address dmmToken) public view returns (uint) { } function getExchangeRateByUnderlying(address underlyingToken) public view returns (uint) { } function getExchangeRate(address dmmToken) public view returns (uint) { } function getDmmTokenForUnderlying(address underlyingToken) public view returns (address) { } function getUnderlyingTokenForDmm(address dmmToken) public view returns (address) { } function isMarketEnabledByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (bool) { } function isMarketEnabledByDmmTokenAddress(address dmmToken) public view returns (bool) { } function getTokenIdFromDmmTokenAddress(address dmmToken) public view returns (uint) { } function getDmmTokenIds() public view returns (uint[] memory) { } /********************** * Private Functions */ function _addMarket(address dmmToken, address underlyingToken) private { } function getCollateralization(uint totalLiabilities, uint totalAssets) private view returns (uint) { } function getDmmSupplyValue(IDmmToken dmmToken, uint dmmSupply, uint currentExchangeRate) private view returns (uint) { } function getUnderlyingSupplyValue(IERC20 underlyingToken, uint underlyingSupply, uint8 decimals) private view returns (uint) { } }
dmmTokenIdToDmmTokenAddressMap[dmmTokenId]!=address(0x0),"TOKEN_DOES_NOT_EXIST"
318,686
dmmTokenIdToDmmTokenAddressMap[dmmTokenId]!=address(0x0)
"TOKEN_ALREADY_EXISTS"
pragma solidity ^0.5.0; contract DmmController is IPausable, Pausable, CommonConstants, IDmmController, Ownable { using SafeMath for uint; using SafeERC20 for IERC20; using Address for address; /******************************** * Events */ event InterestRateInterfaceChanged(address previousInterestRateInterface, address newInterestRateInterface); event OffChainAssetValuatorChanged(address previousOffChainAssetValuator, address newOffChainAssetValuator); event OffChainCurrencyValuatorChanged(address previousOffChainCurrencyValuator, address newOffChainCurrencyValuator); event UnderlyingTokenValuatorChanged(address previousUnderlyingTokenValuator, address newUnderlyingTokenValuator); event MarketAdded(uint indexed dmmTokenId, address indexed dmmToken, address indexed underlyingToken); event DisableMarket(uint indexed dmmTokenId); event EnableMarket(uint indexed dmmTokenId); event MinCollateralizationChanged(uint previousMinCollateralization, uint newMinCollateralization); event MinReserveRatioChanged(uint previousMinReserveRatio, uint newMinReserveRatio); /******************************** * Controller Fields */ DmmBlacklistable public dmmBlacklistable; InterestRateInterface public interestRateInterface; IOffChainCurrencyValuator public offChainCurrencyValuator; IOffChainAssetValuator public offChainAssetsValuator; IUnderlyingTokenValuator public underlyingTokenValuator; IDmmTokenFactory public dmmTokenFactory; IDmmTokenFactory public dmmEtherFactory; uint public minCollateralization; uint public minReserveRatio; address public wethToken; /******************************** * DMM Account Management */ mapping(uint => address) public dmmTokenIdToDmmTokenAddressMap; mapping(address => uint) public dmmTokenAddressToDmmTokenIdMap; mapping(address => uint) public underlyingTokenAddressToDmmTokenIdMap; mapping(uint => address) public dmmTokenIdToUnderlyingTokenAddressMap; mapping(uint => bool) public dmmTokenIdToIsDisabledMap; uint[] public dmmTokenIds; /******************************** * Constants */ uint public constant COLLATERALIZATION_BASE_RATE = 1e18; uint public constant INTEREST_RATE_BASE_RATE = 1e18; uint public constant MIN_RESERVE_RATIO_BASE_RATE = 1e18; constructor( address _interestRateInterface, address _offChainAssetsValuator, address _offChainCurrencyValuator, address _underlyingTokenValuator, address _dmmEtherFactory, address _dmmTokenFactory, address _dmmBlacklistable, uint _minCollateralization, uint _minReserveRatio, address _wethToken ) public { } /***************** * Modifiers */ modifier whenNotPaused() { } modifier whenPaused() { } modifier checkTokenExists(uint dmmTokenId) { } /********************** * Public Functions */ function transferOwnership(address newOwner) public onlyOwner { } function blacklistable() public view returns (Blacklistable) { } function addMarket( address underlyingToken, string memory symbol, string memory name, uint8 decimals, uint minMintAmount, uint minRedeemAmount, uint totalSupply ) public onlyOwner { require(<FILL_ME>) IDmmToken dmmToken; address controller = address(this); if (underlyingToken == wethToken) { dmmToken = dmmEtherFactory.deployToken( symbol, name, decimals, minMintAmount, minRedeemAmount, totalSupply, controller ); } else { dmmToken = dmmTokenFactory.deployToken( symbol, name, decimals, minMintAmount, minRedeemAmount, totalSupply, controller ); } _addMarket(address(dmmToken), underlyingToken); } function addMarketFromExistingDmmToken( address dmmToken, address underlyingToken ) onlyOwner public { } function transferOwnershipToNewController( address newController ) onlyOwner public { } function enableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function disableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function setInterestRateInterface(address newInterestRateInterface) public whenNotPaused onlyOwner { } function setOffChainAssetValuator(address newOffChainAssetValuator) public whenNotPaused onlyOwner { } function setOffChainCurrencyValuator(address newOffChainCurrencyValuator) public whenNotPaused onlyOwner { } function setUnderlyingTokenValuator(address newUnderlyingTokenValuator) public whenNotPaused onlyOwner { } function setMinCollateralization(uint newMinCollateralization) public whenNotPaused onlyOwner { } function setMinReserveRatio(uint newMinReserveRatio) public whenNotPaused onlyOwner { } function increaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function decreaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminWithdrawFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminDepositFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function getTotalCollateralization() public view returns (uint) { } function getActiveCollateralization() public view returns (uint) { } function getInterestRateByUnderlyingTokenAddress(address underlyingToken) public view returns (uint) { } function getInterestRateByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (uint) { } function getInterestRateByDmmTokenAddress(address dmmToken) public view returns (uint) { } function getExchangeRateByUnderlying(address underlyingToken) public view returns (uint) { } function getExchangeRate(address dmmToken) public view returns (uint) { } function getDmmTokenForUnderlying(address underlyingToken) public view returns (address) { } function getUnderlyingTokenForDmm(address dmmToken) public view returns (address) { } function isMarketEnabledByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (bool) { } function isMarketEnabledByDmmTokenAddress(address dmmToken) public view returns (bool) { } function getTokenIdFromDmmTokenAddress(address dmmToken) public view returns (uint) { } function getDmmTokenIds() public view returns (uint[] memory) { } /********************** * Private Functions */ function _addMarket(address dmmToken, address underlyingToken) private { } function getCollateralization(uint totalLiabilities, uint totalAssets) private view returns (uint) { } function getDmmSupplyValue(IDmmToken dmmToken, uint dmmSupply, uint currentExchangeRate) private view returns (uint) { } function getUnderlyingSupplyValue(IERC20 underlyingToken, uint underlyingSupply, uint8 decimals) private view returns (uint) { } }
underlyingTokenAddressToDmmTokenIdMap[underlyingToken]==0,"TOKEN_ALREADY_EXISTS"
318,686
underlyingTokenAddressToDmmTokenIdMap[underlyingToken]==0
"DMM_TOKEN_IS_NOT_CONTRACT"
pragma solidity ^0.5.0; contract DmmController is IPausable, Pausable, CommonConstants, IDmmController, Ownable { using SafeMath for uint; using SafeERC20 for IERC20; using Address for address; /******************************** * Events */ event InterestRateInterfaceChanged(address previousInterestRateInterface, address newInterestRateInterface); event OffChainAssetValuatorChanged(address previousOffChainAssetValuator, address newOffChainAssetValuator); event OffChainCurrencyValuatorChanged(address previousOffChainCurrencyValuator, address newOffChainCurrencyValuator); event UnderlyingTokenValuatorChanged(address previousUnderlyingTokenValuator, address newUnderlyingTokenValuator); event MarketAdded(uint indexed dmmTokenId, address indexed dmmToken, address indexed underlyingToken); event DisableMarket(uint indexed dmmTokenId); event EnableMarket(uint indexed dmmTokenId); event MinCollateralizationChanged(uint previousMinCollateralization, uint newMinCollateralization); event MinReserveRatioChanged(uint previousMinReserveRatio, uint newMinReserveRatio); /******************************** * Controller Fields */ DmmBlacklistable public dmmBlacklistable; InterestRateInterface public interestRateInterface; IOffChainCurrencyValuator public offChainCurrencyValuator; IOffChainAssetValuator public offChainAssetsValuator; IUnderlyingTokenValuator public underlyingTokenValuator; IDmmTokenFactory public dmmTokenFactory; IDmmTokenFactory public dmmEtherFactory; uint public minCollateralization; uint public minReserveRatio; address public wethToken; /******************************** * DMM Account Management */ mapping(uint => address) public dmmTokenIdToDmmTokenAddressMap; mapping(address => uint) public dmmTokenAddressToDmmTokenIdMap; mapping(address => uint) public underlyingTokenAddressToDmmTokenIdMap; mapping(uint => address) public dmmTokenIdToUnderlyingTokenAddressMap; mapping(uint => bool) public dmmTokenIdToIsDisabledMap; uint[] public dmmTokenIds; /******************************** * Constants */ uint public constant COLLATERALIZATION_BASE_RATE = 1e18; uint public constant INTEREST_RATE_BASE_RATE = 1e18; uint public constant MIN_RESERVE_RATIO_BASE_RATE = 1e18; constructor( address _interestRateInterface, address _offChainAssetsValuator, address _offChainCurrencyValuator, address _underlyingTokenValuator, address _dmmEtherFactory, address _dmmTokenFactory, address _dmmBlacklistable, uint _minCollateralization, uint _minReserveRatio, address _wethToken ) public { } /***************** * Modifiers */ modifier whenNotPaused() { } modifier whenPaused() { } modifier checkTokenExists(uint dmmTokenId) { } /********************** * Public Functions */ function transferOwnership(address newOwner) public onlyOwner { } function blacklistable() public view returns (Blacklistable) { } function addMarket( address underlyingToken, string memory symbol, string memory name, uint8 decimals, uint minMintAmount, uint minRedeemAmount, uint totalSupply ) public onlyOwner { } function addMarketFromExistingDmmToken( address dmmToken, address underlyingToken ) onlyOwner public { require(underlyingTokenAddressToDmmTokenIdMap[underlyingToken] == 0, "TOKEN_ALREADY_EXISTS"); require(<FILL_ME>) require(underlyingToken.isContract(), "UNDERLYING_TOKEN_IS_NOT_CONTRACT"); require(Ownable(dmmToken).owner() == address(this), "INVALID_DMM_TOKEN_OWNERSHIP"); _addMarket(dmmToken, underlyingToken); } function transferOwnershipToNewController( address newController ) onlyOwner public { } function enableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function disableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function setInterestRateInterface(address newInterestRateInterface) public whenNotPaused onlyOwner { } function setOffChainAssetValuator(address newOffChainAssetValuator) public whenNotPaused onlyOwner { } function setOffChainCurrencyValuator(address newOffChainCurrencyValuator) public whenNotPaused onlyOwner { } function setUnderlyingTokenValuator(address newUnderlyingTokenValuator) public whenNotPaused onlyOwner { } function setMinCollateralization(uint newMinCollateralization) public whenNotPaused onlyOwner { } function setMinReserveRatio(uint newMinReserveRatio) public whenNotPaused onlyOwner { } function increaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function decreaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminWithdrawFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminDepositFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function getTotalCollateralization() public view returns (uint) { } function getActiveCollateralization() public view returns (uint) { } function getInterestRateByUnderlyingTokenAddress(address underlyingToken) public view returns (uint) { } function getInterestRateByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (uint) { } function getInterestRateByDmmTokenAddress(address dmmToken) public view returns (uint) { } function getExchangeRateByUnderlying(address underlyingToken) public view returns (uint) { } function getExchangeRate(address dmmToken) public view returns (uint) { } function getDmmTokenForUnderlying(address underlyingToken) public view returns (address) { } function getUnderlyingTokenForDmm(address dmmToken) public view returns (address) { } function isMarketEnabledByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (bool) { } function isMarketEnabledByDmmTokenAddress(address dmmToken) public view returns (bool) { } function getTokenIdFromDmmTokenAddress(address dmmToken) public view returns (uint) { } function getDmmTokenIds() public view returns (uint[] memory) { } /********************** * Private Functions */ function _addMarket(address dmmToken, address underlyingToken) private { } function getCollateralization(uint totalLiabilities, uint totalAssets) private view returns (uint) { } function getDmmSupplyValue(IDmmToken dmmToken, uint dmmSupply, uint currentExchangeRate) private view returns (uint) { } function getUnderlyingSupplyValue(IERC20 underlyingToken, uint underlyingSupply, uint8 decimals) private view returns (uint) { } }
dmmToken.isContract(),"DMM_TOKEN_IS_NOT_CONTRACT"
318,686
dmmToken.isContract()
"UNDERLYING_TOKEN_IS_NOT_CONTRACT"
pragma solidity ^0.5.0; contract DmmController is IPausable, Pausable, CommonConstants, IDmmController, Ownable { using SafeMath for uint; using SafeERC20 for IERC20; using Address for address; /******************************** * Events */ event InterestRateInterfaceChanged(address previousInterestRateInterface, address newInterestRateInterface); event OffChainAssetValuatorChanged(address previousOffChainAssetValuator, address newOffChainAssetValuator); event OffChainCurrencyValuatorChanged(address previousOffChainCurrencyValuator, address newOffChainCurrencyValuator); event UnderlyingTokenValuatorChanged(address previousUnderlyingTokenValuator, address newUnderlyingTokenValuator); event MarketAdded(uint indexed dmmTokenId, address indexed dmmToken, address indexed underlyingToken); event DisableMarket(uint indexed dmmTokenId); event EnableMarket(uint indexed dmmTokenId); event MinCollateralizationChanged(uint previousMinCollateralization, uint newMinCollateralization); event MinReserveRatioChanged(uint previousMinReserveRatio, uint newMinReserveRatio); /******************************** * Controller Fields */ DmmBlacklistable public dmmBlacklistable; InterestRateInterface public interestRateInterface; IOffChainCurrencyValuator public offChainCurrencyValuator; IOffChainAssetValuator public offChainAssetsValuator; IUnderlyingTokenValuator public underlyingTokenValuator; IDmmTokenFactory public dmmTokenFactory; IDmmTokenFactory public dmmEtherFactory; uint public minCollateralization; uint public minReserveRatio; address public wethToken; /******************************** * DMM Account Management */ mapping(uint => address) public dmmTokenIdToDmmTokenAddressMap; mapping(address => uint) public dmmTokenAddressToDmmTokenIdMap; mapping(address => uint) public underlyingTokenAddressToDmmTokenIdMap; mapping(uint => address) public dmmTokenIdToUnderlyingTokenAddressMap; mapping(uint => bool) public dmmTokenIdToIsDisabledMap; uint[] public dmmTokenIds; /******************************** * Constants */ uint public constant COLLATERALIZATION_BASE_RATE = 1e18; uint public constant INTEREST_RATE_BASE_RATE = 1e18; uint public constant MIN_RESERVE_RATIO_BASE_RATE = 1e18; constructor( address _interestRateInterface, address _offChainAssetsValuator, address _offChainCurrencyValuator, address _underlyingTokenValuator, address _dmmEtherFactory, address _dmmTokenFactory, address _dmmBlacklistable, uint _minCollateralization, uint _minReserveRatio, address _wethToken ) public { } /***************** * Modifiers */ modifier whenNotPaused() { } modifier whenPaused() { } modifier checkTokenExists(uint dmmTokenId) { } /********************** * Public Functions */ function transferOwnership(address newOwner) public onlyOwner { } function blacklistable() public view returns (Blacklistable) { } function addMarket( address underlyingToken, string memory symbol, string memory name, uint8 decimals, uint minMintAmount, uint minRedeemAmount, uint totalSupply ) public onlyOwner { } function addMarketFromExistingDmmToken( address dmmToken, address underlyingToken ) onlyOwner public { require(underlyingTokenAddressToDmmTokenIdMap[underlyingToken] == 0, "TOKEN_ALREADY_EXISTS"); require(dmmToken.isContract(), "DMM_TOKEN_IS_NOT_CONTRACT"); require(<FILL_ME>) require(Ownable(dmmToken).owner() == address(this), "INVALID_DMM_TOKEN_OWNERSHIP"); _addMarket(dmmToken, underlyingToken); } function transferOwnershipToNewController( address newController ) onlyOwner public { } function enableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function disableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function setInterestRateInterface(address newInterestRateInterface) public whenNotPaused onlyOwner { } function setOffChainAssetValuator(address newOffChainAssetValuator) public whenNotPaused onlyOwner { } function setOffChainCurrencyValuator(address newOffChainCurrencyValuator) public whenNotPaused onlyOwner { } function setUnderlyingTokenValuator(address newUnderlyingTokenValuator) public whenNotPaused onlyOwner { } function setMinCollateralization(uint newMinCollateralization) public whenNotPaused onlyOwner { } function setMinReserveRatio(uint newMinReserveRatio) public whenNotPaused onlyOwner { } function increaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function decreaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminWithdrawFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminDepositFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function getTotalCollateralization() public view returns (uint) { } function getActiveCollateralization() public view returns (uint) { } function getInterestRateByUnderlyingTokenAddress(address underlyingToken) public view returns (uint) { } function getInterestRateByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (uint) { } function getInterestRateByDmmTokenAddress(address dmmToken) public view returns (uint) { } function getExchangeRateByUnderlying(address underlyingToken) public view returns (uint) { } function getExchangeRate(address dmmToken) public view returns (uint) { } function getDmmTokenForUnderlying(address underlyingToken) public view returns (address) { } function getUnderlyingTokenForDmm(address dmmToken) public view returns (address) { } function isMarketEnabledByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (bool) { } function isMarketEnabledByDmmTokenAddress(address dmmToken) public view returns (bool) { } function getTokenIdFromDmmTokenAddress(address dmmToken) public view returns (uint) { } function getDmmTokenIds() public view returns (uint[] memory) { } /********************** * Private Functions */ function _addMarket(address dmmToken, address underlyingToken) private { } function getCollateralization(uint totalLiabilities, uint totalAssets) private view returns (uint) { } function getDmmSupplyValue(IDmmToken dmmToken, uint dmmSupply, uint currentExchangeRate) private view returns (uint) { } function getUnderlyingSupplyValue(IERC20 underlyingToken, uint underlyingSupply, uint8 decimals) private view returns (uint) { } }
underlyingToken.isContract(),"UNDERLYING_TOKEN_IS_NOT_CONTRACT"
318,686
underlyingToken.isContract()
"INVALID_DMM_TOKEN_OWNERSHIP"
pragma solidity ^0.5.0; contract DmmController is IPausable, Pausable, CommonConstants, IDmmController, Ownable { using SafeMath for uint; using SafeERC20 for IERC20; using Address for address; /******************************** * Events */ event InterestRateInterfaceChanged(address previousInterestRateInterface, address newInterestRateInterface); event OffChainAssetValuatorChanged(address previousOffChainAssetValuator, address newOffChainAssetValuator); event OffChainCurrencyValuatorChanged(address previousOffChainCurrencyValuator, address newOffChainCurrencyValuator); event UnderlyingTokenValuatorChanged(address previousUnderlyingTokenValuator, address newUnderlyingTokenValuator); event MarketAdded(uint indexed dmmTokenId, address indexed dmmToken, address indexed underlyingToken); event DisableMarket(uint indexed dmmTokenId); event EnableMarket(uint indexed dmmTokenId); event MinCollateralizationChanged(uint previousMinCollateralization, uint newMinCollateralization); event MinReserveRatioChanged(uint previousMinReserveRatio, uint newMinReserveRatio); /******************************** * Controller Fields */ DmmBlacklistable public dmmBlacklistable; InterestRateInterface public interestRateInterface; IOffChainCurrencyValuator public offChainCurrencyValuator; IOffChainAssetValuator public offChainAssetsValuator; IUnderlyingTokenValuator public underlyingTokenValuator; IDmmTokenFactory public dmmTokenFactory; IDmmTokenFactory public dmmEtherFactory; uint public minCollateralization; uint public minReserveRatio; address public wethToken; /******************************** * DMM Account Management */ mapping(uint => address) public dmmTokenIdToDmmTokenAddressMap; mapping(address => uint) public dmmTokenAddressToDmmTokenIdMap; mapping(address => uint) public underlyingTokenAddressToDmmTokenIdMap; mapping(uint => address) public dmmTokenIdToUnderlyingTokenAddressMap; mapping(uint => bool) public dmmTokenIdToIsDisabledMap; uint[] public dmmTokenIds; /******************************** * Constants */ uint public constant COLLATERALIZATION_BASE_RATE = 1e18; uint public constant INTEREST_RATE_BASE_RATE = 1e18; uint public constant MIN_RESERVE_RATIO_BASE_RATE = 1e18; constructor( address _interestRateInterface, address _offChainAssetsValuator, address _offChainCurrencyValuator, address _underlyingTokenValuator, address _dmmEtherFactory, address _dmmTokenFactory, address _dmmBlacklistable, uint _minCollateralization, uint _minReserveRatio, address _wethToken ) public { } /***************** * Modifiers */ modifier whenNotPaused() { } modifier whenPaused() { } modifier checkTokenExists(uint dmmTokenId) { } /********************** * Public Functions */ function transferOwnership(address newOwner) public onlyOwner { } function blacklistable() public view returns (Blacklistable) { } function addMarket( address underlyingToken, string memory symbol, string memory name, uint8 decimals, uint minMintAmount, uint minRedeemAmount, uint totalSupply ) public onlyOwner { } function addMarketFromExistingDmmToken( address dmmToken, address underlyingToken ) onlyOwner public { require(underlyingTokenAddressToDmmTokenIdMap[underlyingToken] == 0, "TOKEN_ALREADY_EXISTS"); require(dmmToken.isContract(), "DMM_TOKEN_IS_NOT_CONTRACT"); require(underlyingToken.isContract(), "UNDERLYING_TOKEN_IS_NOT_CONTRACT"); require(<FILL_ME>) _addMarket(dmmToken, underlyingToken); } function transferOwnershipToNewController( address newController ) onlyOwner public { } function enableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function disableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function setInterestRateInterface(address newInterestRateInterface) public whenNotPaused onlyOwner { } function setOffChainAssetValuator(address newOffChainAssetValuator) public whenNotPaused onlyOwner { } function setOffChainCurrencyValuator(address newOffChainCurrencyValuator) public whenNotPaused onlyOwner { } function setUnderlyingTokenValuator(address newUnderlyingTokenValuator) public whenNotPaused onlyOwner { } function setMinCollateralization(uint newMinCollateralization) public whenNotPaused onlyOwner { } function setMinReserveRatio(uint newMinReserveRatio) public whenNotPaused onlyOwner { } function increaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function decreaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminWithdrawFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminDepositFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function getTotalCollateralization() public view returns (uint) { } function getActiveCollateralization() public view returns (uint) { } function getInterestRateByUnderlyingTokenAddress(address underlyingToken) public view returns (uint) { } function getInterestRateByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (uint) { } function getInterestRateByDmmTokenAddress(address dmmToken) public view returns (uint) { } function getExchangeRateByUnderlying(address underlyingToken) public view returns (uint) { } function getExchangeRate(address dmmToken) public view returns (uint) { } function getDmmTokenForUnderlying(address underlyingToken) public view returns (address) { } function getUnderlyingTokenForDmm(address dmmToken) public view returns (address) { } function isMarketEnabledByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (bool) { } function isMarketEnabledByDmmTokenAddress(address dmmToken) public view returns (bool) { } function getTokenIdFromDmmTokenAddress(address dmmToken) public view returns (uint) { } function getDmmTokenIds() public view returns (uint[] memory) { } /********************** * Private Functions */ function _addMarket(address dmmToken, address underlyingToken) private { } function getCollateralization(uint totalLiabilities, uint totalAssets) private view returns (uint) { } function getDmmSupplyValue(IDmmToken dmmToken, uint dmmSupply, uint currentExchangeRate) private view returns (uint) { } function getUnderlyingSupplyValue(IERC20 underlyingToken, uint underlyingSupply, uint8 decimals) private view returns (uint) { } }
Ownable(dmmToken).owner()==address(this),"INVALID_DMM_TOKEN_OWNERSHIP"
318,686
Ownable(dmmToken).owner()==address(this)
"NEW_CONTROLLER_IS_NOT_CONTRACT"
pragma solidity ^0.5.0; contract DmmController is IPausable, Pausable, CommonConstants, IDmmController, Ownable { using SafeMath for uint; using SafeERC20 for IERC20; using Address for address; /******************************** * Events */ event InterestRateInterfaceChanged(address previousInterestRateInterface, address newInterestRateInterface); event OffChainAssetValuatorChanged(address previousOffChainAssetValuator, address newOffChainAssetValuator); event OffChainCurrencyValuatorChanged(address previousOffChainCurrencyValuator, address newOffChainCurrencyValuator); event UnderlyingTokenValuatorChanged(address previousUnderlyingTokenValuator, address newUnderlyingTokenValuator); event MarketAdded(uint indexed dmmTokenId, address indexed dmmToken, address indexed underlyingToken); event DisableMarket(uint indexed dmmTokenId); event EnableMarket(uint indexed dmmTokenId); event MinCollateralizationChanged(uint previousMinCollateralization, uint newMinCollateralization); event MinReserveRatioChanged(uint previousMinReserveRatio, uint newMinReserveRatio); /******************************** * Controller Fields */ DmmBlacklistable public dmmBlacklistable; InterestRateInterface public interestRateInterface; IOffChainCurrencyValuator public offChainCurrencyValuator; IOffChainAssetValuator public offChainAssetsValuator; IUnderlyingTokenValuator public underlyingTokenValuator; IDmmTokenFactory public dmmTokenFactory; IDmmTokenFactory public dmmEtherFactory; uint public minCollateralization; uint public minReserveRatio; address public wethToken; /******************************** * DMM Account Management */ mapping(uint => address) public dmmTokenIdToDmmTokenAddressMap; mapping(address => uint) public dmmTokenAddressToDmmTokenIdMap; mapping(address => uint) public underlyingTokenAddressToDmmTokenIdMap; mapping(uint => address) public dmmTokenIdToUnderlyingTokenAddressMap; mapping(uint => bool) public dmmTokenIdToIsDisabledMap; uint[] public dmmTokenIds; /******************************** * Constants */ uint public constant COLLATERALIZATION_BASE_RATE = 1e18; uint public constant INTEREST_RATE_BASE_RATE = 1e18; uint public constant MIN_RESERVE_RATIO_BASE_RATE = 1e18; constructor( address _interestRateInterface, address _offChainAssetsValuator, address _offChainCurrencyValuator, address _underlyingTokenValuator, address _dmmEtherFactory, address _dmmTokenFactory, address _dmmBlacklistable, uint _minCollateralization, uint _minReserveRatio, address _wethToken ) public { } /***************** * Modifiers */ modifier whenNotPaused() { } modifier whenPaused() { } modifier checkTokenExists(uint dmmTokenId) { } /********************** * Public Functions */ function transferOwnership(address newOwner) public onlyOwner { } function blacklistable() public view returns (Blacklistable) { } function addMarket( address underlyingToken, string memory symbol, string memory name, uint8 decimals, uint minMintAmount, uint minRedeemAmount, uint totalSupply ) public onlyOwner { } function addMarketFromExistingDmmToken( address dmmToken, address underlyingToken ) onlyOwner public { } function transferOwnershipToNewController( address newController ) onlyOwner public { require(<FILL_ME>) // All of the following contracts are owned by the controller. All other ownable contracts are owned by the // same owner as this controller. for (uint i = 0; i < dmmTokenIds.length; i++) { address dmmToken = dmmTokenIdToDmmTokenAddressMap[dmmTokenIds[i]]; Ownable(dmmToken).transferOwnership(newController); } Ownable(address(dmmEtherFactory)).transferOwnership(newController); Ownable(address(dmmTokenFactory)).transferOwnership(newController); } function enableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function disableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function setInterestRateInterface(address newInterestRateInterface) public whenNotPaused onlyOwner { } function setOffChainAssetValuator(address newOffChainAssetValuator) public whenNotPaused onlyOwner { } function setOffChainCurrencyValuator(address newOffChainCurrencyValuator) public whenNotPaused onlyOwner { } function setUnderlyingTokenValuator(address newUnderlyingTokenValuator) public whenNotPaused onlyOwner { } function setMinCollateralization(uint newMinCollateralization) public whenNotPaused onlyOwner { } function setMinReserveRatio(uint newMinReserveRatio) public whenNotPaused onlyOwner { } function increaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function decreaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminWithdrawFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminDepositFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function getTotalCollateralization() public view returns (uint) { } function getActiveCollateralization() public view returns (uint) { } function getInterestRateByUnderlyingTokenAddress(address underlyingToken) public view returns (uint) { } function getInterestRateByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (uint) { } function getInterestRateByDmmTokenAddress(address dmmToken) public view returns (uint) { } function getExchangeRateByUnderlying(address underlyingToken) public view returns (uint) { } function getExchangeRate(address dmmToken) public view returns (uint) { } function getDmmTokenForUnderlying(address underlyingToken) public view returns (address) { } function getUnderlyingTokenForDmm(address dmmToken) public view returns (address) { } function isMarketEnabledByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (bool) { } function isMarketEnabledByDmmTokenAddress(address dmmToken) public view returns (bool) { } function getTokenIdFromDmmTokenAddress(address dmmToken) public view returns (uint) { } function getDmmTokenIds() public view returns (uint[] memory) { } /********************** * Private Functions */ function _addMarket(address dmmToken, address underlyingToken) private { } function getCollateralization(uint totalLiabilities, uint totalAssets) private view returns (uint) { } function getDmmSupplyValue(IDmmToken dmmToken, uint dmmSupply, uint currentExchangeRate) private view returns (uint) { } function getUnderlyingSupplyValue(IERC20 underlyingToken, uint underlyingSupply, uint8 decimals) private view returns (uint) { } }
newController.isContract(),"NEW_CONTROLLER_IS_NOT_CONTRACT"
318,686
newController.isContract()
"MARKET_ALREADY_ENABLED"
pragma solidity ^0.5.0; contract DmmController is IPausable, Pausable, CommonConstants, IDmmController, Ownable { using SafeMath for uint; using SafeERC20 for IERC20; using Address for address; /******************************** * Events */ event InterestRateInterfaceChanged(address previousInterestRateInterface, address newInterestRateInterface); event OffChainAssetValuatorChanged(address previousOffChainAssetValuator, address newOffChainAssetValuator); event OffChainCurrencyValuatorChanged(address previousOffChainCurrencyValuator, address newOffChainCurrencyValuator); event UnderlyingTokenValuatorChanged(address previousUnderlyingTokenValuator, address newUnderlyingTokenValuator); event MarketAdded(uint indexed dmmTokenId, address indexed dmmToken, address indexed underlyingToken); event DisableMarket(uint indexed dmmTokenId); event EnableMarket(uint indexed dmmTokenId); event MinCollateralizationChanged(uint previousMinCollateralization, uint newMinCollateralization); event MinReserveRatioChanged(uint previousMinReserveRatio, uint newMinReserveRatio); /******************************** * Controller Fields */ DmmBlacklistable public dmmBlacklistable; InterestRateInterface public interestRateInterface; IOffChainCurrencyValuator public offChainCurrencyValuator; IOffChainAssetValuator public offChainAssetsValuator; IUnderlyingTokenValuator public underlyingTokenValuator; IDmmTokenFactory public dmmTokenFactory; IDmmTokenFactory public dmmEtherFactory; uint public minCollateralization; uint public minReserveRatio; address public wethToken; /******************************** * DMM Account Management */ mapping(uint => address) public dmmTokenIdToDmmTokenAddressMap; mapping(address => uint) public dmmTokenAddressToDmmTokenIdMap; mapping(address => uint) public underlyingTokenAddressToDmmTokenIdMap; mapping(uint => address) public dmmTokenIdToUnderlyingTokenAddressMap; mapping(uint => bool) public dmmTokenIdToIsDisabledMap; uint[] public dmmTokenIds; /******************************** * Constants */ uint public constant COLLATERALIZATION_BASE_RATE = 1e18; uint public constant INTEREST_RATE_BASE_RATE = 1e18; uint public constant MIN_RESERVE_RATIO_BASE_RATE = 1e18; constructor( address _interestRateInterface, address _offChainAssetsValuator, address _offChainCurrencyValuator, address _underlyingTokenValuator, address _dmmEtherFactory, address _dmmTokenFactory, address _dmmBlacklistable, uint _minCollateralization, uint _minReserveRatio, address _wethToken ) public { } /***************** * Modifiers */ modifier whenNotPaused() { } modifier whenPaused() { } modifier checkTokenExists(uint dmmTokenId) { } /********************** * Public Functions */ function transferOwnership(address newOwner) public onlyOwner { } function blacklistable() public view returns (Blacklistable) { } function addMarket( address underlyingToken, string memory symbol, string memory name, uint8 decimals, uint minMintAmount, uint minRedeemAmount, uint totalSupply ) public onlyOwner { } function addMarketFromExistingDmmToken( address dmmToken, address underlyingToken ) onlyOwner public { } function transferOwnershipToNewController( address newController ) onlyOwner public { } function enableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { require(<FILL_ME>) dmmTokenIdToIsDisabledMap[dmmTokenId] = false; emit EnableMarket(dmmTokenId); } function disableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function setInterestRateInterface(address newInterestRateInterface) public whenNotPaused onlyOwner { } function setOffChainAssetValuator(address newOffChainAssetValuator) public whenNotPaused onlyOwner { } function setOffChainCurrencyValuator(address newOffChainCurrencyValuator) public whenNotPaused onlyOwner { } function setUnderlyingTokenValuator(address newUnderlyingTokenValuator) public whenNotPaused onlyOwner { } function setMinCollateralization(uint newMinCollateralization) public whenNotPaused onlyOwner { } function setMinReserveRatio(uint newMinReserveRatio) public whenNotPaused onlyOwner { } function increaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function decreaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminWithdrawFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminDepositFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function getTotalCollateralization() public view returns (uint) { } function getActiveCollateralization() public view returns (uint) { } function getInterestRateByUnderlyingTokenAddress(address underlyingToken) public view returns (uint) { } function getInterestRateByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (uint) { } function getInterestRateByDmmTokenAddress(address dmmToken) public view returns (uint) { } function getExchangeRateByUnderlying(address underlyingToken) public view returns (uint) { } function getExchangeRate(address dmmToken) public view returns (uint) { } function getDmmTokenForUnderlying(address underlyingToken) public view returns (address) { } function getUnderlyingTokenForDmm(address dmmToken) public view returns (address) { } function isMarketEnabledByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (bool) { } function isMarketEnabledByDmmTokenAddress(address dmmToken) public view returns (bool) { } function getTokenIdFromDmmTokenAddress(address dmmToken) public view returns (uint) { } function getDmmTokenIds() public view returns (uint[] memory) { } /********************** * Private Functions */ function _addMarket(address dmmToken, address underlyingToken) private { } function getCollateralization(uint totalLiabilities, uint totalAssets) private view returns (uint) { } function getDmmSupplyValue(IDmmToken dmmToken, uint dmmSupply, uint currentExchangeRate) private view returns (uint) { } function getUnderlyingSupplyValue(IERC20 underlyingToken, uint underlyingSupply, uint8 decimals) private view returns (uint) { } }
dmmTokenIdToIsDisabledMap[dmmTokenId],"MARKET_ALREADY_ENABLED"
318,686
dmmTokenIdToIsDisabledMap[dmmTokenId]
"MARKET_ALREADY_DISABLED"
pragma solidity ^0.5.0; contract DmmController is IPausable, Pausable, CommonConstants, IDmmController, Ownable { using SafeMath for uint; using SafeERC20 for IERC20; using Address for address; /******************************** * Events */ event InterestRateInterfaceChanged(address previousInterestRateInterface, address newInterestRateInterface); event OffChainAssetValuatorChanged(address previousOffChainAssetValuator, address newOffChainAssetValuator); event OffChainCurrencyValuatorChanged(address previousOffChainCurrencyValuator, address newOffChainCurrencyValuator); event UnderlyingTokenValuatorChanged(address previousUnderlyingTokenValuator, address newUnderlyingTokenValuator); event MarketAdded(uint indexed dmmTokenId, address indexed dmmToken, address indexed underlyingToken); event DisableMarket(uint indexed dmmTokenId); event EnableMarket(uint indexed dmmTokenId); event MinCollateralizationChanged(uint previousMinCollateralization, uint newMinCollateralization); event MinReserveRatioChanged(uint previousMinReserveRatio, uint newMinReserveRatio); /******************************** * Controller Fields */ DmmBlacklistable public dmmBlacklistable; InterestRateInterface public interestRateInterface; IOffChainCurrencyValuator public offChainCurrencyValuator; IOffChainAssetValuator public offChainAssetsValuator; IUnderlyingTokenValuator public underlyingTokenValuator; IDmmTokenFactory public dmmTokenFactory; IDmmTokenFactory public dmmEtherFactory; uint public minCollateralization; uint public minReserveRatio; address public wethToken; /******************************** * DMM Account Management */ mapping(uint => address) public dmmTokenIdToDmmTokenAddressMap; mapping(address => uint) public dmmTokenAddressToDmmTokenIdMap; mapping(address => uint) public underlyingTokenAddressToDmmTokenIdMap; mapping(uint => address) public dmmTokenIdToUnderlyingTokenAddressMap; mapping(uint => bool) public dmmTokenIdToIsDisabledMap; uint[] public dmmTokenIds; /******************************** * Constants */ uint public constant COLLATERALIZATION_BASE_RATE = 1e18; uint public constant INTEREST_RATE_BASE_RATE = 1e18; uint public constant MIN_RESERVE_RATIO_BASE_RATE = 1e18; constructor( address _interestRateInterface, address _offChainAssetsValuator, address _offChainCurrencyValuator, address _underlyingTokenValuator, address _dmmEtherFactory, address _dmmTokenFactory, address _dmmBlacklistable, uint _minCollateralization, uint _minReserveRatio, address _wethToken ) public { } /***************** * Modifiers */ modifier whenNotPaused() { } modifier whenPaused() { } modifier checkTokenExists(uint dmmTokenId) { } /********************** * Public Functions */ function transferOwnership(address newOwner) public onlyOwner { } function blacklistable() public view returns (Blacklistable) { } function addMarket( address underlyingToken, string memory symbol, string memory name, uint8 decimals, uint minMintAmount, uint minRedeemAmount, uint totalSupply ) public onlyOwner { } function addMarketFromExistingDmmToken( address dmmToken, address underlyingToken ) onlyOwner public { } function transferOwnershipToNewController( address newController ) onlyOwner public { } function enableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function disableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { require(<FILL_ME>) dmmTokenIdToIsDisabledMap[dmmTokenId] = true; emit DisableMarket(dmmTokenId); } function setInterestRateInterface(address newInterestRateInterface) public whenNotPaused onlyOwner { } function setOffChainAssetValuator(address newOffChainAssetValuator) public whenNotPaused onlyOwner { } function setOffChainCurrencyValuator(address newOffChainCurrencyValuator) public whenNotPaused onlyOwner { } function setUnderlyingTokenValuator(address newUnderlyingTokenValuator) public whenNotPaused onlyOwner { } function setMinCollateralization(uint newMinCollateralization) public whenNotPaused onlyOwner { } function setMinReserveRatio(uint newMinReserveRatio) public whenNotPaused onlyOwner { } function increaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function decreaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminWithdrawFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminDepositFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function getTotalCollateralization() public view returns (uint) { } function getActiveCollateralization() public view returns (uint) { } function getInterestRateByUnderlyingTokenAddress(address underlyingToken) public view returns (uint) { } function getInterestRateByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (uint) { } function getInterestRateByDmmTokenAddress(address dmmToken) public view returns (uint) { } function getExchangeRateByUnderlying(address underlyingToken) public view returns (uint) { } function getExchangeRate(address dmmToken) public view returns (uint) { } function getDmmTokenForUnderlying(address underlyingToken) public view returns (address) { } function getUnderlyingTokenForDmm(address dmmToken) public view returns (address) { } function isMarketEnabledByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (bool) { } function isMarketEnabledByDmmTokenAddress(address dmmToken) public view returns (bool) { } function getTokenIdFromDmmTokenAddress(address dmmToken) public view returns (uint) { } function getDmmTokenIds() public view returns (uint[] memory) { } /********************** * Private Functions */ function _addMarket(address dmmToken, address underlyingToken) private { } function getCollateralization(uint totalLiabilities, uint totalAssets) private view returns (uint) { } function getDmmSupplyValue(IDmmToken dmmToken, uint dmmSupply, uint currentExchangeRate) private view returns (uint) { } function getUnderlyingSupplyValue(IERC20 underlyingToken, uint underlyingSupply, uint8 decimals) private view returns (uint) { } }
!dmmTokenIdToIsDisabledMap[dmmTokenId],"MARKET_ALREADY_DISABLED"
318,686
!dmmTokenIdToIsDisabledMap[dmmTokenId]
"INSUFFICIENT_COLLATERAL"
pragma solidity ^0.5.0; contract DmmController is IPausable, Pausable, CommonConstants, IDmmController, Ownable { using SafeMath for uint; using SafeERC20 for IERC20; using Address for address; /******************************** * Events */ event InterestRateInterfaceChanged(address previousInterestRateInterface, address newInterestRateInterface); event OffChainAssetValuatorChanged(address previousOffChainAssetValuator, address newOffChainAssetValuator); event OffChainCurrencyValuatorChanged(address previousOffChainCurrencyValuator, address newOffChainCurrencyValuator); event UnderlyingTokenValuatorChanged(address previousUnderlyingTokenValuator, address newUnderlyingTokenValuator); event MarketAdded(uint indexed dmmTokenId, address indexed dmmToken, address indexed underlyingToken); event DisableMarket(uint indexed dmmTokenId); event EnableMarket(uint indexed dmmTokenId); event MinCollateralizationChanged(uint previousMinCollateralization, uint newMinCollateralization); event MinReserveRatioChanged(uint previousMinReserveRatio, uint newMinReserveRatio); /******************************** * Controller Fields */ DmmBlacklistable public dmmBlacklistable; InterestRateInterface public interestRateInterface; IOffChainCurrencyValuator public offChainCurrencyValuator; IOffChainAssetValuator public offChainAssetsValuator; IUnderlyingTokenValuator public underlyingTokenValuator; IDmmTokenFactory public dmmTokenFactory; IDmmTokenFactory public dmmEtherFactory; uint public minCollateralization; uint public minReserveRatio; address public wethToken; /******************************** * DMM Account Management */ mapping(uint => address) public dmmTokenIdToDmmTokenAddressMap; mapping(address => uint) public dmmTokenAddressToDmmTokenIdMap; mapping(address => uint) public underlyingTokenAddressToDmmTokenIdMap; mapping(uint => address) public dmmTokenIdToUnderlyingTokenAddressMap; mapping(uint => bool) public dmmTokenIdToIsDisabledMap; uint[] public dmmTokenIds; /******************************** * Constants */ uint public constant COLLATERALIZATION_BASE_RATE = 1e18; uint public constant INTEREST_RATE_BASE_RATE = 1e18; uint public constant MIN_RESERVE_RATIO_BASE_RATE = 1e18; constructor( address _interestRateInterface, address _offChainAssetsValuator, address _offChainCurrencyValuator, address _underlyingTokenValuator, address _dmmEtherFactory, address _dmmTokenFactory, address _dmmBlacklistable, uint _minCollateralization, uint _minReserveRatio, address _wethToken ) public { } /***************** * Modifiers */ modifier whenNotPaused() { } modifier whenPaused() { } modifier checkTokenExists(uint dmmTokenId) { } /********************** * Public Functions */ function transferOwnership(address newOwner) public onlyOwner { } function blacklistable() public view returns (Blacklistable) { } function addMarket( address underlyingToken, string memory symbol, string memory name, uint8 decimals, uint minMintAmount, uint minRedeemAmount, uint totalSupply ) public onlyOwner { } function addMarketFromExistingDmmToken( address dmmToken, address underlyingToken ) onlyOwner public { } function transferOwnershipToNewController( address newController ) onlyOwner public { } function enableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function disableMarket(uint dmmTokenId) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function setInterestRateInterface(address newInterestRateInterface) public whenNotPaused onlyOwner { } function setOffChainAssetValuator(address newOffChainAssetValuator) public whenNotPaused onlyOwner { } function setOffChainCurrencyValuator(address newOffChainCurrencyValuator) public whenNotPaused onlyOwner { } function setUnderlyingTokenValuator(address newUnderlyingTokenValuator) public whenNotPaused onlyOwner { } function setMinCollateralization(uint newMinCollateralization) public whenNotPaused onlyOwner { } function setMinReserveRatio(uint newMinReserveRatio) public whenNotPaused onlyOwner { } function increaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { IDmmToken(dmmTokenIdToDmmTokenAddressMap[dmmTokenId]).increaseTotalSupply(amount); require(<FILL_ME>) } function decreaseTotalSupply( uint dmmTokenId, uint amount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminWithdrawFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function adminDepositFunds( uint dmmTokenId, uint underlyingAmount ) public checkTokenExists(dmmTokenId) whenNotPaused onlyOwner { } function getTotalCollateralization() public view returns (uint) { } function getActiveCollateralization() public view returns (uint) { } function getInterestRateByUnderlyingTokenAddress(address underlyingToken) public view returns (uint) { } function getInterestRateByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (uint) { } function getInterestRateByDmmTokenAddress(address dmmToken) public view returns (uint) { } function getExchangeRateByUnderlying(address underlyingToken) public view returns (uint) { } function getExchangeRate(address dmmToken) public view returns (uint) { } function getDmmTokenForUnderlying(address underlyingToken) public view returns (address) { } function getUnderlyingTokenForDmm(address dmmToken) public view returns (address) { } function isMarketEnabledByDmmTokenId(uint dmmTokenId) checkTokenExists(dmmTokenId) public view returns (bool) { } function isMarketEnabledByDmmTokenAddress(address dmmToken) public view returns (bool) { } function getTokenIdFromDmmTokenAddress(address dmmToken) public view returns (uint) { } function getDmmTokenIds() public view returns (uint[] memory) { } /********************** * Private Functions */ function _addMarket(address dmmToken, address underlyingToken) private { } function getCollateralization(uint totalLiabilities, uint totalAssets) private view returns (uint) { } function getDmmSupplyValue(IDmmToken dmmToken, uint dmmSupply, uint currentExchangeRate) private view returns (uint) { } function getUnderlyingSupplyValue(IERC20 underlyingToken, uint underlyingSupply, uint8 decimals) private view returns (uint) { } }
getTotalCollateralization()>=minCollateralization,"INSUFFICIENT_COLLATERAL"
318,686
getTotalCollateralization()>=minCollateralization
null
/** * Edgeless Casino Proxy Contract. Serves as a proxy for game functionality. * Allows the players to deposit and withdraw funds. * Allows authorized addresses to make game transactions. * author: Julia Altenried **/ pragma solidity ^0.4.17; contract token { function transferFrom(address sender, address receiver, uint amount) public returns(bool success) {} function transfer(address receiver, uint amount) public returns(bool success) {} function balanceOf(address holder) public constant returns(uint) {} } contract owned { address public owner; modifier onlyOwner { } function owned() public{ } function changeOwner(address newOwner) onlyOwner public{ } } contract safeMath { //internals function safeSub(uint a, uint b) constant internal returns(uint) { } function safeAdd(uint a, uint b) constant internal returns(uint) { } function safeMul(uint a, uint b) constant internal returns (uint) { } } contract casinoBank is owned, safeMath{ /** the total balance of all players with 4 virtual decimals **/ uint public playerBalance; /** the balance per player in edgeless tokens with 4 virtual decimals */ mapping(address=>uint) public balanceOf; /** in case the user wants/needs to call the withdraw function from his own wallet, he first needs to request a withdrawal */ mapping(address=>uint) public withdrawAfter; /** the price per kgas in tokens (4 decimals) */ uint public gasPrice = 20; /** the edgeless token contract */ token edg; /** owner should be able to close the contract is nobody has been using it for at least 30 days */ uint public closeAt; /** informs listeners how many tokens were deposited for a player */ event Deposit(address _player, uint _numTokens, bool _chargeGas); /** informs listeners how many tokens were withdrawn from the player to the receiver address */ event Withdrawal(address _player, address _receiver, uint _numTokens); function casinoBank(address tokenContract) public{ } /** * accepts deposits for an arbitrary address. * retrieves tokens from the message sender and adds them to the balance of the specified address. * edgeless tokens do not have any decimals, but are represented on this contract with 4 decimals. * @param receiver address of the receiver * numTokens number of tokens to deposit (0 decimals) * chargeGas indicates if the gas cost is subtracted from the user's edgeless token balance **/ function deposit(address receiver, uint numTokens, bool chargeGas) public isAlive{ } /** * If the user wants/needs to withdraw his funds himself, he needs to request the withdrawal first. * This method sets the earliest possible withdrawal date to 7 minutes from now. * Reason: The user should not be able to withdraw his funds, while the the last game methods have not yet been mined. **/ function requestWithdrawal() public{ } /** * In case the user requested a withdrawal and changes his mind. * Necessary to be able to continue playing. **/ function cancelWithdrawalRequest() public{ } /** * withdraws an amount from the user balance if 7 minutes passed since the request. * @param amount the amount of tokens to withdraw **/ function withdraw(uint amount) public keepAlive{ require(<FILL_ME>) withdrawAfter[msg.sender] = 0; uint value = safeMul(amount,10000); balanceOf[msg.sender]=safeSub(balanceOf[msg.sender],value); playerBalance = safeSub(playerBalance, value); assert(edg.transfer(msg.sender, amount)); Withdrawal(msg.sender, msg.sender, amount); } /** * lets the owner withdraw from the bankroll * @param numTokens the number of tokens to withdraw (0 decimals) **/ function withdrawBankroll(uint numTokens) public onlyOwner { } /** * returns the current bankroll in tokens with 0 decimals **/ function bankroll() constant public returns(uint){ } /** * lets the owner close the contract if there are no player funds on it or if nobody has been using it for at least 30 days */ function close() onlyOwner public{ } /** * in case close has been called accidentally. **/ function open() onlyOwner public{ } /** * make sure the contract is not in process of being closed. **/ modifier isAlive { } /** * delays the time of closing. **/ modifier keepAlive { } } contract casinoProxy is casinoBank{ /** indicates if an address is authorized to call game functions */ mapping(address => bool) public authorized; /** indicates if the user allowed a casino game address to move his/her funds **/ mapping(address => mapping(address => bool)) public authorizedByUser; /** counts how often an address has been deauthorized by the user => make sure signatzures can't be reused**/ mapping(address => mapping(address => uint8)) public lockedByUser; /** list of casino game contract addresses */ address[] public casinoGames; /** a number to count withdrawal signatures to ensure each signature is different even if withdrawing the same amount to the same address */ mapping(address => uint) public count; modifier onlyAuthorized { } modifier onlyCasinoGames { } /** * creates a new casino wallet. * @param authorizedAddress the address which may send transactions to the Edgeless Casino * blackjackAddress the address of the Edgeless blackjack contract * tokenContract the address of the Edgeless token contract **/ function casinoProxy(address authorizedAddress, address blackjackAddress, address tokenContract) casinoBank(tokenContract) public{ } /** * shifts tokens from the contract balance to the player or the other way round. * only callable from an edgeless casino contract. sender must have been approved by the user. * @param player the address of the player * numTokens the amount of tokens to shift with 4 decimals * isReceiver tells if the player is receiving token or the other way round **/ function shift(address player, uint numTokens, bool isReceiver) public onlyCasinoGames{ } /** * transfers an amount from the contract balance to the owner's wallet. * @param receiver the receiver address * amount the amount of tokens to withdraw (0 decimals) * v,r,s the signature of the player **/ function withdrawFor(address receiver, uint amount, uint8 v, bytes32 r, bytes32 s) public onlyAuthorized keepAlive{ } /** * update a casino game address in case of a new contract or a new casino game * @param game the index of the game * newAddress the new address of the game **/ function setGameAddress(uint8 game, address newAddress) public onlyOwner{ } /** * authorize a address to call game functions. * @param addr the address to be authorized **/ function authorize(address addr) public onlyOwner{ } /** * deauthorize a address to call game functions. * @param addr the address to be deauthorized **/ function deauthorize(address addr) public onlyOwner{ } /** * authorize a casino contract address to access the funds * @param casinoAddress the address of the casino contract * v, r, s the player's signature of the casino address, the number of times the address has already been locked * and a bool stating if the signature is meant for authourization (true) or deauthorization (false) * */ function authorizeCasino(address playerAddress, address casinoAddress, uint8 v, bytes32 r, bytes32 s) public{ } /** * deauthorize a casino contract address to access the funds * @param casinoAddress the address of the casino contract * v, r, s the player's signature of the casino address, the number of times the address has already been locked * and a bool stating if the signature is meant for authourization (true) or deauthorization (false) * */ function deauthorizeCasino(address playerAddress, address casinoAddress, uint8 v, bytes32 r, bytes32 s) public{ } /** * updates the price per 1000 gas in EDG. * @param price the new gas price (4 decimals, max 0.0256 EDG) **/ function setGasPrice(uint8 price) public onlyOwner{ } /** * Forwards a move to the corresponding game contract if the data has been signed by the client. * The casino contract ensures it is no duplicate move. * @param game specifies which game contract to call * data the function call * v,r,s the player's signature of the data **/ function move(uint8 game, bytes data, uint8 v, bytes32 r, bytes32 s) public onlyAuthorized isAlive{ } /** * checks if the given address is passed as first parameters in the bytes field * @param player the player address * data the function call * */ function checkAddress(address player, bytes data) constant internal returns(bool){ } }
withdrawAfter[msg.sender]>0&&now>withdrawAfter[msg.sender]
318,733
withdrawAfter[msg.sender]>0&&now>withdrawAfter[msg.sender]
null
/** * Edgeless Casino Proxy Contract. Serves as a proxy for game functionality. * Allows the players to deposit and withdraw funds. * Allows authorized addresses to make game transactions. * author: Julia Altenried **/ pragma solidity ^0.4.17; contract token { function transferFrom(address sender, address receiver, uint amount) public returns(bool success) {} function transfer(address receiver, uint amount) public returns(bool success) {} function balanceOf(address holder) public constant returns(uint) {} } contract owned { address public owner; modifier onlyOwner { } function owned() public{ } function changeOwner(address newOwner) onlyOwner public{ } } contract safeMath { //internals function safeSub(uint a, uint b) constant internal returns(uint) { } function safeAdd(uint a, uint b) constant internal returns(uint) { } function safeMul(uint a, uint b) constant internal returns (uint) { } } contract casinoBank is owned, safeMath{ /** the total balance of all players with 4 virtual decimals **/ uint public playerBalance; /** the balance per player in edgeless tokens with 4 virtual decimals */ mapping(address=>uint) public balanceOf; /** in case the user wants/needs to call the withdraw function from his own wallet, he first needs to request a withdrawal */ mapping(address=>uint) public withdrawAfter; /** the price per kgas in tokens (4 decimals) */ uint public gasPrice = 20; /** the edgeless token contract */ token edg; /** owner should be able to close the contract is nobody has been using it for at least 30 days */ uint public closeAt; /** informs listeners how many tokens were deposited for a player */ event Deposit(address _player, uint _numTokens, bool _chargeGas); /** informs listeners how many tokens were withdrawn from the player to the receiver address */ event Withdrawal(address _player, address _receiver, uint _numTokens); function casinoBank(address tokenContract) public{ } /** * accepts deposits for an arbitrary address. * retrieves tokens from the message sender and adds them to the balance of the specified address. * edgeless tokens do not have any decimals, but are represented on this contract with 4 decimals. * @param receiver address of the receiver * numTokens number of tokens to deposit (0 decimals) * chargeGas indicates if the gas cost is subtracted from the user's edgeless token balance **/ function deposit(address receiver, uint numTokens, bool chargeGas) public isAlive{ } /** * If the user wants/needs to withdraw his funds himself, he needs to request the withdrawal first. * This method sets the earliest possible withdrawal date to 7 minutes from now. * Reason: The user should not be able to withdraw his funds, while the the last game methods have not yet been mined. **/ function requestWithdrawal() public{ } /** * In case the user requested a withdrawal and changes his mind. * Necessary to be able to continue playing. **/ function cancelWithdrawalRequest() public{ } /** * withdraws an amount from the user balance if 7 minutes passed since the request. * @param amount the amount of tokens to withdraw **/ function withdraw(uint amount) public keepAlive{ } /** * lets the owner withdraw from the bankroll * @param numTokens the number of tokens to withdraw (0 decimals) **/ function withdrawBankroll(uint numTokens) public onlyOwner { } /** * returns the current bankroll in tokens with 0 decimals **/ function bankroll() constant public returns(uint){ } /** * lets the owner close the contract if there are no player funds on it or if nobody has been using it for at least 30 days */ function close() onlyOwner public{ } /** * in case close has been called accidentally. **/ function open() onlyOwner public{ } /** * make sure the contract is not in process of being closed. **/ modifier isAlive { } /** * delays the time of closing. **/ modifier keepAlive { } } contract casinoProxy is casinoBank{ /** indicates if an address is authorized to call game functions */ mapping(address => bool) public authorized; /** indicates if the user allowed a casino game address to move his/her funds **/ mapping(address => mapping(address => bool)) public authorizedByUser; /** counts how often an address has been deauthorized by the user => make sure signatzures can't be reused**/ mapping(address => mapping(address => uint8)) public lockedByUser; /** list of casino game contract addresses */ address[] public casinoGames; /** a number to count withdrawal signatures to ensure each signature is different even if withdrawing the same amount to the same address */ mapping(address => uint) public count; modifier onlyAuthorized { } modifier onlyCasinoGames { } /** * creates a new casino wallet. * @param authorizedAddress the address which may send transactions to the Edgeless Casino * blackjackAddress the address of the Edgeless blackjack contract * tokenContract the address of the Edgeless token contract **/ function casinoProxy(address authorizedAddress, address blackjackAddress, address tokenContract) casinoBank(tokenContract) public{ } /** * shifts tokens from the contract balance to the player or the other way round. * only callable from an edgeless casino contract. sender must have been approved by the user. * @param player the address of the player * numTokens the amount of tokens to shift with 4 decimals * isReceiver tells if the player is receiving token or the other way round **/ function shift(address player, uint numTokens, bool isReceiver) public onlyCasinoGames{ require(<FILL_ME>) var gasCost = msg.gas/1000 * gasPrice;//at this point a good deal of the gas has already been consumend, maybe better to have fix price if(isReceiver){ numTokens = safeSub(numTokens, gasCost); balanceOf[player] = safeAdd(balanceOf[player], numTokens); playerBalance = safeAdd(playerBalance, numTokens); } else{ numTokens = safeAdd(numTokens, gasCost); balanceOf[player] = safeSub(balanceOf[player], numTokens); playerBalance = safeSub(playerBalance, numTokens); } } /** * transfers an amount from the contract balance to the owner's wallet. * @param receiver the receiver address * amount the amount of tokens to withdraw (0 decimals) * v,r,s the signature of the player **/ function withdrawFor(address receiver, uint amount, uint8 v, bytes32 r, bytes32 s) public onlyAuthorized keepAlive{ } /** * update a casino game address in case of a new contract or a new casino game * @param game the index of the game * newAddress the new address of the game **/ function setGameAddress(uint8 game, address newAddress) public onlyOwner{ } /** * authorize a address to call game functions. * @param addr the address to be authorized **/ function authorize(address addr) public onlyOwner{ } /** * deauthorize a address to call game functions. * @param addr the address to be deauthorized **/ function deauthorize(address addr) public onlyOwner{ } /** * authorize a casino contract address to access the funds * @param casinoAddress the address of the casino contract * v, r, s the player's signature of the casino address, the number of times the address has already been locked * and a bool stating if the signature is meant for authourization (true) or deauthorization (false) * */ function authorizeCasino(address playerAddress, address casinoAddress, uint8 v, bytes32 r, bytes32 s) public{ } /** * deauthorize a casino contract address to access the funds * @param casinoAddress the address of the casino contract * v, r, s the player's signature of the casino address, the number of times the address has already been locked * and a bool stating if the signature is meant for authourization (true) or deauthorization (false) * */ function deauthorizeCasino(address playerAddress, address casinoAddress, uint8 v, bytes32 r, bytes32 s) public{ } /** * updates the price per 1000 gas in EDG. * @param price the new gas price (4 decimals, max 0.0256 EDG) **/ function setGasPrice(uint8 price) public onlyOwner{ } /** * Forwards a move to the corresponding game contract if the data has been signed by the client. * The casino contract ensures it is no duplicate move. * @param game specifies which game contract to call * data the function call * v,r,s the player's signature of the data **/ function move(uint8 game, bytes data, uint8 v, bytes32 r, bytes32 s) public onlyAuthorized isAlive{ } /** * checks if the given address is passed as first parameters in the bytes field * @param player the player address * data the function call * */ function checkAddress(address player, bytes data) constant internal returns(bool){ } }
authorizedByUser[player][msg.sender]
318,733
authorizedByUser[player][msg.sender]
null
/** * Edgeless Casino Proxy Contract. Serves as a proxy for game functionality. * Allows the players to deposit and withdraw funds. * Allows authorized addresses to make game transactions. * author: Julia Altenried **/ pragma solidity ^0.4.17; contract token { function transferFrom(address sender, address receiver, uint amount) public returns(bool success) {} function transfer(address receiver, uint amount) public returns(bool success) {} function balanceOf(address holder) public constant returns(uint) {} } contract owned { address public owner; modifier onlyOwner { } function owned() public{ } function changeOwner(address newOwner) onlyOwner public{ } } contract safeMath { //internals function safeSub(uint a, uint b) constant internal returns(uint) { } function safeAdd(uint a, uint b) constant internal returns(uint) { } function safeMul(uint a, uint b) constant internal returns (uint) { } } contract casinoBank is owned, safeMath{ /** the total balance of all players with 4 virtual decimals **/ uint public playerBalance; /** the balance per player in edgeless tokens with 4 virtual decimals */ mapping(address=>uint) public balanceOf; /** in case the user wants/needs to call the withdraw function from his own wallet, he first needs to request a withdrawal */ mapping(address=>uint) public withdrawAfter; /** the price per kgas in tokens (4 decimals) */ uint public gasPrice = 20; /** the edgeless token contract */ token edg; /** owner should be able to close the contract is nobody has been using it for at least 30 days */ uint public closeAt; /** informs listeners how many tokens were deposited for a player */ event Deposit(address _player, uint _numTokens, bool _chargeGas); /** informs listeners how many tokens were withdrawn from the player to the receiver address */ event Withdrawal(address _player, address _receiver, uint _numTokens); function casinoBank(address tokenContract) public{ } /** * accepts deposits for an arbitrary address. * retrieves tokens from the message sender and adds them to the balance of the specified address. * edgeless tokens do not have any decimals, but are represented on this contract with 4 decimals. * @param receiver address of the receiver * numTokens number of tokens to deposit (0 decimals) * chargeGas indicates if the gas cost is subtracted from the user's edgeless token balance **/ function deposit(address receiver, uint numTokens, bool chargeGas) public isAlive{ } /** * If the user wants/needs to withdraw his funds himself, he needs to request the withdrawal first. * This method sets the earliest possible withdrawal date to 7 minutes from now. * Reason: The user should not be able to withdraw his funds, while the the last game methods have not yet been mined. **/ function requestWithdrawal() public{ } /** * In case the user requested a withdrawal and changes his mind. * Necessary to be able to continue playing. **/ function cancelWithdrawalRequest() public{ } /** * withdraws an amount from the user balance if 7 minutes passed since the request. * @param amount the amount of tokens to withdraw **/ function withdraw(uint amount) public keepAlive{ } /** * lets the owner withdraw from the bankroll * @param numTokens the number of tokens to withdraw (0 decimals) **/ function withdrawBankroll(uint numTokens) public onlyOwner { } /** * returns the current bankroll in tokens with 0 decimals **/ function bankroll() constant public returns(uint){ } /** * lets the owner close the contract if there are no player funds on it or if nobody has been using it for at least 30 days */ function close() onlyOwner public{ } /** * in case close has been called accidentally. **/ function open() onlyOwner public{ } /** * make sure the contract is not in process of being closed. **/ modifier isAlive { } /** * delays the time of closing. **/ modifier keepAlive { } } contract casinoProxy is casinoBank{ /** indicates if an address is authorized to call game functions */ mapping(address => bool) public authorized; /** indicates if the user allowed a casino game address to move his/her funds **/ mapping(address => mapping(address => bool)) public authorizedByUser; /** counts how often an address has been deauthorized by the user => make sure signatzures can't be reused**/ mapping(address => mapping(address => uint8)) public lockedByUser; /** list of casino game contract addresses */ address[] public casinoGames; /** a number to count withdrawal signatures to ensure each signature is different even if withdrawing the same amount to the same address */ mapping(address => uint) public count; modifier onlyAuthorized { } modifier onlyCasinoGames { } /** * creates a new casino wallet. * @param authorizedAddress the address which may send transactions to the Edgeless Casino * blackjackAddress the address of the Edgeless blackjack contract * tokenContract the address of the Edgeless token contract **/ function casinoProxy(address authorizedAddress, address blackjackAddress, address tokenContract) casinoBank(tokenContract) public{ } /** * shifts tokens from the contract balance to the player or the other way round. * only callable from an edgeless casino contract. sender must have been approved by the user. * @param player the address of the player * numTokens the amount of tokens to shift with 4 decimals * isReceiver tells if the player is receiving token or the other way round **/ function shift(address player, uint numTokens, bool isReceiver) public onlyCasinoGames{ } /** * transfers an amount from the contract balance to the owner's wallet. * @param receiver the receiver address * amount the amount of tokens to withdraw (0 decimals) * v,r,s the signature of the player **/ function withdrawFor(address receiver, uint amount, uint8 v, bytes32 r, bytes32 s) public onlyAuthorized keepAlive{ } /** * update a casino game address in case of a new contract or a new casino game * @param game the index of the game * newAddress the new address of the game **/ function setGameAddress(uint8 game, address newAddress) public onlyOwner{ } /** * authorize a address to call game functions. * @param addr the address to be authorized **/ function authorize(address addr) public onlyOwner{ } /** * deauthorize a address to call game functions. * @param addr the address to be deauthorized **/ function deauthorize(address addr) public onlyOwner{ } /** * authorize a casino contract address to access the funds * @param casinoAddress the address of the casino contract * v, r, s the player's signature of the casino address, the number of times the address has already been locked * and a bool stating if the signature is meant for authourization (true) or deauthorization (false) * */ function authorizeCasino(address playerAddress, address casinoAddress, uint8 v, bytes32 r, bytes32 s) public{ } /** * deauthorize a casino contract address to access the funds * @param casinoAddress the address of the casino contract * v, r, s the player's signature of the casino address, the number of times the address has already been locked * and a bool stating if the signature is meant for authourization (true) or deauthorization (false) * */ function deauthorizeCasino(address playerAddress, address casinoAddress, uint8 v, bytes32 r, bytes32 s) public{ } /** * updates the price per 1000 gas in EDG. * @param price the new gas price (4 decimals, max 0.0256 EDG) **/ function setGasPrice(uint8 price) public onlyOwner{ } /** * Forwards a move to the corresponding game contract if the data has been signed by the client. * The casino contract ensures it is no duplicate move. * @param game specifies which game contract to call * data the function call * v,r,s the player's signature of the data **/ function move(uint8 game, bytes data, uint8 v, bytes32 r, bytes32 s) public onlyAuthorized isAlive{ require(game < casinoGames.length); var player = ecrecover(keccak256(data), v, r, s); require(<FILL_ME>) assert(checkAddress(player, data)); assert(casinoGames[game].call(data)); } /** * checks if the given address is passed as first parameters in the bytes field * @param player the player address * data the function call * */ function checkAddress(address player, bytes data) constant internal returns(bool){ } }
withdrawAfter[player]==0||now<withdrawAfter[player]
318,733
withdrawAfter[player]==0||now<withdrawAfter[player]
null
pragma solidity ^0.4.21; interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } /// ERC20 contract interface With ERC23/ERC223 Extensions contract ERC20 { uint256 public totalSupply; // ERC223 and ERC20 functions and events function totalSupply() constant public returns (uint256 _supply); function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool ok); function transfer(address to, uint256 value, bytes data) public returns (bool ok); function name() constant public returns (string _name); function symbol() constant public returns (string _symbol); function decimals() constant public returns (uint8 _decimals); // ERC20 functions and events function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public constant returns (uint256 remaining); // ERC20 Event event Transfer(address indexed _from, address indexed _to, uint256 _value); event Transfer(address indexed from, address indexed to, uint256 value, bytes indexed data); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event FrozenFunds(address target, bool frozen); event Burn(address indexed from, uint256 value); } /// Include SafeMath Lib contract SafeMath { uint256 constant public MAX_UINT256 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; function safeAdd(uint256 x, uint256 y) pure internal returns (uint256 z) { } function safeSub(uint256 x, uint256 y) pure internal returns (uint256 z) { } function safeMul(uint256 x, uint256 y) pure internal returns (uint256 z) { } } /// Contract that is working with ERC223 tokens contract ContractReceiver { struct TKN { address sender; uint256 value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint256 _value, bytes _data) public pure { } function rewiewToken () public pure returns (address, uint, bytes, bytes4) { } } /// Realthium is an ERC20 token with ERC223 Extensions contract TokenRK50Z is ERC20, SafeMath { string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; address public owner; bool public SC_locked = false; bool public tokenCreated = false; uint public DateCreateToken; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) allowed; mapping(address => bool) public frozenAccount; mapping(address => bool) public SmartContract_Allowed; // Initialize // Constructor is called only once and can not be called again (Ethereum Solidity specification) function TokenRK50Z() public { // Security check in case EVM has future flaw or exploit to call constructor multiple times require(tokenCreated == false); owner = msg.sender; name = "RK50Z"; symbol = "RK50Z"; decimals = 5; totalSupply = 500000000 * 10 ** uint256(decimals); balances[owner] = totalSupply; emit Transfer(owner, owner, totalSupply); tokenCreated = true; // Final sanity check to ensure owner balance is greater than zero require(<FILL_ME>) // Date Deploy Contract DateCreateToken = now; } modifier onlyOwner() { } // Function to create date token. function DateCreateToken() public view returns (uint256 _DateCreateToken) { } // Function to access name of token . function name() view public returns (string _name) { } // Function to access symbol of token . function symbol() public view returns (string _symbol) { } // Function to access decimals of token . function decimals() public view returns (uint8 _decimals) { } // Function to access total supply of tokens . function totalSupply() public view returns (uint256 _totalSupply) { } // Get balance of the address provided function balanceOf(address _owner) constant public returns (uint256 balance) { } // Get Smart Contract of the address approved function SmartContract_Allowed(address _target) constant public returns (bool _sc_address_allowed) { } // Function that is called when a user or another contract wants to transfer funds . function transfer(address _to, uint256 _value, bytes _data) public returns (bool success) { } // Standard function transfer similar to ERC20 transfer with no _data . // Added due to backwards compatibility reasons . function transfer(address _to, uint256 _value) public returns (bool success) { } // assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private view returns (bool is_contract) { } // function that is called when transaction target is an address function transferToAddress(address _to, uint256 _value, bytes _data) private returns (bool success) { } // function that is called when transaction target is a contract function transferToContract(address _to, uint256 _value, bytes _data) private returns (bool success) { } // Allow transfers if the owner provided an allowance // Use SafeMath for the main logic function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } function approve(address _spender, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) constant public returns (uint256 remaining) { } /// Set allowance for other address and notify function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { } /// Function to activate Ether reception in the smart Contract address only by the Owner function () public payable { } // Creator/Owner can Locked/Unlock smart contract function OWN_contractlocked(bool _locked) onlyOwner public { } /// Destroy tokens amount from another account (Caution!!! the operation is destructive and you can not go back) function OWN_burnToken(address _from, uint256 _value) onlyOwner public returns (bool success) { } ///Generate other tokens after starting the program function OWN_mintToken(uint256 mintedAmount) onlyOwner public { } /// Block / Unlock address handling tokens function OWN_freezeAddress(address target, bool freeze) onlyOwner public { } /// Function to destroy the smart contract function OWN_kill() onlyOwner public { } /// Function Change Owner function OWN_transferOwnership(address newOwner) onlyOwner public { } /// Smart Contract approved function OWN_SmartContract_Allowed(address target, bool _allowed) onlyOwner public { } /// Distribution Token from Admin function OWN_DistributeTokenAdmin_Multi(address[] addresses, uint256 _value, bool freeze) onlyOwner public { } }
balances[owner]>0
318,766
balances[owner]>0
null
pragma solidity ^0.4.21; interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } /// ERC20 contract interface With ERC23/ERC223 Extensions contract ERC20 { uint256 public totalSupply; // ERC223 and ERC20 functions and events function totalSupply() constant public returns (uint256 _supply); function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool ok); function transfer(address to, uint256 value, bytes data) public returns (bool ok); function name() constant public returns (string _name); function symbol() constant public returns (string _symbol); function decimals() constant public returns (uint8 _decimals); // ERC20 functions and events function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public constant returns (uint256 remaining); // ERC20 Event event Transfer(address indexed _from, address indexed _to, uint256 _value); event Transfer(address indexed from, address indexed to, uint256 value, bytes indexed data); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event FrozenFunds(address target, bool frozen); event Burn(address indexed from, uint256 value); } /// Include SafeMath Lib contract SafeMath { uint256 constant public MAX_UINT256 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; function safeAdd(uint256 x, uint256 y) pure internal returns (uint256 z) { } function safeSub(uint256 x, uint256 y) pure internal returns (uint256 z) { } function safeMul(uint256 x, uint256 y) pure internal returns (uint256 z) { } } /// Contract that is working with ERC223 tokens contract ContractReceiver { struct TKN { address sender; uint256 value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint256 _value, bytes _data) public pure { } function rewiewToken () public pure returns (address, uint, bytes, bytes4) { } } /// Realthium is an ERC20 token with ERC223 Extensions contract TokenRK50Z is ERC20, SafeMath { string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; address public owner; bool public SC_locked = false; bool public tokenCreated = false; uint public DateCreateToken; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) allowed; mapping(address => bool) public frozenAccount; mapping(address => bool) public SmartContract_Allowed; // Initialize // Constructor is called only once and can not be called again (Ethereum Solidity specification) function TokenRK50Z() public { } modifier onlyOwner() { } // Function to create date token. function DateCreateToken() public view returns (uint256 _DateCreateToken) { } // Function to access name of token . function name() view public returns (string _name) { } // Function to access symbol of token . function symbol() public view returns (string _symbol) { } // Function to access decimals of token . function decimals() public view returns (uint8 _decimals) { } // Function to access total supply of tokens . function totalSupply() public view returns (uint256 _totalSupply) { } // Get balance of the address provided function balanceOf(address _owner) constant public returns (uint256 balance) { } // Get Smart Contract of the address approved function SmartContract_Allowed(address _target) constant public returns (bool _sc_address_allowed) { } // Function that is called when a user or another contract wants to transfer funds . function transfer(address _to, uint256 _value, bytes _data) public returns (bool success) { // Only allow transfer once Locked // Once it is Locked, it is Locked forever and no one can lock again require(<FILL_ME>) require(!frozenAccount[msg.sender]); require(!frozenAccount[_to]); if (isContract(_to)) { return transferToContract(_to, _value, _data); } else { return transferToAddress(_to, _value, _data); } } // Standard function transfer similar to ERC20 transfer with no _data . // Added due to backwards compatibility reasons . function transfer(address _to, uint256 _value) public returns (bool success) { } // assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private view returns (bool is_contract) { } // function that is called when transaction target is an address function transferToAddress(address _to, uint256 _value, bytes _data) private returns (bool success) { } // function that is called when transaction target is a contract function transferToContract(address _to, uint256 _value, bytes _data) private returns (bool success) { } // Allow transfers if the owner provided an allowance // Use SafeMath for the main logic function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } function approve(address _spender, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) constant public returns (uint256 remaining) { } /// Set allowance for other address and notify function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { } /// Function to activate Ether reception in the smart Contract address only by the Owner function () public payable { } // Creator/Owner can Locked/Unlock smart contract function OWN_contractlocked(bool _locked) onlyOwner public { } /// Destroy tokens amount from another account (Caution!!! the operation is destructive and you can not go back) function OWN_burnToken(address _from, uint256 _value) onlyOwner public returns (bool success) { } ///Generate other tokens after starting the program function OWN_mintToken(uint256 mintedAmount) onlyOwner public { } /// Block / Unlock address handling tokens function OWN_freezeAddress(address target, bool freeze) onlyOwner public { } /// Function to destroy the smart contract function OWN_kill() onlyOwner public { } /// Function Change Owner function OWN_transferOwnership(address newOwner) onlyOwner public { } /// Smart Contract approved function OWN_SmartContract_Allowed(address target, bool _allowed) onlyOwner public { } /// Distribution Token from Admin function OWN_DistributeTokenAdmin_Multi(address[] addresses, uint256 _value, bool freeze) onlyOwner public { } }
!SC_locked
318,766
!SC_locked
null
pragma solidity ^0.4.21; interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } /// ERC20 contract interface With ERC23/ERC223 Extensions contract ERC20 { uint256 public totalSupply; // ERC223 and ERC20 functions and events function totalSupply() constant public returns (uint256 _supply); function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool ok); function transfer(address to, uint256 value, bytes data) public returns (bool ok); function name() constant public returns (string _name); function symbol() constant public returns (string _symbol); function decimals() constant public returns (uint8 _decimals); // ERC20 functions and events function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public constant returns (uint256 remaining); // ERC20 Event event Transfer(address indexed _from, address indexed _to, uint256 _value); event Transfer(address indexed from, address indexed to, uint256 value, bytes indexed data); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event FrozenFunds(address target, bool frozen); event Burn(address indexed from, uint256 value); } /// Include SafeMath Lib contract SafeMath { uint256 constant public MAX_UINT256 = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; function safeAdd(uint256 x, uint256 y) pure internal returns (uint256 z) { } function safeSub(uint256 x, uint256 y) pure internal returns (uint256 z) { } function safeMul(uint256 x, uint256 y) pure internal returns (uint256 z) { } } /// Contract that is working with ERC223 tokens contract ContractReceiver { struct TKN { address sender; uint256 value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint256 _value, bytes _data) public pure { } function rewiewToken () public pure returns (address, uint, bytes, bytes4) { } } /// Realthium is an ERC20 token with ERC223 Extensions contract TokenRK50Z is ERC20, SafeMath { string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; address public owner; bool public SC_locked = false; bool public tokenCreated = false; uint public DateCreateToken; mapping(address => uint256) balances; mapping(address => mapping (address => uint256)) allowed; mapping(address => bool) public frozenAccount; mapping(address => bool) public SmartContract_Allowed; // Initialize // Constructor is called only once and can not be called again (Ethereum Solidity specification) function TokenRK50Z() public { } modifier onlyOwner() { } // Function to create date token. function DateCreateToken() public view returns (uint256 _DateCreateToken) { } // Function to access name of token . function name() view public returns (string _name) { } // Function to access symbol of token . function symbol() public view returns (string _symbol) { } // Function to access decimals of token . function decimals() public view returns (uint8 _decimals) { } // Function to access total supply of tokens . function totalSupply() public view returns (uint256 _totalSupply) { } // Get balance of the address provided function balanceOf(address _owner) constant public returns (uint256 balance) { } // Get Smart Contract of the address approved function SmartContract_Allowed(address _target) constant public returns (bool _sc_address_allowed) { } // Function that is called when a user or another contract wants to transfer funds . function transfer(address _to, uint256 _value, bytes _data) public returns (bool success) { } // Standard function transfer similar to ERC20 transfer with no _data . // Added due to backwards compatibility reasons . function transfer(address _to, uint256 _value) public returns (bool success) { } // assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private view returns (bool is_contract) { } // function that is called when transaction target is an address function transferToAddress(address _to, uint256 _value, bytes _data) private returns (bool success) { } // function that is called when transaction target is a contract function transferToContract(address _to, uint256 _value, bytes _data) private returns (bool success) { require(<FILL_ME>) if (balanceOf(msg.sender) < _value) revert(); balances[msg.sender] = safeSub(balanceOf(msg.sender), _value); balances[_to] = safeAdd(balanceOf(_to), _value); emit Transfer(msg.sender, _to, _value, _data); return true; } // Allow transfers if the owner provided an allowance // Use SafeMath for the main logic function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } function approve(address _spender, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) constant public returns (uint256 remaining) { } /// Set allowance for other address and notify function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { } /// Function to activate Ether reception in the smart Contract address only by the Owner function () public payable { } // Creator/Owner can Locked/Unlock smart contract function OWN_contractlocked(bool _locked) onlyOwner public { } /// Destroy tokens amount from another account (Caution!!! the operation is destructive and you can not go back) function OWN_burnToken(address _from, uint256 _value) onlyOwner public returns (bool success) { } ///Generate other tokens after starting the program function OWN_mintToken(uint256 mintedAmount) onlyOwner public { } /// Block / Unlock address handling tokens function OWN_freezeAddress(address target, bool freeze) onlyOwner public { } /// Function to destroy the smart contract function OWN_kill() onlyOwner public { } /// Function Change Owner function OWN_transferOwnership(address newOwner) onlyOwner public { } /// Smart Contract approved function OWN_SmartContract_Allowed(address target, bool _allowed) onlyOwner public { } /// Distribution Token from Admin function OWN_DistributeTokenAdmin_Multi(address[] addresses, uint256 _value, bool freeze) onlyOwner public { } }
SmartContract_Allowed[_to]
318,766
SmartContract_Allowed[_to]
"Transit: Insufficient balance of C8"
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.5.16; contract C8BridgeToBSC is Ownable { using SafeMath for uint; struct TxInfo { address from; address to; uint256 amount; } uint private _lockedC8; uint private _feeAmount; address payable private _feeReceiver; address public C8_TOKEN; mapping(bytes32 => bool) public depositTxHash; mapping(bytes32 => TxInfo) public txInfo; uint private unlocked = 1; modifier lock() { } event Transit(address indexed from, address indexed to, uint amount); event Deliver(address indexed from, address indexed to, uint amount, bytes32 indexed txHash); constructor(address _c8_token) public { } function setFee(uint _fee) public onlyOwner { } function setFeeReceiver(address payable _receiver) public onlyOwner { } function transitToBSC(address _to, uint _amount) public payable { IERC20 C8 = IERC20(C8_TOKEN); require(msg.value >= _feeAmount, "Transit: Insufficient for ETH Fee"); require(<FILL_ME>) _feeReceiver.transfer(msg.value); TransferHelper.safeTransferFrom(C8_TOKEN, msg.sender, address(this), _amount); _lockedC8 = _lockedC8.add(_amount); emit Transit(msg.sender, _to, _amount); } function deliverToETH(address _from, address _to, uint _amount, bytes32 _txHash) public lock onlyOwner { } function totalLocked() public view returns (uint _totalLocked){ } function getFee() public view returns (uint _fee){ } function getFeeReceiver() public view returns (address _receiver){ } }
C8.balanceOf(msg.sender)>=_amount,"Transit: Insufficient balance of C8"
318,851
C8.balanceOf(msg.sender)>=_amount
"Deliver: Duplicated hash"
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.5.16; contract C8BridgeToBSC is Ownable { using SafeMath for uint; struct TxInfo { address from; address to; uint256 amount; } uint private _lockedC8; uint private _feeAmount; address payable private _feeReceiver; address public C8_TOKEN; mapping(bytes32 => bool) public depositTxHash; mapping(bytes32 => TxInfo) public txInfo; uint private unlocked = 1; modifier lock() { } event Transit(address indexed from, address indexed to, uint amount); event Deliver(address indexed from, address indexed to, uint amount, bytes32 indexed txHash); constructor(address _c8_token) public { } function setFee(uint _fee) public onlyOwner { } function setFeeReceiver(address payable _receiver) public onlyOwner { } function transitToBSC(address _to, uint _amount) public payable { } function deliverToETH(address _from, address _to, uint _amount, bytes32 _txHash) public lock onlyOwner { IERC20 C8 = IERC20(C8_TOKEN); require(<FILL_ME>) require(C8.balanceOf(address(this)) >= _amount, "Deliver: Insufficient balance of C8"); TransferHelper.safeTransfer(C8_TOKEN, _to, _amount); _lockedC8 = _lockedC8.sub(_amount); depositTxHash[_txHash] = true; TxInfo storage info = txInfo[_txHash]; info.from = _from; info.to = _to; info.amount = _amount; emit Deliver(_from, _to, _amount, _txHash); } function totalLocked() public view returns (uint _totalLocked){ } function getFee() public view returns (uint _fee){ } function getFeeReceiver() public view returns (address _receiver){ } }
depositTxHash[_txHash]==false,"Deliver: Duplicated hash"
318,851
depositTxHash[_txHash]==false
"Deliver: Insufficient balance of C8"
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.5.16; contract C8BridgeToBSC is Ownable { using SafeMath for uint; struct TxInfo { address from; address to; uint256 amount; } uint private _lockedC8; uint private _feeAmount; address payable private _feeReceiver; address public C8_TOKEN; mapping(bytes32 => bool) public depositTxHash; mapping(bytes32 => TxInfo) public txInfo; uint private unlocked = 1; modifier lock() { } event Transit(address indexed from, address indexed to, uint amount); event Deliver(address indexed from, address indexed to, uint amount, bytes32 indexed txHash); constructor(address _c8_token) public { } function setFee(uint _fee) public onlyOwner { } function setFeeReceiver(address payable _receiver) public onlyOwner { } function transitToBSC(address _to, uint _amount) public payable { } function deliverToETH(address _from, address _to, uint _amount, bytes32 _txHash) public lock onlyOwner { IERC20 C8 = IERC20(C8_TOKEN); require(depositTxHash[_txHash] == false, "Deliver: Duplicated hash"); require(<FILL_ME>) TransferHelper.safeTransfer(C8_TOKEN, _to, _amount); _lockedC8 = _lockedC8.sub(_amount); depositTxHash[_txHash] = true; TxInfo storage info = txInfo[_txHash]; info.from = _from; info.to = _to; info.amount = _amount; emit Deliver(_from, _to, _amount, _txHash); } function totalLocked() public view returns (uint _totalLocked){ } function getFee() public view returns (uint _fee){ } function getFeeReceiver() public view returns (address _receiver){ } }
C8.balanceOf(address(this))>=_amount,"Deliver: Insufficient balance of C8"
318,851
C8.balanceOf(address(this))>=_amount
"Claim NFT is not open please try again later"
pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } pragma solidity ^0.8.0; contract ShibElon is ERC721, Ownable { uint16 public mintCount = 0; uint16 supply = totalSupply(); uint256 public MAX_SUPPLY = 500; uint256 public FREECLAIM_RESERVED = 100; uint256 public MAX_ALLOWED = 8; uint256 public price = 100000000000000000; //0.1 Ether string baseTokenURI; bool public saleOpen = true; bool public freeClaim = true; address public oldContractAddress = 0x6ACf4FDC54281441b7C0dD736301AC83fd5F6160; //ShibElon Old Contract - Mainnet event NFTMinted(uint256 totalMinted); constructor(string memory baseURI) ERC721("ShibElon", "ELON") { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function setMaxAllowd(uint256 _maxAllowed) public onlyOwner { } function setMaxSupply(uint256 _max_supply) public onlyOwner { } function setMintCount(uint16 _mintCount) public onlyOwner { } function totalSupply() public view returns (uint16) { } function burnUnsold() external onlyOwner { } function getPrice() external view returns(uint256){ } //Close sale function pauseSale() public onlyOwner { } //Open sale function unpauseSale() public onlyOwner { } //Open freeclaim function setOldContractAddress(address _oldContractAddress) public onlyOwner { } //Open freeclaim function unpauseFreeClaim() public onlyOwner { } //Close freeclaim function pauseFreeClaim() public onlyOwner { } function withdrawAll() public onlyOwner { } function freeClaimEligible() public view returns (bool) { } //Claim NFT function claimNFT() public payable { IERC721 nft = IERC721(oldContractAddress); supply = totalSupply(); if (msg.sender != owner()) { require(<FILL_ME>) } require( nft.balanceOf(msg.sender) > 0, "You are not eligible for free claim" ); require(balanceOf(msg.sender) < nft.balanceOf(msg.sender), "You have claimed allowd NFTs for this account"); require( totalSupply() + nft.balanceOf(msg.sender) <= (FREECLAIM_RESERVED), "All allowed NFTs claimed" ); mintCount += uint16(nft.balanceOf(msg.sender)); for (uint256 i = 0; i < nft.balanceOf(msg.sender); i++) { _safeMint(_msgSender(), ++supply); emit NFTMinted(supply); } FREECLAIM_RESERVED = FREECLAIM_RESERVED - nft.balanceOf(msg.sender); } //mint NFT function mintNFT(uint16 _count) public payable { } function airdrop(address[] calldata _recipients) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } }
(freeClaim==true),"Claim NFT is not open please try again later"
318,869
(freeClaim==true)
"You have claimed allowd NFTs for this account"
pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } pragma solidity ^0.8.0; contract ShibElon is ERC721, Ownable { uint16 public mintCount = 0; uint16 supply = totalSupply(); uint256 public MAX_SUPPLY = 500; uint256 public FREECLAIM_RESERVED = 100; uint256 public MAX_ALLOWED = 8; uint256 public price = 100000000000000000; //0.1 Ether string baseTokenURI; bool public saleOpen = true; bool public freeClaim = true; address public oldContractAddress = 0x6ACf4FDC54281441b7C0dD736301AC83fd5F6160; //ShibElon Old Contract - Mainnet event NFTMinted(uint256 totalMinted); constructor(string memory baseURI) ERC721("ShibElon", "ELON") { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function setMaxAllowd(uint256 _maxAllowed) public onlyOwner { } function setMaxSupply(uint256 _max_supply) public onlyOwner { } function setMintCount(uint16 _mintCount) public onlyOwner { } function totalSupply() public view returns (uint16) { } function burnUnsold() external onlyOwner { } function getPrice() external view returns(uint256){ } //Close sale function pauseSale() public onlyOwner { } //Open sale function unpauseSale() public onlyOwner { } //Open freeclaim function setOldContractAddress(address _oldContractAddress) public onlyOwner { } //Open freeclaim function unpauseFreeClaim() public onlyOwner { } //Close freeclaim function pauseFreeClaim() public onlyOwner { } function withdrawAll() public onlyOwner { } function freeClaimEligible() public view returns (bool) { } //Claim NFT function claimNFT() public payable { IERC721 nft = IERC721(oldContractAddress); supply = totalSupply(); if (msg.sender != owner()) { require((freeClaim == true), "Claim NFT is not open please try again later"); } require( nft.balanceOf(msg.sender) > 0, "You are not eligible for free claim" ); require(<FILL_ME>) require( totalSupply() + nft.balanceOf(msg.sender) <= (FREECLAIM_RESERVED), "All allowed NFTs claimed" ); mintCount += uint16(nft.balanceOf(msg.sender)); for (uint256 i = 0; i < nft.balanceOf(msg.sender); i++) { _safeMint(_msgSender(), ++supply); emit NFTMinted(supply); } FREECLAIM_RESERVED = FREECLAIM_RESERVED - nft.balanceOf(msg.sender); } //mint NFT function mintNFT(uint16 _count) public payable { } function airdrop(address[] calldata _recipients) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } }
balanceOf(msg.sender)<nft.balanceOf(msg.sender),"You have claimed allowd NFTs for this account"
318,869
balanceOf(msg.sender)<nft.balanceOf(msg.sender)
"All allowed NFTs claimed"
pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } pragma solidity ^0.8.0; contract ShibElon is ERC721, Ownable { uint16 public mintCount = 0; uint16 supply = totalSupply(); uint256 public MAX_SUPPLY = 500; uint256 public FREECLAIM_RESERVED = 100; uint256 public MAX_ALLOWED = 8; uint256 public price = 100000000000000000; //0.1 Ether string baseTokenURI; bool public saleOpen = true; bool public freeClaim = true; address public oldContractAddress = 0x6ACf4FDC54281441b7C0dD736301AC83fd5F6160; //ShibElon Old Contract - Mainnet event NFTMinted(uint256 totalMinted); constructor(string memory baseURI) ERC721("ShibElon", "ELON") { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function setMaxAllowd(uint256 _maxAllowed) public onlyOwner { } function setMaxSupply(uint256 _max_supply) public onlyOwner { } function setMintCount(uint16 _mintCount) public onlyOwner { } function totalSupply() public view returns (uint16) { } function burnUnsold() external onlyOwner { } function getPrice() external view returns(uint256){ } //Close sale function pauseSale() public onlyOwner { } //Open sale function unpauseSale() public onlyOwner { } //Open freeclaim function setOldContractAddress(address _oldContractAddress) public onlyOwner { } //Open freeclaim function unpauseFreeClaim() public onlyOwner { } //Close freeclaim function pauseFreeClaim() public onlyOwner { } function withdrawAll() public onlyOwner { } function freeClaimEligible() public view returns (bool) { } //Claim NFT function claimNFT() public payable { IERC721 nft = IERC721(oldContractAddress); supply = totalSupply(); if (msg.sender != owner()) { require((freeClaim == true), "Claim NFT is not open please try again later"); } require( nft.balanceOf(msg.sender) > 0, "You are not eligible for free claim" ); require(balanceOf(msg.sender) < nft.balanceOf(msg.sender), "You have claimed allowd NFTs for this account"); require(<FILL_ME>) mintCount += uint16(nft.balanceOf(msg.sender)); for (uint256 i = 0; i < nft.balanceOf(msg.sender); i++) { _safeMint(_msgSender(), ++supply); emit NFTMinted(supply); } FREECLAIM_RESERVED = FREECLAIM_RESERVED - nft.balanceOf(msg.sender); } //mint NFT function mintNFT(uint16 _count) public payable { } function airdrop(address[] calldata _recipients) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } }
totalSupply()+nft.balanceOf(msg.sender)<=(FREECLAIM_RESERVED),"All allowed NFTs claimed"
318,869
totalSupply()+nft.balanceOf(msg.sender)<=(FREECLAIM_RESERVED)
"Sale is not open please try again later"
pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } pragma solidity ^0.8.0; contract ShibElon is ERC721, Ownable { uint16 public mintCount = 0; uint16 supply = totalSupply(); uint256 public MAX_SUPPLY = 500; uint256 public FREECLAIM_RESERVED = 100; uint256 public MAX_ALLOWED = 8; uint256 public price = 100000000000000000; //0.1 Ether string baseTokenURI; bool public saleOpen = true; bool public freeClaim = true; address public oldContractAddress = 0x6ACf4FDC54281441b7C0dD736301AC83fd5F6160; //ShibElon Old Contract - Mainnet event NFTMinted(uint256 totalMinted); constructor(string memory baseURI) ERC721("ShibElon", "ELON") { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function setMaxAllowd(uint256 _maxAllowed) public onlyOwner { } function setMaxSupply(uint256 _max_supply) public onlyOwner { } function setMintCount(uint16 _mintCount) public onlyOwner { } function totalSupply() public view returns (uint16) { } function burnUnsold() external onlyOwner { } function getPrice() external view returns(uint256){ } //Close sale function pauseSale() public onlyOwner { } //Open sale function unpauseSale() public onlyOwner { } //Open freeclaim function setOldContractAddress(address _oldContractAddress) public onlyOwner { } //Open freeclaim function unpauseFreeClaim() public onlyOwner { } //Close freeclaim function pauseFreeClaim() public onlyOwner { } function withdrawAll() public onlyOwner { } function freeClaimEligible() public view returns (bool) { } //Claim NFT function claimNFT() public payable { } //mint NFT function mintNFT(uint16 _count) public payable { supply = totalSupply(); if (msg.sender != owner()) { require(<FILL_ME>) } require( _count > 0 && (balanceOf(msg.sender)+_count) <= MAX_ALLOWED, "You have reached the NFT minting limit per transaction" ); require(balanceOf(msg.sender) < MAX_ALLOWED, "You have reached maximum NFT minting limit per account"); if (msg.sender != owner()) { require( totalSupply() + _count <= MAX_SUPPLY, "All NFTs sold" ); }else{ require( totalSupply() + _count <= (MAX_SUPPLY), "All NFTs sold" ); } require( msg.value >= price * _count, "Ether sent with this transaction is not correct" ); mintCount += _count; for (uint256 i = 0; i < _count; i++) { _safeMint(_msgSender(), ++supply); emit NFTMinted(supply); } } function airdrop(address[] calldata _recipients) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } }
(saleOpen==true),"Sale is not open please try again later"
318,869
(saleOpen==true)
"You have reached maximum NFT minting limit per account"
pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } pragma solidity ^0.8.0; contract ShibElon is ERC721, Ownable { uint16 public mintCount = 0; uint16 supply = totalSupply(); uint256 public MAX_SUPPLY = 500; uint256 public FREECLAIM_RESERVED = 100; uint256 public MAX_ALLOWED = 8; uint256 public price = 100000000000000000; //0.1 Ether string baseTokenURI; bool public saleOpen = true; bool public freeClaim = true; address public oldContractAddress = 0x6ACf4FDC54281441b7C0dD736301AC83fd5F6160; //ShibElon Old Contract - Mainnet event NFTMinted(uint256 totalMinted); constructor(string memory baseURI) ERC721("ShibElon", "ELON") { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function setMaxAllowd(uint256 _maxAllowed) public onlyOwner { } function setMaxSupply(uint256 _max_supply) public onlyOwner { } function setMintCount(uint16 _mintCount) public onlyOwner { } function totalSupply() public view returns (uint16) { } function burnUnsold() external onlyOwner { } function getPrice() external view returns(uint256){ } //Close sale function pauseSale() public onlyOwner { } //Open sale function unpauseSale() public onlyOwner { } //Open freeclaim function setOldContractAddress(address _oldContractAddress) public onlyOwner { } //Open freeclaim function unpauseFreeClaim() public onlyOwner { } //Close freeclaim function pauseFreeClaim() public onlyOwner { } function withdrawAll() public onlyOwner { } function freeClaimEligible() public view returns (bool) { } //Claim NFT function claimNFT() public payable { } //mint NFT function mintNFT(uint16 _count) public payable { supply = totalSupply(); if (msg.sender != owner()) { require((saleOpen == true), "Sale is not open please try again later"); } require( _count > 0 && (balanceOf(msg.sender)+_count) <= MAX_ALLOWED, "You have reached the NFT minting limit per transaction" ); require(<FILL_ME>) if (msg.sender != owner()) { require( totalSupply() + _count <= MAX_SUPPLY, "All NFTs sold" ); }else{ require( totalSupply() + _count <= (MAX_SUPPLY), "All NFTs sold" ); } require( msg.value >= price * _count, "Ether sent with this transaction is not correct" ); mintCount += _count; for (uint256 i = 0; i < _count; i++) { _safeMint(_msgSender(), ++supply); emit NFTMinted(supply); } } function airdrop(address[] calldata _recipients) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } }
balanceOf(msg.sender)<MAX_ALLOWED,"You have reached maximum NFT minting limit per account"
318,869
balanceOf(msg.sender)<MAX_ALLOWED
"All NFTs sold"
pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } pragma solidity ^0.8.0; contract ShibElon is ERC721, Ownable { uint16 public mintCount = 0; uint16 supply = totalSupply(); uint256 public MAX_SUPPLY = 500; uint256 public FREECLAIM_RESERVED = 100; uint256 public MAX_ALLOWED = 8; uint256 public price = 100000000000000000; //0.1 Ether string baseTokenURI; bool public saleOpen = true; bool public freeClaim = true; address public oldContractAddress = 0x6ACf4FDC54281441b7C0dD736301AC83fd5F6160; //ShibElon Old Contract - Mainnet event NFTMinted(uint256 totalMinted); constructor(string memory baseURI) ERC721("ShibElon", "ELON") { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function setMaxAllowd(uint256 _maxAllowed) public onlyOwner { } function setMaxSupply(uint256 _max_supply) public onlyOwner { } function setMintCount(uint16 _mintCount) public onlyOwner { } function totalSupply() public view returns (uint16) { } function burnUnsold() external onlyOwner { } function getPrice() external view returns(uint256){ } //Close sale function pauseSale() public onlyOwner { } //Open sale function unpauseSale() public onlyOwner { } //Open freeclaim function setOldContractAddress(address _oldContractAddress) public onlyOwner { } //Open freeclaim function unpauseFreeClaim() public onlyOwner { } //Close freeclaim function pauseFreeClaim() public onlyOwner { } function withdrawAll() public onlyOwner { } function freeClaimEligible() public view returns (bool) { } //Claim NFT function claimNFT() public payable { } //mint NFT function mintNFT(uint16 _count) public payable { supply = totalSupply(); if (msg.sender != owner()) { require((saleOpen == true), "Sale is not open please try again later"); } require( _count > 0 && (balanceOf(msg.sender)+_count) <= MAX_ALLOWED, "You have reached the NFT minting limit per transaction" ); require(balanceOf(msg.sender) < MAX_ALLOWED, "You have reached maximum NFT minting limit per account"); if (msg.sender != owner()) { require( totalSupply() + _count <= MAX_SUPPLY, "All NFTs sold" ); }else{ require(<FILL_ME>) } require( msg.value >= price * _count, "Ether sent with this transaction is not correct" ); mintCount += _count; for (uint256 i = 0; i < _count; i++) { _safeMint(_msgSender(), ++supply); emit NFTMinted(supply); } } function airdrop(address[] calldata _recipients) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } }
totalSupply()+_count<=(MAX_SUPPLY),"All NFTs sold"
318,869
totalSupply()+_count<=(MAX_SUPPLY)
"Airdrop minting will exceed maximum supply"
pragma solidity ^0.8.0; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} } pragma solidity ^0.8.0; contract ShibElon is ERC721, Ownable { uint16 public mintCount = 0; uint16 supply = totalSupply(); uint256 public MAX_SUPPLY = 500; uint256 public FREECLAIM_RESERVED = 100; uint256 public MAX_ALLOWED = 8; uint256 public price = 100000000000000000; //0.1 Ether string baseTokenURI; bool public saleOpen = true; bool public freeClaim = true; address public oldContractAddress = 0x6ACf4FDC54281441b7C0dD736301AC83fd5F6160; //ShibElon Old Contract - Mainnet event NFTMinted(uint256 totalMinted); constructor(string memory baseURI) ERC721("ShibElon", "ELON") { } function setBaseURI(string memory baseURI) public onlyOwner { } function setPrice(uint256 _newPrice) public onlyOwner { } function setMaxAllowd(uint256 _maxAllowed) public onlyOwner { } function setMaxSupply(uint256 _max_supply) public onlyOwner { } function setMintCount(uint16 _mintCount) public onlyOwner { } function totalSupply() public view returns (uint16) { } function burnUnsold() external onlyOwner { } function getPrice() external view returns(uint256){ } //Close sale function pauseSale() public onlyOwner { } //Open sale function unpauseSale() public onlyOwner { } //Open freeclaim function setOldContractAddress(address _oldContractAddress) public onlyOwner { } //Open freeclaim function unpauseFreeClaim() public onlyOwner { } //Close freeclaim function pauseFreeClaim() public onlyOwner { } function withdrawAll() public onlyOwner { } function freeClaimEligible() public view returns (bool) { } //Claim NFT function claimNFT() public payable { } //mint NFT function mintNFT(uint16 _count) public payable { } function airdrop(address[] calldata _recipients) external onlyOwner { supply = totalSupply(); require(<FILL_ME>) require(_recipients.length != 0, "Address not found for minting"); for (uint256 i = 0; i < _recipients.length; i++) { require(_recipients[i] != address(0), "Minting to Null address"); _safeMint(_recipients[i], ++supply); } mintCount = mintCount + uint16(_recipients.length); } function _baseURI() internal view virtual override returns (string memory) { } }
totalSupply()+_recipients.length<=MAX_SUPPLY,"Airdrop minting will exceed maximum supply"
318,869
totalSupply()+_recipients.length<=MAX_SUPPLY
"old token transfer exception"
pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } contract EmcoTokenInterface is ERC20 { function setReferral(bytes32 _code) public; function setReferralCode(bytes32 _code) public view returns (bytes32); function referralCodeOwners(bytes32 _code) public view returns (address); function referrals(address _address) public view returns (address); function userReferralCodes(address _address) public view returns (bytes32); } /** * @title Emco token 2nd version * @dev Emco token implementation */ contract EmcoToken is StandardToken, Ownable { string public constant name = "EmcoToken"; string public constant symbol = "EMCO"; uint8 public constant decimals = 18; uint public constant MAX_SUPPLY = 36000000 * (10 ** uint(decimals)); mapping (address => uint) public miningBalances; mapping (address => uint) public lastMiningBalanceUpdateTime; address systemAddress; EmcoTokenInterface private oldContract; uint public constant DAY_MINING_DEPOSIT_LIMIT = 360000 * (10 ** uint(decimals)); uint public constant TOTAL_MINING_DEPOSIT_LIMIT = 3600000 * (10 ** uint(decimals)); uint private currentDay; uint private currentDayDeposited; uint public miningTotalDeposited; mapping(address => bytes32) private userRefCodes; mapping(bytes32 => address) private refCodeOwners; mapping(address => address) private refs; event Mine(address indexed beneficiary, uint value); event MiningBalanceUpdated(address indexed owner, uint amount, bool isDeposit); event Migrate(address indexed user, uint256 amount); event TransferComment(address indexed to, uint256 amount, bytes comment); event SetReferral(address whoSet, address indexed referrer); constructor(address emcoAddress) public { } /** * @dev Function for migration from old token * @param _amount Amount of old EMCO tokens to exchnage for new ones */ function migrate(uint _amount) public { require(<FILL_ME>) totalSupply_ = totalSupply_.add(_amount); balances[msg.sender] = balances[msg.sender].add(_amount); emit Migrate(msg.sender, _amount); emit Transfer(address(0), msg.sender, _amount); } /** * @dev Set referral (inviter) code * @param _code Code to be set. Code should be initially encoded with web3.utils.asciiToHex function */ function setReferralCode(bytes32 _code) public returns (bytes32) { } /** * @dev Get owner of referral (inviter) code * @param _code code to check * @return owner of code */ function referralCodeOwners(bytes32 _code) public view returns (address owner) { } /** * @dev Get account's referral (inviter) code * @param _address address of user to check for code * @return referral code of user */ function userReferralCodes(address _address) public view returns (bytes32) { } /** * @dev Get referral (inviter) of account * @param _address Account's address * @return Address of referral (inviter) */ function referrals(address _address) public view returns (address) { } /** * @dev Set referral (inviter) by his referral code * @param _code Inviter's code */ function setReferral(bytes32 _code) public { } /** * @dev Transfer token with comment * @param _to The address to transfer to. * @param _value The amount to be transferred. @ @param _comment The comemnt of transaction */ function transferWithComment(address _to, uint256 _value, bytes _comment) public returns (bool) { } /** * @dev Gets the balance of specified address (amount of tokens on main balance * plus amount of tokens on mining balance). * @param _owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint balance) { } /** * @dev Gets the mining balance if caller. * @param _owner The address to query the balance of. * @return An uint256 representing the amount of tokens of caller's mining balance */ function miningBalanceOf(address _owner) public view returns (uint balance) { } /** * @dev Moves specified amount of tokens from main balance to mining balance * @param _amount An uint256 representing the amount of tokens to transfer to main balance */ function depositToMiningBalance(uint _amount) public { } /** * @dev Moves specified amount of tokens from mining balance to main balance * @param _amount An uint256 representing the amount of tokens to transfer to mining balance */ function withdrawFromMiningBalance(uint _amount) public { } /** * @dev Mine tokens. For every 24h for each userοΏ½s token on mining balance, * 1% is burnt on mining balance and Reward % is minted to the main balance. 15% fee of difference * between minted coins and burnt coins goes to system address. */ function mine() public { } function mineReward(address _to, uint _amount) private { } /** * @dev Set system address * @param _systemAddress An address to set */ function setSystemAddress(address _systemAddress) public onlyOwner { } /** * @dev Get sum of deposits to mining accounts for current day * @return sum of deposits to mining accounts for current day */ function getCurrentDayDeposited() public view returns (uint) { } /** * @dev Get number of days for reward on mining. Maximum 100 days. * @return An uint256 representing number of days user will get reward for. */ function getDaysForReward() public view returns (uint rewardDaysNum){ } /** * @dev Calculate current mining reward based on total supply of tokens * @return An uint256 representing reward in percents multiplied by 1000000000 */ function getReward(uint _totalSupply) public pure returns (uint rewardPercent){ } function updateCurrentDayDeposited(uint _addedTokens) private { } }
oldContract.transferFrom(msg.sender,this,_amount),"old token transfer exception"
318,899
oldContract.transferFrom(msg.sender,this,_amount)
"code can't be empty"
pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } contract EmcoTokenInterface is ERC20 { function setReferral(bytes32 _code) public; function setReferralCode(bytes32 _code) public view returns (bytes32); function referralCodeOwners(bytes32 _code) public view returns (address); function referrals(address _address) public view returns (address); function userReferralCodes(address _address) public view returns (bytes32); } /** * @title Emco token 2nd version * @dev Emco token implementation */ contract EmcoToken is StandardToken, Ownable { string public constant name = "EmcoToken"; string public constant symbol = "EMCO"; uint8 public constant decimals = 18; uint public constant MAX_SUPPLY = 36000000 * (10 ** uint(decimals)); mapping (address => uint) public miningBalances; mapping (address => uint) public lastMiningBalanceUpdateTime; address systemAddress; EmcoTokenInterface private oldContract; uint public constant DAY_MINING_DEPOSIT_LIMIT = 360000 * (10 ** uint(decimals)); uint public constant TOTAL_MINING_DEPOSIT_LIMIT = 3600000 * (10 ** uint(decimals)); uint private currentDay; uint private currentDayDeposited; uint public miningTotalDeposited; mapping(address => bytes32) private userRefCodes; mapping(bytes32 => address) private refCodeOwners; mapping(address => address) private refs; event Mine(address indexed beneficiary, uint value); event MiningBalanceUpdated(address indexed owner, uint amount, bool isDeposit); event Migrate(address indexed user, uint256 amount); event TransferComment(address indexed to, uint256 amount, bytes comment); event SetReferral(address whoSet, address indexed referrer); constructor(address emcoAddress) public { } /** * @dev Function for migration from old token * @param _amount Amount of old EMCO tokens to exchnage for new ones */ function migrate(uint _amount) public { } /** * @dev Set referral (inviter) code * @param _code Code to be set. Code should be initially encoded with web3.utils.asciiToHex function */ function setReferralCode(bytes32 _code) public returns (bytes32) { require(<FILL_ME>) require(referralCodeOwners(_code) == address(0), "code is already used"); require(userReferralCodes(msg.sender) == "", "another code is already set"); userRefCodes[msg.sender] = _code; refCodeOwners[_code] = msg.sender; return _code; } /** * @dev Get owner of referral (inviter) code * @param _code code to check * @return owner of code */ function referralCodeOwners(bytes32 _code) public view returns (address owner) { } /** * @dev Get account's referral (inviter) code * @param _address address of user to check for code * @return referral code of user */ function userReferralCodes(address _address) public view returns (bytes32) { } /** * @dev Get referral (inviter) of account * @param _address Account's address * @return Address of referral (inviter) */ function referrals(address _address) public view returns (address) { } /** * @dev Set referral (inviter) by his referral code * @param _code Inviter's code */ function setReferral(bytes32 _code) public { } /** * @dev Transfer token with comment * @param _to The address to transfer to. * @param _value The amount to be transferred. @ @param _comment The comemnt of transaction */ function transferWithComment(address _to, uint256 _value, bytes _comment) public returns (bool) { } /** * @dev Gets the balance of specified address (amount of tokens on main balance * plus amount of tokens on mining balance). * @param _owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint balance) { } /** * @dev Gets the mining balance if caller. * @param _owner The address to query the balance of. * @return An uint256 representing the amount of tokens of caller's mining balance */ function miningBalanceOf(address _owner) public view returns (uint balance) { } /** * @dev Moves specified amount of tokens from main balance to mining balance * @param _amount An uint256 representing the amount of tokens to transfer to main balance */ function depositToMiningBalance(uint _amount) public { } /** * @dev Moves specified amount of tokens from mining balance to main balance * @param _amount An uint256 representing the amount of tokens to transfer to mining balance */ function withdrawFromMiningBalance(uint _amount) public { } /** * @dev Mine tokens. For every 24h for each userοΏ½s token on mining balance, * 1% is burnt on mining balance and Reward % is minted to the main balance. 15% fee of difference * between minted coins and burnt coins goes to system address. */ function mine() public { } function mineReward(address _to, uint _amount) private { } /** * @dev Set system address * @param _systemAddress An address to set */ function setSystemAddress(address _systemAddress) public onlyOwner { } /** * @dev Get sum of deposits to mining accounts for current day * @return sum of deposits to mining accounts for current day */ function getCurrentDayDeposited() public view returns (uint) { } /** * @dev Get number of days for reward on mining. Maximum 100 days. * @return An uint256 representing number of days user will get reward for. */ function getDaysForReward() public view returns (uint rewardDaysNum){ } /** * @dev Calculate current mining reward based on total supply of tokens * @return An uint256 representing reward in percents multiplied by 1000000000 */ function getReward(uint _totalSupply) public pure returns (uint rewardPercent){ } function updateCurrentDayDeposited(uint _addedTokens) private { } }
_code!="","code can't be empty"
318,899
_code!=""
"code is already used"
pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } contract EmcoTokenInterface is ERC20 { function setReferral(bytes32 _code) public; function setReferralCode(bytes32 _code) public view returns (bytes32); function referralCodeOwners(bytes32 _code) public view returns (address); function referrals(address _address) public view returns (address); function userReferralCodes(address _address) public view returns (bytes32); } /** * @title Emco token 2nd version * @dev Emco token implementation */ contract EmcoToken is StandardToken, Ownable { string public constant name = "EmcoToken"; string public constant symbol = "EMCO"; uint8 public constant decimals = 18; uint public constant MAX_SUPPLY = 36000000 * (10 ** uint(decimals)); mapping (address => uint) public miningBalances; mapping (address => uint) public lastMiningBalanceUpdateTime; address systemAddress; EmcoTokenInterface private oldContract; uint public constant DAY_MINING_DEPOSIT_LIMIT = 360000 * (10 ** uint(decimals)); uint public constant TOTAL_MINING_DEPOSIT_LIMIT = 3600000 * (10 ** uint(decimals)); uint private currentDay; uint private currentDayDeposited; uint public miningTotalDeposited; mapping(address => bytes32) private userRefCodes; mapping(bytes32 => address) private refCodeOwners; mapping(address => address) private refs; event Mine(address indexed beneficiary, uint value); event MiningBalanceUpdated(address indexed owner, uint amount, bool isDeposit); event Migrate(address indexed user, uint256 amount); event TransferComment(address indexed to, uint256 amount, bytes comment); event SetReferral(address whoSet, address indexed referrer); constructor(address emcoAddress) public { } /** * @dev Function for migration from old token * @param _amount Amount of old EMCO tokens to exchnage for new ones */ function migrate(uint _amount) public { } /** * @dev Set referral (inviter) code * @param _code Code to be set. Code should be initially encoded with web3.utils.asciiToHex function */ function setReferralCode(bytes32 _code) public returns (bytes32) { require(_code != "", "code can't be empty"); require(<FILL_ME>) require(userReferralCodes(msg.sender) == "", "another code is already set"); userRefCodes[msg.sender] = _code; refCodeOwners[_code] = msg.sender; return _code; } /** * @dev Get owner of referral (inviter) code * @param _code code to check * @return owner of code */ function referralCodeOwners(bytes32 _code) public view returns (address owner) { } /** * @dev Get account's referral (inviter) code * @param _address address of user to check for code * @return referral code of user */ function userReferralCodes(address _address) public view returns (bytes32) { } /** * @dev Get referral (inviter) of account * @param _address Account's address * @return Address of referral (inviter) */ function referrals(address _address) public view returns (address) { } /** * @dev Set referral (inviter) by his referral code * @param _code Inviter's code */ function setReferral(bytes32 _code) public { } /** * @dev Transfer token with comment * @param _to The address to transfer to. * @param _value The amount to be transferred. @ @param _comment The comemnt of transaction */ function transferWithComment(address _to, uint256 _value, bytes _comment) public returns (bool) { } /** * @dev Gets the balance of specified address (amount of tokens on main balance * plus amount of tokens on mining balance). * @param _owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint balance) { } /** * @dev Gets the mining balance if caller. * @param _owner The address to query the balance of. * @return An uint256 representing the amount of tokens of caller's mining balance */ function miningBalanceOf(address _owner) public view returns (uint balance) { } /** * @dev Moves specified amount of tokens from main balance to mining balance * @param _amount An uint256 representing the amount of tokens to transfer to main balance */ function depositToMiningBalance(uint _amount) public { } /** * @dev Moves specified amount of tokens from mining balance to main balance * @param _amount An uint256 representing the amount of tokens to transfer to mining balance */ function withdrawFromMiningBalance(uint _amount) public { } /** * @dev Mine tokens. For every 24h for each userοΏ½s token on mining balance, * 1% is burnt on mining balance and Reward % is minted to the main balance. 15% fee of difference * between minted coins and burnt coins goes to system address. */ function mine() public { } function mineReward(address _to, uint _amount) private { } /** * @dev Set system address * @param _systemAddress An address to set */ function setSystemAddress(address _systemAddress) public onlyOwner { } /** * @dev Get sum of deposits to mining accounts for current day * @return sum of deposits to mining accounts for current day */ function getCurrentDayDeposited() public view returns (uint) { } /** * @dev Get number of days for reward on mining. Maximum 100 days. * @return An uint256 representing number of days user will get reward for. */ function getDaysForReward() public view returns (uint rewardDaysNum){ } /** * @dev Calculate current mining reward based on total supply of tokens * @return An uint256 representing reward in percents multiplied by 1000000000 */ function getReward(uint _totalSupply) public pure returns (uint rewardPercent){ } function updateCurrentDayDeposited(uint _addedTokens) private { } }
referralCodeOwners(_code)==address(0),"code is already used"
318,899
referralCodeOwners(_code)==address(0)
"another code is already set"
pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } contract EmcoTokenInterface is ERC20 { function setReferral(bytes32 _code) public; function setReferralCode(bytes32 _code) public view returns (bytes32); function referralCodeOwners(bytes32 _code) public view returns (address); function referrals(address _address) public view returns (address); function userReferralCodes(address _address) public view returns (bytes32); } /** * @title Emco token 2nd version * @dev Emco token implementation */ contract EmcoToken is StandardToken, Ownable { string public constant name = "EmcoToken"; string public constant symbol = "EMCO"; uint8 public constant decimals = 18; uint public constant MAX_SUPPLY = 36000000 * (10 ** uint(decimals)); mapping (address => uint) public miningBalances; mapping (address => uint) public lastMiningBalanceUpdateTime; address systemAddress; EmcoTokenInterface private oldContract; uint public constant DAY_MINING_DEPOSIT_LIMIT = 360000 * (10 ** uint(decimals)); uint public constant TOTAL_MINING_DEPOSIT_LIMIT = 3600000 * (10 ** uint(decimals)); uint private currentDay; uint private currentDayDeposited; uint public miningTotalDeposited; mapping(address => bytes32) private userRefCodes; mapping(bytes32 => address) private refCodeOwners; mapping(address => address) private refs; event Mine(address indexed beneficiary, uint value); event MiningBalanceUpdated(address indexed owner, uint amount, bool isDeposit); event Migrate(address indexed user, uint256 amount); event TransferComment(address indexed to, uint256 amount, bytes comment); event SetReferral(address whoSet, address indexed referrer); constructor(address emcoAddress) public { } /** * @dev Function for migration from old token * @param _amount Amount of old EMCO tokens to exchnage for new ones */ function migrate(uint _amount) public { } /** * @dev Set referral (inviter) code * @param _code Code to be set. Code should be initially encoded with web3.utils.asciiToHex function */ function setReferralCode(bytes32 _code) public returns (bytes32) { require(_code != "", "code can't be empty"); require(referralCodeOwners(_code) == address(0), "code is already used"); require(<FILL_ME>) userRefCodes[msg.sender] = _code; refCodeOwners[_code] = msg.sender; return _code; } /** * @dev Get owner of referral (inviter) code * @param _code code to check * @return owner of code */ function referralCodeOwners(bytes32 _code) public view returns (address owner) { } /** * @dev Get account's referral (inviter) code * @param _address address of user to check for code * @return referral code of user */ function userReferralCodes(address _address) public view returns (bytes32) { } /** * @dev Get referral (inviter) of account * @param _address Account's address * @return Address of referral (inviter) */ function referrals(address _address) public view returns (address) { } /** * @dev Set referral (inviter) by his referral code * @param _code Inviter's code */ function setReferral(bytes32 _code) public { } /** * @dev Transfer token with comment * @param _to The address to transfer to. * @param _value The amount to be transferred. @ @param _comment The comemnt of transaction */ function transferWithComment(address _to, uint256 _value, bytes _comment) public returns (bool) { } /** * @dev Gets the balance of specified address (amount of tokens on main balance * plus amount of tokens on mining balance). * @param _owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint balance) { } /** * @dev Gets the mining balance if caller. * @param _owner The address to query the balance of. * @return An uint256 representing the amount of tokens of caller's mining balance */ function miningBalanceOf(address _owner) public view returns (uint balance) { } /** * @dev Moves specified amount of tokens from main balance to mining balance * @param _amount An uint256 representing the amount of tokens to transfer to main balance */ function depositToMiningBalance(uint _amount) public { } /** * @dev Moves specified amount of tokens from mining balance to main balance * @param _amount An uint256 representing the amount of tokens to transfer to mining balance */ function withdrawFromMiningBalance(uint _amount) public { } /** * @dev Mine tokens. For every 24h for each userοΏ½s token on mining balance, * 1% is burnt on mining balance and Reward % is minted to the main balance. 15% fee of difference * between minted coins and burnt coins goes to system address. */ function mine() public { } function mineReward(address _to, uint _amount) private { } /** * @dev Set system address * @param _systemAddress An address to set */ function setSystemAddress(address _systemAddress) public onlyOwner { } /** * @dev Get sum of deposits to mining accounts for current day * @return sum of deposits to mining accounts for current day */ function getCurrentDayDeposited() public view returns (uint) { } /** * @dev Get number of days for reward on mining. Maximum 100 days. * @return An uint256 representing number of days user will get reward for. */ function getDaysForReward() public view returns (uint rewardDaysNum){ } /** * @dev Calculate current mining reward based on total supply of tokens * @return An uint256 representing reward in percents multiplied by 1000000000 */ function getReward(uint _totalSupply) public pure returns (uint rewardPercent){ } function updateCurrentDayDeposited(uint _addedTokens) private { } }
userReferralCodes(msg.sender)=="","another code is already set"
318,899
userReferralCodes(msg.sender)==""
"no referral with this code"
pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } contract EmcoTokenInterface is ERC20 { function setReferral(bytes32 _code) public; function setReferralCode(bytes32 _code) public view returns (bytes32); function referralCodeOwners(bytes32 _code) public view returns (address); function referrals(address _address) public view returns (address); function userReferralCodes(address _address) public view returns (bytes32); } /** * @title Emco token 2nd version * @dev Emco token implementation */ contract EmcoToken is StandardToken, Ownable { string public constant name = "EmcoToken"; string public constant symbol = "EMCO"; uint8 public constant decimals = 18; uint public constant MAX_SUPPLY = 36000000 * (10 ** uint(decimals)); mapping (address => uint) public miningBalances; mapping (address => uint) public lastMiningBalanceUpdateTime; address systemAddress; EmcoTokenInterface private oldContract; uint public constant DAY_MINING_DEPOSIT_LIMIT = 360000 * (10 ** uint(decimals)); uint public constant TOTAL_MINING_DEPOSIT_LIMIT = 3600000 * (10 ** uint(decimals)); uint private currentDay; uint private currentDayDeposited; uint public miningTotalDeposited; mapping(address => bytes32) private userRefCodes; mapping(bytes32 => address) private refCodeOwners; mapping(address => address) private refs; event Mine(address indexed beneficiary, uint value); event MiningBalanceUpdated(address indexed owner, uint amount, bool isDeposit); event Migrate(address indexed user, uint256 amount); event TransferComment(address indexed to, uint256 amount, bytes comment); event SetReferral(address whoSet, address indexed referrer); constructor(address emcoAddress) public { } /** * @dev Function for migration from old token * @param _amount Amount of old EMCO tokens to exchnage for new ones */ function migrate(uint _amount) public { } /** * @dev Set referral (inviter) code * @param _code Code to be set. Code should be initially encoded with web3.utils.asciiToHex function */ function setReferralCode(bytes32 _code) public returns (bytes32) { } /** * @dev Get owner of referral (inviter) code * @param _code code to check * @return owner of code */ function referralCodeOwners(bytes32 _code) public view returns (address owner) { } /** * @dev Get account's referral (inviter) code * @param _address address of user to check for code * @return referral code of user */ function userReferralCodes(address _address) public view returns (bytes32) { } /** * @dev Get referral (inviter) of account * @param _address Account's address * @return Address of referral (inviter) */ function referrals(address _address) public view returns (address) { } /** * @dev Set referral (inviter) by his referral code * @param _code Inviter's code */ function setReferral(bytes32 _code) public { require(<FILL_ME>) require(referrals(msg.sender) == address(0), "referral is already set"); address referrer = referralCodeOwners(_code); require(referrer != msg.sender, "Can not invite yourself"); refs[msg.sender] = referrer; emit SetReferral(msg.sender, referrer); } /** * @dev Transfer token with comment * @param _to The address to transfer to. * @param _value The amount to be transferred. @ @param _comment The comemnt of transaction */ function transferWithComment(address _to, uint256 _value, bytes _comment) public returns (bool) { } /** * @dev Gets the balance of specified address (amount of tokens on main balance * plus amount of tokens on mining balance). * @param _owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint balance) { } /** * @dev Gets the mining balance if caller. * @param _owner The address to query the balance of. * @return An uint256 representing the amount of tokens of caller's mining balance */ function miningBalanceOf(address _owner) public view returns (uint balance) { } /** * @dev Moves specified amount of tokens from main balance to mining balance * @param _amount An uint256 representing the amount of tokens to transfer to main balance */ function depositToMiningBalance(uint _amount) public { } /** * @dev Moves specified amount of tokens from mining balance to main balance * @param _amount An uint256 representing the amount of tokens to transfer to mining balance */ function withdrawFromMiningBalance(uint _amount) public { } /** * @dev Mine tokens. For every 24h for each userοΏ½s token on mining balance, * 1% is burnt on mining balance and Reward % is minted to the main balance. 15% fee of difference * between minted coins and burnt coins goes to system address. */ function mine() public { } function mineReward(address _to, uint _amount) private { } /** * @dev Set system address * @param _systemAddress An address to set */ function setSystemAddress(address _systemAddress) public onlyOwner { } /** * @dev Get sum of deposits to mining accounts for current day * @return sum of deposits to mining accounts for current day */ function getCurrentDayDeposited() public view returns (uint) { } /** * @dev Get number of days for reward on mining. Maximum 100 days. * @return An uint256 representing number of days user will get reward for. */ function getDaysForReward() public view returns (uint rewardDaysNum){ } /** * @dev Calculate current mining reward based on total supply of tokens * @return An uint256 representing reward in percents multiplied by 1000000000 */ function getReward(uint _totalSupply) public pure returns (uint rewardPercent){ } function updateCurrentDayDeposited(uint _addedTokens) private { } }
referralCodeOwners(_code)!=address(0),"no referral with this code"
318,899
referralCodeOwners(_code)!=address(0)
"referral is already set"
pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } contract EmcoTokenInterface is ERC20 { function setReferral(bytes32 _code) public; function setReferralCode(bytes32 _code) public view returns (bytes32); function referralCodeOwners(bytes32 _code) public view returns (address); function referrals(address _address) public view returns (address); function userReferralCodes(address _address) public view returns (bytes32); } /** * @title Emco token 2nd version * @dev Emco token implementation */ contract EmcoToken is StandardToken, Ownable { string public constant name = "EmcoToken"; string public constant symbol = "EMCO"; uint8 public constant decimals = 18; uint public constant MAX_SUPPLY = 36000000 * (10 ** uint(decimals)); mapping (address => uint) public miningBalances; mapping (address => uint) public lastMiningBalanceUpdateTime; address systemAddress; EmcoTokenInterface private oldContract; uint public constant DAY_MINING_DEPOSIT_LIMIT = 360000 * (10 ** uint(decimals)); uint public constant TOTAL_MINING_DEPOSIT_LIMIT = 3600000 * (10 ** uint(decimals)); uint private currentDay; uint private currentDayDeposited; uint public miningTotalDeposited; mapping(address => bytes32) private userRefCodes; mapping(bytes32 => address) private refCodeOwners; mapping(address => address) private refs; event Mine(address indexed beneficiary, uint value); event MiningBalanceUpdated(address indexed owner, uint amount, bool isDeposit); event Migrate(address indexed user, uint256 amount); event TransferComment(address indexed to, uint256 amount, bytes comment); event SetReferral(address whoSet, address indexed referrer); constructor(address emcoAddress) public { } /** * @dev Function for migration from old token * @param _amount Amount of old EMCO tokens to exchnage for new ones */ function migrate(uint _amount) public { } /** * @dev Set referral (inviter) code * @param _code Code to be set. Code should be initially encoded with web3.utils.asciiToHex function */ function setReferralCode(bytes32 _code) public returns (bytes32) { } /** * @dev Get owner of referral (inviter) code * @param _code code to check * @return owner of code */ function referralCodeOwners(bytes32 _code) public view returns (address owner) { } /** * @dev Get account's referral (inviter) code * @param _address address of user to check for code * @return referral code of user */ function userReferralCodes(address _address) public view returns (bytes32) { } /** * @dev Get referral (inviter) of account * @param _address Account's address * @return Address of referral (inviter) */ function referrals(address _address) public view returns (address) { } /** * @dev Set referral (inviter) by his referral code * @param _code Inviter's code */ function setReferral(bytes32 _code) public { require(referralCodeOwners(_code) != address(0), "no referral with this code"); require(<FILL_ME>) address referrer = referralCodeOwners(_code); require(referrer != msg.sender, "Can not invite yourself"); refs[msg.sender] = referrer; emit SetReferral(msg.sender, referrer); } /** * @dev Transfer token with comment * @param _to The address to transfer to. * @param _value The amount to be transferred. @ @param _comment The comemnt of transaction */ function transferWithComment(address _to, uint256 _value, bytes _comment) public returns (bool) { } /** * @dev Gets the balance of specified address (amount of tokens on main balance * plus amount of tokens on mining balance). * @param _owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint balance) { } /** * @dev Gets the mining balance if caller. * @param _owner The address to query the balance of. * @return An uint256 representing the amount of tokens of caller's mining balance */ function miningBalanceOf(address _owner) public view returns (uint balance) { } /** * @dev Moves specified amount of tokens from main balance to mining balance * @param _amount An uint256 representing the amount of tokens to transfer to main balance */ function depositToMiningBalance(uint _amount) public { } /** * @dev Moves specified amount of tokens from mining balance to main balance * @param _amount An uint256 representing the amount of tokens to transfer to mining balance */ function withdrawFromMiningBalance(uint _amount) public { } /** * @dev Mine tokens. For every 24h for each userοΏ½s token on mining balance, * 1% is burnt on mining balance and Reward % is minted to the main balance. 15% fee of difference * between minted coins and burnt coins goes to system address. */ function mine() public { } function mineReward(address _to, uint _amount) private { } /** * @dev Set system address * @param _systemAddress An address to set */ function setSystemAddress(address _systemAddress) public onlyOwner { } /** * @dev Get sum of deposits to mining accounts for current day * @return sum of deposits to mining accounts for current day */ function getCurrentDayDeposited() public view returns (uint) { } /** * @dev Get number of days for reward on mining. Maximum 100 days. * @return An uint256 representing number of days user will get reward for. */ function getDaysForReward() public view returns (uint rewardDaysNum){ } /** * @dev Calculate current mining reward based on total supply of tokens * @return An uint256 representing reward in percents multiplied by 1000000000 */ function getReward(uint _totalSupply) public pure returns (uint rewardPercent){ } function updateCurrentDayDeposited(uint _addedTokens) private { } }
referrals(msg.sender)==address(0),"referral is already set"
318,899
referrals(msg.sender)==address(0)
"Day mining deposit exceeded"
pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } contract EmcoTokenInterface is ERC20 { function setReferral(bytes32 _code) public; function setReferralCode(bytes32 _code) public view returns (bytes32); function referralCodeOwners(bytes32 _code) public view returns (address); function referrals(address _address) public view returns (address); function userReferralCodes(address _address) public view returns (bytes32); } /** * @title Emco token 2nd version * @dev Emco token implementation */ contract EmcoToken is StandardToken, Ownable { string public constant name = "EmcoToken"; string public constant symbol = "EMCO"; uint8 public constant decimals = 18; uint public constant MAX_SUPPLY = 36000000 * (10 ** uint(decimals)); mapping (address => uint) public miningBalances; mapping (address => uint) public lastMiningBalanceUpdateTime; address systemAddress; EmcoTokenInterface private oldContract; uint public constant DAY_MINING_DEPOSIT_LIMIT = 360000 * (10 ** uint(decimals)); uint public constant TOTAL_MINING_DEPOSIT_LIMIT = 3600000 * (10 ** uint(decimals)); uint private currentDay; uint private currentDayDeposited; uint public miningTotalDeposited; mapping(address => bytes32) private userRefCodes; mapping(bytes32 => address) private refCodeOwners; mapping(address => address) private refs; event Mine(address indexed beneficiary, uint value); event MiningBalanceUpdated(address indexed owner, uint amount, bool isDeposit); event Migrate(address indexed user, uint256 amount); event TransferComment(address indexed to, uint256 amount, bytes comment); event SetReferral(address whoSet, address indexed referrer); constructor(address emcoAddress) public { } /** * @dev Function for migration from old token * @param _amount Amount of old EMCO tokens to exchnage for new ones */ function migrate(uint _amount) public { } /** * @dev Set referral (inviter) code * @param _code Code to be set. Code should be initially encoded with web3.utils.asciiToHex function */ function setReferralCode(bytes32 _code) public returns (bytes32) { } /** * @dev Get owner of referral (inviter) code * @param _code code to check * @return owner of code */ function referralCodeOwners(bytes32 _code) public view returns (address owner) { } /** * @dev Get account's referral (inviter) code * @param _address address of user to check for code * @return referral code of user */ function userReferralCodes(address _address) public view returns (bytes32) { } /** * @dev Get referral (inviter) of account * @param _address Account's address * @return Address of referral (inviter) */ function referrals(address _address) public view returns (address) { } /** * @dev Set referral (inviter) by his referral code * @param _code Inviter's code */ function setReferral(bytes32 _code) public { } /** * @dev Transfer token with comment * @param _to The address to transfer to. * @param _value The amount to be transferred. @ @param _comment The comemnt of transaction */ function transferWithComment(address _to, uint256 _value, bytes _comment) public returns (bool) { } /** * @dev Gets the balance of specified address (amount of tokens on main balance * plus amount of tokens on mining balance). * @param _owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint balance) { } /** * @dev Gets the mining balance if caller. * @param _owner The address to query the balance of. * @return An uint256 representing the amount of tokens of caller's mining balance */ function miningBalanceOf(address _owner) public view returns (uint balance) { } /** * @dev Moves specified amount of tokens from main balance to mining balance * @param _amount An uint256 representing the amount of tokens to transfer to main balance */ function depositToMiningBalance(uint _amount) public { require(balances[msg.sender] >= _amount, "not enough tokens"); require(<FILL_ME>) require(miningTotalDeposited.add(_amount) <= TOTAL_MINING_DEPOSIT_LIMIT, "Total mining deposit exceeded"); balances[msg.sender] = balances[msg.sender].sub(_amount); miningBalances[msg.sender] = miningBalances[msg.sender].add(_amount); miningTotalDeposited = miningTotalDeposited.add(_amount); updateCurrentDayDeposited(_amount); lastMiningBalanceUpdateTime[msg.sender] = now; emit MiningBalanceUpdated(msg.sender, _amount, true); } /** * @dev Moves specified amount of tokens from mining balance to main balance * @param _amount An uint256 representing the amount of tokens to transfer to mining balance */ function withdrawFromMiningBalance(uint _amount) public { } /** * @dev Mine tokens. For every 24h for each userοΏ½s token on mining balance, * 1% is burnt on mining balance and Reward % is minted to the main balance. 15% fee of difference * between minted coins and burnt coins goes to system address. */ function mine() public { } function mineReward(address _to, uint _amount) private { } /** * @dev Set system address * @param _systemAddress An address to set */ function setSystemAddress(address _systemAddress) public onlyOwner { } /** * @dev Get sum of deposits to mining accounts for current day * @return sum of deposits to mining accounts for current day */ function getCurrentDayDeposited() public view returns (uint) { } /** * @dev Get number of days for reward on mining. Maximum 100 days. * @return An uint256 representing number of days user will get reward for. */ function getDaysForReward() public view returns (uint rewardDaysNum){ } /** * @dev Calculate current mining reward based on total supply of tokens * @return An uint256 representing reward in percents multiplied by 1000000000 */ function getReward(uint _totalSupply) public pure returns (uint rewardPercent){ } function updateCurrentDayDeposited(uint _addedTokens) private { } }
getCurrentDayDeposited().add(_amount)<=DAY_MINING_DEPOSIT_LIMIT,"Day mining deposit exceeded"
318,899
getCurrentDayDeposited().add(_amount)<=DAY_MINING_DEPOSIT_LIMIT
"Total mining deposit exceeded"
pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } contract EmcoTokenInterface is ERC20 { function setReferral(bytes32 _code) public; function setReferralCode(bytes32 _code) public view returns (bytes32); function referralCodeOwners(bytes32 _code) public view returns (address); function referrals(address _address) public view returns (address); function userReferralCodes(address _address) public view returns (bytes32); } /** * @title Emco token 2nd version * @dev Emco token implementation */ contract EmcoToken is StandardToken, Ownable { string public constant name = "EmcoToken"; string public constant symbol = "EMCO"; uint8 public constant decimals = 18; uint public constant MAX_SUPPLY = 36000000 * (10 ** uint(decimals)); mapping (address => uint) public miningBalances; mapping (address => uint) public lastMiningBalanceUpdateTime; address systemAddress; EmcoTokenInterface private oldContract; uint public constant DAY_MINING_DEPOSIT_LIMIT = 360000 * (10 ** uint(decimals)); uint public constant TOTAL_MINING_DEPOSIT_LIMIT = 3600000 * (10 ** uint(decimals)); uint private currentDay; uint private currentDayDeposited; uint public miningTotalDeposited; mapping(address => bytes32) private userRefCodes; mapping(bytes32 => address) private refCodeOwners; mapping(address => address) private refs; event Mine(address indexed beneficiary, uint value); event MiningBalanceUpdated(address indexed owner, uint amount, bool isDeposit); event Migrate(address indexed user, uint256 amount); event TransferComment(address indexed to, uint256 amount, bytes comment); event SetReferral(address whoSet, address indexed referrer); constructor(address emcoAddress) public { } /** * @dev Function for migration from old token * @param _amount Amount of old EMCO tokens to exchnage for new ones */ function migrate(uint _amount) public { } /** * @dev Set referral (inviter) code * @param _code Code to be set. Code should be initially encoded with web3.utils.asciiToHex function */ function setReferralCode(bytes32 _code) public returns (bytes32) { } /** * @dev Get owner of referral (inviter) code * @param _code code to check * @return owner of code */ function referralCodeOwners(bytes32 _code) public view returns (address owner) { } /** * @dev Get account's referral (inviter) code * @param _address address of user to check for code * @return referral code of user */ function userReferralCodes(address _address) public view returns (bytes32) { } /** * @dev Get referral (inviter) of account * @param _address Account's address * @return Address of referral (inviter) */ function referrals(address _address) public view returns (address) { } /** * @dev Set referral (inviter) by his referral code * @param _code Inviter's code */ function setReferral(bytes32 _code) public { } /** * @dev Transfer token with comment * @param _to The address to transfer to. * @param _value The amount to be transferred. @ @param _comment The comemnt of transaction */ function transferWithComment(address _to, uint256 _value, bytes _comment) public returns (bool) { } /** * @dev Gets the balance of specified address (amount of tokens on main balance * plus amount of tokens on mining balance). * @param _owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint balance) { } /** * @dev Gets the mining balance if caller. * @param _owner The address to query the balance of. * @return An uint256 representing the amount of tokens of caller's mining balance */ function miningBalanceOf(address _owner) public view returns (uint balance) { } /** * @dev Moves specified amount of tokens from main balance to mining balance * @param _amount An uint256 representing the amount of tokens to transfer to main balance */ function depositToMiningBalance(uint _amount) public { require(balances[msg.sender] >= _amount, "not enough tokens"); require(getCurrentDayDeposited().add(_amount) <= DAY_MINING_DEPOSIT_LIMIT, "Day mining deposit exceeded"); require(<FILL_ME>) balances[msg.sender] = balances[msg.sender].sub(_amount); miningBalances[msg.sender] = miningBalances[msg.sender].add(_amount); miningTotalDeposited = miningTotalDeposited.add(_amount); updateCurrentDayDeposited(_amount); lastMiningBalanceUpdateTime[msg.sender] = now; emit MiningBalanceUpdated(msg.sender, _amount, true); } /** * @dev Moves specified amount of tokens from mining balance to main balance * @param _amount An uint256 representing the amount of tokens to transfer to mining balance */ function withdrawFromMiningBalance(uint _amount) public { } /** * @dev Mine tokens. For every 24h for each userοΏ½s token on mining balance, * 1% is burnt on mining balance and Reward % is minted to the main balance. 15% fee of difference * between minted coins and burnt coins goes to system address. */ function mine() public { } function mineReward(address _to, uint _amount) private { } /** * @dev Set system address * @param _systemAddress An address to set */ function setSystemAddress(address _systemAddress) public onlyOwner { } /** * @dev Get sum of deposits to mining accounts for current day * @return sum of deposits to mining accounts for current day */ function getCurrentDayDeposited() public view returns (uint) { } /** * @dev Get number of days for reward on mining. Maximum 100 days. * @return An uint256 representing number of days user will get reward for. */ function getDaysForReward() public view returns (uint rewardDaysNum){ } /** * @dev Calculate current mining reward based on total supply of tokens * @return An uint256 representing reward in percents multiplied by 1000000000 */ function getReward(uint _totalSupply) public pure returns (uint rewardPercent){ } function updateCurrentDayDeposited(uint _addedTokens) private { } }
miningTotalDeposited.add(_amount)<=TOTAL_MINING_DEPOSIT_LIMIT,"Total mining deposit exceeded"
318,899
miningTotalDeposited.add(_amount)<=TOTAL_MINING_DEPOSIT_LIMIT
"not enough mining tokens"
pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public returns (bool) { } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public returns (bool) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { } } contract EmcoTokenInterface is ERC20 { function setReferral(bytes32 _code) public; function setReferralCode(bytes32 _code) public view returns (bytes32); function referralCodeOwners(bytes32 _code) public view returns (address); function referrals(address _address) public view returns (address); function userReferralCodes(address _address) public view returns (bytes32); } /** * @title Emco token 2nd version * @dev Emco token implementation */ contract EmcoToken is StandardToken, Ownable { string public constant name = "EmcoToken"; string public constant symbol = "EMCO"; uint8 public constant decimals = 18; uint public constant MAX_SUPPLY = 36000000 * (10 ** uint(decimals)); mapping (address => uint) public miningBalances; mapping (address => uint) public lastMiningBalanceUpdateTime; address systemAddress; EmcoTokenInterface private oldContract; uint public constant DAY_MINING_DEPOSIT_LIMIT = 360000 * (10 ** uint(decimals)); uint public constant TOTAL_MINING_DEPOSIT_LIMIT = 3600000 * (10 ** uint(decimals)); uint private currentDay; uint private currentDayDeposited; uint public miningTotalDeposited; mapping(address => bytes32) private userRefCodes; mapping(bytes32 => address) private refCodeOwners; mapping(address => address) private refs; event Mine(address indexed beneficiary, uint value); event MiningBalanceUpdated(address indexed owner, uint amount, bool isDeposit); event Migrate(address indexed user, uint256 amount); event TransferComment(address indexed to, uint256 amount, bytes comment); event SetReferral(address whoSet, address indexed referrer); constructor(address emcoAddress) public { } /** * @dev Function for migration from old token * @param _amount Amount of old EMCO tokens to exchnage for new ones */ function migrate(uint _amount) public { } /** * @dev Set referral (inviter) code * @param _code Code to be set. Code should be initially encoded with web3.utils.asciiToHex function */ function setReferralCode(bytes32 _code) public returns (bytes32) { } /** * @dev Get owner of referral (inviter) code * @param _code code to check * @return owner of code */ function referralCodeOwners(bytes32 _code) public view returns (address owner) { } /** * @dev Get account's referral (inviter) code * @param _address address of user to check for code * @return referral code of user */ function userReferralCodes(address _address) public view returns (bytes32) { } /** * @dev Get referral (inviter) of account * @param _address Account's address * @return Address of referral (inviter) */ function referrals(address _address) public view returns (address) { } /** * @dev Set referral (inviter) by his referral code * @param _code Inviter's code */ function setReferral(bytes32 _code) public { } /** * @dev Transfer token with comment * @param _to The address to transfer to. * @param _value The amount to be transferred. @ @param _comment The comemnt of transaction */ function transferWithComment(address _to, uint256 _value, bytes _comment) public returns (bool) { } /** * @dev Gets the balance of specified address (amount of tokens on main balance * plus amount of tokens on mining balance). * @param _owner The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint balance) { } /** * @dev Gets the mining balance if caller. * @param _owner The address to query the balance of. * @return An uint256 representing the amount of tokens of caller's mining balance */ function miningBalanceOf(address _owner) public view returns (uint balance) { } /** * @dev Moves specified amount of tokens from main balance to mining balance * @param _amount An uint256 representing the amount of tokens to transfer to main balance */ function depositToMiningBalance(uint _amount) public { } /** * @dev Moves specified amount of tokens from mining balance to main balance * @param _amount An uint256 representing the amount of tokens to transfer to mining balance */ function withdrawFromMiningBalance(uint _amount) public { require(<FILL_ME>) miningBalances[msg.sender] = miningBalances[msg.sender].sub(_amount); balances[msg.sender] = balances[msg.sender].add(_amount); //updating mining limits miningTotalDeposited = miningTotalDeposited.sub(_amount); lastMiningBalanceUpdateTime[msg.sender] = now; emit MiningBalanceUpdated(msg.sender, _amount, false); } /** * @dev Mine tokens. For every 24h for each userοΏ½s token on mining balance, * 1% is burnt on mining balance and Reward % is minted to the main balance. 15% fee of difference * between minted coins and burnt coins goes to system address. */ function mine() public { } function mineReward(address _to, uint _amount) private { } /** * @dev Set system address * @param _systemAddress An address to set */ function setSystemAddress(address _systemAddress) public onlyOwner { } /** * @dev Get sum of deposits to mining accounts for current day * @return sum of deposits to mining accounts for current day */ function getCurrentDayDeposited() public view returns (uint) { } /** * @dev Get number of days for reward on mining. Maximum 100 days. * @return An uint256 representing number of days user will get reward for. */ function getDaysForReward() public view returns (uint rewardDaysNum){ } /** * @dev Calculate current mining reward based on total supply of tokens * @return An uint256 representing reward in percents multiplied by 1000000000 */ function getReward(uint _totalSupply) public pure returns (uint rewardPercent){ } function updateCurrentDayDeposited(uint _addedTokens) private { } }
miningBalances[msg.sender]>=_amount,"not enough mining tokens"
318,899
miningBalances[msg.sender]>=_amount
null
pragma solidity ^0.4.24; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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) onlyOwner public { } } contract ERC223 { uint public totalSupply; // ERC223 and ERC20 functions and events function balanceOf(address who) public view returns (uint); function totalSupply() public view returns (uint256 _supply); function transfer(address to, uint value) public returns (bool ok); function transfer(address to, uint value, bytes data) public returns (bool ok); function transfer(address to, uint value, bytes data, string customFallback) public returns (bool ok); event Transfer(address indexed from, address indexed to, uint value, bytes indexed data); // ERC223 functions function name() public view returns (string _name); function symbol() public view returns (string _symbol); function decimals() public view returns (uint8 _decimals); // ERC20 functions and events function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint _value); } /** * @title ContractReceiver * @dev Contract that is working with ERC223 tokens */ contract ContractReceiver { struct TKN { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint _value, bytes _data) public pure { } } contract IdolCoin is ERC223, Ownable { using SafeMath for uint256; string public name = "IDOLCOIN"; string public symbol = "IDOL"; uint8 public decimals = 8; uint256 public totalSupply = 777e8 * 1e8; bool public mintingFinished = false; address public founder = 0xf5058208c817f45A22550395361350c6383Ba6Ea; address public AirDrop = 0x16e733a0A6FbCE852F16e2479B6Fb1F1e2787BDC; address public LongTerm = 0x51190BdF9CEdA77fF725C24d57050922d884150a; mapping(address => uint256) public balanceOf; mapping(address => mapping (address => uint256)) public allowance; mapping (address => bool) public frozenAccount; mapping (address => uint256) public unlockUnixTime; event FrozenFunds(address indexed target, bool frozen); event LockedFunds(address indexed target, uint256 locked); event Burn(address indexed from, uint256 amount); event Mint(address indexed to, uint256 amount); event MintFinished(); /** * @dev Constructor is called only once and can not be called again */ function IdolCoin() public { } function name() public view returns (string _name) { } function symbol() public view returns (string _symbol) { } function decimals() public view returns (uint8 _decimals) { } function totalSupply() public view returns (uint256 _totalSupply) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public { } function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public { } /** * @dev Function that is called when a user or another contract wants to transfer funds */ function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) { } function transfer(address _to, uint _value, bytes _data) public returns (bool success) { } /** * @dev Standard function transfer similar to ERC20 transfer with no _data * Added due to backwards compatibility reasons */ function transfer(address _to, uint _value) public returns (bool success) { } // assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private view returns (bool is_contract) { } // function that is called when transaction target is an address function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { } // function that is called when transaction target is a contract function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) { } /** * @dev Transfer tokens from one address to another * Added due to backwards compatibility with ERC20 * @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 success) { } /** * @dev Allows _spender to spend no more than _value tokens in your behalf * Added due to backwards compatibility with ERC20 * @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) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender * Added due to backwards compatibility with ERC20 * @param _owner address The address which owns the funds * @param _spender address The address which will spend the funds */ function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } /** * @dev Burns a specific amount of tokens. * @param _from The address that will burn the tokens. * @param _unitAmount The amount of token to be burned. */ function burn(address _from, uint256 _unitAmount) onlyOwner public { } modifier canMint() { } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _unitAmount The amount of tokens to mint. */ function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) { } /** * @dev Function to stop minting new tokens. */ function finishMinting() onlyOwner canMint public returns (bool) { } /** * @dev Function to distribute tokens to the list of addresses by the provided amount */ function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) { require(amount > 0 && addresses.length > 0 && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); amount = amount.mul(1e8); uint256 totalAmount = amount.mul(addresses.length); require(balanceOf[msg.sender] >= totalAmount); for (uint j = 0; j < addresses.length; j++) { require(<FILL_ME>) balanceOf[addresses[j]] = balanceOf[addresses[j]].add(amount); Transfer(msg.sender, addresses[j], amount); } balanceOf[msg.sender] = balanceOf[msg.sender].sub(totalAmount); return true; } function distributeAirdrop(address[] addresses, uint[] amounts) public returns (bool) { } /** * @dev Function to collect tokens from the list of addresses */ function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) { } }
addresses[j]!=0x0&&frozenAccount[addresses[j]]==false&&now>unlockUnixTime[addresses[j]]
319,008
addresses[j]!=0x0&&frozenAccount[addresses[j]]==false&&now>unlockUnixTime[addresses[j]]
null
pragma solidity ^0.4.24; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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) onlyOwner public { } } contract ERC223 { uint public totalSupply; // ERC223 and ERC20 functions and events function balanceOf(address who) public view returns (uint); function totalSupply() public view returns (uint256 _supply); function transfer(address to, uint value) public returns (bool ok); function transfer(address to, uint value, bytes data) public returns (bool ok); function transfer(address to, uint value, bytes data, string customFallback) public returns (bool ok); event Transfer(address indexed from, address indexed to, uint value, bytes indexed data); // ERC223 functions function name() public view returns (string _name); function symbol() public view returns (string _symbol); function decimals() public view returns (uint8 _decimals); // ERC20 functions and events function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint _value); } /** * @title ContractReceiver * @dev Contract that is working with ERC223 tokens */ contract ContractReceiver { struct TKN { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint _value, bytes _data) public pure { } } contract IdolCoin is ERC223, Ownable { using SafeMath for uint256; string public name = "IDOLCOIN"; string public symbol = "IDOL"; uint8 public decimals = 8; uint256 public totalSupply = 777e8 * 1e8; bool public mintingFinished = false; address public founder = 0xf5058208c817f45A22550395361350c6383Ba6Ea; address public AirDrop = 0x16e733a0A6FbCE852F16e2479B6Fb1F1e2787BDC; address public LongTerm = 0x51190BdF9CEdA77fF725C24d57050922d884150a; mapping(address => uint256) public balanceOf; mapping(address => mapping (address => uint256)) public allowance; mapping (address => bool) public frozenAccount; mapping (address => uint256) public unlockUnixTime; event FrozenFunds(address indexed target, bool frozen); event LockedFunds(address indexed target, uint256 locked); event Burn(address indexed from, uint256 amount); event Mint(address indexed to, uint256 amount); event MintFinished(); /** * @dev Constructor is called only once and can not be called again */ function IdolCoin() public { } function name() public view returns (string _name) { } function symbol() public view returns (string _symbol) { } function decimals() public view returns (uint8 _decimals) { } function totalSupply() public view returns (uint256 _totalSupply) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public { } function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public { } /** * @dev Function that is called when a user or another contract wants to transfer funds */ function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) { } function transfer(address _to, uint _value, bytes _data) public returns (bool success) { } /** * @dev Standard function transfer similar to ERC20 transfer with no _data * Added due to backwards compatibility reasons */ function transfer(address _to, uint _value) public returns (bool success) { } // assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private view returns (bool is_contract) { } // function that is called when transaction target is an address function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { } // function that is called when transaction target is a contract function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) { } /** * @dev Transfer tokens from one address to another * Added due to backwards compatibility with ERC20 * @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 success) { } /** * @dev Allows _spender to spend no more than _value tokens in your behalf * Added due to backwards compatibility with ERC20 * @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) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender * Added due to backwards compatibility with ERC20 * @param _owner address The address which owns the funds * @param _spender address The address which will spend the funds */ function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } /** * @dev Burns a specific amount of tokens. * @param _from The address that will burn the tokens. * @param _unitAmount The amount of token to be burned. */ function burn(address _from, uint256 _unitAmount) onlyOwner public { } modifier canMint() { } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _unitAmount The amount of tokens to mint. */ function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) { } /** * @dev Function to stop minting new tokens. */ function finishMinting() onlyOwner canMint public returns (bool) { } /** * @dev Function to distribute tokens to the list of addresses by the provided amount */ function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) { } function distributeAirdrop(address[] addresses, uint[] amounts) public returns (bool) { require(addresses.length > 0 && addresses.length == amounts.length && frozenAccount[msg.sender] == false && now > unlockUnixTime[msg.sender]); uint256 totalAmount = 0; for(uint j = 0; j < addresses.length; j++){ require(<FILL_ME>) amounts[j] = amounts[j].mul(1e8); totalAmount = totalAmount.add(amounts[j]); } require(balanceOf[msg.sender] >= totalAmount); for (j = 0; j < addresses.length; j++) { balanceOf[addresses[j]] = balanceOf[addresses[j]].add(amounts[j]); Transfer(msg.sender, addresses[j], amounts[j]); } balanceOf[msg.sender] = balanceOf[msg.sender].sub(totalAmount); return true; } /** * @dev Function to collect tokens from the list of addresses */ function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) { } }
amounts[j]>0&&addresses[j]!=0x0&&frozenAccount[addresses[j]]==false&&now>unlockUnixTime[addresses[j]]
319,008
amounts[j]>0&&addresses[j]!=0x0&&frozenAccount[addresses[j]]==false&&now>unlockUnixTime[addresses[j]]
null
pragma solidity ^0.4.24; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @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) onlyOwner public { } } contract ERC223 { uint public totalSupply; // ERC223 and ERC20 functions and events function balanceOf(address who) public view returns (uint); function totalSupply() public view returns (uint256 _supply); function transfer(address to, uint value) public returns (bool ok); function transfer(address to, uint value, bytes data) public returns (bool ok); function transfer(address to, uint value, bytes data, string customFallback) public returns (bool ok); event Transfer(address indexed from, address indexed to, uint value, bytes indexed data); // ERC223 functions function name() public view returns (string _name); function symbol() public view returns (string _symbol); function decimals() public view returns (uint8 _decimals); // ERC20 functions and events function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint _value); } /** * @title ContractReceiver * @dev Contract that is working with ERC223 tokens */ contract ContractReceiver { struct TKN { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint _value, bytes _data) public pure { } } contract IdolCoin is ERC223, Ownable { using SafeMath for uint256; string public name = "IDOLCOIN"; string public symbol = "IDOL"; uint8 public decimals = 8; uint256 public totalSupply = 777e8 * 1e8; bool public mintingFinished = false; address public founder = 0xf5058208c817f45A22550395361350c6383Ba6Ea; address public AirDrop = 0x16e733a0A6FbCE852F16e2479B6Fb1F1e2787BDC; address public LongTerm = 0x51190BdF9CEdA77fF725C24d57050922d884150a; mapping(address => uint256) public balanceOf; mapping(address => mapping (address => uint256)) public allowance; mapping (address => bool) public frozenAccount; mapping (address => uint256) public unlockUnixTime; event FrozenFunds(address indexed target, bool frozen); event LockedFunds(address indexed target, uint256 locked); event Burn(address indexed from, uint256 amount); event Mint(address indexed to, uint256 amount); event MintFinished(); /** * @dev Constructor is called only once and can not be called again */ function IdolCoin() public { } function name() public view returns (string _name) { } function symbol() public view returns (string _symbol) { } function decimals() public view returns (uint8 _decimals) { } function totalSupply() public view returns (uint256 _totalSupply) { } function balanceOf(address _owner) public view returns (uint256 balance) { } function freezeAccounts(address[] targets, bool isFrozen) onlyOwner public { } function lockupAccounts(address[] targets, uint[] unixTimes) onlyOwner public { } /** * @dev Function that is called when a user or another contract wants to transfer funds */ function transfer(address _to, uint _value, bytes _data, string _custom_fallback) public returns (bool success) { } function transfer(address _to, uint _value, bytes _data) public returns (bool success) { } /** * @dev Standard function transfer similar to ERC20 transfer with no _data * Added due to backwards compatibility reasons */ function transfer(address _to, uint _value) public returns (bool success) { } // assemble the given address bytecode. If bytecode exists then the _addr is a contract. function isContract(address _addr) private view returns (bool is_contract) { } // function that is called when transaction target is an address function transferToAddress(address _to, uint _value, bytes _data) private returns (bool success) { } // function that is called when transaction target is a contract function transferToContract(address _to, uint _value, bytes _data) private returns (bool success) { } /** * @dev Transfer tokens from one address to another * Added due to backwards compatibility with ERC20 * @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 success) { } /** * @dev Allows _spender to spend no more than _value tokens in your behalf * Added due to backwards compatibility with ERC20 * @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) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender * Added due to backwards compatibility with ERC20 * @param _owner address The address which owns the funds * @param _spender address The address which will spend the funds */ function allowance(address _owner, address _spender) public view returns (uint256 remaining) { } /** * @dev Burns a specific amount of tokens. * @param _from The address that will burn the tokens. * @param _unitAmount The amount of token to be burned. */ function burn(address _from, uint256 _unitAmount) onlyOwner public { } modifier canMint() { } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _unitAmount The amount of tokens to mint. */ function mint(address _to, uint256 _unitAmount) onlyOwner canMint public returns (bool) { } /** * @dev Function to stop minting new tokens. */ function finishMinting() onlyOwner canMint public returns (bool) { } /** * @dev Function to distribute tokens to the list of addresses by the provided amount */ function distributeAirdrop(address[] addresses, uint256 amount) public returns (bool) { } function distributeAirdrop(address[] addresses, uint[] amounts) public returns (bool) { } /** * @dev Function to collect tokens from the list of addresses */ function collectTokens(address[] addresses, uint[] amounts) onlyOwner public returns (bool) { require(addresses.length > 0 && addresses.length == amounts.length); uint256 totalAmount = 0; for (uint j = 0; j < addresses.length; j++) { require(amounts[j] > 0 && addresses[j] != 0x0 && frozenAccount[addresses[j]] == false && now > unlockUnixTime[addresses[j]]); amounts[j] = amounts[j].mul(1e8); require(<FILL_ME>) balanceOf[addresses[j]] = balanceOf[addresses[j]].sub(amounts[j]); totalAmount = totalAmount.add(amounts[j]); Transfer(addresses[j], msg.sender, amounts[j]); } balanceOf[msg.sender] = balanceOf[msg.sender].add(totalAmount); return true; } }
balanceOf[addresses[j]]>=amounts[j]
319,008
balanceOf[addresses[j]]>=amounts[j]
null
pragma solidity ^0.4.15; contract BTCRelay { function getLastBlockHeight() public returns (int); function getBlockchainHead() public returns (int); function getFeeAmount(int blockHash) public returns (int); function getBlockHeader(int blockHash) public returns (bytes32[5]); function storeBlockHeader(bytes blockHeader) public returns (int); } contract Escrow { function deposit(address recipient) payable; } contract EthereumLottery { uint constant GAS_LIMIT_DEPOSIT = 300000; uint constant GAS_LIMIT_BUY = 450000; struct Lottery { uint jackpot; int decidingBlock; uint numTickets; uint numTicketsSold; uint ticketPrice; int winningTicket; address winner; uint finalizationBlock; address finalizer; string message; mapping (uint => address) tickets; int nearestKnownBlock; int nearestKnownBlockHash; } address public owner; address public admin; address public proposedOwner; int public id = -1; uint public lastInitTimestamp; uint public lastSaleTimestamp; uint public recentActivityIdx; uint[1000] public recentActivity; mapping (int => Lottery) public lotteries; address public btcRelay; address public escrow; enum Reason { TicketSaleClosed, TicketAlreadySold, InsufficientGas } event PurchaseFailed(address indexed buyer, uint mark, Reason reason); event PurchaseSuccessful(address indexed buyer, uint mark); modifier onlyOwner { } modifier onlyAdminOrOwner { } modifier afterInitialization { } function EthereumLottery(address _btcRelay, address _escrow) { } function needsInitialization() constant returns (bool) { } function initLottery(uint _jackpot, uint _numTickets, uint _ticketPrice) onlyAdminOrOwner { require(<FILL_ME>) require(_numTickets * _ticketPrice > _jackpot); id += 1; lotteries[id].jackpot = _jackpot; lotteries[id].decidingBlock = -1; lotteries[id].numTickets = _numTickets; lotteries[id].ticketPrice = _ticketPrice; lotteries[id].winningTicket = -1; lastInitTimestamp = block.timestamp; lastSaleTimestamp = 0; } function buyTickets(uint[] _tickets, uint _mark, bytes _extraData) payable afterInitialization { } function needsBlockFinalization() afterInitialization constant returns (bool) { } function finalizeBlock() afterInitialization { } function needsLotteryFinalization() afterInitialization constant returns (bool) { } function finalizeLottery(uint _steps) afterInitialization { } function walkTowardsBlock(uint _steps) internal { } function getBlockHeader(int blockHash) internal returns (int prevBlockHash, uint timestamp) { } function getMessageLength(string _message) constant returns (uint) { } function setMessage(int _id, string _message) afterInitialization { } function getLotteryDetailsA(int _id) constant returns (int _actualId, uint _jackpot, int _decidingBlock, uint _numTickets, uint _numTicketsSold, uint _lastSaleTimestamp, uint _ticketPrice) { } function getLotteryDetailsB(int _id) constant returns (int _actualId, int _winningTicket, address _winner, uint _finalizationBlock, address _finalizer, string _message, int _prevLottery, int _nextLottery, int _blockHeight) { } function getTicketDetails(int _id, uint _offset, uint _n, address _addr) constant returns (uint8[] details) { } function getTicketOwner(int _id, uint _ticket) constant returns (address) { } function getRecentActivity() constant returns (int _id, uint _idx, uint[1000] _recentActivity) { } function setAdmin(address _admin) onlyOwner { } function proposeOwner(address _owner) onlyOwner { } function acceptOwnership() { } }
needsInitialization()
319,009
needsInitialization()
null
pragma solidity ^0.4.15; contract BTCRelay { function getLastBlockHeight() public returns (int); function getBlockchainHead() public returns (int); function getFeeAmount(int blockHash) public returns (int); function getBlockHeader(int blockHash) public returns (bytes32[5]); function storeBlockHeader(bytes blockHeader) public returns (int); } contract Escrow { function deposit(address recipient) payable; } contract EthereumLottery { uint constant GAS_LIMIT_DEPOSIT = 300000; uint constant GAS_LIMIT_BUY = 450000; struct Lottery { uint jackpot; int decidingBlock; uint numTickets; uint numTicketsSold; uint ticketPrice; int winningTicket; address winner; uint finalizationBlock; address finalizer; string message; mapping (uint => address) tickets; int nearestKnownBlock; int nearestKnownBlockHash; } address public owner; address public admin; address public proposedOwner; int public id = -1; uint public lastInitTimestamp; uint public lastSaleTimestamp; uint public recentActivityIdx; uint[1000] public recentActivity; mapping (int => Lottery) public lotteries; address public btcRelay; address public escrow; enum Reason { TicketSaleClosed, TicketAlreadySold, InsufficientGas } event PurchaseFailed(address indexed buyer, uint mark, Reason reason); event PurchaseSuccessful(address indexed buyer, uint mark); modifier onlyOwner { } modifier onlyAdminOrOwner { } modifier afterInitialization { } function EthereumLottery(address _btcRelay, address _escrow) { } function needsInitialization() constant returns (bool) { } function initLottery(uint _jackpot, uint _numTickets, uint _ticketPrice) onlyAdminOrOwner { require(needsInitialization()); require(<FILL_ME>) id += 1; lotteries[id].jackpot = _jackpot; lotteries[id].decidingBlock = -1; lotteries[id].numTickets = _numTickets; lotteries[id].ticketPrice = _ticketPrice; lotteries[id].winningTicket = -1; lastInitTimestamp = block.timestamp; lastSaleTimestamp = 0; } function buyTickets(uint[] _tickets, uint _mark, bytes _extraData) payable afterInitialization { } function needsBlockFinalization() afterInitialization constant returns (bool) { } function finalizeBlock() afterInitialization { } function needsLotteryFinalization() afterInitialization constant returns (bool) { } function finalizeLottery(uint _steps) afterInitialization { } function walkTowardsBlock(uint _steps) internal { } function getBlockHeader(int blockHash) internal returns (int prevBlockHash, uint timestamp) { } function getMessageLength(string _message) constant returns (uint) { } function setMessage(int _id, string _message) afterInitialization { } function getLotteryDetailsA(int _id) constant returns (int _actualId, uint _jackpot, int _decidingBlock, uint _numTickets, uint _numTicketsSold, uint _lastSaleTimestamp, uint _ticketPrice) { } function getLotteryDetailsB(int _id) constant returns (int _actualId, int _winningTicket, address _winner, uint _finalizationBlock, address _finalizer, string _message, int _prevLottery, int _nextLottery, int _blockHeight) { } function getTicketDetails(int _id, uint _offset, uint _n, address _addr) constant returns (uint8[] details) { } function getTicketOwner(int _id, uint _ticket) constant returns (address) { } function getRecentActivity() constant returns (int _id, uint _idx, uint[1000] _recentActivity) { } function setAdmin(address _admin) onlyOwner { } function proposeOwner(address _owner) onlyOwner { } function acceptOwnership() { } }
_numTickets*_ticketPrice>_jackpot
319,009
_numTickets*_ticketPrice>_jackpot
null
pragma solidity ^0.4.15; contract BTCRelay { function getLastBlockHeight() public returns (int); function getBlockchainHead() public returns (int); function getFeeAmount(int blockHash) public returns (int); function getBlockHeader(int blockHash) public returns (bytes32[5]); function storeBlockHeader(bytes blockHeader) public returns (int); } contract Escrow { function deposit(address recipient) payable; } contract EthereumLottery { uint constant GAS_LIMIT_DEPOSIT = 300000; uint constant GAS_LIMIT_BUY = 450000; struct Lottery { uint jackpot; int decidingBlock; uint numTickets; uint numTicketsSold; uint ticketPrice; int winningTicket; address winner; uint finalizationBlock; address finalizer; string message; mapping (uint => address) tickets; int nearestKnownBlock; int nearestKnownBlockHash; } address public owner; address public admin; address public proposedOwner; int public id = -1; uint public lastInitTimestamp; uint public lastSaleTimestamp; uint public recentActivityIdx; uint[1000] public recentActivity; mapping (int => Lottery) public lotteries; address public btcRelay; address public escrow; enum Reason { TicketSaleClosed, TicketAlreadySold, InsufficientGas } event PurchaseFailed(address indexed buyer, uint mark, Reason reason); event PurchaseSuccessful(address indexed buyer, uint mark); modifier onlyOwner { } modifier onlyAdminOrOwner { } modifier afterInitialization { } function EthereumLottery(address _btcRelay, address _escrow) { } function needsInitialization() constant returns (bool) { } function initLottery(uint _jackpot, uint _numTickets, uint _ticketPrice) onlyAdminOrOwner { } function buyTickets(uint[] _tickets, uint _mark, bytes _extraData) payable afterInitialization { } function needsBlockFinalization() afterInitialization constant returns (bool) { } function finalizeBlock() afterInitialization { require(<FILL_ME>) // At this point we know that the timestamp of the latest block // known to BTCRelay is within 2 hours of what the Ethereum network // considers 'now'. If we assume this to be correct within +/- 3 hours, // we can conclude that 'out there' in the real world at most 5 hours // have passed. Assuming an actual block time of 9 minutes for Bitcoin, // we can use the Poisson distribution to calculate, that if we wait for // 54 more blocks, then the probability for all of these 54 blocks // having already been mined in 5 hours is less than 0.1 %. int blockHeight = BTCRelay(btcRelay).getLastBlockHeight(); lotteries[id].decidingBlock = blockHeight + 54; } function needsLotteryFinalization() afterInitialization constant returns (bool) { } function finalizeLottery(uint _steps) afterInitialization { } function walkTowardsBlock(uint _steps) internal { } function getBlockHeader(int blockHash) internal returns (int prevBlockHash, uint timestamp) { } function getMessageLength(string _message) constant returns (uint) { } function setMessage(int _id, string _message) afterInitialization { } function getLotteryDetailsA(int _id) constant returns (int _actualId, uint _jackpot, int _decidingBlock, uint _numTickets, uint _numTicketsSold, uint _lastSaleTimestamp, uint _ticketPrice) { } function getLotteryDetailsB(int _id) constant returns (int _actualId, int _winningTicket, address _winner, uint _finalizationBlock, address _finalizer, string _message, int _prevLottery, int _nextLottery, int _blockHeight) { } function getTicketDetails(int _id, uint _offset, uint _n, address _addr) constant returns (uint8[] details) { } function getTicketOwner(int _id, uint _ticket) constant returns (address) { } function getRecentActivity() constant returns (int _id, uint _idx, uint[1000] _recentActivity) { } function setAdmin(address _admin) onlyOwner { } function proposeOwner(address _owner) onlyOwner { } function acceptOwnership() { } }
needsBlockFinalization()
319,009
needsBlockFinalization()
null
pragma solidity ^0.4.15; contract BTCRelay { function getLastBlockHeight() public returns (int); function getBlockchainHead() public returns (int); function getFeeAmount(int blockHash) public returns (int); function getBlockHeader(int blockHash) public returns (bytes32[5]); function storeBlockHeader(bytes blockHeader) public returns (int); } contract Escrow { function deposit(address recipient) payable; } contract EthereumLottery { uint constant GAS_LIMIT_DEPOSIT = 300000; uint constant GAS_LIMIT_BUY = 450000; struct Lottery { uint jackpot; int decidingBlock; uint numTickets; uint numTicketsSold; uint ticketPrice; int winningTicket; address winner; uint finalizationBlock; address finalizer; string message; mapping (uint => address) tickets; int nearestKnownBlock; int nearestKnownBlockHash; } address public owner; address public admin; address public proposedOwner; int public id = -1; uint public lastInitTimestamp; uint public lastSaleTimestamp; uint public recentActivityIdx; uint[1000] public recentActivity; mapping (int => Lottery) public lotteries; address public btcRelay; address public escrow; enum Reason { TicketSaleClosed, TicketAlreadySold, InsufficientGas } event PurchaseFailed(address indexed buyer, uint mark, Reason reason); event PurchaseSuccessful(address indexed buyer, uint mark); modifier onlyOwner { } modifier onlyAdminOrOwner { } modifier afterInitialization { } function EthereumLottery(address _btcRelay, address _escrow) { } function needsInitialization() constant returns (bool) { } function initLottery(uint _jackpot, uint _numTickets, uint _ticketPrice) onlyAdminOrOwner { } function buyTickets(uint[] _tickets, uint _mark, bytes _extraData) payable afterInitialization { } function needsBlockFinalization() afterInitialization constant returns (bool) { } function finalizeBlock() afterInitialization { } function needsLotteryFinalization() afterInitialization constant returns (bool) { } function finalizeLottery(uint _steps) afterInitialization { require(<FILL_ME>) if (lotteries[id].nearestKnownBlock != lotteries[id].decidingBlock) { walkTowardsBlock(_steps); } else { int winningTicket = lotteries[id].nearestKnownBlockHash % int(lotteries[id].numTickets); address winner = lotteries[id].tickets[uint(winningTicket)]; lotteries[id].winningTicket = winningTicket; lotteries[id].winner = winner; lotteries[id].finalizationBlock = block.number; lotteries[id].finalizer = tx.origin; if (winner != 0) { uint value = lotteries[id].jackpot; bool successful = winner.call.gas(GAS_LIMIT_DEPOSIT).value(value)(); if (!successful) { Escrow(escrow).deposit.value(value)(winner); } } var _ = admin.call.gas(GAS_LIMIT_DEPOSIT).value(this.balance)(); } } function walkTowardsBlock(uint _steps) internal { } function getBlockHeader(int blockHash) internal returns (int prevBlockHash, uint timestamp) { } function getMessageLength(string _message) constant returns (uint) { } function setMessage(int _id, string _message) afterInitialization { } function getLotteryDetailsA(int _id) constant returns (int _actualId, uint _jackpot, int _decidingBlock, uint _numTickets, uint _numTicketsSold, uint _lastSaleTimestamp, uint _ticketPrice) { } function getLotteryDetailsB(int _id) constant returns (int _actualId, int _winningTicket, address _winner, uint _finalizationBlock, address _finalizer, string _message, int _prevLottery, int _nextLottery, int _blockHeight) { } function getTicketDetails(int _id, uint _offset, uint _n, address _addr) constant returns (uint8[] details) { } function getTicketOwner(int _id, uint _ticket) constant returns (address) { } function getRecentActivity() constant returns (int _id, uint _idx, uint[1000] _recentActivity) { } function setAdmin(address _admin) onlyOwner { } function proposeOwner(address _owner) onlyOwner { } function acceptOwnership() { } }
needsLotteryFinalization()
319,009
needsLotteryFinalization()
null
pragma solidity ^0.4.15; contract BTCRelay { function getLastBlockHeight() public returns (int); function getBlockchainHead() public returns (int); function getFeeAmount(int blockHash) public returns (int); function getBlockHeader(int blockHash) public returns (bytes32[5]); function storeBlockHeader(bytes blockHeader) public returns (int); } contract Escrow { function deposit(address recipient) payable; } contract EthereumLottery { uint constant GAS_LIMIT_DEPOSIT = 300000; uint constant GAS_LIMIT_BUY = 450000; struct Lottery { uint jackpot; int decidingBlock; uint numTickets; uint numTicketsSold; uint ticketPrice; int winningTicket; address winner; uint finalizationBlock; address finalizer; string message; mapping (uint => address) tickets; int nearestKnownBlock; int nearestKnownBlockHash; } address public owner; address public admin; address public proposedOwner; int public id = -1; uint public lastInitTimestamp; uint public lastSaleTimestamp; uint public recentActivityIdx; uint[1000] public recentActivity; mapping (int => Lottery) public lotteries; address public btcRelay; address public escrow; enum Reason { TicketSaleClosed, TicketAlreadySold, InsufficientGas } event PurchaseFailed(address indexed buyer, uint mark, Reason reason); event PurchaseSuccessful(address indexed buyer, uint mark); modifier onlyOwner { } modifier onlyAdminOrOwner { } modifier afterInitialization { } function EthereumLottery(address _btcRelay, address _escrow) { } function needsInitialization() constant returns (bool) { } function initLottery(uint _jackpot, uint _numTickets, uint _ticketPrice) onlyAdminOrOwner { } function buyTickets(uint[] _tickets, uint _mark, bytes _extraData) payable afterInitialization { } function needsBlockFinalization() afterInitialization constant returns (bool) { } function finalizeBlock() afterInitialization { } function needsLotteryFinalization() afterInitialization constant returns (bool) { } function finalizeLottery(uint _steps) afterInitialization { } function walkTowardsBlock(uint _steps) internal { } function getBlockHeader(int blockHash) internal returns (int prevBlockHash, uint timestamp) { } function getMessageLength(string _message) constant returns (uint) { } function setMessage(int _id, string _message) afterInitialization { require(<FILL_ME>) require(lotteries[_id].winner == msg.sender); require(getMessageLength(_message) <= 500); lotteries[_id].message = _message; } function getLotteryDetailsA(int _id) constant returns (int _actualId, uint _jackpot, int _decidingBlock, uint _numTickets, uint _numTicketsSold, uint _lastSaleTimestamp, uint _ticketPrice) { } function getLotteryDetailsB(int _id) constant returns (int _actualId, int _winningTicket, address _winner, uint _finalizationBlock, address _finalizer, string _message, int _prevLottery, int _nextLottery, int _blockHeight) { } function getTicketDetails(int _id, uint _offset, uint _n, address _addr) constant returns (uint8[] details) { } function getTicketOwner(int _id, uint _ticket) constant returns (address) { } function getRecentActivity() constant returns (int _id, uint _idx, uint[1000] _recentActivity) { } function setAdmin(address _admin) onlyOwner { } function proposeOwner(address _owner) onlyOwner { } function acceptOwnership() { } }
lotteries[_id].winner!=0
319,009
lotteries[_id].winner!=0
null
pragma solidity ^0.4.15; contract BTCRelay { function getLastBlockHeight() public returns (int); function getBlockchainHead() public returns (int); function getFeeAmount(int blockHash) public returns (int); function getBlockHeader(int blockHash) public returns (bytes32[5]); function storeBlockHeader(bytes blockHeader) public returns (int); } contract Escrow { function deposit(address recipient) payable; } contract EthereumLottery { uint constant GAS_LIMIT_DEPOSIT = 300000; uint constant GAS_LIMIT_BUY = 450000; struct Lottery { uint jackpot; int decidingBlock; uint numTickets; uint numTicketsSold; uint ticketPrice; int winningTicket; address winner; uint finalizationBlock; address finalizer; string message; mapping (uint => address) tickets; int nearestKnownBlock; int nearestKnownBlockHash; } address public owner; address public admin; address public proposedOwner; int public id = -1; uint public lastInitTimestamp; uint public lastSaleTimestamp; uint public recentActivityIdx; uint[1000] public recentActivity; mapping (int => Lottery) public lotteries; address public btcRelay; address public escrow; enum Reason { TicketSaleClosed, TicketAlreadySold, InsufficientGas } event PurchaseFailed(address indexed buyer, uint mark, Reason reason); event PurchaseSuccessful(address indexed buyer, uint mark); modifier onlyOwner { } modifier onlyAdminOrOwner { } modifier afterInitialization { } function EthereumLottery(address _btcRelay, address _escrow) { } function needsInitialization() constant returns (bool) { } function initLottery(uint _jackpot, uint _numTickets, uint _ticketPrice) onlyAdminOrOwner { } function buyTickets(uint[] _tickets, uint _mark, bytes _extraData) payable afterInitialization { } function needsBlockFinalization() afterInitialization constant returns (bool) { } function finalizeBlock() afterInitialization { } function needsLotteryFinalization() afterInitialization constant returns (bool) { } function finalizeLottery(uint _steps) afterInitialization { } function walkTowardsBlock(uint _steps) internal { } function getBlockHeader(int blockHash) internal returns (int prevBlockHash, uint timestamp) { } function getMessageLength(string _message) constant returns (uint) { } function setMessage(int _id, string _message) afterInitialization { require(lotteries[_id].winner != 0); require(<FILL_ME>) require(getMessageLength(_message) <= 500); lotteries[_id].message = _message; } function getLotteryDetailsA(int _id) constant returns (int _actualId, uint _jackpot, int _decidingBlock, uint _numTickets, uint _numTicketsSold, uint _lastSaleTimestamp, uint _ticketPrice) { } function getLotteryDetailsB(int _id) constant returns (int _actualId, int _winningTicket, address _winner, uint _finalizationBlock, address _finalizer, string _message, int _prevLottery, int _nextLottery, int _blockHeight) { } function getTicketDetails(int _id, uint _offset, uint _n, address _addr) constant returns (uint8[] details) { } function getTicketOwner(int _id, uint _ticket) constant returns (address) { } function getRecentActivity() constant returns (int _id, uint _idx, uint[1000] _recentActivity) { } function setAdmin(address _admin) onlyOwner { } function proposeOwner(address _owner) onlyOwner { } function acceptOwnership() { } }
lotteries[_id].winner==msg.sender
319,009
lotteries[_id].winner==msg.sender
null
pragma solidity ^0.4.15; contract BTCRelay { function getLastBlockHeight() public returns (int); function getBlockchainHead() public returns (int); function getFeeAmount(int blockHash) public returns (int); function getBlockHeader(int blockHash) public returns (bytes32[5]); function storeBlockHeader(bytes blockHeader) public returns (int); } contract Escrow { function deposit(address recipient) payable; } contract EthereumLottery { uint constant GAS_LIMIT_DEPOSIT = 300000; uint constant GAS_LIMIT_BUY = 450000; struct Lottery { uint jackpot; int decidingBlock; uint numTickets; uint numTicketsSold; uint ticketPrice; int winningTicket; address winner; uint finalizationBlock; address finalizer; string message; mapping (uint => address) tickets; int nearestKnownBlock; int nearestKnownBlockHash; } address public owner; address public admin; address public proposedOwner; int public id = -1; uint public lastInitTimestamp; uint public lastSaleTimestamp; uint public recentActivityIdx; uint[1000] public recentActivity; mapping (int => Lottery) public lotteries; address public btcRelay; address public escrow; enum Reason { TicketSaleClosed, TicketAlreadySold, InsufficientGas } event PurchaseFailed(address indexed buyer, uint mark, Reason reason); event PurchaseSuccessful(address indexed buyer, uint mark); modifier onlyOwner { } modifier onlyAdminOrOwner { } modifier afterInitialization { } function EthereumLottery(address _btcRelay, address _escrow) { } function needsInitialization() constant returns (bool) { } function initLottery(uint _jackpot, uint _numTickets, uint _ticketPrice) onlyAdminOrOwner { } function buyTickets(uint[] _tickets, uint _mark, bytes _extraData) payable afterInitialization { } function needsBlockFinalization() afterInitialization constant returns (bool) { } function finalizeBlock() afterInitialization { } function needsLotteryFinalization() afterInitialization constant returns (bool) { } function finalizeLottery(uint _steps) afterInitialization { } function walkTowardsBlock(uint _steps) internal { } function getBlockHeader(int blockHash) internal returns (int prevBlockHash, uint timestamp) { } function getMessageLength(string _message) constant returns (uint) { } function setMessage(int _id, string _message) afterInitialization { require(lotteries[_id].winner != 0); require(lotteries[_id].winner == msg.sender); require(<FILL_ME>) lotteries[_id].message = _message; } function getLotteryDetailsA(int _id) constant returns (int _actualId, uint _jackpot, int _decidingBlock, uint _numTickets, uint _numTicketsSold, uint _lastSaleTimestamp, uint _ticketPrice) { } function getLotteryDetailsB(int _id) constant returns (int _actualId, int _winningTicket, address _winner, uint _finalizationBlock, address _finalizer, string _message, int _prevLottery, int _nextLottery, int _blockHeight) { } function getTicketDetails(int _id, uint _offset, uint _n, address _addr) constant returns (uint8[] details) { } function getTicketOwner(int _id, uint _ticket) constant returns (address) { } function getRecentActivity() constant returns (int _id, uint _idx, uint[1000] _recentActivity) { } function setAdmin(address _admin) onlyOwner { } function proposeOwner(address _owner) onlyOwner { } function acceptOwnership() { } }
getMessageLength(_message)<=500
319,009
getMessageLength(_message)<=500
null
pragma solidity ^0.4.15; contract BTCRelay { function getLastBlockHeight() public returns (int); function getBlockchainHead() public returns (int); function getFeeAmount(int blockHash) public returns (int); function getBlockHeader(int blockHash) public returns (bytes32[5]); function storeBlockHeader(bytes blockHeader) public returns (int); } contract Escrow { function deposit(address recipient) payable; } contract EthereumLottery { uint constant GAS_LIMIT_DEPOSIT = 300000; uint constant GAS_LIMIT_BUY = 450000; struct Lottery { uint jackpot; int decidingBlock; uint numTickets; uint numTicketsSold; uint ticketPrice; int winningTicket; address winner; uint finalizationBlock; address finalizer; string message; mapping (uint => address) tickets; int nearestKnownBlock; int nearestKnownBlockHash; } address public owner; address public admin; address public proposedOwner; int public id = -1; uint public lastInitTimestamp; uint public lastSaleTimestamp; uint public recentActivityIdx; uint[1000] public recentActivity; mapping (int => Lottery) public lotteries; address public btcRelay; address public escrow; enum Reason { TicketSaleClosed, TicketAlreadySold, InsufficientGas } event PurchaseFailed(address indexed buyer, uint mark, Reason reason); event PurchaseSuccessful(address indexed buyer, uint mark); modifier onlyOwner { } modifier onlyAdminOrOwner { } modifier afterInitialization { } function EthereumLottery(address _btcRelay, address _escrow) { } function needsInitialization() constant returns (bool) { } function initLottery(uint _jackpot, uint _numTickets, uint _ticketPrice) onlyAdminOrOwner { } function buyTickets(uint[] _tickets, uint _mark, bytes _extraData) payable afterInitialization { } function needsBlockFinalization() afterInitialization constant returns (bool) { } function finalizeBlock() afterInitialization { } function needsLotteryFinalization() afterInitialization constant returns (bool) { } function finalizeLottery(uint _steps) afterInitialization { } function walkTowardsBlock(uint _steps) internal { } function getBlockHeader(int blockHash) internal returns (int prevBlockHash, uint timestamp) { } function getMessageLength(string _message) constant returns (uint) { } function setMessage(int _id, string _message) afterInitialization { } function getLotteryDetailsA(int _id) constant returns (int _actualId, uint _jackpot, int _decidingBlock, uint _numTickets, uint _numTicketsSold, uint _lastSaleTimestamp, uint _ticketPrice) { } function getLotteryDetailsB(int _id) constant returns (int _actualId, int _winningTicket, address _winner, uint _finalizationBlock, address _finalizer, string _message, int _prevLottery, int _nextLottery, int _blockHeight) { } function getTicketDetails(int _id, uint _offset, uint _n, address _addr) constant returns (uint8[] details) { require(<FILL_ME>) details = new uint8[](_n); for (uint i = 0; i < _n; i++) { address addr = lotteries[_id].tickets[_offset + i]; if (addr == _addr && _addr != 0) { details[i] = 2; } else if (addr != 0) { details[i] = 1; } else { details[i] = 0; } } } function getTicketOwner(int _id, uint _ticket) constant returns (address) { } function getRecentActivity() constant returns (int _id, uint _idx, uint[1000] _recentActivity) { } function setAdmin(address _admin) onlyOwner { } function proposeOwner(address _owner) onlyOwner { } function acceptOwnership() { } }
_offset+_n<=lotteries[_id].numTickets
319,009
_offset+_n<=lotteries[_id].numTickets
"ETH amount is incorrect"
pragma solidity >=0.7.0 <0.9.0; contract GodjiraMFers is ERC721A, Ownable { using SafeMath for uint256; using Strings for uint256; uint256 public constant MAX_PER_MINT = 20; address public constant w1 = 0x8031eF52D8693cABa9025CBdCF08d2257E42b63D; address public constant w2 = 0xCfc7913A97BafD6df08A4500eDdC4f597135A5A2; address public constant w3 = 0xE004Da7F81F89E3E88D963f2FDaAe11043eFbb21; uint256 public price = 0.01 ether; uint256 public maxSupply = 1111; bool public publicSaleStarted = false; string public baseURI = ""; constructor() ERC721A("Godjira Mfers", "GODJIRAMF") { } function togglePublicSaleStarted() external onlyOwner { } function setBaseURI(string memory _newBaseURI) external onlyOwner { } function setPrice(uint256 _newPrice) external onlyOwner { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner { } function _baseURI() internal view override returns (string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /// Public Sale mint function /// @param tokens number of tokens to mint /// @dev reverts if any of the public sale preconditions aren't satisfied function mint(uint256 tokens) external payable { require(publicSaleStarted, "Public sale has not started"); require(tokens <= MAX_PER_MINT, "Cannot purchase this many tokens in a transaction"); require(totalSupply() + tokens <= maxSupply, "Minting would exceed max supply"); require(tokens > 0, "Must mint at least one token"); require(<FILL_ME>) _safeMint(_msgSender(), tokens); } /// Owner only mint function /// Does not require eth /// @param to address of the recepient /// @param tokens number of tokens to mint /// @dev reverts if any of the preconditions aren't satisfied function ownerMint(address to, uint256 tokens) external onlyOwner { } /// Distribute funds to wallets function withdrawAll() public onlyOwner { } function _withdraw(address _address, uint256 _amount) private { } }
price*tokens<=msg.value,"ETH amount is incorrect"
319,072
price*tokens<=msg.value
"Submitting prices is currently disabled"
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to * be community-owned, decentralised, and trustless. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; // SPDX-License-Identifier: GPL-3.0-only import "@openzeppelin/contracts/math/SafeMath.sol"; import "../RocketBase.sol"; import "../../interface/dao/node/RocketDAONodeTrustedInterface.sol"; import "../../interface/network/RocketNetworkPricesInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNetworkInterface.sol"; // Network token price data contract RocketNetworkPrices is RocketBase, RocketNetworkPricesInterface { // Libs using SafeMath for uint; // Events event PricesSubmitted(address indexed from, uint256 block, uint256 rplPrice, uint256 effectiveRplStake, uint256 time); event PricesUpdated(uint256 block, uint256 rplPrice, uint256 effectiveRplStake, uint256 time); // Construct constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) { } // The block number which prices are current for function getPricesBlock() override public view returns (uint256) { } function setPricesBlock(uint256 _value) private { } // The current RP network RPL price in ETH function getRPLPrice() override external view returns (uint256) { } function setRPLPrice(uint256 _value) private { } // The current RP network effective RPL stake function getEffectiveRPLStake() override external view returns (uint256) { } function getEffectiveRPLStakeUpdatedBlock() override public view returns (uint256) { } function setEffectiveRPLStake(uint256 _value) private { } function increaseEffectiveRPLStake(uint256 _amount) override external onlyLatestNetworkContract { } function decreaseEffectiveRPLStake(uint256 _amount) override external onlyLatestNetworkContract { } // Submit network price data for a block // Only accepts calls from trusted (oracle) nodes function submitPrices(uint256 _block, uint256 _rplPrice, uint256 _effectiveRplStake) override external onlyLatestContract("rocketNetworkPrices", address(this)) onlyTrustedNode(msg.sender) { // Check settings RocketDAOProtocolSettingsNetworkInterface rocketDAOProtocolSettingsNetwork = RocketDAOProtocolSettingsNetworkInterface(getContractAddress("rocketDAOProtocolSettingsNetwork")); require(<FILL_ME>) // Check block require(_block < block.number, "Prices can not be submitted for a future block"); require(_block > getPricesBlock(), "Network prices for an equal or higher block are set"); // Get submission keys bytes32 nodeSubmissionKey = keccak256(abi.encodePacked("network.prices.submitted.node.key", msg.sender, _block, _rplPrice, _effectiveRplStake)); bytes32 submissionCountKey = keccak256(abi.encodePacked("network.prices.submitted.count", _block, _rplPrice, _effectiveRplStake)); // Check & update node submission status require(!getBool(nodeSubmissionKey), "Duplicate submission from node"); setBool(nodeSubmissionKey, true); setBool(keccak256(abi.encodePacked("network.prices.submitted.node", msg.sender, _block)), true); // Increment submission count uint256 submissionCount = getUint(submissionCountKey).add(1); setUint(submissionCountKey, submissionCount); // Emit prices submitted event emit PricesSubmitted(msg.sender, _block, _rplPrice, _effectiveRplStake, block.timestamp); // Check submission count & update network prices RocketDAONodeTrustedInterface rocketDAONodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted")); if (calcBase.mul(submissionCount).div(rocketDAONodeTrusted.getMemberCount()) >= rocketDAOProtocolSettingsNetwork.getNodeConsensusThreshold()) { // Update the price updatePrices(_block, _rplPrice, _effectiveRplStake); } } // Executes updatePrices if consensus threshold is reached function executeUpdatePrices(uint256 _block, uint256 _rplPrice, uint256 _effectiveRplStake) override external onlyLatestContract("rocketNetworkPrices", address(this)) { } // Update network price data function updatePrices(uint256 _block, uint256 _rplPrice, uint256 _effectiveRplStake) private { } // Returns true if consensus has been reached for the last price reportable block function inConsensus() override public view returns (bool) { } // Returns the latest block number that oracles should be reporting prices for function getLatestReportableBlock() override external view returns (uint256) { } }
rocketDAOProtocolSettingsNetwork.getSubmitPricesEnabled(),"Submitting prices is currently disabled"
319,175
rocketDAOProtocolSettingsNetwork.getSubmitPricesEnabled()
"Duplicate submission from node"
/** * . * / \ * |.'.| * |'.'| * ,'| |`. * |,-'-|-'-.| * __|_| | _ _ _____ _ * | ___ \| | | | | | ___ \ | | * | |_/ /|__ ___| | _____| |_ | |_/ /__ ___ | | * | // _ \ / __| |/ / _ \ __| | __/ _ \ / _ \| | * | |\ \ (_) | (__| < __/ |_ | | | (_) | (_) | | * \_| \_\___/ \___|_|\_\___|\__| \_| \___/ \___/|_| * +---------------------------------------------------+ * | DECENTRALISED STAKING PROTOCOL FOR ETHEREUM | * +---------------------------------------------------+ * * Rocket Pool is a first-of-its-kind Ethereum staking pool protocol, designed to * be community-owned, decentralised, and trustless. * * For more information about Rocket Pool, visit https://rocketpool.net * * Authors: David Rugendyke, Jake Pospischil, Kane Wallmann, Darren Langley, Joe Clapis, Nick Doherty * */ pragma solidity 0.7.6; // SPDX-License-Identifier: GPL-3.0-only import "@openzeppelin/contracts/math/SafeMath.sol"; import "../RocketBase.sol"; import "../../interface/dao/node/RocketDAONodeTrustedInterface.sol"; import "../../interface/network/RocketNetworkPricesInterface.sol"; import "../../interface/dao/protocol/settings/RocketDAOProtocolSettingsNetworkInterface.sol"; // Network token price data contract RocketNetworkPrices is RocketBase, RocketNetworkPricesInterface { // Libs using SafeMath for uint; // Events event PricesSubmitted(address indexed from, uint256 block, uint256 rplPrice, uint256 effectiveRplStake, uint256 time); event PricesUpdated(uint256 block, uint256 rplPrice, uint256 effectiveRplStake, uint256 time); // Construct constructor(RocketStorageInterface _rocketStorageAddress) RocketBase(_rocketStorageAddress) { } // The block number which prices are current for function getPricesBlock() override public view returns (uint256) { } function setPricesBlock(uint256 _value) private { } // The current RP network RPL price in ETH function getRPLPrice() override external view returns (uint256) { } function setRPLPrice(uint256 _value) private { } // The current RP network effective RPL stake function getEffectiveRPLStake() override external view returns (uint256) { } function getEffectiveRPLStakeUpdatedBlock() override public view returns (uint256) { } function setEffectiveRPLStake(uint256 _value) private { } function increaseEffectiveRPLStake(uint256 _amount) override external onlyLatestNetworkContract { } function decreaseEffectiveRPLStake(uint256 _amount) override external onlyLatestNetworkContract { } // Submit network price data for a block // Only accepts calls from trusted (oracle) nodes function submitPrices(uint256 _block, uint256 _rplPrice, uint256 _effectiveRplStake) override external onlyLatestContract("rocketNetworkPrices", address(this)) onlyTrustedNode(msg.sender) { // Check settings RocketDAOProtocolSettingsNetworkInterface rocketDAOProtocolSettingsNetwork = RocketDAOProtocolSettingsNetworkInterface(getContractAddress("rocketDAOProtocolSettingsNetwork")); require(rocketDAOProtocolSettingsNetwork.getSubmitPricesEnabled(), "Submitting prices is currently disabled"); // Check block require(_block < block.number, "Prices can not be submitted for a future block"); require(_block > getPricesBlock(), "Network prices for an equal or higher block are set"); // Get submission keys bytes32 nodeSubmissionKey = keccak256(abi.encodePacked("network.prices.submitted.node.key", msg.sender, _block, _rplPrice, _effectiveRplStake)); bytes32 submissionCountKey = keccak256(abi.encodePacked("network.prices.submitted.count", _block, _rplPrice, _effectiveRplStake)); // Check & update node submission status require(<FILL_ME>) setBool(nodeSubmissionKey, true); setBool(keccak256(abi.encodePacked("network.prices.submitted.node", msg.sender, _block)), true); // Increment submission count uint256 submissionCount = getUint(submissionCountKey).add(1); setUint(submissionCountKey, submissionCount); // Emit prices submitted event emit PricesSubmitted(msg.sender, _block, _rplPrice, _effectiveRplStake, block.timestamp); // Check submission count & update network prices RocketDAONodeTrustedInterface rocketDAONodeTrusted = RocketDAONodeTrustedInterface(getContractAddress("rocketDAONodeTrusted")); if (calcBase.mul(submissionCount).div(rocketDAONodeTrusted.getMemberCount()) >= rocketDAOProtocolSettingsNetwork.getNodeConsensusThreshold()) { // Update the price updatePrices(_block, _rplPrice, _effectiveRplStake); } } // Executes updatePrices if consensus threshold is reached function executeUpdatePrices(uint256 _block, uint256 _rplPrice, uint256 _effectiveRplStake) override external onlyLatestContract("rocketNetworkPrices", address(this)) { } // Update network price data function updatePrices(uint256 _block, uint256 _rplPrice, uint256 _effectiveRplStake) private { } // Returns true if consensus has been reached for the last price reportable block function inConsensus() override public view returns (bool) { } // Returns the latest block number that oracles should be reporting prices for function getLatestReportableBlock() override external view returns (uint256) { } }
!getBool(nodeSubmissionKey),"Duplicate submission from node"
319,175
!getBool(nodeSubmissionKey)