comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
"Invalid payment amount sale"
//Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721 // SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ICryptoBees.sol"; import "./IHoney.sol"; import "./Base64.sol"; contract Traits is Ownable { using Strings for uint256; using MerkleProof for bytes32[]; // struct to store each trait's data for metadata and rendering struct Trait { string name; string png; } string unrevealedImage; ICryptoBees beesContract; IHoney honeyContract; // mint price ETH uint256 public constant MINT_PRICE = .06 ether; uint256 public constant MINT_PRICE_DISCOUNT = .055 ether; uint256 public constant MINTS_PER_WHITELIST = 6; // used to ensure there are no duplicates mapping(uint256 => uint256) public existingCombinations; // mint price HONEY uint256 public constant MINT_PRICE_HONEY = 3000 ether; // mint price WOOL uint256 public mintPriceWool = 6600 ether; // max number of tokens that can be minted uint256 public constant MAX_TOKENS = 40000; // number of tokens that can be claimed for ETH uint256 public constant PAID_TOKENS = 10000; /// @notice controls if mintWithEthPresale is paused bool public mintWithEthPresalePaused = true; /// @notice controls if mintWithWool is paused bool public mintWithWoolPaused = true; /// @notice controls if mainMint is paused bool public mintWithEthPaused = true; mapping(address => uint8) public whitelistMints; bytes32 private merkleRootWhitelist; string[8] _traitTypes = ["Body", "Color", "Eyes", "Mouth", "Nose", "Hair", "Accessories", "Feelers"]; // storage of each traits name and base64 PNG data mapping(uint8 => mapping(uint8 => Trait)) public traitData; string[4] _strengths = ["5", "6", "7", "8"]; // 0 - 7 are associated with Bees, 8 - 18 are associated with Bears, 16 - 23 with Beekeeper uint8[][24] public rarities; // 0 - 7 are associated with Bees, 8 - 18 are associated with Bears, 16 - 23 with Beekeeper uint8[][24] public aliases; constructor() { } function setContracts(address _BEES, address _HONEY) external onlyOwner { } /** MINTING */ function mintForEth( address addr, uint256 amount, uint256 minted, uint256 value, bool stake ) external { } function mintForEthWhitelist( address addr, uint256 amount, uint256 minted, uint256 value, bytes32[] calldata _merkleProof, bool stake ) external { } function mintForHoney( address addr, uint256 amount, uint256 minted, bool stake ) external { } function mintForWool( address addr, uint256 amount, uint256 minted, bool stake ) external returns (uint256 totalWoolCost) { } function mintCheck( address addr, uint256 amount, uint256 minted, bool presale, uint256 value, bool isEth ) private view { require(tx.origin == addr, "Only EOA"); require(minted + amount <= MAX_TOKENS, "All tokens minted"); if (presale) { require(!mintWithEthPresalePaused, "Presale mint paused"); require(amount > 0 && whitelistMints[addr] + amount <= MINTS_PER_WHITELIST, "Only limited amount for WL mint"); } else { require(amount > 0 && amount <= 10, "Invalid mint amount sale"); } if (isEth) { require(minted + amount <= PAID_TOKENS, "All tokens on-sale already sold"); if (presale) require(amount * MINT_PRICE_DISCOUNT == value, "Invalid payment amount presale"); else { require(<FILL_ME>) require(!mintWithEthPaused, "Public sale currently paused"); } } } function getTokenTextType(uint256 tokenId) external view returns (string memory) { } function _getTokenTextType(uint256 tokenId) private view returns (string memory) { } function setPresaleMintPaused(bool _paused) external onlyOwner { } function setWoolMintPaused(bool _paused) external onlyOwner { } function setMintWithEthPaused(bool _paused) external onlyOwner { } function setWoolMintPrice(uint256 _price) external onlyOwner { } function setMerkleRoot(bytes32 root) public onlyOwner { } /** * generates traits for a specific token, checking to make sure it's unique * @param seed a pseudorandom 256 bit number to derive traits from * @return t - a struct of traits for the given token ID */ function generate(uint256 seed) public view returns (ICryptoBees.Token memory) { } /** * selects the species and all of its traits based on the seed value * @param seed a pseudorandom 256 bit number to derive traits from * @return t - a struct of randomly selected traits */ function selectTraits(uint256 seed) internal view returns (ICryptoBees.Token memory t) { } /** * uses A.J. Walker's Alias algorithm for O(1) rarity table lookup * ensuring O(1) instead of O(n) reduces mint cost by more than 50% * probability & alias tables are generated off-chain beforehand * @param seed portion of the 256 bit seed to remove trait correlation * @param traitType the trait type to select a trait for * @return the ID of the randomly selected trait */ function selectTrait(uint16 seed, uint8 traitType) internal view returns (uint8) { } /** * converts a struct to a 256 bit hash to check for uniqueness * @param t the struct to pack into a hash * @return the 256 bit hash of the struct */ function structToHash(ICryptoBees.Token memory t) internal pure returns (uint256) { } /** * Gen 0 can be mint for honey too * @param tokenId the ID to check the cost of to mint * @return the cost of the given token ID */ function mintCost(uint256 tokenId) public pure returns (uint256) { } /** * administrative to upload the names and images associated with each trait * @param traitType the trait type to upload the traits for (see traitTypes for a mapping) * @param traitNames the names and base64 encoded PNGs for each trait * @param traitImages the names and base64 encoded PNGs for each trait */ function uploadTraits( uint8 traitType, string[] calldata traitNames, string[] calldata traitImages ) external onlyOwner { } function uploadUnrevealImage(string calldata image) external onlyOwner { } // function random(uint256 seed) internal view returns (uint256) { // return uint256(keccak256(abi.encodePacked(seed))); // } /** RENDER */ /** * generates an <image> element using base64 encoded PNGs * @param trait the trait storing the PNG data * @return the <image> element */ function drawTrait(Trait memory trait) internal pure returns (string memory) { } /** * generates an <image> element using base64 encoded PNGs * @return the <image> element */ function drawUnrevealedImage() internal view returns (string memory) { } // /** // * generates an entire SVG by composing multiple <image> elements of PNGs // * @param tokenId the ID of the token to generate an SVG for // * @return a valid SVG of the Sheep / Wolf // */ function drawSVG(uint256 tokenId) public view returns (string memory) { } /** * generates an attribute for the attributes array in the ERC721 metadata standard * @param traitType the trait type to reference as the metadata key * @param value the token's trait associated with the key * @return a JSON dictionary for the single attribute */ function attributeForTypeAndValue(string memory traitType, string memory value) internal pure returns (string memory) { } /** * generates an array composed of all the individual traits and values * @param tokenId the ID of the token to compose the metadata for * @return a JSON array of all of the attributes for given token ID */ function compileAttributes(uint256 tokenId) public view returns (string memory) { } function tokenURI(uint256 tokenId) public view returns (string memory) { } }
amount*MINT_PRICE==value,"Invalid payment amount sale"
314,980
amount*MINT_PRICE==value
"Public sale currently paused"
//Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721 // SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ICryptoBees.sol"; import "./IHoney.sol"; import "./Base64.sol"; contract Traits is Ownable { using Strings for uint256; using MerkleProof for bytes32[]; // struct to store each trait's data for metadata and rendering struct Trait { string name; string png; } string unrevealedImage; ICryptoBees beesContract; IHoney honeyContract; // mint price ETH uint256 public constant MINT_PRICE = .06 ether; uint256 public constant MINT_PRICE_DISCOUNT = .055 ether; uint256 public constant MINTS_PER_WHITELIST = 6; // used to ensure there are no duplicates mapping(uint256 => uint256) public existingCombinations; // mint price HONEY uint256 public constant MINT_PRICE_HONEY = 3000 ether; // mint price WOOL uint256 public mintPriceWool = 6600 ether; // max number of tokens that can be minted uint256 public constant MAX_TOKENS = 40000; // number of tokens that can be claimed for ETH uint256 public constant PAID_TOKENS = 10000; /// @notice controls if mintWithEthPresale is paused bool public mintWithEthPresalePaused = true; /// @notice controls if mintWithWool is paused bool public mintWithWoolPaused = true; /// @notice controls if mainMint is paused bool public mintWithEthPaused = true; mapping(address => uint8) public whitelistMints; bytes32 private merkleRootWhitelist; string[8] _traitTypes = ["Body", "Color", "Eyes", "Mouth", "Nose", "Hair", "Accessories", "Feelers"]; // storage of each traits name and base64 PNG data mapping(uint8 => mapping(uint8 => Trait)) public traitData; string[4] _strengths = ["5", "6", "7", "8"]; // 0 - 7 are associated with Bees, 8 - 18 are associated with Bears, 16 - 23 with Beekeeper uint8[][24] public rarities; // 0 - 7 are associated with Bees, 8 - 18 are associated with Bears, 16 - 23 with Beekeeper uint8[][24] public aliases; constructor() { } function setContracts(address _BEES, address _HONEY) external onlyOwner { } /** MINTING */ function mintForEth( address addr, uint256 amount, uint256 minted, uint256 value, bool stake ) external { } function mintForEthWhitelist( address addr, uint256 amount, uint256 minted, uint256 value, bytes32[] calldata _merkleProof, bool stake ) external { } function mintForHoney( address addr, uint256 amount, uint256 minted, bool stake ) external { } function mintForWool( address addr, uint256 amount, uint256 minted, bool stake ) external returns (uint256 totalWoolCost) { } function mintCheck( address addr, uint256 amount, uint256 minted, bool presale, uint256 value, bool isEth ) private view { require(tx.origin == addr, "Only EOA"); require(minted + amount <= MAX_TOKENS, "All tokens minted"); if (presale) { require(!mintWithEthPresalePaused, "Presale mint paused"); require(amount > 0 && whitelistMints[addr] + amount <= MINTS_PER_WHITELIST, "Only limited amount for WL mint"); } else { require(amount > 0 && amount <= 10, "Invalid mint amount sale"); } if (isEth) { require(minted + amount <= PAID_TOKENS, "All tokens on-sale already sold"); if (presale) require(amount * MINT_PRICE_DISCOUNT == value, "Invalid payment amount presale"); else { require(amount * MINT_PRICE == value, "Invalid payment amount sale"); require(<FILL_ME>) } } } function getTokenTextType(uint256 tokenId) external view returns (string memory) { } function _getTokenTextType(uint256 tokenId) private view returns (string memory) { } function setPresaleMintPaused(bool _paused) external onlyOwner { } function setWoolMintPaused(bool _paused) external onlyOwner { } function setMintWithEthPaused(bool _paused) external onlyOwner { } function setWoolMintPrice(uint256 _price) external onlyOwner { } function setMerkleRoot(bytes32 root) public onlyOwner { } /** * generates traits for a specific token, checking to make sure it's unique * @param seed a pseudorandom 256 bit number to derive traits from * @return t - a struct of traits for the given token ID */ function generate(uint256 seed) public view returns (ICryptoBees.Token memory) { } /** * selects the species and all of its traits based on the seed value * @param seed a pseudorandom 256 bit number to derive traits from * @return t - a struct of randomly selected traits */ function selectTraits(uint256 seed) internal view returns (ICryptoBees.Token memory t) { } /** * uses A.J. Walker's Alias algorithm for O(1) rarity table lookup * ensuring O(1) instead of O(n) reduces mint cost by more than 50% * probability & alias tables are generated off-chain beforehand * @param seed portion of the 256 bit seed to remove trait correlation * @param traitType the trait type to select a trait for * @return the ID of the randomly selected trait */ function selectTrait(uint16 seed, uint8 traitType) internal view returns (uint8) { } /** * converts a struct to a 256 bit hash to check for uniqueness * @param t the struct to pack into a hash * @return the 256 bit hash of the struct */ function structToHash(ICryptoBees.Token memory t) internal pure returns (uint256) { } /** * Gen 0 can be mint for honey too * @param tokenId the ID to check the cost of to mint * @return the cost of the given token ID */ function mintCost(uint256 tokenId) public pure returns (uint256) { } /** * administrative to upload the names and images associated with each trait * @param traitType the trait type to upload the traits for (see traitTypes for a mapping) * @param traitNames the names and base64 encoded PNGs for each trait * @param traitImages the names and base64 encoded PNGs for each trait */ function uploadTraits( uint8 traitType, string[] calldata traitNames, string[] calldata traitImages ) external onlyOwner { } function uploadUnrevealImage(string calldata image) external onlyOwner { } // function random(uint256 seed) internal view returns (uint256) { // return uint256(keccak256(abi.encodePacked(seed))); // } /** RENDER */ /** * generates an <image> element using base64 encoded PNGs * @param trait the trait storing the PNG data * @return the <image> element */ function drawTrait(Trait memory trait) internal pure returns (string memory) { } /** * generates an <image> element using base64 encoded PNGs * @return the <image> element */ function drawUnrevealedImage() internal view returns (string memory) { } // /** // * generates an entire SVG by composing multiple <image> elements of PNGs // * @param tokenId the ID of the token to generate an SVG for // * @return a valid SVG of the Sheep / Wolf // */ function drawSVG(uint256 tokenId) public view returns (string memory) { } /** * generates an attribute for the attributes array in the ERC721 metadata standard * @param traitType the trait type to reference as the metadata key * @param value the token's trait associated with the key * @return a JSON dictionary for the single attribute */ function attributeForTypeAndValue(string memory traitType, string memory value) internal pure returns (string memory) { } /** * generates an array composed of all the individual traits and values * @param tokenId the ID of the token to compose the metadata for * @return a JSON array of all of the attributes for given token ID */ function compileAttributes(uint256 tokenId) public view returns (string memory) { } function tokenURI(uint256 tokenId) public view returns (string memory) { } }
!mintWithEthPaused,"Public sale currently paused"
314,980
!mintWithEthPaused
"ERC721Metadata: Nonexistent token"
//Contract based on https://docs.openzeppelin.com/contracts/3.x/erc721 // SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import "./ICryptoBees.sol"; import "./IHoney.sol"; import "./Base64.sol"; contract Traits is Ownable { using Strings for uint256; using MerkleProof for bytes32[]; // struct to store each trait's data for metadata and rendering struct Trait { string name; string png; } string unrevealedImage; ICryptoBees beesContract; IHoney honeyContract; // mint price ETH uint256 public constant MINT_PRICE = .06 ether; uint256 public constant MINT_PRICE_DISCOUNT = .055 ether; uint256 public constant MINTS_PER_WHITELIST = 6; // used to ensure there are no duplicates mapping(uint256 => uint256) public existingCombinations; // mint price HONEY uint256 public constant MINT_PRICE_HONEY = 3000 ether; // mint price WOOL uint256 public mintPriceWool = 6600 ether; // max number of tokens that can be minted uint256 public constant MAX_TOKENS = 40000; // number of tokens that can be claimed for ETH uint256 public constant PAID_TOKENS = 10000; /// @notice controls if mintWithEthPresale is paused bool public mintWithEthPresalePaused = true; /// @notice controls if mintWithWool is paused bool public mintWithWoolPaused = true; /// @notice controls if mainMint is paused bool public mintWithEthPaused = true; mapping(address => uint8) public whitelistMints; bytes32 private merkleRootWhitelist; string[8] _traitTypes = ["Body", "Color", "Eyes", "Mouth", "Nose", "Hair", "Accessories", "Feelers"]; // storage of each traits name and base64 PNG data mapping(uint8 => mapping(uint8 => Trait)) public traitData; string[4] _strengths = ["5", "6", "7", "8"]; // 0 - 7 are associated with Bees, 8 - 18 are associated with Bears, 16 - 23 with Beekeeper uint8[][24] public rarities; // 0 - 7 are associated with Bees, 8 - 18 are associated with Bears, 16 - 23 with Beekeeper uint8[][24] public aliases; constructor() { } function setContracts(address _BEES, address _HONEY) external onlyOwner { } /** MINTING */ function mintForEth( address addr, uint256 amount, uint256 minted, uint256 value, bool stake ) external { } function mintForEthWhitelist( address addr, uint256 amount, uint256 minted, uint256 value, bytes32[] calldata _merkleProof, bool stake ) external { } function mintForHoney( address addr, uint256 amount, uint256 minted, bool stake ) external { } function mintForWool( address addr, uint256 amount, uint256 minted, bool stake ) external returns (uint256 totalWoolCost) { } function mintCheck( address addr, uint256 amount, uint256 minted, bool presale, uint256 value, bool isEth ) private view { } function getTokenTextType(uint256 tokenId) external view returns (string memory) { require(<FILL_ME>) return _getTokenTextType(tokenId); } function _getTokenTextType(uint256 tokenId) private view returns (string memory) { } function setPresaleMintPaused(bool _paused) external onlyOwner { } function setWoolMintPaused(bool _paused) external onlyOwner { } function setMintWithEthPaused(bool _paused) external onlyOwner { } function setWoolMintPrice(uint256 _price) external onlyOwner { } function setMerkleRoot(bytes32 root) public onlyOwner { } /** * generates traits for a specific token, checking to make sure it's unique * @param seed a pseudorandom 256 bit number to derive traits from * @return t - a struct of traits for the given token ID */ function generate(uint256 seed) public view returns (ICryptoBees.Token memory) { } /** * selects the species and all of its traits based on the seed value * @param seed a pseudorandom 256 bit number to derive traits from * @return t - a struct of randomly selected traits */ function selectTraits(uint256 seed) internal view returns (ICryptoBees.Token memory t) { } /** * uses A.J. Walker's Alias algorithm for O(1) rarity table lookup * ensuring O(1) instead of O(n) reduces mint cost by more than 50% * probability & alias tables are generated off-chain beforehand * @param seed portion of the 256 bit seed to remove trait correlation * @param traitType the trait type to select a trait for * @return the ID of the randomly selected trait */ function selectTrait(uint16 seed, uint8 traitType) internal view returns (uint8) { } /** * converts a struct to a 256 bit hash to check for uniqueness * @param t the struct to pack into a hash * @return the 256 bit hash of the struct */ function structToHash(ICryptoBees.Token memory t) internal pure returns (uint256) { } /** * Gen 0 can be mint for honey too * @param tokenId the ID to check the cost of to mint * @return the cost of the given token ID */ function mintCost(uint256 tokenId) public pure returns (uint256) { } /** * administrative to upload the names and images associated with each trait * @param traitType the trait type to upload the traits for (see traitTypes for a mapping) * @param traitNames the names and base64 encoded PNGs for each trait * @param traitImages the names and base64 encoded PNGs for each trait */ function uploadTraits( uint8 traitType, string[] calldata traitNames, string[] calldata traitImages ) external onlyOwner { } function uploadUnrevealImage(string calldata image) external onlyOwner { } // function random(uint256 seed) internal view returns (uint256) { // return uint256(keccak256(abi.encodePacked(seed))); // } /** RENDER */ /** * generates an <image> element using base64 encoded PNGs * @param trait the trait storing the PNG data * @return the <image> element */ function drawTrait(Trait memory trait) internal pure returns (string memory) { } /** * generates an <image> element using base64 encoded PNGs * @return the <image> element */ function drawUnrevealedImage() internal view returns (string memory) { } // /** // * generates an entire SVG by composing multiple <image> elements of PNGs // * @param tokenId the ID of the token to generate an SVG for // * @return a valid SVG of the Sheep / Wolf // */ function drawSVG(uint256 tokenId) public view returns (string memory) { } /** * generates an attribute for the attributes array in the ERC721 metadata standard * @param traitType the trait type to reference as the metadata key * @param value the token's trait associated with the key * @return a JSON dictionary for the single attribute */ function attributeForTypeAndValue(string memory traitType, string memory value) internal pure returns (string memory) { } /** * generates an array composed of all the individual traits and values * @param tokenId the ID of the token to compose the metadata for * @return a JSON array of all of the attributes for given token ID */ function compileAttributes(uint256 tokenId) public view returns (string memory) { } function tokenURI(uint256 tokenId) public view returns (string memory) { } }
beesContract.doesExist(tokenId),"ERC721Metadata: Nonexistent token"
314,980
beesContract.doesExist(tokenId)
null
pragma solidity ^0.4.2; contract owned { address public owner; function owned() { } function changeOwner(address newOwner) onlyOwner { } modifier onlyOwner { } } contract tokenRecipient {function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData);} contract Utils { /** constructor */ function Utils() { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { } // verifies that the address is different than this contract address modifier notThis(address _address) { } // Overflow protected math functions /** @dev returns the sum of _x and _y, asserts if the calculation overflows @param _x value 1 @param _y value 2 @return sum */ function safeAdd(uint256 _x, uint256 _y) internal returns (uint256) { } /** @dev returns the difference of _x minus _y, asserts if the subtraction results in a negative number @param _x minuend @param _y subtrahend @return difference */ function safeSub(uint256 _x, uint256 _y) internal returns (uint256) { } } contract CSToken is owned, Utils { struct Dividend {uint256 time; uint256 tenThousandth; uint256 countComplete;} /* Public variables of the token */ string public standard = 'Token 0.1'; string public name = 'KickCoin'; string public symbol = 'KC'; uint8 public decimals = 8; uint256 _totalSupply = 0; /* This creates an array with all balances */ mapping (address => uint256) balances; mapping (address => mapping (uint256 => uint256)) public agingBalanceOf; uint[] agingTimes; Dividend[] dividends; mapping (address => mapping (address => uint256)) allowed; /* This generates a public event on the blockchain that will notify clients */ event Transfer(address indexed from, address indexed to, uint256 value); event AgingTransfer(address indexed from, address indexed to, uint256 value, uint256 agingTime); event Approval(address indexed _owner, address indexed _spender, uint256 _value); // triggered when the total supply is increased event Issuance(uint256 _amount); // triggered when the total supply is decreased event Destruction(uint256 _amount); address[] public addressByIndex; mapping (address => bool) addressAddedToIndex; mapping (address => uint) agingTimesForPools; uint16 currentDividendIndex = 1; mapping (address => uint) calculatedDividendsIndex; bool public transfersEnabled = true; event NewSmartToken(address _token); /* Initializes contract with initial supply tokens to the creator of the contract */ function CSToken() { } modifier transfersAllowed { } function totalSupply() constant returns (uint256 totalSupply) { } function balanceOf(address _owner) constant returns (uint256 balance) { } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } bool allAgingTimesHasBeenAdded = false; function addAgingTime(uint256 time) onlyOwner { require(<FILL_ME>) agingTimes.push(time); } function allAgingTimesAdded() onlyOwner { } function calculateDividends(uint256 limit) { } function addDividendsForAddress(address _address) internal { } /* Send coins */ function transfer(address _to, uint256 _value) transfersAllowed returns (bool success) { } function mintToken(address target, uint256 mintedAmount, uint256 agingTime) onlyOwner { } function addIndex(address _address) internal { } function addToAging(address from, address target, uint256 agingTime, uint256 amount) internal { } /* Allow another contract to spend some tokens in your behalf */ function approve(address _spender, uint256 _value) returns (bool success) { } /* Approve and then communicate the approved contract in a single tx */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { } /* A contract attempts to get the coins */ function transferFrom(address _from, address _to, uint256 _value) transfersAllowed returns (bool success) { } /* This unnamed function is called whenever someone tries to send ether to it */ function() { } function checkMyAging(address sender) internal { } function addAgingTimesForPool(address poolAddress, uint256 agingTime) onlyOwner { } function countAddresses() constant returns (uint256 length) { } function accountBalance(address _address) constant returns (uint256 balance) { } function disableTransfers(bool _disable) public onlyOwner { } function issue(address _to, uint256 _amount) public onlyOwner validAddress(_to) notThis(_to) { } function destroy(address _from, uint256 _amount) public { } }
!allAgingTimesHasBeenAdded
315,008
!allAgingTimesHasBeenAdded
null
pragma solidity ^0.4.2; contract owned { address public owner; function owned() { } function changeOwner(address newOwner) onlyOwner { } modifier onlyOwner { } } contract tokenRecipient {function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData);} contract Utils { /** constructor */ function Utils() { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { } // verifies that the address is different than this contract address modifier notThis(address _address) { } // Overflow protected math functions /** @dev returns the sum of _x and _y, asserts if the calculation overflows @param _x value 1 @param _y value 2 @return sum */ function safeAdd(uint256 _x, uint256 _y) internal returns (uint256) { } /** @dev returns the difference of _x minus _y, asserts if the subtraction results in a negative number @param _x minuend @param _y subtrahend @return difference */ function safeSub(uint256 _x, uint256 _y) internal returns (uint256) { } } contract CSToken is owned, Utils { struct Dividend {uint256 time; uint256 tenThousandth; uint256 countComplete;} /* Public variables of the token */ string public standard = 'Token 0.1'; string public name = 'KickCoin'; string public symbol = 'KC'; uint8 public decimals = 8; uint256 _totalSupply = 0; /* This creates an array with all balances */ mapping (address => uint256) balances; mapping (address => mapping (uint256 => uint256)) public agingBalanceOf; uint[] agingTimes; Dividend[] dividends; mapping (address => mapping (address => uint256)) allowed; /* This generates a public event on the blockchain that will notify clients */ event Transfer(address indexed from, address indexed to, uint256 value); event AgingTransfer(address indexed from, address indexed to, uint256 value, uint256 agingTime); event Approval(address indexed _owner, address indexed _spender, uint256 _value); // triggered when the total supply is increased event Issuance(uint256 _amount); // triggered when the total supply is decreased event Destruction(uint256 _amount); address[] public addressByIndex; mapping (address => bool) addressAddedToIndex; mapping (address => uint) agingTimesForPools; uint16 currentDividendIndex = 1; mapping (address => uint) calculatedDividendsIndex; bool public transfersEnabled = true; event NewSmartToken(address _token); /* Initializes contract with initial supply tokens to the creator of the contract */ function CSToken() { } modifier transfersAllowed { } function totalSupply() constant returns (uint256 totalSupply) { } function balanceOf(address _owner) constant returns (uint256 balance) { } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } bool allAgingTimesHasBeenAdded = false; function addAgingTime(uint256 time) onlyOwner { } function allAgingTimesAdded() onlyOwner { } function calculateDividends(uint256 limit) { } function addDividendsForAddress(address _address) internal { } /* Send coins */ function transfer(address _to, uint256 _value) transfersAllowed returns (bool success) { checkMyAging(msg.sender); if (now >= dividends[currentDividendIndex].time) { addDividendsForAddress(msg.sender); addDividendsForAddress(_to); } require(<FILL_ME>) // Subtract from the sender balances[msg.sender] -= _value; if (agingTimesForPools[msg.sender] > 0 && agingTimesForPools[msg.sender] > now) { addToAging(msg.sender, _to, agingTimesForPools[msg.sender], _value); } balances[_to] = safeAdd(balances[_to], _value); addIndex(_to); Transfer(msg.sender, _to, _value); return true; } function mintToken(address target, uint256 mintedAmount, uint256 agingTime) onlyOwner { } function addIndex(address _address) internal { } function addToAging(address from, address target, uint256 agingTime, uint256 amount) internal { } /* Allow another contract to spend some tokens in your behalf */ function approve(address _spender, uint256 _value) returns (bool success) { } /* Approve and then communicate the approved contract in a single tx */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { } /* A contract attempts to get the coins */ function transferFrom(address _from, address _to, uint256 _value) transfersAllowed returns (bool success) { } /* This unnamed function is called whenever someone tries to send ether to it */ function() { } function checkMyAging(address sender) internal { } function addAgingTimesForPool(address poolAddress, uint256 agingTime) onlyOwner { } function countAddresses() constant returns (uint256 length) { } function accountBalance(address _address) constant returns (uint256 balance) { } function disableTransfers(bool _disable) public onlyOwner { } function issue(address _to, uint256 _amount) public onlyOwner validAddress(_to) notThis(_to) { } function destroy(address _from, uint256 _amount) public { } }
accountBalance(msg.sender)>=_value
315,008
accountBalance(msg.sender)>=_value
null
pragma solidity ^0.4.2; contract owned { address public owner; function owned() { } function changeOwner(address newOwner) onlyOwner { } modifier onlyOwner { } } contract tokenRecipient {function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData);} contract Utils { /** constructor */ function Utils() { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { } // verifies that the address is different than this contract address modifier notThis(address _address) { } // Overflow protected math functions /** @dev returns the sum of _x and _y, asserts if the calculation overflows @param _x value 1 @param _y value 2 @return sum */ function safeAdd(uint256 _x, uint256 _y) internal returns (uint256) { } /** @dev returns the difference of _x minus _y, asserts if the subtraction results in a negative number @param _x minuend @param _y subtrahend @return difference */ function safeSub(uint256 _x, uint256 _y) internal returns (uint256) { } } contract CSToken is owned, Utils { struct Dividend {uint256 time; uint256 tenThousandth; uint256 countComplete;} /* Public variables of the token */ string public standard = 'Token 0.1'; string public name = 'KickCoin'; string public symbol = 'KC'; uint8 public decimals = 8; uint256 _totalSupply = 0; /* This creates an array with all balances */ mapping (address => uint256) balances; mapping (address => mapping (uint256 => uint256)) public agingBalanceOf; uint[] agingTimes; Dividend[] dividends; mapping (address => mapping (address => uint256)) allowed; /* This generates a public event on the blockchain that will notify clients */ event Transfer(address indexed from, address indexed to, uint256 value); event AgingTransfer(address indexed from, address indexed to, uint256 value, uint256 agingTime); event Approval(address indexed _owner, address indexed _spender, uint256 _value); // triggered when the total supply is increased event Issuance(uint256 _amount); // triggered when the total supply is decreased event Destruction(uint256 _amount); address[] public addressByIndex; mapping (address => bool) addressAddedToIndex; mapping (address => uint) agingTimesForPools; uint16 currentDividendIndex = 1; mapping (address => uint) calculatedDividendsIndex; bool public transfersEnabled = true; event NewSmartToken(address _token); /* Initializes contract with initial supply tokens to the creator of the contract */ function CSToken() { } modifier transfersAllowed { } function totalSupply() constant returns (uint256 totalSupply) { } function balanceOf(address _owner) constant returns (uint256 balance) { } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } bool allAgingTimesHasBeenAdded = false; function addAgingTime(uint256 time) onlyOwner { } function allAgingTimesAdded() onlyOwner { } function calculateDividends(uint256 limit) { } function addDividendsForAddress(address _address) internal { } /* Send coins */ function transfer(address _to, uint256 _value) transfersAllowed returns (bool success) { } function mintToken(address target, uint256 mintedAmount, uint256 agingTime) onlyOwner { } function addIndex(address _address) internal { } function addToAging(address from, address target, uint256 agingTime, uint256 amount) internal { } /* Allow another contract to spend some tokens in your behalf */ function approve(address _spender, uint256 _value) returns (bool success) { } /* Approve and then communicate the approved contract in a single tx */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { } /* A contract attempts to get the coins */ function transferFrom(address _from, address _to, uint256 _value) transfersAllowed returns (bool success) { checkMyAging(_from); if (now >= dividends[currentDividendIndex].time) { addDividendsForAddress(_from); addDividendsForAddress(_to); } // Check if the sender has enough require(<FILL_ME>) // Check allowed require(_value <= allowed[_from][msg.sender]); // Subtract from the sender balances[_from] -= _value; // Add the same to the recipient balances[_to] = safeAdd(balances[_to], _value); allowed[_from][msg.sender] -= _value; if (agingTimesForPools[_from] > 0 && agingTimesForPools[_from] > now) { addToAging(_from, _to, agingTimesForPools[_from], _value); } addIndex(_to); Transfer(_from, _to, _value); return true; } /* This unnamed function is called whenever someone tries to send ether to it */ function() { } function checkMyAging(address sender) internal { } function addAgingTimesForPool(address poolAddress, uint256 agingTime) onlyOwner { } function countAddresses() constant returns (uint256 length) { } function accountBalance(address _address) constant returns (uint256 balance) { } function disableTransfers(bool _disable) public onlyOwner { } function issue(address _to, uint256 _amount) public onlyOwner validAddress(_to) notThis(_to) { } function destroy(address _from, uint256 _amount) public { } }
accountBalance(_from)>=_value
315,008
accountBalance(_from)>=_value
null
pragma solidity ^0.4.2; contract owned { address public owner; function owned() { } function changeOwner(address newOwner) onlyOwner { } modifier onlyOwner { } } contract tokenRecipient {function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData);} contract Utils { /** constructor */ function Utils() { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { } // verifies that the address is different than this contract address modifier notThis(address _address) { } // Overflow protected math functions /** @dev returns the sum of _x and _y, asserts if the calculation overflows @param _x value 1 @param _y value 2 @return sum */ function safeAdd(uint256 _x, uint256 _y) internal returns (uint256) { } /** @dev returns the difference of _x minus _y, asserts if the subtraction results in a negative number @param _x minuend @param _y subtrahend @return difference */ function safeSub(uint256 _x, uint256 _y) internal returns (uint256) { } } contract CSToken is owned, Utils { struct Dividend {uint256 time; uint256 tenThousandth; uint256 countComplete;} /* Public variables of the token */ string public standard = 'Token 0.1'; string public name = 'KickCoin'; string public symbol = 'KC'; uint8 public decimals = 8; uint256 _totalSupply = 0; /* This creates an array with all balances */ mapping (address => uint256) balances; mapping (address => mapping (uint256 => uint256)) public agingBalanceOf; uint[] agingTimes; Dividend[] dividends; mapping (address => mapping (address => uint256)) allowed; /* This generates a public event on the blockchain that will notify clients */ event Transfer(address indexed from, address indexed to, uint256 value); event AgingTransfer(address indexed from, address indexed to, uint256 value, uint256 agingTime); event Approval(address indexed _owner, address indexed _spender, uint256 _value); // triggered when the total supply is increased event Issuance(uint256 _amount); // triggered when the total supply is decreased event Destruction(uint256 _amount); address[] public addressByIndex; mapping (address => bool) addressAddedToIndex; mapping (address => uint) agingTimesForPools; uint16 currentDividendIndex = 1; mapping (address => uint) calculatedDividendsIndex; bool public transfersEnabled = true; event NewSmartToken(address _token); /* Initializes contract with initial supply tokens to the creator of the contract */ function CSToken() { } modifier transfersAllowed { } function totalSupply() constant returns (uint256 totalSupply) { } function balanceOf(address _owner) constant returns (uint256 balance) { } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } bool allAgingTimesHasBeenAdded = false; function addAgingTime(uint256 time) onlyOwner { } function allAgingTimesAdded() onlyOwner { } function calculateDividends(uint256 limit) { } function addDividendsForAddress(address _address) internal { } /* Send coins */ function transfer(address _to, uint256 _value) transfersAllowed returns (bool success) { } function mintToken(address target, uint256 mintedAmount, uint256 agingTime) onlyOwner { } function addIndex(address _address) internal { } function addToAging(address from, address target, uint256 agingTime, uint256 amount) internal { } /* Allow another contract to spend some tokens in your behalf */ function approve(address _spender, uint256 _value) returns (bool success) { } /* Approve and then communicate the approved contract in a single tx */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { } /* A contract attempts to get the coins */ function transferFrom(address _from, address _to, uint256 _value) transfersAllowed returns (bool success) { } /* This unnamed function is called whenever someone tries to send ether to it */ function() { } function checkMyAging(address sender) internal { } function addAgingTimesForPool(address poolAddress, uint256 agingTime) onlyOwner { } function countAddresses() constant returns (uint256 length) { } function accountBalance(address _address) constant returns (uint256 balance) { } function disableTransfers(bool _disable) public onlyOwner { } function issue(address _to, uint256 _amount) public onlyOwner validAddress(_to) notThis(_to) { } function destroy(address _from, uint256 _amount) public { checkMyAging(msg.sender); // validate input require(msg.sender == _from || msg.sender == owner); require(<FILL_ME>) balances[_from] = safeSub(balances[_from], _amount); _totalSupply = safeSub(_totalSupply, _amount); Transfer(_from, this, _amount); Destruction(_amount); } }
accountBalance(_from)>=_amount
315,008
accountBalance(_from)>=_amount
null
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.0; contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract AbacusOracle is Initializable{ using SafeMath for uint256; address payable owner; uint public callFee; uint public jobFee; uint public jobsActive; uint64[] private jobIds; uint callId; enum Status {ACTIVE,CLOSED} /*============Mappings============= ----------------------------------*/ mapping (uint64 => Job) public jobs; mapping (uint64 => uint[]) private jobResponse; mapping (uint64 => bool) public isJobActive; mapping (address => bool) private isUpdater; mapping (uint => bytes32) public calls; /*============Events=============== ---------------------------------*/ event jobCreated( string api, bytes32 [] parameters, uint64 jobId ); event breach( uint64 jobId, address creator, uint previousPrice, uint newPrice ); event ScheduleFuncEvent( address indexed to, uint256 indexed callTime, bytes data, uint256 fee, uint256 gaslimit, uint256 gasprice, uint256 indexed callID ); event FunctionExec( address to, bool txStatus, bool reimbursedStatus ); /*=========Structs================ --------------------------------*/ struct Job{ string api; bytes32 [] parameters; string ipfsHash; address creator; uint NoOfParameters; uint triggerValue; uint dataFrequency; uint prepaidValue; uint leftValue; bool hashRequired; Status status; } /*===========Modifiers=========== -------------------------------*/ modifier onlyOwner(){ } modifier onlyUpdater(){ require(<FILL_ME>) _; } uint public totalOwnerFee; function initialize(address payable _owner,uint _fee,uint _callFee , address[] memory _updaters) public initializer{ } // constructor (address payable _owner,uint _fee,uint _callFee , address[] memory _updaters) public { // owner =_owner; // jobFee = _fee; // isUpdater[_owner] =true; // callFee = _callFee; // for(uint i=0; i<_updaters.length;i++){ // isUpdater[_updaters[i]] = true; // } // } /*===========Job functions============ -------------------------------------*/ function createJob(string calldata _api, bytes32[] calldata _parameters, uint _triggerValue , uint _frequency , uint _prepaidValue, uint ipfsHashProof ) external payable returns(uint _Id) { } function updateJob(uint64 _jobId,uint[] calldata _values) external onlyUpdater { } function setFee(uint _fee) public onlyOwner { } function deactivateJob(uint64 _jobId) public onlyOwner{ } function getJobParameters(uint64 _jobId) public onlyUpdater view returns(bytes32[] memory _parameters){ } function addUpdater(address _updater) public onlyOwner{ } function getJobIds() public onlyUpdater view returns(uint64[] memory Ids) { } function updateJobTrigger(uint64 _jobId,uint _triggerValue) public { } function getJobResponse(uint64 _jobId) public view returns(uint[] memory _values){ } function increasePrepaidValue(uint64 _jobId,uint amount) external payable{ } /*==============Shcedule functions=============== -----------------------------------------------*/ function scheduleFunc(address to ,uint callTime, bytes calldata data , uint fee , uint gaslimit ,uint gasprice)external payable{ } function execfunct(address to ,uint callTime, bytes calldata data , uint fee , uint gaslimit ,uint gasprice,uint _callId) external onlyUpdater { } function setCallFee(uint _callFee) public onlyOwner { } /*==============Helpers============ ---------------------------------*/ function breachCheck(uint64 _jobId, uint newvalue) private view returns(bool) { } function bytes32ToString(bytes32 x) public pure returns (string memory) { } function stringToBytes32(string memory str) public pure returns(bytes32 result){ } function withdraw(uint amount) public onlyOwner{ } }
isUpdater[msg.sender]
315,177
isUpdater[msg.sender]
"job closed or not exist"
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.0; contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract AbacusOracle is Initializable{ using SafeMath for uint256; address payable owner; uint public callFee; uint public jobFee; uint public jobsActive; uint64[] private jobIds; uint callId; enum Status {ACTIVE,CLOSED} /*============Mappings============= ----------------------------------*/ mapping (uint64 => Job) public jobs; mapping (uint64 => uint[]) private jobResponse; mapping (uint64 => bool) public isJobActive; mapping (address => bool) private isUpdater; mapping (uint => bytes32) public calls; /*============Events=============== ---------------------------------*/ event jobCreated( string api, bytes32 [] parameters, uint64 jobId ); event breach( uint64 jobId, address creator, uint previousPrice, uint newPrice ); event ScheduleFuncEvent( address indexed to, uint256 indexed callTime, bytes data, uint256 fee, uint256 gaslimit, uint256 gasprice, uint256 indexed callID ); event FunctionExec( address to, bool txStatus, bool reimbursedStatus ); /*=========Structs================ --------------------------------*/ struct Job{ string api; bytes32 [] parameters; string ipfsHash; address creator; uint NoOfParameters; uint triggerValue; uint dataFrequency; uint prepaidValue; uint leftValue; bool hashRequired; Status status; } /*===========Modifiers=========== -------------------------------*/ modifier onlyOwner(){ } modifier onlyUpdater(){ } uint public totalOwnerFee; function initialize(address payable _owner,uint _fee,uint _callFee , address[] memory _updaters) public initializer{ } // constructor (address payable _owner,uint _fee,uint _callFee , address[] memory _updaters) public { // owner =_owner; // jobFee = _fee; // isUpdater[_owner] =true; // callFee = _callFee; // for(uint i=0; i<_updaters.length;i++){ // isUpdater[_updaters[i]] = true; // } // } /*===========Job functions============ -------------------------------------*/ function createJob(string calldata _api, bytes32[] calldata _parameters, uint _triggerValue , uint _frequency , uint _prepaidValue, uint ipfsHashProof ) external payable returns(uint _Id) { } function updateJob(uint64 _jobId,uint[] calldata _values) external onlyUpdater { require(<FILL_ME>) uint g1 = gasleft(); if(breachCheck(_jobId,_values[0])){ //breachUpdate() emit breach(_jobId, jobs[_jobId].creator, jobResponse[_jobId][0], _values[0] ); } jobResponse[_jobId] = _values; uint gasUsed = g1 - gasleft(); if(jobs[_jobId].leftValue < gasUsed + jobFee){ jobs[_jobId].status = Status.CLOSED; isJobActive[_jobId] = false; jobsActive -= 1; }else{ totalOwnerFee += jobFee; jobs[_jobId].leftValue -= gasUsed + jobFee; } } function setFee(uint _fee) public onlyOwner { } function deactivateJob(uint64 _jobId) public onlyOwner{ } function getJobParameters(uint64 _jobId) public onlyUpdater view returns(bytes32[] memory _parameters){ } function addUpdater(address _updater) public onlyOwner{ } function getJobIds() public onlyUpdater view returns(uint64[] memory Ids) { } function updateJobTrigger(uint64 _jobId,uint _triggerValue) public { } function getJobResponse(uint64 _jobId) public view returns(uint[] memory _values){ } function increasePrepaidValue(uint64 _jobId,uint amount) external payable{ } /*==============Shcedule functions=============== -----------------------------------------------*/ function scheduleFunc(address to ,uint callTime, bytes calldata data , uint fee , uint gaslimit ,uint gasprice)external payable{ } function execfunct(address to ,uint callTime, bytes calldata data , uint fee , uint gaslimit ,uint gasprice,uint _callId) external onlyUpdater { } function setCallFee(uint _callFee) public onlyOwner { } /*==============Helpers============ ---------------------------------*/ function breachCheck(uint64 _jobId, uint newvalue) private view returns(bool) { } function bytes32ToString(bytes32 x) public pure returns (string memory) { } function stringToBytes32(string memory str) public pure returns(bytes32 result){ } function withdraw(uint amount) public onlyOwner{ } }
isJobActive[_jobId],"job closed or not exist"
315,177
isJobActive[_jobId]
"unauthorised"
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.0; contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract AbacusOracle is Initializable{ using SafeMath for uint256; address payable owner; uint public callFee; uint public jobFee; uint public jobsActive; uint64[] private jobIds; uint callId; enum Status {ACTIVE,CLOSED} /*============Mappings============= ----------------------------------*/ mapping (uint64 => Job) public jobs; mapping (uint64 => uint[]) private jobResponse; mapping (uint64 => bool) public isJobActive; mapping (address => bool) private isUpdater; mapping (uint => bytes32) public calls; /*============Events=============== ---------------------------------*/ event jobCreated( string api, bytes32 [] parameters, uint64 jobId ); event breach( uint64 jobId, address creator, uint previousPrice, uint newPrice ); event ScheduleFuncEvent( address indexed to, uint256 indexed callTime, bytes data, uint256 fee, uint256 gaslimit, uint256 gasprice, uint256 indexed callID ); event FunctionExec( address to, bool txStatus, bool reimbursedStatus ); /*=========Structs================ --------------------------------*/ struct Job{ string api; bytes32 [] parameters; string ipfsHash; address creator; uint NoOfParameters; uint triggerValue; uint dataFrequency; uint prepaidValue; uint leftValue; bool hashRequired; Status status; } /*===========Modifiers=========== -------------------------------*/ modifier onlyOwner(){ } modifier onlyUpdater(){ } uint public totalOwnerFee; function initialize(address payable _owner,uint _fee,uint _callFee , address[] memory _updaters) public initializer{ } // constructor (address payable _owner,uint _fee,uint _callFee , address[] memory _updaters) public { // owner =_owner; // jobFee = _fee; // isUpdater[_owner] =true; // callFee = _callFee; // for(uint i=0; i<_updaters.length;i++){ // isUpdater[_updaters[i]] = true; // } // } /*===========Job functions============ -------------------------------------*/ function createJob(string calldata _api, bytes32[] calldata _parameters, uint _triggerValue , uint _frequency , uint _prepaidValue, uint ipfsHashProof ) external payable returns(uint _Id) { } function updateJob(uint64 _jobId,uint[] calldata _values) external onlyUpdater { } function setFee(uint _fee) public onlyOwner { } function deactivateJob(uint64 _jobId) public onlyOwner{ } function getJobParameters(uint64 _jobId) public onlyUpdater view returns(bytes32[] memory _parameters){ } function addUpdater(address _updater) public onlyOwner{ } function getJobIds() public onlyUpdater view returns(uint64[] memory Ids) { } function updateJobTrigger(uint64 _jobId,uint _triggerValue) public { require(<FILL_ME>) jobs[_jobId].triggerValue = _triggerValue; } function getJobResponse(uint64 _jobId) public view returns(uint[] memory _values){ } function increasePrepaidValue(uint64 _jobId,uint amount) external payable{ } /*==============Shcedule functions=============== -----------------------------------------------*/ function scheduleFunc(address to ,uint callTime, bytes calldata data , uint fee , uint gaslimit ,uint gasprice)external payable{ } function execfunct(address to ,uint callTime, bytes calldata data , uint fee , uint gaslimit ,uint gasprice,uint _callId) external onlyUpdater { } function setCallFee(uint _callFee) public onlyOwner { } /*==============Helpers============ ---------------------------------*/ function breachCheck(uint64 _jobId, uint newvalue) private view returns(bool) { } function bytes32ToString(bytes32 x) public pure returns (string memory) { } function stringToBytes32(string memory str) public pure returns(bytes32 result){ } function withdraw(uint amount) public onlyOwner{ } }
jobs[_jobId].creator==msg.sender,"unauthorised"
315,177
jobs[_jobId].creator==msg.sender
null
//SPDX-License-Identifier: UNLICENSED pragma solidity ^0.6.0; contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract AbacusOracle is Initializable{ using SafeMath for uint256; address payable owner; uint public callFee; uint public jobFee; uint public jobsActive; uint64[] private jobIds; uint callId; enum Status {ACTIVE,CLOSED} /*============Mappings============= ----------------------------------*/ mapping (uint64 => Job) public jobs; mapping (uint64 => uint[]) private jobResponse; mapping (uint64 => bool) public isJobActive; mapping (address => bool) private isUpdater; mapping (uint => bytes32) public calls; /*============Events=============== ---------------------------------*/ event jobCreated( string api, bytes32 [] parameters, uint64 jobId ); event breach( uint64 jobId, address creator, uint previousPrice, uint newPrice ); event ScheduleFuncEvent( address indexed to, uint256 indexed callTime, bytes data, uint256 fee, uint256 gaslimit, uint256 gasprice, uint256 indexed callID ); event FunctionExec( address to, bool txStatus, bool reimbursedStatus ); /*=========Structs================ --------------------------------*/ struct Job{ string api; bytes32 [] parameters; string ipfsHash; address creator; uint NoOfParameters; uint triggerValue; uint dataFrequency; uint prepaidValue; uint leftValue; bool hashRequired; Status status; } /*===========Modifiers=========== -------------------------------*/ modifier onlyOwner(){ } modifier onlyUpdater(){ } uint public totalOwnerFee; function initialize(address payable _owner,uint _fee,uint _callFee , address[] memory _updaters) public initializer{ } // constructor (address payable _owner,uint _fee,uint _callFee , address[] memory _updaters) public { // owner =_owner; // jobFee = _fee; // isUpdater[_owner] =true; // callFee = _callFee; // for(uint i=0; i<_updaters.length;i++){ // isUpdater[_updaters[i]] = true; // } // } /*===========Job functions============ -------------------------------------*/ function createJob(string calldata _api, bytes32[] calldata _parameters, uint _triggerValue , uint _frequency , uint _prepaidValue, uint ipfsHashProof ) external payable returns(uint _Id) { } function updateJob(uint64 _jobId,uint[] calldata _values) external onlyUpdater { } function setFee(uint _fee) public onlyOwner { } function deactivateJob(uint64 _jobId) public onlyOwner{ } function getJobParameters(uint64 _jobId) public onlyUpdater view returns(bytes32[] memory _parameters){ } function addUpdater(address _updater) public onlyOwner{ } function getJobIds() public onlyUpdater view returns(uint64[] memory Ids) { } function updateJobTrigger(uint64 _jobId,uint _triggerValue) public { } function getJobResponse(uint64 _jobId) public view returns(uint[] memory _values){ } function increasePrepaidValue(uint64 _jobId,uint amount) external payable{ } /*==============Shcedule functions=============== -----------------------------------------------*/ function scheduleFunc(address to ,uint callTime, bytes calldata data , uint fee , uint gaslimit ,uint gasprice)external payable{ } function execfunct(address to ,uint callTime, bytes calldata data , uint fee , uint gaslimit ,uint gasprice,uint _callId) external onlyUpdater { require(<FILL_ME>) (bool txStatus,) = to.call(data); (bool success,) = to.call{value:gasleft() -200}(""); delete calls[_callId]; emit FunctionExec(to,txStatus,success); } function setCallFee(uint _callFee) public onlyOwner { } /*==============Helpers============ ---------------------------------*/ function breachCheck(uint64 _jobId, uint newvalue) private view returns(bool) { } function bytes32ToString(bytes32 x) public pure returns (string memory) { } function stringToBytes32(string memory str) public pure returns(bytes32 result){ } function withdraw(uint amount) public onlyOwner{ } }
calls[_callId]==keccak256(abi.encodePacked(to,callTime,data,fee,gaslimit,gasprice))
315,177
calls[_callId]==keccak256(abi.encodePacked(to,callTime,data,fee,gaslimit,gasprice))
null
pragma solidity ^0.4.24; /** * Audited by VZ Chains (vzchains.com) * HashRushICO.sol creates the client's token for crowdsale and allows for subsequent token sales and minting of tokens * Crowdsale contracts edited from original contract code at https://www.ethereum.org/crowdsale#crowdfund-your-idea * Additional crowdsale contracts, functions, libraries from OpenZeppelin * at https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts/token * Token contract edited from original contract code at https://www.ethereum.org/token * ERC20 interface and certain token functions adapted from https://github.com/ConsenSys/Tokens **/ /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 { //Sets events and functions for ERC20 token event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 _value); function totalSupply() public view returns (uint256); function balanceOf(address _owner) public view returns (uint256); function transfer(address _to, uint256 _value) public returns (bool); function allowance(address _owner, address _spender) public view returns (uint256); function approve(address _spender, uint256 _value) public returns (bool); function transferFrom(address _from, address _to, uint256 _value) public returns (bool); } /** * @title Owned * @dev The Owned contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Owned { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function max64(uint64 a, uint64 b) internal pure returns (uint64) { } function max256(uint256 a, uint256 b) internal pure returns (uint256) { } function min64(uint64 a, uint64 b) internal pure returns (uint64) { } function min256(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } } contract HashRush is ERC20, Owned { // Applies SafeMath library to uint256 operations using SafeMath for uint256; // Public variables string public name; string public symbol; uint256 public decimals; // Variables uint256 totalSupply_; uint256 multiplier; // Arrays for balances & allowance mapping (address => uint256) balance; mapping (address => mapping (address => uint256)) allowed; // Modifier to prevent short address attack modifier onlyPayloadSize(uint size) { } constructor(string tokenName, string tokenSymbol, uint8 decimalUnits, uint256 decimalMultiplier) public { } /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev 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) { } /** * @dev Transfer token to a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) public returns (bool) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) onlyPayloadSize(3 * 32) public returns (bool) { } } contract HashRushICO is Owned, HashRush { // Applies SafeMath library to uint256 operations using SafeMath for uint256; // Public Variables address public multiSigWallet; uint256 public amountRaised; uint256 public startTime; uint256 public stopTime; uint256 public fixedTotalSupply; uint256 public price; uint256 public minimumInvestment; uint256 public crowdsaleTarget; // Variables bool crowdsaleClosed = true; string tokenName = "HashRush"; string tokenSymbol = "RUSH"; uint256 multiplier = 100000000; uint8 decimalUnits = 8; // Initializes the token constructor() HashRush(tokenName, tokenSymbol, decimalUnits, multiplier) public { } /** * @dev Fallback function creates tokens and sends to investor when crowdsale is open */ function () public payable { require(<FILL_ME>) address recipient = msg.sender; amountRaised = amountRaised.add(msg.value.div(1 ether)); uint256 tokens = msg.value.mul(price).mul(multiplier).div(1 ether); totalSupply_ = totalSupply_.add(tokens); } /** * @dev Function to mint tokens * @param target The address that will receive the minted tokens. * @param amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mintToken(address target, uint256 amount) onlyOwner public returns (bool) { } /** * @dev Function to set token price * @param newPriceperEther New price. * @return A boolean that indicates if the operation was successful. */ function setPrice(uint256 newPriceperEther) onlyOwner public returns (uint256) { } /** * @dev Function to set the multisig wallet for a crowdsale * @param wallet Wallet address. * @return A boolean that indicates if the operation was successful. */ function setMultiSigWallet(address wallet) onlyOwner public returns (bool) { } /** * @dev Function to set the minimum investment to participate in crowdsale * @param minimum minimum amount in wei. * @return A boolean that indicates if the operation was successful. */ function setMinimumInvestment(uint256 minimum) onlyOwner public returns (bool) { } /** * @dev Function to set the crowdsale target * @param target Target amount in ETH. * @return A boolean that indicates if the operation was successful. */ function setCrowdsaleTarget(uint256 target) onlyOwner public returns (bool) { } /** * @dev Function to start the crowdsale specifying startTime and stopTime * @param saleStart Sale start timestamp. * @param saleStop Sale stop timestamo. * @param salePrice Token price per ether. * @param setBeneficiary Beneficiary address. * @param minInvestment Minimum investment to participate in crowdsale (wei). * @param saleTarget Crowdsale target in ETH * @return A boolean that indicates if the operation was successful. */ function startSale(uint256 saleStart, uint256 saleStop, uint256 salePrice, address setBeneficiary, uint256 minInvestment, uint256 saleTarget) onlyOwner public returns (bool) { } /** * @dev Function that allows owner to stop the crowdsale immediately * @return A boolean that indicates if the operation was successful. */ function stopSale() onlyOwner public returns (bool) { } }
!crowdsaleClosed&&(now<stopTime)&&(msg.value>=minimumInvestment)&&(totalSupply_.add(msg.value.mul(price).mul(multiplier).div(1ether))<=fixedTotalSupply)&&(amountRaised.add(msg.value.div(1ether))<=crowdsaleTarget)
315,190
!crowdsaleClosed&&(now<stopTime)&&(msg.value>=minimumInvestment)&&(totalSupply_.add(msg.value.mul(price).mul(multiplier).div(1ether))<=fixedTotalSupply)&&(amountRaised.add(msg.value.div(1ether))<=crowdsaleTarget)
null
pragma solidity ^0.4.24; /** * Audited by VZ Chains (vzchains.com) * HashRushICO.sol creates the client's token for crowdsale and allows for subsequent token sales and minting of tokens * Crowdsale contracts edited from original contract code at https://www.ethereum.org/crowdsale#crowdfund-your-idea * Additional crowdsale contracts, functions, libraries from OpenZeppelin * at https://github.com/OpenZeppelin/zeppelin-solidity/tree/master/contracts/token * Token contract edited from original contract code at https://www.ethereum.org/token * ERC20 interface and certain token functions adapted from https://github.com/ConsenSys/Tokens **/ /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 { //Sets events and functions for ERC20 token event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Transfer(address indexed _from, address indexed _to, uint256 _value); function totalSupply() public view returns (uint256); function balanceOf(address _owner) public view returns (uint256); function transfer(address _to, uint256 _value) public returns (bool); function allowance(address _owner, address _spender) public view returns (uint256); function approve(address _spender, uint256 _value) public returns (bool); function transferFrom(address _from, address _to, uint256 _value) public returns (bool); } /** * @title Owned * @dev The Owned contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Owned { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function max64(uint64 a, uint64 b) internal pure returns (uint64) { } function max256(uint256 a, uint256 b) internal pure returns (uint256) { } function min64(uint64 a, uint64 b) internal pure returns (uint64) { } function min256(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } } contract HashRush is ERC20, Owned { // Applies SafeMath library to uint256 operations using SafeMath for uint256; // Public variables string public name; string public symbol; uint256 public decimals; // Variables uint256 totalSupply_; uint256 multiplier; // Arrays for balances & allowance mapping (address => uint256) balance; mapping (address => mapping (address => uint256)) allowed; // Modifier to prevent short address attack modifier onlyPayloadSize(uint size) { } constructor(string tokenName, string tokenSymbol, uint8 decimalUnits, uint256 decimalMultiplier) public { } /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { } /** * @dev 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) { } /** * @dev Transfer token to a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) public returns (bool) { } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) onlyPayloadSize(3 * 32) public returns (bool) { } } contract HashRushICO is Owned, HashRush { // Applies SafeMath library to uint256 operations using SafeMath for uint256; // Public Variables address public multiSigWallet; uint256 public amountRaised; uint256 public startTime; uint256 public stopTime; uint256 public fixedTotalSupply; uint256 public price; uint256 public minimumInvestment; uint256 public crowdsaleTarget; // Variables bool crowdsaleClosed = true; string tokenName = "HashRush"; string tokenSymbol = "RUSH"; uint256 multiplier = 100000000; uint8 decimalUnits = 8; // Initializes the token constructor() HashRush(tokenName, tokenSymbol, decimalUnits, multiplier) public { } /** * @dev Fallback function creates tokens and sends to investor when crowdsale is open */ function () public payable { } /** * @dev Function to mint tokens * @param target The address that will receive the minted tokens. * @param amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mintToken(address target, uint256 amount) onlyOwner public returns (bool) { require(amount > 0); require(<FILL_ME>) uint256 addTokens = amount; balance[target] = balance[target].add(addTokens); totalSupply_ = totalSupply_.add(addTokens); emit Transfer(0, target, addTokens); return true; } /** * @dev Function to set token price * @param newPriceperEther New price. * @return A boolean that indicates if the operation was successful. */ function setPrice(uint256 newPriceperEther) onlyOwner public returns (uint256) { } /** * @dev Function to set the multisig wallet for a crowdsale * @param wallet Wallet address. * @return A boolean that indicates if the operation was successful. */ function setMultiSigWallet(address wallet) onlyOwner public returns (bool) { } /** * @dev Function to set the minimum investment to participate in crowdsale * @param minimum minimum amount in wei. * @return A boolean that indicates if the operation was successful. */ function setMinimumInvestment(uint256 minimum) onlyOwner public returns (bool) { } /** * @dev Function to set the crowdsale target * @param target Target amount in ETH. * @return A boolean that indicates if the operation was successful. */ function setCrowdsaleTarget(uint256 target) onlyOwner public returns (bool) { } /** * @dev Function to start the crowdsale specifying startTime and stopTime * @param saleStart Sale start timestamp. * @param saleStop Sale stop timestamo. * @param salePrice Token price per ether. * @param setBeneficiary Beneficiary address. * @param minInvestment Minimum investment to participate in crowdsale (wei). * @param saleTarget Crowdsale target in ETH * @return A boolean that indicates if the operation was successful. */ function startSale(uint256 saleStart, uint256 saleStop, uint256 salePrice, address setBeneficiary, uint256 minInvestment, uint256 saleTarget) onlyOwner public returns (bool) { } /** * @dev Function that allows owner to stop the crowdsale immediately * @return A boolean that indicates if the operation was successful. */ function stopSale() onlyOwner public returns (bool) { } }
totalSupply_.add(amount)<=fixedTotalSupply
315,190
totalSupply_.add(amount)<=fixedTotalSupply
"max NFT per address exceeded"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "hardhat/console.sol"; contract MonkeyPoly is ERC721Enumerable, Ownable { using Strings for uint256; string public baseURI; string public notRevealedUri; uint256 public cost = 0.03 ether; uint256 public maxSupply = 10000; uint256 public maxMintAmount = 5; uint256 public nftPerAddressLimit = 5; bool public paused = false; bool public revealed = false; bool public onlyWhitelisted = true; address[] public whitelistedAddresses; mapping(address => uint256) public addressMintedBalance; constructor( string memory _name, string memory _symbol, string memory _initBaseURI, string memory _initNotRevealedUri ) ERC721(_name, _symbol) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(uint256 _mintAmount) public payable { require(!paused, "the contract is paused"); uint256 supply = totalSupply(); require(_mintAmount > 0, "need to mint at least 1 NFT"); require(supply + _mintAmount <= maxSupply, "max NFT limit exceeded"); if (msg.sender != owner()) { require(_mintAmount <= maxMintAmount, "max mint amount per session exceeded"); uint256 ownerMintedCount = addressMintedBalance[msg.sender]; if(onlyWhitelisted == true) { require(isWhitelisted(msg.sender), "user is not whitelisted"); require(<FILL_ME>) } else{ require(ownerMintedCount + _mintAmount <= nftPerAddressLimit, "max NFT per address exceeded"); } console.log('value:', msg.value ); console.log('cost:', cost ); console.log('mintamt:', _mintAmount ); require(msg.value >= cost * _mintAmount, "insufficient funds"); } for (uint256 i = 1; i <= _mintAmount; i++) { addressMintedBalance[msg.sender]++; _safeMint(msg.sender, supply + i); } } function isWhitelisted(address _user) public view returns (bool) { } 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 setNftPerAddressLimit(uint256 _limit) public onlyOwner { } function setCost(uint256 _newCost) public onlyOwner { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setNotRevealedURI(string memory _notRevealedURI) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function whitelistUsers(address[] calldata _users) public onlyOwner { } function withdraw() public payable onlyOwner { } }
ownerMintedCount+_mintAmount<=2,"max NFT per address exceeded"
315,245
ownerMintedCount+_mintAmount<=2
null
/** * Copyright 2017–2018, bZeroX, LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0. */ pragma solidity 0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 _a, uint256 _b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) { } } /** * @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. * @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 { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * 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 DetailedERC20 token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) internal balances; uint256 internal 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. * https://github.com/ethereum/EIPs/issues/20 * 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, 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) { } } contract UnlimitedAllowanceToken is StandardToken { uint internal constant MAX_UINT = 2**256 - 1; /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance, and to add revert reasons. /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer. function transferFrom( address _from, address _to, uint256 _value) public returns (bool) { } /// @dev Transfer token for a specified address, modified to add revert reasons. /// @param _to The address to transfer to. /// @param _value The amount to be transferred. function transfer( address _to, uint256 _value) public returns (bool) { } } contract BZRxToken is UnlimitedAllowanceToken, DetailedERC20, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); event LockingFinished(); bool public mintingFinished = false; bool public lockingFinished = false; mapping (address => bool) public minters; modifier canMint() { } modifier hasMintPermission() { } modifier isLocked() { require(<FILL_ME>) _; } constructor() public DetailedERC20( "bZx Protocol Token", "BZRX", 18 ) { } /// @dev ERC20 transferFrom function /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer. function transferFrom( address _from, address _to, uint256 _value) public returns (bool) { } /// @dev ERC20 transfer function /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer. function transfer( address _to, uint256 _value) public returns (bool) { } /// @dev Allows minter to initiate a transfer on behalf of another spender /// @param _spender Minter with permission to spend. /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer. function minterTransferFrom( address _spender, address _from, address _to, uint256 _value) public hasMintPermission canMint returns (bool) { } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint( address _to, uint256 _amount) public hasMintPermission canMint returns (bool) { } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() public onlyOwner canMint { } /** * @dev Function to stop locking token. * @return True if the operation was successful. */ function finishLocking() public onlyOwner isLocked { } /** * @dev Function to add minter address. * @return True if the operation was successful. */ function addMinter( address _minter) public onlyOwner canMint { } /** * @dev Function to remove minter address. * @return True if the operation was successful. */ function removeMinter( address _minter) public onlyOwner canMint { } /** * @dev Function to check balance and allowance for a spender. * @return True transfer will succeed based on balance and allowance. */ function canTransfer( address _spender, address _from, uint256 _value) public view returns (bool) { } } contract BZRxTransferProxy is Ownable { using SafeMath for uint256; address public bZRxTokenContractAddress; mapping (address => uint) public transferAllowance; string public name = "bZx Protocol Token"; string public symbol = "BZRX"; uint8 public decimals = 18; constructor( address _bZRxTokenContractAddress) public { } function() public { } // for ERC20 conformity function transferFrom( address _from, address _to, uint256 _amount) public returns (bool) { } // for ERC20 conformity function totalSupply() public view returns (uint) { } // for ERC20 conformity function balanceOf( address _owner) public view returns (uint) { } // for ERC20 conformity function allowance( address _owner, address _spender) public view returns (uint) { } function setTransferAllowance( address _who, uint _amount) public onlyOwner { } function changeBZRxTokenContract( address _bZRxTokenContractAddress) public onlyOwner { } function transferToken( address _tokenAddress, address _to, uint _value) public onlyOwner returns (bool) { } }
!lockingFinished
315,254
!lockingFinished
"canTransfer is false"
/** * Copyright 2017–2018, bZeroX, LLC. All Rights Reserved. * Licensed under the Apache License, Version 2.0. */ pragma solidity 0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 _a, uint256 _b) internal pure returns (uint256 c) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 _a, uint256 _b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 _a, uint256 _b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 _a, uint256 _b) internal pure returns (uint256 c) { } } /** * @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. * @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 { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * 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 DetailedERC20 token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; constructor(string _name, string _symbol, uint8 _decimals) public { } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) internal balances; uint256 internal 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. * https://github.com/ethereum/EIPs/issues/20 * 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, 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) { } } contract UnlimitedAllowanceToken is StandardToken { uint internal constant MAX_UINT = 2**256 - 1; /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance, and to add revert reasons. /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer. function transferFrom( address _from, address _to, uint256 _value) public returns (bool) { } /// @dev Transfer token for a specified address, modified to add revert reasons. /// @param _to The address to transfer to. /// @param _value The amount to be transferred. function transfer( address _to, uint256 _value) public returns (bool) { } } contract BZRxToken is UnlimitedAllowanceToken, DetailedERC20, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); event LockingFinished(); bool public mintingFinished = false; bool public lockingFinished = false; mapping (address => bool) public minters; modifier canMint() { } modifier hasMintPermission() { } modifier isLocked() { } constructor() public DetailedERC20( "bZx Protocol Token", "BZRX", 18 ) { } /// @dev ERC20 transferFrom function /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer. function transferFrom( address _from, address _to, uint256 _value) public returns (bool) { } /// @dev ERC20 transfer function /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer. function transfer( address _to, uint256 _value) public returns (bool) { } /// @dev Allows minter to initiate a transfer on behalf of another spender /// @param _spender Minter with permission to spend. /// @param _from Address to transfer from. /// @param _to Address to transfer to. /// @param _value Amount to transfer. /// @return Success of transfer. function minterTransferFrom( address _spender, address _from, address _to, uint256 _value) public hasMintPermission canMint returns (bool) { require(<FILL_ME>) require(_to != address(0), "token burn not allowed"); uint allowance = allowed[_from][_spender]; balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); if (allowance < MAX_UINT) { allowed[_from][_spender] = allowance.sub(_value); } emit Transfer(_from, _to, _value); return true; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint( address _to, uint256 _amount) public hasMintPermission canMint returns (bool) { } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() public onlyOwner canMint { } /** * @dev Function to stop locking token. * @return True if the operation was successful. */ function finishLocking() public onlyOwner isLocked { } /** * @dev Function to add minter address. * @return True if the operation was successful. */ function addMinter( address _minter) public onlyOwner canMint { } /** * @dev Function to remove minter address. * @return True if the operation was successful. */ function removeMinter( address _minter) public onlyOwner canMint { } /** * @dev Function to check balance and allowance for a spender. * @return True transfer will succeed based on balance and allowance. */ function canTransfer( address _spender, address _from, uint256 _value) public view returns (bool) { } } contract BZRxTransferProxy is Ownable { using SafeMath for uint256; address public bZRxTokenContractAddress; mapping (address => uint) public transferAllowance; string public name = "bZx Protocol Token"; string public symbol = "BZRX"; uint8 public decimals = 18; constructor( address _bZRxTokenContractAddress) public { } function() public { } // for ERC20 conformity function transferFrom( address _from, address _to, uint256 _amount) public returns (bool) { } // for ERC20 conformity function totalSupply() public view returns (uint) { } // for ERC20 conformity function balanceOf( address _owner) public view returns (uint) { } // for ERC20 conformity function allowance( address _owner, address _spender) public view returns (uint) { } function setTransferAllowance( address _who, uint _amount) public onlyOwner { } function changeBZRxTokenContract( address _bZRxTokenContractAddress) public onlyOwner { } function transferToken( address _tokenAddress, address _to, uint _value) public onlyOwner returns (bool) { } }
canTransfer(_spender,_from,_value),"canTransfer is false"
315,254
canTransfer(_spender,_from,_value)
null
pragma solidity ^0.4.24; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * 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 Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } } 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 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 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 Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * 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, 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) { } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { } function _burn(address _who, uint256 _value) internal { } } /** * @title Standard Burnable Token * @dev Adds burnFrom method to ERC20 implementations */ contract StandardBurnableToken is BurnableToken, StandardToken { /** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param _from address The address which you want to send tokens from * @param _value uint256 The amount of token to be burned */ function burnFrom(address _from, uint256 _value) public { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } /** * @title Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer( address _to, uint256 _value ) public whenNotPaused returns (bool) { } function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { } function approve( address _spender, uint256 _value ) public whenNotPaused returns (bool) { } function increaseApproval( address _spender, uint _addedValue ) public whenNotPaused returns (bool success) { } function decreaseApproval( address _spender, uint _subtractedValue ) public whenNotPaused returns (bool success) { } } /** * @title Wish token **/ contract WISH is StandardBurnableToken, PausableToken { using SafeMath for uint256; string public constant name = "WishChain"; string public constant symbol = "WISH"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 4e10 * (10 ** uint256(decimals)); uint constant LOCK_TOKEN_COUNT = 1000; struct LockedUserInfo{ uint256 _releaseTime; uint256 _amount; } mapping(address => LockedUserInfo[]) private lockedUserEntity; mapping(address => bool) private supervisorEntity; mapping(address => bool) private lockedWalletEntity; modifier onlySupervisor() { } event Lock(address indexed holder, uint256 value, uint256 releaseTime); event Unlock(address indexed holder, uint256 value); event PrintLog( address indexed sender, string _logName, uint256 _value ); constructor() public { } function transfer(address to, uint256 value) public whenNotPaused returns (bool) { require(<FILL_ME>) require(msg.sender != to,"Check your address!!"); if (lockedUserEntity[msg.sender].length > 0 ) { _autoUnlock(msg.sender); } return super.transfer(to, value); } function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) { } function transferWithLock(address holder, uint256 value, uint256 releaseTime) public onlySupervisor whenNotPaused returns (bool) { } function _lock(address holder, uint256 value, uint256 releaseTime) internal returns(bool) { } function _unlock(address holder, uint256 idx) internal returns(bool) { } function _autoUnlock(address holder) internal returns(bool) { } function setLockTime(address holder, uint idx, uint256 releaseTime) onlySupervisor public returns(bool){ } function getLockedUserInfo(address _address) view public returns (uint256[], uint256[]){ } function burn(uint256 _value) onlySupervisor public { } function burnFrom(address _from, uint256 _value) onlySupervisor public { } function balanceOf(address owner) public view returns (uint256) { } function setSupervisor(address _address) onlyOwner public returns (bool){ } function removeSupervisor(address _address) onlyOwner public returns (bool){ } function setLockedWalletEntity(address _address) onlySupervisor public returns (bool){ } function removeLockedWalletEntity(address _address) onlySupervisor public returns (bool){ } function isSupervisor(address _address) view onlyOwner public returns (bool){ } function isLockedWalletEntity(address _from) view private returns (bool){ } }
!isLockedWalletEntity(msg.sender)
315,353
!isLockedWalletEntity(msg.sender)
null
pragma solidity ^0.4.24; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * 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 Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } } 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 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 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 Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * 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, 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) { } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { } function _burn(address _who, uint256 _value) internal { } } /** * @title Standard Burnable Token * @dev Adds burnFrom method to ERC20 implementations */ contract StandardBurnableToken is BurnableToken, StandardToken { /** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param _from address The address which you want to send tokens from * @param _value uint256 The amount of token to be burned */ function burnFrom(address _from, uint256 _value) public { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } /** * @title Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer( address _to, uint256 _value ) public whenNotPaused returns (bool) { } function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { } function approve( address _spender, uint256 _value ) public whenNotPaused returns (bool) { } function increaseApproval( address _spender, uint _addedValue ) public whenNotPaused returns (bool success) { } function decreaseApproval( address _spender, uint _subtractedValue ) public whenNotPaused returns (bool success) { } } /** * @title Wish token **/ contract WISH is StandardBurnableToken, PausableToken { using SafeMath for uint256; string public constant name = "WishChain"; string public constant symbol = "WISH"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 4e10 * (10 ** uint256(decimals)); uint constant LOCK_TOKEN_COUNT = 1000; struct LockedUserInfo{ uint256 _releaseTime; uint256 _amount; } mapping(address => LockedUserInfo[]) private lockedUserEntity; mapping(address => bool) private supervisorEntity; mapping(address => bool) private lockedWalletEntity; modifier onlySupervisor() { } event Lock(address indexed holder, uint256 value, uint256 releaseTime); event Unlock(address indexed holder, uint256 value); event PrintLog( address indexed sender, string _logName, uint256 _value ); constructor() public { } function transfer(address to, uint256 value) public whenNotPaused returns (bool) { } function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) { require(<FILL_ME>) if (lockedUserEntity[from].length > 0) { _autoUnlock(from); } return super.transferFrom(from, to, value); } function transferWithLock(address holder, uint256 value, uint256 releaseTime) public onlySupervisor whenNotPaused returns (bool) { } function _lock(address holder, uint256 value, uint256 releaseTime) internal returns(bool) { } function _unlock(address holder, uint256 idx) internal returns(bool) { } function _autoUnlock(address holder) internal returns(bool) { } function setLockTime(address holder, uint idx, uint256 releaseTime) onlySupervisor public returns(bool){ } function getLockedUserInfo(address _address) view public returns (uint256[], uint256[]){ } function burn(uint256 _value) onlySupervisor public { } function burnFrom(address _from, uint256 _value) onlySupervisor public { } function balanceOf(address owner) public view returns (uint256) { } function setSupervisor(address _address) onlyOwner public returns (bool){ } function removeSupervisor(address _address) onlyOwner public returns (bool){ } function setLockedWalletEntity(address _address) onlySupervisor public returns (bool){ } function removeLockedWalletEntity(address _address) onlySupervisor public returns (bool){ } function isSupervisor(address _address) view onlyOwner public returns (bool){ } function isLockedWalletEntity(address _from) view private returns (bool){ } }
!isLockedWalletEntity(from)&&!isLockedWalletEntity(msg.sender)
315,353
!isLockedWalletEntity(from)&&!isLockedWalletEntity(msg.sender)
null
pragma solidity ^0.4.24; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * 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 Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { } } 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 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 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 Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * 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, 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) { } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { } function _burn(address _who, uint256 _value) internal { } } /** * @title Standard Burnable Token * @dev Adds burnFrom method to ERC20 implementations */ contract StandardBurnableToken is BurnableToken, StandardToken { /** * @dev Burns a specific amount of tokens from the target address and decrements allowance * @param _from address The address which you want to send tokens from * @param _value uint256 The amount of token to be burned */ function burnFrom(address _from, uint256 _value) public { } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } /** * @title Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer( address _to, uint256 _value ) public whenNotPaused returns (bool) { } function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { } function approve( address _spender, uint256 _value ) public whenNotPaused returns (bool) { } function increaseApproval( address _spender, uint _addedValue ) public whenNotPaused returns (bool success) { } function decreaseApproval( address _spender, uint _subtractedValue ) public whenNotPaused returns (bool success) { } } /** * @title Wish token **/ contract WISH is StandardBurnableToken, PausableToken { using SafeMath for uint256; string public constant name = "WishChain"; string public constant symbol = "WISH"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 4e10 * (10 ** uint256(decimals)); uint constant LOCK_TOKEN_COUNT = 1000; struct LockedUserInfo{ uint256 _releaseTime; uint256 _amount; } mapping(address => LockedUserInfo[]) private lockedUserEntity; mapping(address => bool) private supervisorEntity; mapping(address => bool) private lockedWalletEntity; modifier onlySupervisor() { } event Lock(address indexed holder, uint256 value, uint256 releaseTime); event Unlock(address indexed holder, uint256 value); event PrintLog( address indexed sender, string _logName, uint256 _value ); constructor() public { } function transfer(address to, uint256 value) public whenNotPaused returns (bool) { } function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) { } function transferWithLock(address holder, uint256 value, uint256 releaseTime) public onlySupervisor whenNotPaused returns (bool) { } function _lock(address holder, uint256 value, uint256 releaseTime) internal returns(bool) { } function _unlock(address holder, uint256 idx) internal returns(bool) { } function _autoUnlock(address holder) internal returns(bool) { } function setLockTime(address holder, uint idx, uint256 releaseTime) onlySupervisor public returns(bool){ require(holder !=address(0) && idx >= 0 && releaseTime > now); require(<FILL_ME>) lockedUserEntity[holder][idx]._releaseTime = releaseTime; return true; } function getLockedUserInfo(address _address) view public returns (uint256[], uint256[]){ } function burn(uint256 _value) onlySupervisor public { } function burnFrom(address _from, uint256 _value) onlySupervisor public { } function balanceOf(address owner) public view returns (uint256) { } function setSupervisor(address _address) onlyOwner public returns (bool){ } function removeSupervisor(address _address) onlyOwner public returns (bool){ } function setLockedWalletEntity(address _address) onlySupervisor public returns (bool){ } function removeLockedWalletEntity(address _address) onlySupervisor public returns (bool){ } function isSupervisor(address _address) view onlyOwner public returns (bool){ } function isLockedWalletEntity(address _from) view private returns (bool){ } }
lockedUserEntity[holder].length>=idx
315,353
lockedUserEntity[holder].length>=idx
null
// SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; pragma solidity ^0.8.0; contract HAYC is ERC721("Hex Ape Yacht Club", "HAYC"), Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenSupply; string baseURI; uint256 maxMintAmount = 20; uint256 maxSupply = 10_000; uint256 price = 0.02 ether; // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(uint256 _mintAmount) public payable { } function setPrice(uint256 _newPrice) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function withdraw() public payable onlyOwner { address a = 0xecF037b1eA1e7A29909e9C696091E7AAcb3eB573; uint256 bal = address(this).balance; require(<FILL_ME>) } function totalSupply() public view returns (uint256) { } function walletOfOwner(address owner) public view returns (uint256[] memory) { } }
payable(a).send(bal)
315,363
payable(a).send(bal)
null
pragma solidity ^0.4.25; // ---------------------------------------------------------------------------- // BokkyPooBah's Pricefeed from a single source // // Deployed to: 0xD649c9b68BB78e8fd25c0B7a9c22c42f57768c91 // // Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd 2018. The MIT Licence. // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; bool private initialised; event OwnershipTransferred(address indexed _from, address indexed _to); modifier onlyOwner { } function initOwned(address _owner) internal { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } function transferOwnershipImmediately(address _newOwner) public onlyOwner { } } // ---------------------------------------------------------------------------- // Maintain a list of operators that are permissioned to execute certain // functions // ---------------------------------------------------------------------------- contract Operated is Owned { mapping(address => bool) public operators; event OperatorAdded(address _operator); event OperatorRemoved(address _operator); modifier onlyOperator() { require(<FILL_ME>) _; } function initOperated(address _owner) internal { } function addOperator(address _operator) public onlyOwner { } function removeOperator(address _operator) public onlyOwner { } } // ---------------------------------------------------------------------------- // PriceFeed Interface - _live is true if the rate is valid, false if invalid // ---------------------------------------------------------------------------- contract PriceFeedInterface { function name() public view returns (string); function getRate() public view returns (uint _rate, bool _live); } // ---------------------------------------------------------------------------- // Pricefeed from a single source // ---------------------------------------------------------------------------- contract PriceFeed is PriceFeedInterface, Operated { string private _name; uint private _rate; bool private _live; event SetRate(uint oldRate, bool oldLive, uint newRate, bool newLive); constructor(string name, uint rate, bool live) public { } function name() public view returns (string) { } function setRate(uint rate, bool live) public onlyOperator { } function getRate() public view returns (uint rate, bool live) { } }
operators[msg.sender]||owner==msg.sender
315,444
operators[msg.sender]||owner==msg.sender
null
pragma solidity ^0.4.25; // ---------------------------------------------------------------------------- // BokkyPooBah's Pricefeed from a single source // // Deployed to: 0xD649c9b68BB78e8fd25c0B7a9c22c42f57768c91 // // Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd 2018. The MIT Licence. // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; bool private initialised; event OwnershipTransferred(address indexed _from, address indexed _to); modifier onlyOwner { } function initOwned(address _owner) internal { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } function transferOwnershipImmediately(address _newOwner) public onlyOwner { } } // ---------------------------------------------------------------------------- // Maintain a list of operators that are permissioned to execute certain // functions // ---------------------------------------------------------------------------- contract Operated is Owned { mapping(address => bool) public operators; event OperatorAdded(address _operator); event OperatorRemoved(address _operator); modifier onlyOperator() { } function initOperated(address _owner) internal { } function addOperator(address _operator) public onlyOwner { require(<FILL_ME>) operators[_operator] = true; emit OperatorAdded(_operator); } function removeOperator(address _operator) public onlyOwner { } } // ---------------------------------------------------------------------------- // PriceFeed Interface - _live is true if the rate is valid, false if invalid // ---------------------------------------------------------------------------- contract PriceFeedInterface { function name() public view returns (string); function getRate() public view returns (uint _rate, bool _live); } // ---------------------------------------------------------------------------- // Pricefeed from a single source // ---------------------------------------------------------------------------- contract PriceFeed is PriceFeedInterface, Operated { string private _name; uint private _rate; bool private _live; event SetRate(uint oldRate, bool oldLive, uint newRate, bool newLive); constructor(string name, uint rate, bool live) public { } function name() public view returns (string) { } function setRate(uint rate, bool live) public onlyOperator { } function getRate() public view returns (uint rate, bool live) { } }
!operators[_operator]
315,444
!operators[_operator]
null
pragma solidity ^0.4.25; // ---------------------------------------------------------------------------- // BokkyPooBah's Pricefeed from a single source // // Deployed to: 0xD649c9b68BB78e8fd25c0B7a9c22c42f57768c91 // // Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd 2018. The MIT Licence. // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // Owned contract // ---------------------------------------------------------------------------- contract Owned { address public owner; address public newOwner; bool private initialised; event OwnershipTransferred(address indexed _from, address indexed _to); modifier onlyOwner { } function initOwned(address _owner) internal { } function transferOwnership(address _newOwner) public onlyOwner { } function acceptOwnership() public { } function transferOwnershipImmediately(address _newOwner) public onlyOwner { } } // ---------------------------------------------------------------------------- // Maintain a list of operators that are permissioned to execute certain // functions // ---------------------------------------------------------------------------- contract Operated is Owned { mapping(address => bool) public operators; event OperatorAdded(address _operator); event OperatorRemoved(address _operator); modifier onlyOperator() { } function initOperated(address _owner) internal { } function addOperator(address _operator) public onlyOwner { } function removeOperator(address _operator) public onlyOwner { require(<FILL_ME>) delete operators[_operator]; emit OperatorRemoved(_operator); } } // ---------------------------------------------------------------------------- // PriceFeed Interface - _live is true if the rate is valid, false if invalid // ---------------------------------------------------------------------------- contract PriceFeedInterface { function name() public view returns (string); function getRate() public view returns (uint _rate, bool _live); } // ---------------------------------------------------------------------------- // Pricefeed from a single source // ---------------------------------------------------------------------------- contract PriceFeed is PriceFeedInterface, Operated { string private _name; uint private _rate; bool private _live; event SetRate(uint oldRate, bool oldLive, uint newRate, bool newLive); constructor(string name, uint rate, bool live) public { } function name() public view returns (string) { } function setRate(uint rate, bool live) public onlyOperator { } function getRate() public view returns (uint rate, bool live) { } }
operators[_operator]
315,444
operators[_operator]
"Transfer failed"
pragma solidity ^0.5.16; import "openzeppelin-solidity-2.3.0/contracts/token/ERC20/ERC20.sol"; import "openzeppelin-solidity-2.3.0/contracts/math/Math.sol"; import "openzeppelin-solidity-2.3.0/contracts/math/SafeMath.sol"; import "synthetix-2.43.1/contracts/SafeDecimalMath.sol"; import "openzeppelin-solidity-2.3.0/contracts/utils/ReentrancyGuard.sol"; import "synthetix-2.43.1/contracts/Owned.sol"; contract VestingEscrow is ReentrancyGuard, Owned { using Math for uint256; using SafeMath for uint256; address public token; uint256 public startTime; uint256 public endTime; mapping(address => uint256) public initialLocked; mapping(address => uint256) public totalClaimed; uint256 public initialLockedSupply; uint256 public unallocatedSupply; constructor( address _owner, address _token, uint256 _startTime, uint256 _endTime ) public Owned(_owner) { } function addTokens(uint256 _amount) external onlyOwner { require(<FILL_ME>) unallocatedSupply = unallocatedSupply.add(_amount); } function fund(address[] calldata _recipients, uint256[] calldata _amounts) external onlyOwner { } function _totalVestedOf(address _recipient, uint256 _time) internal view returns (uint256) { } function _totalVested() internal view returns (uint256) { } function vestedSupply() public view returns (uint256) { } function vestedOf(address _recipient) public view returns (uint256) { } function lockedSupply() public view returns (uint256) { } function balanceOf(address _recipient) public view returns (uint256) { } function lockedOf(address _recipient) public view returns (uint256) { } function _selfDestruct(address payable beneficiary) external onlyOwner { } function claim() external nonReentrant { } event Fund(address indexed _recipient, uint256 _amount); event Claim(address indexed _address, uint256 _amount); }
ERC20(token).transferFrom(msg.sender,address(this),_amount),"Transfer failed"
315,493
ERC20(token).transferFrom(msg.sender,address(this),_amount)
"Contract can only be selfdestruct a year after endtime"
pragma solidity ^0.5.16; import "openzeppelin-solidity-2.3.0/contracts/token/ERC20/ERC20.sol"; import "openzeppelin-solidity-2.3.0/contracts/math/Math.sol"; import "openzeppelin-solidity-2.3.0/contracts/math/SafeMath.sol"; import "synthetix-2.43.1/contracts/SafeDecimalMath.sol"; import "openzeppelin-solidity-2.3.0/contracts/utils/ReentrancyGuard.sol"; import "synthetix-2.43.1/contracts/Owned.sol"; contract VestingEscrow is ReentrancyGuard, Owned { using Math for uint256; using SafeMath for uint256; address public token; uint256 public startTime; uint256 public endTime; mapping(address => uint256) public initialLocked; mapping(address => uint256) public totalClaimed; uint256 public initialLockedSupply; uint256 public unallocatedSupply; constructor( address _owner, address _token, uint256 _startTime, uint256 _endTime ) public Owned(_owner) { } function addTokens(uint256 _amount) external onlyOwner { } function fund(address[] calldata _recipients, uint256[] calldata _amounts) external onlyOwner { } function _totalVestedOf(address _recipient, uint256 _time) internal view returns (uint256) { } function _totalVested() internal view returns (uint256) { } function vestedSupply() public view returns (uint256) { } function vestedOf(address _recipient) public view returns (uint256) { } function lockedSupply() public view returns (uint256) { } function balanceOf(address _recipient) public view returns (uint256) { } function lockedOf(address _recipient) public view returns (uint256) { } function _selfDestruct(address payable beneficiary) external onlyOwner { //only callable a year after end time require(<FILL_ME>) // Transfer the balance rather than the deposit value in case there are any synths left over // from direct transfers. IERC20(token).transfer(beneficiary, IERC20(token).balanceOf(address(this))); // Destroy the option tokens before destroying the market itself. selfdestruct(beneficiary); } function claim() external nonReentrant { } event Fund(address indexed _recipient, uint256 _amount); event Claim(address indexed _address, uint256 _amount); }
block.timestamp>(endTime+365days),"Contract can only be selfdestruct a year after endtime"
315,493
block.timestamp>(endTime+365days)
null
pragma solidity ^0.5.16; import "openzeppelin-solidity-2.3.0/contracts/token/ERC20/ERC20.sol"; import "openzeppelin-solidity-2.3.0/contracts/math/Math.sol"; import "openzeppelin-solidity-2.3.0/contracts/math/SafeMath.sol"; import "synthetix-2.43.1/contracts/SafeDecimalMath.sol"; import "openzeppelin-solidity-2.3.0/contracts/utils/ReentrancyGuard.sol"; import "synthetix-2.43.1/contracts/Owned.sol"; contract VestingEscrow is ReentrancyGuard, Owned { using Math for uint256; using SafeMath for uint256; address public token; uint256 public startTime; uint256 public endTime; mapping(address => uint256) public initialLocked; mapping(address => uint256) public totalClaimed; uint256 public initialLockedSupply; uint256 public unallocatedSupply; constructor( address _owner, address _token, uint256 _startTime, uint256 _endTime ) public Owned(_owner) { } function addTokens(uint256 _amount) external onlyOwner { } function fund(address[] calldata _recipients, uint256[] calldata _amounts) external onlyOwner { } function _totalVestedOf(address _recipient, uint256 _time) internal view returns (uint256) { } function _totalVested() internal view returns (uint256) { } function vestedSupply() public view returns (uint256) { } function vestedOf(address _recipient) public view returns (uint256) { } function lockedSupply() public view returns (uint256) { } function balanceOf(address _recipient) public view returns (uint256) { } function lockedOf(address _recipient) public view returns (uint256) { } function _selfDestruct(address payable beneficiary) external onlyOwner { } function claim() external nonReentrant { uint256 claimable = balanceOf(msg.sender); require(claimable > 0, "nothing to claim"); totalClaimed[msg.sender] = totalClaimed[msg.sender].add(claimable); require(<FILL_ME>) emit Claim(msg.sender, claimable); } event Fund(address indexed _recipient, uint256 _amount); event Claim(address indexed _address, uint256 _amount); }
ERC20(token).transfer(msg.sender,claimable)
315,493
ERC20(token).transfer(msg.sender,claimable)
"Color name can have a maximum length of 32 characters"
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 { } function _setOwner(address newOwner) private { } } // OpenZeppelin Contracts v4.3.2 (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.0; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) 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 override { } } // cRGB (www.crgb.io) // Based loosely on HashLips NFT_ON_CHAIN // Inspired by LOOT pragma solidity >=0.8.0 <0.9.0; contract cRGB is ERC721Enumerable, ReentrancyGuard, Ownable{ using Strings for uint256; uint256 public cost = 0.005 ether; address payable private _passch; address payable private _holstein; int colorId; int public Red; int public Green; int public Blue; int public bgRed; int public bgGreen; int public bgBlue; constructor( address holstein ) ERC721("cRGB", "cRGB"){ } struct Color { string colorName; string colorNameMeta; string bgRed; string bgGreen; string bgBlue; } mapping (uint256 => Color) public colors; // public function mint(uint256 _tokenId, string memory colorName) public nonReentrant payable { require(msg.value >= cost, "Ether amount sent is insufficient"); require(_tokenId >= 0 && _tokenId <= 16777215, "Token ID invalid"); require(<FILL_ME>) require(bytes(colorName).length >= 1, "Color name requires a minimum of 1 character"); // ColorShifter // Convert TokenId to RGB values colorId = int(_tokenId); Red = colorId; Red >> 0; bgRed = (Red & 0xFF0000) >> 16; Green = colorId; Green >> 0; bgGreen = (Green & 0xFF00) >> 8; Blue = colorId; Blue >> 0; bgBlue = Blue & 0xFF; Color memory newColor = Color( string(abi.encodePacked('"', colorName,'"')), string(abi.encodePacked(' \\"',colorName,'\\" ')), uint(bgRed).toString(), uint(bgGreen).toString(), uint(bgBlue).toString()); colors[_tokenId] = newColor; // safeMint _safeMint(msg.sender, _tokenId); } function changeColorName(uint256 _tokenId, string memory colorName) public nonReentrant payable { } function buildImage(uint256 _tokenId) public view returns(string memory) { } function buildMetadata(uint256 _tokenId) public view returns(string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function withdraw() external { } //only owner // function withdraw() public payable onlyOwner { // (bool success, ) = payable(msg.sender).call{value: address(this).balance}(""); // require(success); //} } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
bytes(colorName).length<=32,"Color name can have a maximum length of 32 characters"
315,504
bytes(colorName).length<=32
"Color name requires a minimum of 1 character"
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 { } function _setOwner(address newOwner) private { } } // OpenZeppelin Contracts v4.3.2 (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.0; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) 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 override { } } // cRGB (www.crgb.io) // Based loosely on HashLips NFT_ON_CHAIN // Inspired by LOOT pragma solidity >=0.8.0 <0.9.0; contract cRGB is ERC721Enumerable, ReentrancyGuard, Ownable{ using Strings for uint256; uint256 public cost = 0.005 ether; address payable private _passch; address payable private _holstein; int colorId; int public Red; int public Green; int public Blue; int public bgRed; int public bgGreen; int public bgBlue; constructor( address holstein ) ERC721("cRGB", "cRGB"){ } struct Color { string colorName; string colorNameMeta; string bgRed; string bgGreen; string bgBlue; } mapping (uint256 => Color) public colors; // public function mint(uint256 _tokenId, string memory colorName) public nonReentrant payable { require(msg.value >= cost, "Ether amount sent is insufficient"); require(_tokenId >= 0 && _tokenId <= 16777215, "Token ID invalid"); require(bytes(colorName).length <= 32, "Color name can have a maximum length of 32 characters"); require(<FILL_ME>) // ColorShifter // Convert TokenId to RGB values colorId = int(_tokenId); Red = colorId; Red >> 0; bgRed = (Red & 0xFF0000) >> 16; Green = colorId; Green >> 0; bgGreen = (Green & 0xFF00) >> 8; Blue = colorId; Blue >> 0; bgBlue = Blue & 0xFF; Color memory newColor = Color( string(abi.encodePacked('"', colorName,'"')), string(abi.encodePacked(' \\"',colorName,'\\" ')), uint(bgRed).toString(), uint(bgGreen).toString(), uint(bgBlue).toString()); colors[_tokenId] = newColor; // safeMint _safeMint(msg.sender, _tokenId); } function changeColorName(uint256 _tokenId, string memory colorName) public nonReentrant payable { } function buildImage(uint256 _tokenId) public view returns(string memory) { } function buildMetadata(uint256 _tokenId) public view returns(string memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function withdraw() external { } //only owner // function withdraw() public payable onlyOwner { // (bool success, ) = payable(msg.sender).call{value: address(this).balance}(""); // require(success); //} } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { } }
bytes(colorName).length>=1,"Color name requires a minimum of 1 character"
315,504
bytes(colorName).length>=1
"Redeeming is not yet profitable."
pragma solidity 0.6.12; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } contract Ownable { address public _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () public { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } function transferOwnership(address newOwner) public virtual onlyOwner { } } contract BentoBoxToken is Ownable{ using SafeMath for uint256; mapping (address => uint256) public balanceOf; mapping (address => bool) public whitelist; string public name = "BentoBox Lending"; string public symbol = "BENTO"; uint8 public decimals = 18; uint256 public totalSupply = 2500000 * (uint256(10) ** decimals); uint256 public totalPooled; event Transfer(address indexed from, address indexed to, uint256 value); constructor() public { } // Ensure a redemption is profitable before allowing a redeem() modifier profitable() { require(<FILL_ME>) _; } // VIEWS // Get the number of tokens to be redeemed from the pool function numberRedeemed(uint256 amount) public view returns (uint256 profit) { } // Check if more than 50% of the token is pooled function is_profitable() public view returns (bool _profitable) { } // SETTERS function addToWhitelist(address _addr) public onlyOwner { } function removeFromWhitelist(address _addr) public onlyOwner { } // TRANSFER FUNCTIONS // BOA-TOKEN <- Sell taxed // TOKEN-BOA <- Buy (not taxed) function transfer(address to, uint256 value) public returns (bool success) { } function burn_transfer(address to, uint256 value) private returns (bool success) { } function regular_transfer(address to, uint256 value) private returns (bool success) { } function transferFrom(address from, address to, uint256 value) public returns (bool success) { } function burn_transferFrom(address from, address to, uint256 value) private returns (bool success) { } function regular_transferFrom(address from, address to, uint256 value) private returns (bool success) { } // REDEEM AND BURN FUNCTIONS // amount = number of tokens to burn function redeem(uint256 amount) public profitable returns (bool success) { } function burn(uint256 value) private returns (bool success) { } // APPROVAL FUNCTIONS event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => mapping(address => uint256)) public allowance; function approve(address spender, uint256 value) public returns (bool success) { } }
is_profitable(),"Redeeming is not yet profitable."
315,511
is_profitable()
"already deployed"
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "./RallyV1CreatorCoinDeployer.sol"; /// @title Creator Coin V1 Factory /// @notice Deploys and tracks the Creator Coin ERC20 contracts for bridging /// individual coins from rally sidechain to ethereum mainnet contract RallyV1CreatorCoinFactory is Ownable, RallyV1CreatorCoinDeployer { mapping(bytes32 => address) public getMainnetCreatorCoinAddress; address private _bridge; event CreatorCoinDeployed( bytes32 pricingCurveIdHash, address indexed mainnetCreatorCoinAddress, string sidechainPricingCurveId, string name, string symbol, uint8 decimals ); function deployCreatorCoinWithDecimals( string memory sidechainPricingCurveId, string memory name, string memory symbol, uint8 decimals ) external onlyOwner returns (address mainnetCreatorCoinAddress) { } function deployCreatorCoin( string memory sidechainPricingCurveId, string memory name, string memory symbol ) external onlyOwner returns (address mainnetCreatorCoinAddress) { } function _deployCreatorCoin( string memory sidechainPricingCurveId, string memory name, string memory symbol, uint8 decimals ) internal returns (address mainnetCreatorCoinAddress) { bytes32 pricingCurveIdHash = keccak256(abi.encode(sidechainPricingCurveId)); require(<FILL_ME>) mainnetCreatorCoinAddress = deploy( address(this), pricingCurveIdHash, sidechainPricingCurveId, name, symbol, decimals ); getMainnetCreatorCoinAddress[ pricingCurveIdHash ] = mainnetCreatorCoinAddress; emit CreatorCoinDeployed( pricingCurveIdHash, mainnetCreatorCoinAddress, sidechainPricingCurveId, name, symbol, decimals ); } function getCreatorCoinFromSidechainPricingCurveId( string memory sidechainPricingCurveId ) external view returns (address mainnetCreatorCoinAddress) { } function setBridge(address newBridge) external onlyOwner { } function bridge() external view returns (address) { } }
getMainnetCreatorCoinAddress[pricingCurveIdHash]==address(0),"already deployed"
315,516
getMainnetCreatorCoinAddress[pricingCurveIdHash]==address(0)
"not supported"
pragma solidity ^0.5.0; import "./Math.sol"; import "./SafeERC20.sol"; import "./IRewardDistributionRecipient.sol"; contract Govern is IERC20 { function make_profit(uint256 amount) external returns (bool); } library SafeGovern { using SafeMath for uint256; using Address for address; function safeMakeProfit(Govern token, uint256 value) internal { } function callOptionalReturn(Govern token, bytes memory data) private { } } contract LPTokenWrapper { using SafeMath for uint256; using SafeERC20 for IERC20; uint256 private _totalSupply; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _tokenBalances; mapping(string => address) private _tokens; constructor() internal { } function totalSupply() public view returns (uint256) { } function balanceOf(address account) public view returns (uint256) { } function balanceOf(string memory token, address account) public view returns (uint256) { } function stake(string memory token, uint256 amount) public { require(<FILL_ME>) _totalSupply = _totalSupply.add(amount); _tokenBalances[msg.sender][_tokens[token]] = _tokenBalances[msg.sender][_tokens[token]].add(amount); _balances[msg.sender] = _balances[msg.sender].add(amount); IERC20 y = IERC20(_tokens[token]); y.safeTransferFrom(msg.sender, address(this), amount); } function withdraw(string memory token, uint256 amount) public { } } contract KaniRewards is LPTokenWrapper, IRewardDistributionRecipient { using SafeGovern for Govern; IERC20 public kani = IERC20(0x790aCe920bAF3af2b773D4556A69490e077F6B4A); uint256 public constant DURATION = 100 days; uint256 public totalReward = 500000*1e18; uint256 public rewardRate = 0; uint256 public starttime = 1600142400; //utc+8 2020 09-15 12:00:00 uint256 public periodFinish = 0; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; address govern = 0x3a8Ff8b9DE3429EA84DFC8e8f13072C6838d51aF; // Governance address event RewardAdded(uint256 reward); event Staked(address indexed user, string token, uint256 amount); event Withdrawn(address indexed user, string token, uint256 amount); event RewardPaid(address indexed user, uint256 reward); event GovernTransfer(address indexed user, address indexed govern, uint256 reward); modifier updateReward(address account) { } function lastTimeRewardApplicable() public view returns (uint256) { } function rewardPerToken() public view returns (uint256) { } function earned(address account) public view returns (uint256) { } // stake visibility is public as overriding LPTokenWrapper's stake() function function stake(string memory token, uint256 amount) public updateReward(msg.sender) checkStart{ } function withdraw(string memory token, uint256 amount) public updateReward(msg.sender) checkStart{ } function withdraw() public updateReward(msg.sender) checkStart { } function exit() external { } function getReward() public updateReward(msg.sender) checkStart{ } modifier checkStart(){ } function notifyRewardAmount(uint256 reward) external onlyRewardDistribution updateReward(address(0)) { } }
_tokens[token]!=address(0),"not supported"
315,734
_tokens[token]!=address(0)
"Pausable.whenNotPaused: PAUSED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* DATA STRUCT IMPORTS */ import "./PausableStore.sol"; /* INHERITANCE IMPORTS */ import "../../utils/Context.sol"; import "./interfaces/PausableEvents.sol"; /* STORAGE */ import "../../ERC20/ERC20Storage.sol"; contract Pausable is Context, PausableEvents, ERC20Storage { /* MODIFIERS */ /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(<FILL_ME>) _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { } /* INITIALIZE METHOD */ /** * @dev Sets the value for {isPaused} to false once during initialization. * It is the developer's responsibility to only call this * function in initialize() of the base contract context. */ function _initializePausable() internal { } /* GETTER METHODS */ /** * @dev Returns true if the contract is paused, and false otherwise. */ function _paused() internal view returns (bool) { } /* STATE CHANGE METHODS */ /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal whenNotPaused { } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal whenPaused { } /* PRIVATE LOGIC METHODS */ function _paused_() private view returns (bool) { } }
!_paused_(),"Pausable.whenNotPaused: PAUSED"
315,773
!_paused_()
"Pausable.whenPaused: NOT_PAUSED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* DATA STRUCT IMPORTS */ import "./PausableStore.sol"; /* INHERITANCE IMPORTS */ import "../../utils/Context.sol"; import "./interfaces/PausableEvents.sol"; /* STORAGE */ import "../../ERC20/ERC20Storage.sol"; contract Pausable is Context, PausableEvents, ERC20Storage { /* MODIFIERS */ /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(<FILL_ME>) _; } /* INITIALIZE METHOD */ /** * @dev Sets the value for {isPaused} to false once during initialization. * It is the developer's responsibility to only call this * function in initialize() of the base contract context. */ function _initializePausable() internal { } /* GETTER METHODS */ /** * @dev Returns true if the contract is paused, and false otherwise. */ function _paused() internal view returns (bool) { } /* STATE CHANGE METHODS */ /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal whenNotPaused { } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal whenPaused { } /* PRIVATE LOGIC METHODS */ function _paused_() private view returns (bool) { } }
_paused_(),"Pausable.whenPaused: NOT_PAUSED"
315,773
_paused_()
"You're not invited"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.7; // by: stormwalkerz ⭐️ import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface iFutureContract { function mintTransfer(address to) external returns(uint256); } contract UtopiaClub is ERC1155, ERC1155Supply, ERC1155Burnable, Ownable { // Supply uint256 public immutable mintPrice; uint256 public immutable maxSupply; uint256 public immutable maxPerTxn; uint256 public immutable maxPerWallet; // Variables bytes32 public merkleRoot; uint256 constant TOKEN_ID = 1; // Project string public name; string public symbol; string public tokenUri; // Track mapping(address => uint256) public walletMints; // Authorized address public authorizedFutureContract = 0x70AaAB03d2cA0F69a5C0F5385304D5ee90BA28Fd; // @todo Future updated smart contract (currently only placeholder) bool public migrationActive = false; constructor( string memory name_, string memory symbol_, string memory uri_, uint256 maxSupply_ ) ERC1155("") { } // MODIFIERS modifier isUser { } // MINT function whitelistMint(uint256 quantity_, bytes32[] memory proof_) external payable isUser isWhitelisted { require(<FILL_ME>) require(quantity_ <= maxPerTxn, "Max per txn exceeded"); require(totalSupply(TOKEN_ID) + quantity_ <= maxSupply, "Max supply exceeded"); require(walletMints[msg.sender] + quantity_ <= maxPerWallet, "Max per wallet reached"); require(msg.value == mintPrice * quantity_, "Wrong value!"); walletMints[msg.sender] += quantity_; _mint(msg.sender, TOKEN_ID, quantity_, ""); } // INVITATION MINT STATUS bool public whitelistMintEnabled; uint256 public whitelistMintTime; function setWhitelistMint(bool bool_, uint256 epochTime_) external onlyOwner { } modifier isWhitelisted { } function whitelistMintIsEnabled() public view returns (bool) { } // FUTURE MIGRATION function setMigrationStatus(bool bool_) external onlyOwner { } function migrateToken() external isUser { } // OWNER function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setTokenUri(string calldata newUri_) public onlyOwner { } function setAuthorizedFutureContract(address futureContractAddress_) external onlyOwner { } function withdrawMoney() external onlyOwner { } // OVERRIDE function uri(uint256) public view virtual override returns (string memory) { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } }
MerkleProof.verify(proof_,merkleRoot,keccak256(abi.encodePacked(msg.sender))),"You're not invited"
315,805
MerkleProof.verify(proof_,merkleRoot,keccak256(abi.encodePacked(msg.sender)))
"Max supply exceeded"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.7; // by: stormwalkerz ⭐️ import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface iFutureContract { function mintTransfer(address to) external returns(uint256); } contract UtopiaClub is ERC1155, ERC1155Supply, ERC1155Burnable, Ownable { // Supply uint256 public immutable mintPrice; uint256 public immutable maxSupply; uint256 public immutable maxPerTxn; uint256 public immutable maxPerWallet; // Variables bytes32 public merkleRoot; uint256 constant TOKEN_ID = 1; // Project string public name; string public symbol; string public tokenUri; // Track mapping(address => uint256) public walletMints; // Authorized address public authorizedFutureContract = 0x70AaAB03d2cA0F69a5C0F5385304D5ee90BA28Fd; // @todo Future updated smart contract (currently only placeholder) bool public migrationActive = false; constructor( string memory name_, string memory symbol_, string memory uri_, uint256 maxSupply_ ) ERC1155("") { } // MODIFIERS modifier isUser { } // MINT function whitelistMint(uint256 quantity_, bytes32[] memory proof_) external payable isUser isWhitelisted { require(MerkleProof.verify(proof_, merkleRoot, keccak256(abi.encodePacked(msg.sender))), "You're not invited"); require(quantity_ <= maxPerTxn, "Max per txn exceeded"); require(<FILL_ME>) require(walletMints[msg.sender] + quantity_ <= maxPerWallet, "Max per wallet reached"); require(msg.value == mintPrice * quantity_, "Wrong value!"); walletMints[msg.sender] += quantity_; _mint(msg.sender, TOKEN_ID, quantity_, ""); } // INVITATION MINT STATUS bool public whitelistMintEnabled; uint256 public whitelistMintTime; function setWhitelistMint(bool bool_, uint256 epochTime_) external onlyOwner { } modifier isWhitelisted { } function whitelistMintIsEnabled() public view returns (bool) { } // FUTURE MIGRATION function setMigrationStatus(bool bool_) external onlyOwner { } function migrateToken() external isUser { } // OWNER function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setTokenUri(string calldata newUri_) public onlyOwner { } function setAuthorizedFutureContract(address futureContractAddress_) external onlyOwner { } function withdrawMoney() external onlyOwner { } // OVERRIDE function uri(uint256) public view virtual override returns (string memory) { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } }
totalSupply(TOKEN_ID)+quantity_<=maxSupply,"Max supply exceeded"
315,805
totalSupply(TOKEN_ID)+quantity_<=maxSupply
"Whitelist sale not started"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.7; // by: stormwalkerz ⭐️ import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface iFutureContract { function mintTransfer(address to) external returns(uint256); } contract UtopiaClub is ERC1155, ERC1155Supply, ERC1155Burnable, Ownable { // Supply uint256 public immutable mintPrice; uint256 public immutable maxSupply; uint256 public immutable maxPerTxn; uint256 public immutable maxPerWallet; // Variables bytes32 public merkleRoot; uint256 constant TOKEN_ID = 1; // Project string public name; string public symbol; string public tokenUri; // Track mapping(address => uint256) public walletMints; // Authorized address public authorizedFutureContract = 0x70AaAB03d2cA0F69a5C0F5385304D5ee90BA28Fd; // @todo Future updated smart contract (currently only placeholder) bool public migrationActive = false; constructor( string memory name_, string memory symbol_, string memory uri_, uint256 maxSupply_ ) ERC1155("") { } // MODIFIERS modifier isUser { } // MINT function whitelistMint(uint256 quantity_, bytes32[] memory proof_) external payable isUser isWhitelisted { } // INVITATION MINT STATUS bool public whitelistMintEnabled; uint256 public whitelistMintTime; function setWhitelistMint(bool bool_, uint256 epochTime_) external onlyOwner { } modifier isWhitelisted { require(<FILL_ME>) _; } function whitelistMintIsEnabled() public view returns (bool) { } // FUTURE MIGRATION function setMigrationStatus(bool bool_) external onlyOwner { } function migrateToken() external isUser { } // OWNER function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setTokenUri(string calldata newUri_) public onlyOwner { } function setAuthorizedFutureContract(address futureContractAddress_) external onlyOwner { } function withdrawMoney() external onlyOwner { } // OVERRIDE function uri(uint256) public view virtual override returns (string memory) { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } }
whitelistMintEnabled&&block.timestamp>=whitelistMintTime,"Whitelist sale not started"
315,805
whitelistMintEnabled&&block.timestamp>=whitelistMintTime
"You don't own the token"
//SPDX-License-Identifier: MIT pragma solidity ^0.8.7; // by: stormwalkerz ⭐️ import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; interface iFutureContract { function mintTransfer(address to) external returns(uint256); } contract UtopiaClub is ERC1155, ERC1155Supply, ERC1155Burnable, Ownable { // Supply uint256 public immutable mintPrice; uint256 public immutable maxSupply; uint256 public immutable maxPerTxn; uint256 public immutable maxPerWallet; // Variables bytes32 public merkleRoot; uint256 constant TOKEN_ID = 1; // Project string public name; string public symbol; string public tokenUri; // Track mapping(address => uint256) public walletMints; // Authorized address public authorizedFutureContract = 0x70AaAB03d2cA0F69a5C0F5385304D5ee90BA28Fd; // @todo Future updated smart contract (currently only placeholder) bool public migrationActive = false; constructor( string memory name_, string memory symbol_, string memory uri_, uint256 maxSupply_ ) ERC1155("") { } // MODIFIERS modifier isUser { } // MINT function whitelistMint(uint256 quantity_, bytes32[] memory proof_) external payable isUser isWhitelisted { } // INVITATION MINT STATUS bool public whitelistMintEnabled; uint256 public whitelistMintTime; function setWhitelistMint(bool bool_, uint256 epochTime_) external onlyOwner { } modifier isWhitelisted { } function whitelistMintIsEnabled() public view returns (bool) { } // FUTURE MIGRATION function setMigrationStatus(bool bool_) external onlyOwner { } function migrateToken() external isUser { require(migrationActive, "Migration is not enabled at this time"); require(<FILL_ME>) // Check if the user own one of the ERC-1155 burn(msg.sender, TOKEN_ID, 1); // Burn one the ERC-1155 token iFutureContract futureContract = iFutureContract(authorizedFutureContract); futureContract.mintTransfer(msg.sender); // Mint the ERC-721 token } // OWNER function setMerkleRoot(bytes32 merkleRoot_) external onlyOwner { } function setTokenUri(string calldata newUri_) public onlyOwner { } function setAuthorizedFutureContract(address futureContractAddress_) external onlyOwner { } function withdrawMoney() external onlyOwner { } // OVERRIDE function uri(uint256) public view virtual override returns (string memory) { } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override(ERC1155, ERC1155Supply) { } }
balanceOf(msg.sender,TOKEN_ID)>0,"You don't own the token"
315,805
balanceOf(msg.sender,TOKEN_ID)>0
"Max supply exceeded!"
pragma solidity ^0.8.0; contract SugarBabes is ERC721, Ownable { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private supply; string public uriPrefix = "ipfs://QmVXSqwcz7583M9Xaa4iMASuuhVJeiPd42jEhkP3FJ3ToV/"; string public uriSuffix = ".json"; string public hiddenMetadataUri; uint256 public preSaleWalletLimit = 15; uint256 public publicSaleWalletLimit = 10; uint256 public cost = 0.07 ether; uint256 public maxSupply = 10000; uint256 public availableToMint = 10000; uint256 public maxMintAmountPerTx = 15; bool public paused = false; bool public revealed = false; bool public onlyWhitelisted = true; mapping(address => bool) public whitelistedAddresses; // mapping(address => uint256) public addressMintedBalance; constructor() ERC721("SugarBabes", "SB") { } modifier mintCompliance(uint256 _mintAmount) { require(_mintAmount > 0 && _mintAmount <= maxMintAmountPerTx, "Invalid mint amount!"); require(<FILL_ME>) _; } function totalSupply() public view returns (uint256) { } function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) { } // Owner quota for the team and giveaways function ownerMint(uint256 _mintAmount, address _receiver) public onlyOwner { } // function isWhitelisted(address _user) public view returns (bool){ // for (uint256 i=0; i < whitelistedAddresses.length; i++) // if (whitelistedAddresses[i] == _user) { // return true; // } // return false; // } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setRevealed(bool _state) public onlyOwner { } function setCost(uint256 _cost) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setPrivateSaleWalletLimit(uint256 _PrivateSaleWalletLimit) public onlyOwner { } function setPublicSaleWalletLimit(uint256 _PublicSaleWalletLimit) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function whitelistUsers(address[] memory _users) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function withdraw() public onlyOwner { } function _mintLoop(address _receiver, uint256 _mintAmount) internal { } function _baseURI() internal view virtual override returns (string memory) { } }
supply.current()+_mintAmount<=availableToMint,"Max supply exceeded!"
315,912
supply.current()+_mintAmount<=availableToMint
"Max NFT mint limit reached. Try minting in public sale"
pragma solidity ^0.8.0; contract SugarBabes is ERC721, Ownable { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private supply; string public uriPrefix = "ipfs://QmVXSqwcz7583M9Xaa4iMASuuhVJeiPd42jEhkP3FJ3ToV/"; string public uriSuffix = ".json"; string public hiddenMetadataUri; uint256 public preSaleWalletLimit = 15; uint256 public publicSaleWalletLimit = 10; uint256 public cost = 0.07 ether; uint256 public maxSupply = 10000; uint256 public availableToMint = 10000; uint256 public maxMintAmountPerTx = 15; bool public paused = false; bool public revealed = false; bool public onlyWhitelisted = true; mapping(address => bool) public whitelistedAddresses; // mapping(address => uint256) public addressMintedBalance; constructor() ERC721("SugarBabes", "SB") { } modifier mintCompliance(uint256 _mintAmount) { } function totalSupply() public view returns (uint256) { } function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) { require(!paused, "The contract is paused!"); if (onlyWhitelisted == true){ require(whitelistedAddresses[msg.sender], "You are not whitelisted"); uint256 ownerMintedCount = balanceOf(msg.sender); require(<FILL_ME>) } if (onlyWhitelisted == false){ // uint256 ownerMintedCount = balanceOf[msg.sender]; require( balanceOf(msg.sender) + _mintAmount <= publicSaleWalletLimit, "Max NFT mint limit reached. Try minting in next sale" ); } require(msg.value >= cost * _mintAmount, "Insufficient funds!"); _mintLoop(msg.sender, _mintAmount); } // Owner quota for the team and giveaways function ownerMint(uint256 _mintAmount, address _receiver) public onlyOwner { } // function isWhitelisted(address _user) public view returns (bool){ // for (uint256 i=0; i < whitelistedAddresses.length; i++) // if (whitelistedAddresses[i] == _user) { // return true; // } // return false; // } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setRevealed(bool _state) public onlyOwner { } function setCost(uint256 _cost) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setPrivateSaleWalletLimit(uint256 _PrivateSaleWalletLimit) public onlyOwner { } function setPublicSaleWalletLimit(uint256 _PublicSaleWalletLimit) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function whitelistUsers(address[] memory _users) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function withdraw() public onlyOwner { } function _mintLoop(address _receiver, uint256 _mintAmount) internal { } function _baseURI() internal view virtual override returns (string memory) { } }
ownerMintedCount+_mintAmount<=preSaleWalletLimit,"Max NFT mint limit reached. Try minting in public sale"
315,912
ownerMintedCount+_mintAmount<=preSaleWalletLimit
"Max NFT mint limit reached. Try minting in next sale"
pragma solidity ^0.8.0; contract SugarBabes is ERC721, Ownable { using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private supply; string public uriPrefix = "ipfs://QmVXSqwcz7583M9Xaa4iMASuuhVJeiPd42jEhkP3FJ3ToV/"; string public uriSuffix = ".json"; string public hiddenMetadataUri; uint256 public preSaleWalletLimit = 15; uint256 public publicSaleWalletLimit = 10; uint256 public cost = 0.07 ether; uint256 public maxSupply = 10000; uint256 public availableToMint = 10000; uint256 public maxMintAmountPerTx = 15; bool public paused = false; bool public revealed = false; bool public onlyWhitelisted = true; mapping(address => bool) public whitelistedAddresses; // mapping(address => uint256) public addressMintedBalance; constructor() ERC721("SugarBabes", "SB") { } modifier mintCompliance(uint256 _mintAmount) { } function totalSupply() public view returns (uint256) { } function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) { require(!paused, "The contract is paused!"); if (onlyWhitelisted == true){ require(whitelistedAddresses[msg.sender], "You are not whitelisted"); uint256 ownerMintedCount = balanceOf(msg.sender); require( ownerMintedCount + _mintAmount <= preSaleWalletLimit, "Max NFT mint limit reached. Try minting in public sale" ); } if (onlyWhitelisted == false){ // uint256 ownerMintedCount = balanceOf[msg.sender]; require(<FILL_ME>) } require(msg.value >= cost * _mintAmount, "Insufficient funds!"); _mintLoop(msg.sender, _mintAmount); } // Owner quota for the team and giveaways function ownerMint(uint256 _mintAmount, address _receiver) public onlyOwner { } // function isWhitelisted(address _user) public view returns (bool){ // for (uint256 i=0; i < whitelistedAddresses.length; i++) // if (whitelistedAddresses[i] == _user) { // return true; // } // return false; // } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setRevealed(bool _state) public onlyOwner { } function setCost(uint256 _cost) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setPrivateSaleWalletLimit(uint256 _PrivateSaleWalletLimit) public onlyOwner { } function setPublicSaleWalletLimit(uint256 _PublicSaleWalletLimit) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function whitelistUsers(address[] memory _users) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function withdraw() public onlyOwner { } function _mintLoop(address _receiver, uint256 _mintAmount) internal { } function _baseURI() internal view virtual override returns (string memory) { } }
balanceOf(msg.sender)+_mintAmount<=publicSaleWalletLimit,"Max NFT mint limit reached. Try minting in next sale"
315,912
balanceOf(msg.sender)+_mintAmount<=publicSaleWalletLimit
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155HolderUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol"; import "./DojiERC721Acc.sol"; import "./DojiERC1155Acc.sol"; import "hardhat/console.sol"; interface BaseToken is IERC721EnumerableUpgradeable { function walletInventory(address _owner) external view returns (uint256[] memory); } contract DojiClaimsProxy is Initializable, ERC721HolderUpgradeable, ERC1155HolderUpgradeable, OwnableUpgradeable, UUPSUpgradeable { event Received(address, uint256); bool public halt; Doji721Accounting NFT721accounting; Doji1155Accounting NFT1155accounting; BaseToken public baseToken; /// @custom:oz-upgrades-unsafe-allow constructor constructor() initializer {} function initialize(address _baseToken, address _NFT721accounting, address _NFT1155accounting) public initializer { } function _authorizeUpgrade(address newImplementation) internal onlyOwner override {} receive() external payable { require(<FILL_ME>) emit Received(msg.sender, msg.value); } function change1155accounting(address _address) public onlyOwner { } function change721accounting(address _address) public onlyOwner { } function onERC721Received( address, address, uint256 tokenID, bytes memory data ) public virtual override returns (bytes4) { } function onERC1155Received( address, address, uint256 tokenID, uint256 _amount, bytes memory data ) public virtual override returns (bytes4) { } function _currentBaseTokensHolder() view external returns (uint) { } function _baseTokenAddress() view external returns (address) { } function claimNFTsPending(uint256 _tokenID) public { } function claimOneNFTPending(uint256 _tokenID, address _nftContract, uint256 _nftId) public { } function claimOne1155Pending(uint256 DojiID, address _contract, uint256 tokenID, uint _amount) public { } function rescueEther() public onlyOwner { } function changeBaseToken(address _newBaseToken) public onlyOwner { } function haltClaims(bool _halt) public onlyOwner { } }
baseToken.totalSupply()>0
316,027
baseToken.totalSupply()>0
'Claims temporarily unavailable'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155HolderUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol"; import "./DojiERC721Acc.sol"; import "./DojiERC1155Acc.sol"; import "hardhat/console.sol"; interface BaseToken is IERC721EnumerableUpgradeable { function walletInventory(address _owner) external view returns (uint256[] memory); } contract DojiClaimsProxy is Initializable, ERC721HolderUpgradeable, ERC1155HolderUpgradeable, OwnableUpgradeable, UUPSUpgradeable { event Received(address, uint256); bool public halt; Doji721Accounting NFT721accounting; Doji1155Accounting NFT1155accounting; BaseToken public baseToken; /// @custom:oz-upgrades-unsafe-allow constructor constructor() initializer {} function initialize(address _baseToken, address _NFT721accounting, address _NFT1155accounting) public initializer { } function _authorizeUpgrade(address newImplementation) internal onlyOwner override {} receive() external payable { } function change1155accounting(address _address) public onlyOwner { } function change721accounting(address _address) public onlyOwner { } function onERC721Received( address, address, uint256 tokenID, bytes memory data ) public virtual override returns (bytes4) { } function onERC1155Received( address, address, uint256 tokenID, uint256 _amount, bytes memory data ) public virtual override returns (bytes4) { } function _currentBaseTokensHolder() view external returns (uint) { } function _baseTokenAddress() view external returns (address) { } function claimNFTsPending(uint256 _tokenID) public { require(<FILL_ME>) require(baseToken.ownerOf(_tokenID) == msg.sender, "You need to own the token to claim the reward"); uint length = NFT721accounting.viewNumberNFTsPending(_tokenID); for (uint256 index = 0; index < length; index++) { Doji721Accounting.NFTClaimInfo memory luckyBaseToken = NFT721accounting.viewNFTsPendingByIndex(_tokenID, index); if(!luckyBaseToken.claimed){ NFT721accounting.claimNft(_tokenID, index); ERC721Upgradeable(luckyBaseToken.nftContract) .safeTransferFrom(address(this), msg.sender, luckyBaseToken.tokenID); } } } function claimOneNFTPending(uint256 _tokenID, address _nftContract, uint256 _nftId) public { } function claimOne1155Pending(uint256 DojiID, address _contract, uint256 tokenID, uint _amount) public { } function rescueEther() public onlyOwner { } function changeBaseToken(address _newBaseToken) public onlyOwner { } function haltClaims(bool _halt) public onlyOwner { } }
!halt,'Claims temporarily unavailable'
316,027
!halt
"You need to own the token to claim the reward"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155HolderUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol"; import "./DojiERC721Acc.sol"; import "./DojiERC1155Acc.sol"; import "hardhat/console.sol"; interface BaseToken is IERC721EnumerableUpgradeable { function walletInventory(address _owner) external view returns (uint256[] memory); } contract DojiClaimsProxy is Initializable, ERC721HolderUpgradeable, ERC1155HolderUpgradeable, OwnableUpgradeable, UUPSUpgradeable { event Received(address, uint256); bool public halt; Doji721Accounting NFT721accounting; Doji1155Accounting NFT1155accounting; BaseToken public baseToken; /// @custom:oz-upgrades-unsafe-allow constructor constructor() initializer {} function initialize(address _baseToken, address _NFT721accounting, address _NFT1155accounting) public initializer { } function _authorizeUpgrade(address newImplementation) internal onlyOwner override {} receive() external payable { } function change1155accounting(address _address) public onlyOwner { } function change721accounting(address _address) public onlyOwner { } function onERC721Received( address, address, uint256 tokenID, bytes memory data ) public virtual override returns (bytes4) { } function onERC1155Received( address, address, uint256 tokenID, uint256 _amount, bytes memory data ) public virtual override returns (bytes4) { } function _currentBaseTokensHolder() view external returns (uint) { } function _baseTokenAddress() view external returns (address) { } function claimNFTsPending(uint256 _tokenID) public { require(!halt, 'Claims temporarily unavailable'); require(<FILL_ME>) uint length = NFT721accounting.viewNumberNFTsPending(_tokenID); for (uint256 index = 0; index < length; index++) { Doji721Accounting.NFTClaimInfo memory luckyBaseToken = NFT721accounting.viewNFTsPendingByIndex(_tokenID, index); if(!luckyBaseToken.claimed){ NFT721accounting.claimNft(_tokenID, index); ERC721Upgradeable(luckyBaseToken.nftContract) .safeTransferFrom(address(this), msg.sender, luckyBaseToken.tokenID); } } } function claimOneNFTPending(uint256 _tokenID, address _nftContract, uint256 _nftId) public { } function claimOne1155Pending(uint256 DojiID, address _contract, uint256 tokenID, uint _amount) public { } function rescueEther() public onlyOwner { } function changeBaseToken(address _newBaseToken) public onlyOwner { } function haltClaims(bool _halt) public onlyOwner { } }
baseToken.ownerOf(_tokenID)==msg.sender,"You need to own the token to claim the reward"
316,027
baseToken.ownerOf(_tokenID)==msg.sender
"You need to own the token to claim the reward"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155HolderUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol"; import "./DojiERC721Acc.sol"; import "./DojiERC1155Acc.sol"; import "hardhat/console.sol"; interface BaseToken is IERC721EnumerableUpgradeable { function walletInventory(address _owner) external view returns (uint256[] memory); } contract DojiClaimsProxy is Initializable, ERC721HolderUpgradeable, ERC1155HolderUpgradeable, OwnableUpgradeable, UUPSUpgradeable { event Received(address, uint256); bool public halt; Doji721Accounting NFT721accounting; Doji1155Accounting NFT1155accounting; BaseToken public baseToken; /// @custom:oz-upgrades-unsafe-allow constructor constructor() initializer {} function initialize(address _baseToken, address _NFT721accounting, address _NFT1155accounting) public initializer { } function _authorizeUpgrade(address newImplementation) internal onlyOwner override {} receive() external payable { } function change1155accounting(address _address) public onlyOwner { } function change721accounting(address _address) public onlyOwner { } function onERC721Received( address, address, uint256 tokenID, bytes memory data ) public virtual override returns (bytes4) { } function onERC1155Received( address, address, uint256 tokenID, uint256 _amount, bytes memory data ) public virtual override returns (bytes4) { } function _currentBaseTokensHolder() view external returns (uint) { } function _baseTokenAddress() view external returns (address) { } function claimNFTsPending(uint256 _tokenID) public { } function claimOneNFTPending(uint256 _tokenID, address _nftContract, uint256 _nftId) public { } function claimOne1155Pending(uint256 DojiID, address _contract, uint256 tokenID, uint _amount) public { require(!halt, 'Claims temporarily unavailable'); require(<FILL_ME>) require(_amount > 0, "Withdraw at least 1"); require(NFT1155accounting.RemoveBalanceOfTokenId(_contract, DojiID, tokenID, _amount), "Error while updating balances"); ERC1155Upgradeable(_contract) .safeTransferFrom(address(this), msg.sender, tokenID, _amount, ""); } function rescueEther() public onlyOwner { } function changeBaseToken(address _newBaseToken) public onlyOwner { } function haltClaims(bool _halt) public onlyOwner { } }
baseToken.ownerOf(DojiID)==msg.sender,"You need to own the token to claim the reward"
316,027
baseToken.ownerOf(DojiID)==msg.sender
"Error while updating balances"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/utils/ERC721HolderUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC1155/utils/ERC1155HolderUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC20/utils/SafeERC20Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/IERC721EnumerableUpgradeable.sol"; import "./DojiERC721Acc.sol"; import "./DojiERC1155Acc.sol"; import "hardhat/console.sol"; interface BaseToken is IERC721EnumerableUpgradeable { function walletInventory(address _owner) external view returns (uint256[] memory); } contract DojiClaimsProxy is Initializable, ERC721HolderUpgradeable, ERC1155HolderUpgradeable, OwnableUpgradeable, UUPSUpgradeable { event Received(address, uint256); bool public halt; Doji721Accounting NFT721accounting; Doji1155Accounting NFT1155accounting; BaseToken public baseToken; /// @custom:oz-upgrades-unsafe-allow constructor constructor() initializer {} function initialize(address _baseToken, address _NFT721accounting, address _NFT1155accounting) public initializer { } function _authorizeUpgrade(address newImplementation) internal onlyOwner override {} receive() external payable { } function change1155accounting(address _address) public onlyOwner { } function change721accounting(address _address) public onlyOwner { } function onERC721Received( address, address, uint256 tokenID, bytes memory data ) public virtual override returns (bytes4) { } function onERC1155Received( address, address, uint256 tokenID, uint256 _amount, bytes memory data ) public virtual override returns (bytes4) { } function _currentBaseTokensHolder() view external returns (uint) { } function _baseTokenAddress() view external returns (address) { } function claimNFTsPending(uint256 _tokenID) public { } function claimOneNFTPending(uint256 _tokenID, address _nftContract, uint256 _nftId) public { } function claimOne1155Pending(uint256 DojiID, address _contract, uint256 tokenID, uint _amount) public { require(!halt, 'Claims temporarily unavailable'); require(baseToken.ownerOf(DojiID) == msg.sender, "You need to own the token to claim the reward"); require(_amount > 0, "Withdraw at least 1"); require(<FILL_ME>) ERC1155Upgradeable(_contract) .safeTransferFrom(address(this), msg.sender, tokenID, _amount, ""); } function rescueEther() public onlyOwner { } function changeBaseToken(address _newBaseToken) public onlyOwner { } function haltClaims(bool _halt) public onlyOwner { } }
NFT1155accounting.RemoveBalanceOfTokenId(_contract,DojiID,tokenID,_amount),"Error while updating balances"
316,027
NFT1155accounting.RemoveBalanceOfTokenId(_contract,DojiID,tokenID,_amount)
null
/** *Submitted for verification at Etherscan.io on 2020-01-14 */ pragma solidity ^0.4.24; pragma experimental ABIEncoderV2; contract TradeProfile { event LogTraderTradingTransaction(string tradingTx); event LogAggregatedFollowersTradingTransaction(bytes32 aggregatedTxsHash); mapping(address=>bool) public errand; address public admin; uint256 public strategyId; constructor(uint256 _strategyId) public { } /** * @dev Log the trader's trading transactions. * @param _tradingTxs string Trading transactions in JSON format. */ function logTraderTradingTx(string[] _tradingTxs) public { require(<FILL_ME>) for(uint i=0; i<_tradingTxs.length; i++) { emit LogTraderTradingTransaction(_tradingTxs[i]); } } function newErrand(address _newErrand) public { } function removeErrand(address _errand) public { } /** * @dev Log the followers' trading transactions. * @param _aggregatedTxsHash bytes32 Hash of aggregation of followers' trading transactions. */ function logFollowerTradingTx(bytes32 _aggregatedTxsHash) public { } }
errand[msg.sender]
316,049
errand[msg.sender]
"Ether value sent is not correct"
pragma solidity ^0.8.4; contract CryptoGolf is ERC721("CryptoGolf", "GOLFPUNKS"), ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; struct OfferedPrice { address buyer; uint256 price; uint256 tokenType; uint256 date; } struct ListToken { uint256 tokenType; // 1: ETH or BNB, 2: GOLF Token uint256 tokenPrice; uint256 timestamp; } struct LastSoldPrice { uint256 currency; uint256 price; uint256 timestamp; } struct HighestOffer { uint256 currency; uint256 price; } event Mint(address indexed minter, uint256 tokenId, uint256 timestamp); event Transfer( address indexed owner, address indexed buyer, uint256 tokenId, uint256 timestamp ); event Sold( address indexed owner, address indexed buyer, uint256 tokenId, uint256 price, uint256 currency, uint256 timestamp ); string private baseURI = "ipfs://QmVaBgZGeu9Jey8cidv5xyHAteD2s7gP4uijBTSmZtbyVQ/"; uint256 public BUY_LIMIT_PER_TX = 5; uint256 public MAX_NFT = 5000; uint256 public tokenPrice = 70000000000000000; // 0.07 ETH uint256 public reflectionFee = 5; address private golfContractAddress = address(0x69685772d4ac0ffC2578F31F8A5c0009E900BAf4); // @notice A price of listed token id mapping(uint256 => mapping(address => ListToken)) public listedPrice; // @notice Array of offer info for token id mapping(uint256 => mapping(address => OfferedPrice[])) public offeredPricesOfToken; // @notice A highest offer price of token id mapping(uint256 => mapping(address => HighestOffer)) public highestOffer; // @notice A last sold price of token id mapping(uint256 => LastSoldPrice) public lastSoldPrice; constructor() {} function withdraw(address _to) public onlyOwner { } function mintNFT(uint256 _numOfTokens, uint256 _timestamp) public payable { require(_numOfTokens <= BUY_LIMIT_PER_TX, "Can't mint above limit"); require( totalSupply().add(_numOfTokens) <= MAX_NFT, "Purchase would exceed max supply of NFTs" ); require(<FILL_ME>) for (uint256 i = 1; i <= _numOfTokens; i++) { _safeMint(msg.sender, totalSupply() + 1); emit Mint(msg.sender, totalSupply() + 1, _timestamp); } } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setTokenPrice(uint256 _price) public onlyOwner { } function getTokenPrice() public view returns (uint256) { } function setBaseURI(string memory _pBaseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } // Standard functions to be overridden function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool){ } // Marketing function setGolfContractAddress(address _addr) public onlyOwner { } function getGolfContractAddress() public view returns (address) { } function setReflectionFee(uint256 _fee) public onlyOwner { } function getReflectionFee() public view onlyOwner returns (uint256) { } function getOwnerTokens(address _owner) public view returns (string memory){ } function getJsonData(uint256 _tokenId, address _owner, string memory _jsonStr) private view returns (string memory) { } function getSampleTokens() public view returns (string memory) { } function getAllTokens() public view returns (string memory) { } function hasOffer(uint256 _tokenId) public view returns (bool) { } function getTokenDetail(uint256 _tokenId) public view returns (string memory) { } function toAsciiString(bytes memory data) public pure returns (string memory) { } // List for sell function setlistedPrice( uint256 _tokenId, uint256 _price, uint256 _type, uint256 _timestamp) public { } function getListedPrice(uint256 _tokenId) public view returns (ListToken memory) { } function removeFromListedPrice(uint256 _tokenId) public { } // Approve by owner function transferToken( address _to, uint256 _tokenId, uint256 _timestamp ) external { } function _transferFrom( address _from, address _to, uint256 _tokenId, uint256 _timestamp ) private { } function approveTokenWithGolf( address _to, uint256 _tokenId, uint256 _timestamp ) external { } function cancelOffer( address _to, uint256 _tokenId ) external { } // Offer function placeOffer(uint256 _tokenId, uint256 _timestamp) public payable { } function placeOfferWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public payable { } function _setOfferedPrice( address _buyer, uint256 _tokenId, uint256 _price, uint256 _tokenType, uint256 _timestamp ) private { } function _setHighestOffer(uint256 _tokenId) private { } function getOfferedPrices(uint256 _tokenId) public view returns (string memory) { } function splitBalance(address _to, uint256 amount) private { } // Buy function buyNFTWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public { } function buyNFT(uint256 _tokenId, uint256 _timestamp) public payable { } }
tokenPrice.mul(_numOfTokens)==msg.value,"Ether value sent is not correct"
316,073
tokenPrice.mul(_numOfTokens)==msg.value
"Token owner does not matched"
pragma solidity ^0.8.4; contract CryptoGolf is ERC721("CryptoGolf", "GOLFPUNKS"), ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; struct OfferedPrice { address buyer; uint256 price; uint256 tokenType; uint256 date; } struct ListToken { uint256 tokenType; // 1: ETH or BNB, 2: GOLF Token uint256 tokenPrice; uint256 timestamp; } struct LastSoldPrice { uint256 currency; uint256 price; uint256 timestamp; } struct HighestOffer { uint256 currency; uint256 price; } event Mint(address indexed minter, uint256 tokenId, uint256 timestamp); event Transfer( address indexed owner, address indexed buyer, uint256 tokenId, uint256 timestamp ); event Sold( address indexed owner, address indexed buyer, uint256 tokenId, uint256 price, uint256 currency, uint256 timestamp ); string private baseURI = "ipfs://QmVaBgZGeu9Jey8cidv5xyHAteD2s7gP4uijBTSmZtbyVQ/"; uint256 public BUY_LIMIT_PER_TX = 5; uint256 public MAX_NFT = 5000; uint256 public tokenPrice = 70000000000000000; // 0.07 ETH uint256 public reflectionFee = 5; address private golfContractAddress = address(0x69685772d4ac0ffC2578F31F8A5c0009E900BAf4); // @notice A price of listed token id mapping(uint256 => mapping(address => ListToken)) public listedPrice; // @notice Array of offer info for token id mapping(uint256 => mapping(address => OfferedPrice[])) public offeredPricesOfToken; // @notice A highest offer price of token id mapping(uint256 => mapping(address => HighestOffer)) public highestOffer; // @notice A last sold price of token id mapping(uint256 => LastSoldPrice) public lastSoldPrice; constructor() {} function withdraw(address _to) public onlyOwner { } function mintNFT(uint256 _numOfTokens, uint256 _timestamp) public payable { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setTokenPrice(uint256 _price) public onlyOwner { } function getTokenPrice() public view returns (uint256) { } function setBaseURI(string memory _pBaseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } // Standard functions to be overridden function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool){ } // Marketing function setGolfContractAddress(address _addr) public onlyOwner { } function getGolfContractAddress() public view returns (address) { } function setReflectionFee(uint256 _fee) public onlyOwner { } function getReflectionFee() public view onlyOwner returns (uint256) { } function getOwnerTokens(address _owner) public view returns (string memory){ } function getJsonData(uint256 _tokenId, address _owner, string memory _jsonStr) private view returns (string memory) { } function getSampleTokens() public view returns (string memory) { } function getAllTokens() public view returns (string memory) { } function hasOffer(uint256 _tokenId) public view returns (bool) { } function getTokenDetail(uint256 _tokenId) public view returns (string memory) { } function toAsciiString(bytes memory data) public pure returns (string memory) { } // List for sell function setlistedPrice( uint256 _tokenId, uint256 _price, uint256 _type, uint256 _timestamp) public { } function getListedPrice(uint256 _tokenId) public view returns (ListToken memory) { } function removeFromListedPrice(uint256 _tokenId) public { } // Approve by owner function transferToken( address _to, uint256 _tokenId, uint256 _timestamp ) external { require( _exists(_tokenId), "ERC721Metadata: URI query for nonexistent token" ); require(<FILL_ME>) ERC721.approve(_to, _tokenId); _transferFrom(msg.sender, _to, _tokenId, _timestamp); } function _transferFrom( address _from, address _to, uint256 _tokenId, uint256 _timestamp ) private { } function approveTokenWithGolf( address _to, uint256 _tokenId, uint256 _timestamp ) external { } function cancelOffer( address _to, uint256 _tokenId ) external { } // Offer function placeOffer(uint256 _tokenId, uint256 _timestamp) public payable { } function placeOfferWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public payable { } function _setOfferedPrice( address _buyer, uint256 _tokenId, uint256 _price, uint256 _tokenType, uint256 _timestamp ) private { } function _setHighestOffer(uint256 _tokenId) private { } function getOfferedPrices(uint256 _tokenId) public view returns (string memory) { } function splitBalance(address _to, uint256 amount) private { } // Buy function buyNFTWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public { } function buyNFT(uint256 _tokenId, uint256 _timestamp) public payable { } }
ERC721.ownerOf(_tokenId)==msg.sender,"Token owner does not matched"
316,073
ERC721.ownerOf(_tokenId)==msg.sender
"Not approved user"
pragma solidity ^0.8.4; contract CryptoGolf is ERC721("CryptoGolf", "GOLFPUNKS"), ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; struct OfferedPrice { address buyer; uint256 price; uint256 tokenType; uint256 date; } struct ListToken { uint256 tokenType; // 1: ETH or BNB, 2: GOLF Token uint256 tokenPrice; uint256 timestamp; } struct LastSoldPrice { uint256 currency; uint256 price; uint256 timestamp; } struct HighestOffer { uint256 currency; uint256 price; } event Mint(address indexed minter, uint256 tokenId, uint256 timestamp); event Transfer( address indexed owner, address indexed buyer, uint256 tokenId, uint256 timestamp ); event Sold( address indexed owner, address indexed buyer, uint256 tokenId, uint256 price, uint256 currency, uint256 timestamp ); string private baseURI = "ipfs://QmVaBgZGeu9Jey8cidv5xyHAteD2s7gP4uijBTSmZtbyVQ/"; uint256 public BUY_LIMIT_PER_TX = 5; uint256 public MAX_NFT = 5000; uint256 public tokenPrice = 70000000000000000; // 0.07 ETH uint256 public reflectionFee = 5; address private golfContractAddress = address(0x69685772d4ac0ffC2578F31F8A5c0009E900BAf4); // @notice A price of listed token id mapping(uint256 => mapping(address => ListToken)) public listedPrice; // @notice Array of offer info for token id mapping(uint256 => mapping(address => OfferedPrice[])) public offeredPricesOfToken; // @notice A highest offer price of token id mapping(uint256 => mapping(address => HighestOffer)) public highestOffer; // @notice A last sold price of token id mapping(uint256 => LastSoldPrice) public lastSoldPrice; constructor() {} function withdraw(address _to) public onlyOwner { } function mintNFT(uint256 _numOfTokens, uint256 _timestamp) public payable { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setTokenPrice(uint256 _price) public onlyOwner { } function getTokenPrice() public view returns (uint256) { } function setBaseURI(string memory _pBaseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } // Standard functions to be overridden function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool){ } // Marketing function setGolfContractAddress(address _addr) public onlyOwner { } function getGolfContractAddress() public view returns (address) { } function setReflectionFee(uint256 _fee) public onlyOwner { } function getReflectionFee() public view onlyOwner returns (uint256) { } function getOwnerTokens(address _owner) public view returns (string memory){ } function getJsonData(uint256 _tokenId, address _owner, string memory _jsonStr) private view returns (string memory) { } function getSampleTokens() public view returns (string memory) { } function getAllTokens() public view returns (string memory) { } function hasOffer(uint256 _tokenId) public view returns (bool) { } function getTokenDetail(uint256 _tokenId) public view returns (string memory) { } function toAsciiString(bytes memory data) public pure returns (string memory) { } // List for sell function setlistedPrice( uint256 _tokenId, uint256 _price, uint256 _type, uint256 _timestamp) public { } function getListedPrice(uint256 _tokenId) public view returns (ListToken memory) { } function removeFromListedPrice(uint256 _tokenId) public { } // Approve by owner function transferToken( address _to, uint256 _tokenId, uint256 _timestamp ) external { } function _transferFrom( address _from, address _to, uint256 _tokenId, uint256 _timestamp ) private { } function approveTokenWithGolf( address _to, uint256 _tokenId, uint256 _timestamp ) external { require( _exists(_tokenId), "ERC721Metadata: URI query for nonexistent token" ); address owner = ERC721.ownerOf(_tokenId); require(owner == msg.sender, "Token owner does not matched"); require(<FILL_ME>) ERC721.approve(_to, _tokenId); OfferedPrice[] memory data = offeredPricesOfToken[_tokenId][owner]; uint256 approvedPrice = 0; for (uint256 i = 0; i < data.length; i++) { if (data[i].buyer == _to) { approvedPrice = data[i].price; ERC20(golfContractAddress).transferFrom( _to, owner, approvedPrice ); // transfer golf token from buyer to owner } else { ERC20(golfContractAddress).approve(address(0), data[i].price); } } ERC721.safeTransferFrom(msg.sender, _to, _tokenId); emit Transfer(msg.sender, _to, _tokenId, _timestamp); lastSoldPrice[_tokenId] = LastSoldPrice(2, approvedPrice, _timestamp); delete offeredPricesOfToken[_tokenId][owner]; delete listedPrice[_tokenId][owner]; emit Sold(msg.sender, _to, _tokenId, approvedPrice, 2, _timestamp); } function cancelOffer( address _to, uint256 _tokenId ) external { } // Offer function placeOffer(uint256 _tokenId, uint256 _timestamp) public payable { } function placeOfferWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public payable { } function _setOfferedPrice( address _buyer, uint256 _tokenId, uint256 _price, uint256 _tokenType, uint256 _timestamp ) private { } function _setHighestOffer(uint256 _tokenId) private { } function getOfferedPrices(uint256 _tokenId) public view returns (string memory) { } function splitBalance(address _to, uint256 amount) private { } // Buy function buyNFTWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public { } function buyNFT(uint256 _tokenId, uint256 _timestamp) public payable { } }
ERC20(golfContractAddress).allowance(_to,address(this))>0,"Not approved user"
316,073
ERC20(golfContractAddress).allowance(_to,address(this))>0
"Inefficient GOLF funds"
pragma solidity ^0.8.4; contract CryptoGolf is ERC721("CryptoGolf", "GOLFPUNKS"), ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; struct OfferedPrice { address buyer; uint256 price; uint256 tokenType; uint256 date; } struct ListToken { uint256 tokenType; // 1: ETH or BNB, 2: GOLF Token uint256 tokenPrice; uint256 timestamp; } struct LastSoldPrice { uint256 currency; uint256 price; uint256 timestamp; } struct HighestOffer { uint256 currency; uint256 price; } event Mint(address indexed minter, uint256 tokenId, uint256 timestamp); event Transfer( address indexed owner, address indexed buyer, uint256 tokenId, uint256 timestamp ); event Sold( address indexed owner, address indexed buyer, uint256 tokenId, uint256 price, uint256 currency, uint256 timestamp ); string private baseURI = "ipfs://QmVaBgZGeu9Jey8cidv5xyHAteD2s7gP4uijBTSmZtbyVQ/"; uint256 public BUY_LIMIT_PER_TX = 5; uint256 public MAX_NFT = 5000; uint256 public tokenPrice = 70000000000000000; // 0.07 ETH uint256 public reflectionFee = 5; address private golfContractAddress = address(0x69685772d4ac0ffC2578F31F8A5c0009E900BAf4); // @notice A price of listed token id mapping(uint256 => mapping(address => ListToken)) public listedPrice; // @notice Array of offer info for token id mapping(uint256 => mapping(address => OfferedPrice[])) public offeredPricesOfToken; // @notice A highest offer price of token id mapping(uint256 => mapping(address => HighestOffer)) public highestOffer; // @notice A last sold price of token id mapping(uint256 => LastSoldPrice) public lastSoldPrice; constructor() {} function withdraw(address _to) public onlyOwner { } function mintNFT(uint256 _numOfTokens, uint256 _timestamp) public payable { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setTokenPrice(uint256 _price) public onlyOwner { } function getTokenPrice() public view returns (uint256) { } function setBaseURI(string memory _pBaseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } // Standard functions to be overridden function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool){ } // Marketing function setGolfContractAddress(address _addr) public onlyOwner { } function getGolfContractAddress() public view returns (address) { } function setReflectionFee(uint256 _fee) public onlyOwner { } function getReflectionFee() public view onlyOwner returns (uint256) { } function getOwnerTokens(address _owner) public view returns (string memory){ } function getJsonData(uint256 _tokenId, address _owner, string memory _jsonStr) private view returns (string memory) { } function getSampleTokens() public view returns (string memory) { } function getAllTokens() public view returns (string memory) { } function hasOffer(uint256 _tokenId) public view returns (bool) { } function getTokenDetail(uint256 _tokenId) public view returns (string memory) { } function toAsciiString(bytes memory data) public pure returns (string memory) { } // List for sell function setlistedPrice( uint256 _tokenId, uint256 _price, uint256 _type, uint256 _timestamp) public { } function getListedPrice(uint256 _tokenId) public view returns (ListToken memory) { } function removeFromListedPrice(uint256 _tokenId) public { } // Approve by owner function transferToken( address _to, uint256 _tokenId, uint256 _timestamp ) external { } function _transferFrom( address _from, address _to, uint256 _tokenId, uint256 _timestamp ) private { } function approveTokenWithGolf( address _to, uint256 _tokenId, uint256 _timestamp ) external { } function cancelOffer( address _to, uint256 _tokenId ) external { } // Offer function placeOffer(uint256 _tokenId, uint256 _timestamp) public payable { } function placeOfferWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public payable { require( _exists(_tokenId), "ERC721Metadata: URI query for nonexistent token" ); require( msg.sender != ERC721.ownerOf(_tokenId), "You can't buy your token" ); require(<FILL_ME>) ERC20(golfContractAddress).approve(address(this), _price); _setOfferedPrice(msg.sender, _tokenId, _price, 2, _timestamp); } function _setOfferedPrice( address _buyer, uint256 _tokenId, uint256 _price, uint256 _tokenType, uint256 _timestamp ) private { } function _setHighestOffer(uint256 _tokenId) private { } function getOfferedPrices(uint256 _tokenId) public view returns (string memory) { } function splitBalance(address _to, uint256 amount) private { } // Buy function buyNFTWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public { } function buyNFT(uint256 _tokenId, uint256 _timestamp) public payable { } }
ERC20(golfContractAddress).balanceOf(msg.sender)>=_price,"Inefficient GOLF funds"
316,073
ERC20(golfContractAddress).balanceOf(msg.sender)>=_price
"Owner can't buy his token"
pragma solidity ^0.8.4; contract CryptoGolf is ERC721("CryptoGolf", "GOLFPUNKS"), ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; struct OfferedPrice { address buyer; uint256 price; uint256 tokenType; uint256 date; } struct ListToken { uint256 tokenType; // 1: ETH or BNB, 2: GOLF Token uint256 tokenPrice; uint256 timestamp; } struct LastSoldPrice { uint256 currency; uint256 price; uint256 timestamp; } struct HighestOffer { uint256 currency; uint256 price; } event Mint(address indexed minter, uint256 tokenId, uint256 timestamp); event Transfer( address indexed owner, address indexed buyer, uint256 tokenId, uint256 timestamp ); event Sold( address indexed owner, address indexed buyer, uint256 tokenId, uint256 price, uint256 currency, uint256 timestamp ); string private baseURI = "ipfs://QmVaBgZGeu9Jey8cidv5xyHAteD2s7gP4uijBTSmZtbyVQ/"; uint256 public BUY_LIMIT_PER_TX = 5; uint256 public MAX_NFT = 5000; uint256 public tokenPrice = 70000000000000000; // 0.07 ETH uint256 public reflectionFee = 5; address private golfContractAddress = address(0x69685772d4ac0ffC2578F31F8A5c0009E900BAf4); // @notice A price of listed token id mapping(uint256 => mapping(address => ListToken)) public listedPrice; // @notice Array of offer info for token id mapping(uint256 => mapping(address => OfferedPrice[])) public offeredPricesOfToken; // @notice A highest offer price of token id mapping(uint256 => mapping(address => HighestOffer)) public highestOffer; // @notice A last sold price of token id mapping(uint256 => LastSoldPrice) public lastSoldPrice; constructor() {} function withdraw(address _to) public onlyOwner { } function mintNFT(uint256 _numOfTokens, uint256 _timestamp) public payable { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setTokenPrice(uint256 _price) public onlyOwner { } function getTokenPrice() public view returns (uint256) { } function setBaseURI(string memory _pBaseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } // Standard functions to be overridden function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool){ } // Marketing function setGolfContractAddress(address _addr) public onlyOwner { } function getGolfContractAddress() public view returns (address) { } function setReflectionFee(uint256 _fee) public onlyOwner { } function getReflectionFee() public view onlyOwner returns (uint256) { } function getOwnerTokens(address _owner) public view returns (string memory){ } function getJsonData(uint256 _tokenId, address _owner, string memory _jsonStr) private view returns (string memory) { } function getSampleTokens() public view returns (string memory) { } function getAllTokens() public view returns (string memory) { } function hasOffer(uint256 _tokenId) public view returns (bool) { } function getTokenDetail(uint256 _tokenId) public view returns (string memory) { } function toAsciiString(bytes memory data) public pure returns (string memory) { } // List for sell function setlistedPrice( uint256 _tokenId, uint256 _price, uint256 _type, uint256 _timestamp) public { } function getListedPrice(uint256 _tokenId) public view returns (ListToken memory) { } function removeFromListedPrice(uint256 _tokenId) public { } // Approve by owner function transferToken( address _to, uint256 _tokenId, uint256 _timestamp ) external { } function _transferFrom( address _from, address _to, uint256 _tokenId, uint256 _timestamp ) private { } function approveTokenWithGolf( address _to, uint256 _tokenId, uint256 _timestamp ) external { } function cancelOffer( address _to, uint256 _tokenId ) external { } // Offer function placeOffer(uint256 _tokenId, uint256 _timestamp) public payable { } function placeOfferWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public payable { } function _setOfferedPrice( address _buyer, uint256 _tokenId, uint256 _price, uint256 _tokenType, uint256 _timestamp ) private { } function _setHighestOffer(uint256 _tokenId) private { } function getOfferedPrices(uint256 _tokenId) public view returns (string memory) { } function splitBalance(address _to, uint256 amount) private { } // Buy function buyNFTWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public { require(_exists(_tokenId), "Token does not exist"); require(<FILL_ME>) require( ERC20(golfContractAddress).balanceOf(msg.sender) >= _price, "Inefficient GOLF funds" ); address owner = ERC721.ownerOf(_tokenId); // ERC20(golfContractAddress).approve(address(this), _price); ERC20(golfContractAddress).transferFrom( msg.sender, owner, _price * 10**9 ); // ERC721().approve(msg.sender, _tokenId); ERC721(address(this)).transferFrom(owner, msg.sender, _tokenId); emit Transfer(owner, msg.sender, _tokenId, _timestamp); lastSoldPrice[_tokenId] = LastSoldPrice(2, _price, _timestamp); delete listedPrice[_tokenId][owner]; delete offeredPricesOfToken[_tokenId][owner]; emit Sold(msg.sender, owner, _tokenId, _price, 2, _timestamp); } function buyNFT(uint256 _tokenId, uint256 _timestamp) public payable { } }
ERC721.ownerOf(_tokenId)!=msg.sender,"Owner can't buy his token"
316,073
ERC721.ownerOf(_tokenId)!=msg.sender
"Not correct price"
pragma solidity ^0.8.4; contract CryptoGolf is ERC721("CryptoGolf", "GOLFPUNKS"), ERC721Enumerable, Ownable { using SafeMath for uint256; using Strings for uint256; struct OfferedPrice { address buyer; uint256 price; uint256 tokenType; uint256 date; } struct ListToken { uint256 tokenType; // 1: ETH or BNB, 2: GOLF Token uint256 tokenPrice; uint256 timestamp; } struct LastSoldPrice { uint256 currency; uint256 price; uint256 timestamp; } struct HighestOffer { uint256 currency; uint256 price; } event Mint(address indexed minter, uint256 tokenId, uint256 timestamp); event Transfer( address indexed owner, address indexed buyer, uint256 tokenId, uint256 timestamp ); event Sold( address indexed owner, address indexed buyer, uint256 tokenId, uint256 price, uint256 currency, uint256 timestamp ); string private baseURI = "ipfs://QmVaBgZGeu9Jey8cidv5xyHAteD2s7gP4uijBTSmZtbyVQ/"; uint256 public BUY_LIMIT_PER_TX = 5; uint256 public MAX_NFT = 5000; uint256 public tokenPrice = 70000000000000000; // 0.07 ETH uint256 public reflectionFee = 5; address private golfContractAddress = address(0x69685772d4ac0ffC2578F31F8A5c0009E900BAf4); // @notice A price of listed token id mapping(uint256 => mapping(address => ListToken)) public listedPrice; // @notice Array of offer info for token id mapping(uint256 => mapping(address => OfferedPrice[])) public offeredPricesOfToken; // @notice A highest offer price of token id mapping(uint256 => mapping(address => HighestOffer)) public highestOffer; // @notice A last sold price of token id mapping(uint256 => LastSoldPrice) public lastSoldPrice; constructor() {} function withdraw(address _to) public onlyOwner { } function mintNFT(uint256 _numOfTokens, uint256 _timestamp) public payable { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } function setTokenPrice(uint256 _price) public onlyOwner { } function getTokenPrice() public view returns (uint256) { } function setBaseURI(string memory _pBaseURI) external onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } // Standard functions to be overridden function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool){ } // Marketing function setGolfContractAddress(address _addr) public onlyOwner { } function getGolfContractAddress() public view returns (address) { } function setReflectionFee(uint256 _fee) public onlyOwner { } function getReflectionFee() public view onlyOwner returns (uint256) { } function getOwnerTokens(address _owner) public view returns (string memory){ } function getJsonData(uint256 _tokenId, address _owner, string memory _jsonStr) private view returns (string memory) { } function getSampleTokens() public view returns (string memory) { } function getAllTokens() public view returns (string memory) { } function hasOffer(uint256 _tokenId) public view returns (bool) { } function getTokenDetail(uint256 _tokenId) public view returns (string memory) { } function toAsciiString(bytes memory data) public pure returns (string memory) { } // List for sell function setlistedPrice( uint256 _tokenId, uint256 _price, uint256 _type, uint256 _timestamp) public { } function getListedPrice(uint256 _tokenId) public view returns (ListToken memory) { } function removeFromListedPrice(uint256 _tokenId) public { } // Approve by owner function transferToken( address _to, uint256 _tokenId, uint256 _timestamp ) external { } function _transferFrom( address _from, address _to, uint256 _tokenId, uint256 _timestamp ) private { } function approveTokenWithGolf( address _to, uint256 _tokenId, uint256 _timestamp ) external { } function cancelOffer( address _to, uint256 _tokenId ) external { } // Offer function placeOffer(uint256 _tokenId, uint256 _timestamp) public payable { } function placeOfferWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public payable { } function _setOfferedPrice( address _buyer, uint256 _tokenId, uint256 _price, uint256 _tokenType, uint256 _timestamp ) private { } function _setHighestOffer(uint256 _tokenId) private { } function getOfferedPrices(uint256 _tokenId) public view returns (string memory) { } function splitBalance(address _to, uint256 amount) private { } // Buy function buyNFTWithGolf( uint256 _tokenId, uint256 _price, uint256 _timestamp ) public { } function buyNFT(uint256 _tokenId, uint256 _timestamp) public payable { require(_exists(_tokenId), "Token does not exist"); address owner = ERC721.ownerOf(_tokenId); require( ERC721.ownerOf(_tokenId) != msg.sender, "Owner can't buy his token" ); require(<FILL_ME>) ERC721(address(this)).transferFrom(owner, msg.sender, _tokenId); emit Transfer(owner, msg.sender, _tokenId, _timestamp); splitBalance(owner, msg.value); lastSoldPrice[_tokenId] = LastSoldPrice(1, msg.value, _timestamp); delete listedPrice[_tokenId][owner]; delete offeredPricesOfToken[_tokenId][owner]; emit Sold(msg.sender, owner, _tokenId, msg.value, 1, _timestamp); } }
listedPrice[_tokenId][owner].tokenPrice==msg.value,"Not correct price"
316,073
listedPrice[_tokenId][owner].tokenPrice==msg.value
"Not eligible for claim."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import './ERC721B.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; // _ __ _ _ _____ ___ ___ // | |/ /| \ | | / ____| |__ \ / _ \ // | ' / | \| || (___ ) | | | | | // | < | . ` | \___ \ / / | | | | // | . \ | |\ | ____) | / /_ _ | |_| | // |_|\_\|_| \_||_____/ |____|(_) \___/ contract KatanaNSamurai2 is Ownable, EIP712, ERC721B { using SafeMath for uint256; using Strings for uint256; // Sales variables // ------------------------------------------------------------------------ uint public MAX_SAMURAI = 6666; uint public STAGE_LIMIT = 666; uint public PRICE = 0.075 ether; uint public numPresale = 0; uint public numSale = 0; uint public numClaim = 0; uint public numGiveaway = 0; uint public totalSupply = 0; bool public hasSaleStarted = true; bool public hasPresaleStarted = true; bool public hasClaimStarted = true; string private _baseTokenURI = "http://api.ramen.katanansamurai.art/Metadata/"; mapping (address => uint256) public hasClaimed; mapping (address => uint256) public hasPresale; uint256 public saleStartTimestamp = 1642518000; // Public Sale start time in epoch format uint256 public presaleStartTimestamp = 1642410000; // PreSale start time in epoch format // Events // ------------------------------------------------------------------------ event mintEvent(address owner, uint256 quantity, uint256 totalSupply); // Constructor // ------------------------------------------------------------------------ constructor() EIP712("Katana N Samurai 2", "1.0.0") ERC721B("Katana N Samurai 2", "KNS2.0"){} // Modifiers // ------------------------------------------------------------------------ modifier onlyPublicSale() { } modifier onlyPresale() { } // Verify functions // ------------------------------------------------------------------------ function verify(uint256 maxClaimNum, bytes memory SIGNATURE) public view returns (bool){ } // Claim functions // ------------------------------------------------------------------------ function claimSamurai(uint256 quantity, uint256 maxClaimNum, bytes memory SIGNATURE) external { require(hasClaimStarted == true, "Claim hasn't started."); require(<FILL_ME>) require(quantity > 0 && hasClaimed[msg.sender].add(quantity) <= maxClaimNum, "Exceed the quantity that can be claimed"); for (uint i = 0; i < quantity; i++) { _safeMint(msg.sender, totalSupply); totalSupply = totalSupply.add(1); } numClaim = numClaim.add(quantity); hasClaimed[msg.sender] = hasClaimed[msg.sender].add(quantity); emit mintEvent(msg.sender, quantity, totalSupply); } // Presale functions // ------------------------------------------------------------------------ function mintPresaleSamurai(uint256 quantity, uint256 maxClaimNumOnPresale, bytes memory SIGNATURE) external payable onlyPresale{ } // Giveaway functions // ------------------------------------------------------------------------ function giveawayMintSamurai(address _to, uint256 quantity) external onlyOwner{ } // Mint functions // ------------------------------------------------------------------------ function mintPublicSaleSamurai(uint256 numPurchase) external payable onlyPublicSale{ } // Base URI Functions // ------------------------------------------------------------------------ function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Burn Functions // ------------------------------------------------------------------------ function burn(uint256 tokenId) external onlyOwner { } // setting functions // ------------------------------------------------------------------------ function setURI(string calldata _tokenURI) external onlyOwner { } function setSTAGE_LIMIT(uint _STAGE_LIMIT) external onlyOwner { } function setMAX_SAMURAI(uint _MAX_num) external onlyOwner { } function set_PRICE(uint _price) external onlyOwner { } function setPresale(bool _hasPresaleStarted,uint256 _presaleStartTimestamp) external onlyOwner { } function setPublicSale(bool _hasSaleStarted,uint256 _saleStartTimestamp) external onlyOwner { } function setClaim(bool _hasClaimStarted) external onlyOwner { } // Withdrawal functions // ------------------------------------------------------------------------ function withdrawAll() public payable onlyOwner { } }
verify(maxClaimNum,SIGNATURE),"Not eligible for claim."
316,265
verify(maxClaimNum,SIGNATURE)
"This stage is sold out!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import './ERC721B.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; // _ __ _ _ _____ ___ ___ // | |/ /| \ | | / ____| |__ \ / _ \ // | ' / | \| || (___ ) | | | | | // | < | . ` | \___ \ / / | | | | // | . \ | |\ | ____) | / /_ _ | |_| | // |_|\_\|_| \_||_____/ |____|(_) \___/ contract KatanaNSamurai2 is Ownable, EIP712, ERC721B { using SafeMath for uint256; using Strings for uint256; // Sales variables // ------------------------------------------------------------------------ uint public MAX_SAMURAI = 6666; uint public STAGE_LIMIT = 666; uint public PRICE = 0.075 ether; uint public numPresale = 0; uint public numSale = 0; uint public numClaim = 0; uint public numGiveaway = 0; uint public totalSupply = 0; bool public hasSaleStarted = true; bool public hasPresaleStarted = true; bool public hasClaimStarted = true; string private _baseTokenURI = "http://api.ramen.katanansamurai.art/Metadata/"; mapping (address => uint256) public hasClaimed; mapping (address => uint256) public hasPresale; uint256 public saleStartTimestamp = 1642518000; // Public Sale start time in epoch format uint256 public presaleStartTimestamp = 1642410000; // PreSale start time in epoch format // Events // ------------------------------------------------------------------------ event mintEvent(address owner, uint256 quantity, uint256 totalSupply); // Constructor // ------------------------------------------------------------------------ constructor() EIP712("Katana N Samurai 2", "1.0.0") ERC721B("Katana N Samurai 2", "KNS2.0"){} // Modifiers // ------------------------------------------------------------------------ modifier onlyPublicSale() { } modifier onlyPresale() { } // Verify functions // ------------------------------------------------------------------------ function verify(uint256 maxClaimNum, bytes memory SIGNATURE) public view returns (bool){ } // Claim functions // ------------------------------------------------------------------------ function claimSamurai(uint256 quantity, uint256 maxClaimNum, bytes memory SIGNATURE) external { } // Presale functions // ------------------------------------------------------------------------ function mintPresaleSamurai(uint256 quantity, uint256 maxClaimNumOnPresale, bytes memory SIGNATURE) external payable onlyPresale{ require(<FILL_ME>) require(verify(maxClaimNumOnPresale, SIGNATURE), "Not eligible for presale."); require(quantity > 0 && hasPresale[msg.sender].add(quantity) <= maxClaimNumOnPresale, "Exceeds max presale number."); require(msg.value >= PRICE.mul(quantity), "Ether value sent is below the price."); require(totalSupply.add(quantity) <= MAX_SAMURAI, "Exceeds MAX_SAMURAI."); for (uint i = 0; i < quantity; i++) { _safeMint(msg.sender, totalSupply); totalSupply = totalSupply.add(1); } numPresale = numPresale.add(quantity); hasPresale[msg.sender] = hasPresale[msg.sender].add(quantity); emit mintEvent(msg.sender, quantity, totalSupply); } // Giveaway functions // ------------------------------------------------------------------------ function giveawayMintSamurai(address _to, uint256 quantity) external onlyOwner{ } // Mint functions // ------------------------------------------------------------------------ function mintPublicSaleSamurai(uint256 numPurchase) external payable onlyPublicSale{ } // Base URI Functions // ------------------------------------------------------------------------ function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Burn Functions // ------------------------------------------------------------------------ function burn(uint256 tokenId) external onlyOwner { } // setting functions // ------------------------------------------------------------------------ function setURI(string calldata _tokenURI) external onlyOwner { } function setSTAGE_LIMIT(uint _STAGE_LIMIT) external onlyOwner { } function setMAX_SAMURAI(uint _MAX_num) external onlyOwner { } function set_PRICE(uint _price) external onlyOwner { } function setPresale(bool _hasPresaleStarted,uint256 _presaleStartTimestamp) external onlyOwner { } function setPublicSale(bool _hasSaleStarted,uint256 _saleStartTimestamp) external onlyOwner { } function setClaim(bool _hasClaimStarted) external onlyOwner { } // Withdrawal functions // ------------------------------------------------------------------------ function withdrawAll() public payable onlyOwner { } }
totalSupply.add(quantity)<=STAGE_LIMIT,"This stage is sold out!"
316,265
totalSupply.add(quantity)<=STAGE_LIMIT
"Not eligible for presale."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import './ERC721B.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; // _ __ _ _ _____ ___ ___ // | |/ /| \ | | / ____| |__ \ / _ \ // | ' / | \| || (___ ) | | | | | // | < | . ` | \___ \ / / | | | | // | . \ | |\ | ____) | / /_ _ | |_| | // |_|\_\|_| \_||_____/ |____|(_) \___/ contract KatanaNSamurai2 is Ownable, EIP712, ERC721B { using SafeMath for uint256; using Strings for uint256; // Sales variables // ------------------------------------------------------------------------ uint public MAX_SAMURAI = 6666; uint public STAGE_LIMIT = 666; uint public PRICE = 0.075 ether; uint public numPresale = 0; uint public numSale = 0; uint public numClaim = 0; uint public numGiveaway = 0; uint public totalSupply = 0; bool public hasSaleStarted = true; bool public hasPresaleStarted = true; bool public hasClaimStarted = true; string private _baseTokenURI = "http://api.ramen.katanansamurai.art/Metadata/"; mapping (address => uint256) public hasClaimed; mapping (address => uint256) public hasPresale; uint256 public saleStartTimestamp = 1642518000; // Public Sale start time in epoch format uint256 public presaleStartTimestamp = 1642410000; // PreSale start time in epoch format // Events // ------------------------------------------------------------------------ event mintEvent(address owner, uint256 quantity, uint256 totalSupply); // Constructor // ------------------------------------------------------------------------ constructor() EIP712("Katana N Samurai 2", "1.0.0") ERC721B("Katana N Samurai 2", "KNS2.0"){} // Modifiers // ------------------------------------------------------------------------ modifier onlyPublicSale() { } modifier onlyPresale() { } // Verify functions // ------------------------------------------------------------------------ function verify(uint256 maxClaimNum, bytes memory SIGNATURE) public view returns (bool){ } // Claim functions // ------------------------------------------------------------------------ function claimSamurai(uint256 quantity, uint256 maxClaimNum, bytes memory SIGNATURE) external { } // Presale functions // ------------------------------------------------------------------------ function mintPresaleSamurai(uint256 quantity, uint256 maxClaimNumOnPresale, bytes memory SIGNATURE) external payable onlyPresale{ require(totalSupply.add(quantity) <= STAGE_LIMIT, "This stage is sold out!"); require(<FILL_ME>) require(quantity > 0 && hasPresale[msg.sender].add(quantity) <= maxClaimNumOnPresale, "Exceeds max presale number."); require(msg.value >= PRICE.mul(quantity), "Ether value sent is below the price."); require(totalSupply.add(quantity) <= MAX_SAMURAI, "Exceeds MAX_SAMURAI."); for (uint i = 0; i < quantity; i++) { _safeMint(msg.sender, totalSupply); totalSupply = totalSupply.add(1); } numPresale = numPresale.add(quantity); hasPresale[msg.sender] = hasPresale[msg.sender].add(quantity); emit mintEvent(msg.sender, quantity, totalSupply); } // Giveaway functions // ------------------------------------------------------------------------ function giveawayMintSamurai(address _to, uint256 quantity) external onlyOwner{ } // Mint functions // ------------------------------------------------------------------------ function mintPublicSaleSamurai(uint256 numPurchase) external payable onlyPublicSale{ } // Base URI Functions // ------------------------------------------------------------------------ function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Burn Functions // ------------------------------------------------------------------------ function burn(uint256 tokenId) external onlyOwner { } // setting functions // ------------------------------------------------------------------------ function setURI(string calldata _tokenURI) external onlyOwner { } function setSTAGE_LIMIT(uint _STAGE_LIMIT) external onlyOwner { } function setMAX_SAMURAI(uint _MAX_num) external onlyOwner { } function set_PRICE(uint _price) external onlyOwner { } function setPresale(bool _hasPresaleStarted,uint256 _presaleStartTimestamp) external onlyOwner { } function setPublicSale(bool _hasSaleStarted,uint256 _saleStartTimestamp) external onlyOwner { } function setClaim(bool _hasClaimStarted) external onlyOwner { } // Withdrawal functions // ------------------------------------------------------------------------ function withdrawAll() public payable onlyOwner { } }
verify(maxClaimNumOnPresale,SIGNATURE),"Not eligible for presale."
316,265
verify(maxClaimNumOnPresale,SIGNATURE)
"Exceeds MAX_SAMURAI."
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import './ERC721B.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; // _ __ _ _ _____ ___ ___ // | |/ /| \ | | / ____| |__ \ / _ \ // | ' / | \| || (___ ) | | | | | // | < | . ` | \___ \ / / | | | | // | . \ | |\ | ____) | / /_ _ | |_| | // |_|\_\|_| \_||_____/ |____|(_) \___/ contract KatanaNSamurai2 is Ownable, EIP712, ERC721B { using SafeMath for uint256; using Strings for uint256; // Sales variables // ------------------------------------------------------------------------ uint public MAX_SAMURAI = 6666; uint public STAGE_LIMIT = 666; uint public PRICE = 0.075 ether; uint public numPresale = 0; uint public numSale = 0; uint public numClaim = 0; uint public numGiveaway = 0; uint public totalSupply = 0; bool public hasSaleStarted = true; bool public hasPresaleStarted = true; bool public hasClaimStarted = true; string private _baseTokenURI = "http://api.ramen.katanansamurai.art/Metadata/"; mapping (address => uint256) public hasClaimed; mapping (address => uint256) public hasPresale; uint256 public saleStartTimestamp = 1642518000; // Public Sale start time in epoch format uint256 public presaleStartTimestamp = 1642410000; // PreSale start time in epoch format // Events // ------------------------------------------------------------------------ event mintEvent(address owner, uint256 quantity, uint256 totalSupply); // Constructor // ------------------------------------------------------------------------ constructor() EIP712("Katana N Samurai 2", "1.0.0") ERC721B("Katana N Samurai 2", "KNS2.0"){} // Modifiers // ------------------------------------------------------------------------ modifier onlyPublicSale() { } modifier onlyPresale() { } // Verify functions // ------------------------------------------------------------------------ function verify(uint256 maxClaimNum, bytes memory SIGNATURE) public view returns (bool){ } // Claim functions // ------------------------------------------------------------------------ function claimSamurai(uint256 quantity, uint256 maxClaimNum, bytes memory SIGNATURE) external { } // Presale functions // ------------------------------------------------------------------------ function mintPresaleSamurai(uint256 quantity, uint256 maxClaimNumOnPresale, bytes memory SIGNATURE) external payable onlyPresale{ require(totalSupply.add(quantity) <= STAGE_LIMIT, "This stage is sold out!"); require(verify(maxClaimNumOnPresale, SIGNATURE), "Not eligible for presale."); require(quantity > 0 && hasPresale[msg.sender].add(quantity) <= maxClaimNumOnPresale, "Exceeds max presale number."); require(msg.value >= PRICE.mul(quantity), "Ether value sent is below the price."); require(<FILL_ME>) for (uint i = 0; i < quantity; i++) { _safeMint(msg.sender, totalSupply); totalSupply = totalSupply.add(1); } numPresale = numPresale.add(quantity); hasPresale[msg.sender] = hasPresale[msg.sender].add(quantity); emit mintEvent(msg.sender, quantity, totalSupply); } // Giveaway functions // ------------------------------------------------------------------------ function giveawayMintSamurai(address _to, uint256 quantity) external onlyOwner{ } // Mint functions // ------------------------------------------------------------------------ function mintPublicSaleSamurai(uint256 numPurchase) external payable onlyPublicSale{ } // Base URI Functions // ------------------------------------------------------------------------ function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Burn Functions // ------------------------------------------------------------------------ function burn(uint256 tokenId) external onlyOwner { } // setting functions // ------------------------------------------------------------------------ function setURI(string calldata _tokenURI) external onlyOwner { } function setSTAGE_LIMIT(uint _STAGE_LIMIT) external onlyOwner { } function setMAX_SAMURAI(uint _MAX_num) external onlyOwner { } function set_PRICE(uint _price) external onlyOwner { } function setPresale(bool _hasPresaleStarted,uint256 _presaleStartTimestamp) external onlyOwner { } function setPublicSale(bool _hasSaleStarted,uint256 _saleStartTimestamp) external onlyOwner { } function setClaim(bool _hasClaimStarted) external onlyOwner { } // Withdrawal functions // ------------------------------------------------------------------------ function withdrawAll() public payable onlyOwner { } }
totalSupply.add(quantity)<=MAX_SAMURAI,"Exceeds MAX_SAMURAI."
316,265
totalSupply.add(quantity)<=MAX_SAMURAI
"This stage is sold out!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import './ERC721B.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; // _ __ _ _ _____ ___ ___ // | |/ /| \ | | / ____| |__ \ / _ \ // | ' / | \| || (___ ) | | | | | // | < | . ` | \___ \ / / | | | | // | . \ | |\ | ____) | / /_ _ | |_| | // |_|\_\|_| \_||_____/ |____|(_) \___/ contract KatanaNSamurai2 is Ownable, EIP712, ERC721B { using SafeMath for uint256; using Strings for uint256; // Sales variables // ------------------------------------------------------------------------ uint public MAX_SAMURAI = 6666; uint public STAGE_LIMIT = 666; uint public PRICE = 0.075 ether; uint public numPresale = 0; uint public numSale = 0; uint public numClaim = 0; uint public numGiveaway = 0; uint public totalSupply = 0; bool public hasSaleStarted = true; bool public hasPresaleStarted = true; bool public hasClaimStarted = true; string private _baseTokenURI = "http://api.ramen.katanansamurai.art/Metadata/"; mapping (address => uint256) public hasClaimed; mapping (address => uint256) public hasPresale; uint256 public saleStartTimestamp = 1642518000; // Public Sale start time in epoch format uint256 public presaleStartTimestamp = 1642410000; // PreSale start time in epoch format // Events // ------------------------------------------------------------------------ event mintEvent(address owner, uint256 quantity, uint256 totalSupply); // Constructor // ------------------------------------------------------------------------ constructor() EIP712("Katana N Samurai 2", "1.0.0") ERC721B("Katana N Samurai 2", "KNS2.0"){} // Modifiers // ------------------------------------------------------------------------ modifier onlyPublicSale() { } modifier onlyPresale() { } // Verify functions // ------------------------------------------------------------------------ function verify(uint256 maxClaimNum, bytes memory SIGNATURE) public view returns (bool){ } // Claim functions // ------------------------------------------------------------------------ function claimSamurai(uint256 quantity, uint256 maxClaimNum, bytes memory SIGNATURE) external { } // Presale functions // ------------------------------------------------------------------------ function mintPresaleSamurai(uint256 quantity, uint256 maxClaimNumOnPresale, bytes memory SIGNATURE) external payable onlyPresale{ } // Giveaway functions // ------------------------------------------------------------------------ function giveawayMintSamurai(address _to, uint256 quantity) external onlyOwner{ } // Mint functions // ------------------------------------------------------------------------ function mintPublicSaleSamurai(uint256 numPurchase) external payable onlyPublicSale{ require(numPurchase > 0 && numPurchase <= 50, "You can mint minimum 1, maximum 50 samurais."); require(<FILL_ME>) require(totalSupply.add(numPurchase) <= MAX_SAMURAI, "Sold out!"); require(msg.value >= PRICE.mul(numPurchase), "Ether value sent is below the price."); for (uint i = 0; i < numPurchase; i++) { _safeMint(msg.sender, totalSupply); totalSupply = totalSupply.add(1); } numSale = numSale.add(numPurchase); emit mintEvent(msg.sender, numPurchase, totalSupply); } // Base URI Functions // ------------------------------------------------------------------------ function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Burn Functions // ------------------------------------------------------------------------ function burn(uint256 tokenId) external onlyOwner { } // setting functions // ------------------------------------------------------------------------ function setURI(string calldata _tokenURI) external onlyOwner { } function setSTAGE_LIMIT(uint _STAGE_LIMIT) external onlyOwner { } function setMAX_SAMURAI(uint _MAX_num) external onlyOwner { } function set_PRICE(uint _price) external onlyOwner { } function setPresale(bool _hasPresaleStarted,uint256 _presaleStartTimestamp) external onlyOwner { } function setPublicSale(bool _hasSaleStarted,uint256 _saleStartTimestamp) external onlyOwner { } function setClaim(bool _hasClaimStarted) external onlyOwner { } // Withdrawal functions // ------------------------------------------------------------------------ function withdrawAll() public payable onlyOwner { } }
totalSupply.add(numPurchase)<=STAGE_LIMIT,"This stage is sold out!"
316,265
totalSupply.add(numPurchase)<=STAGE_LIMIT
"Sold out!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import './ERC721B.sol'; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; // _ __ _ _ _____ ___ ___ // | |/ /| \ | | / ____| |__ \ / _ \ // | ' / | \| || (___ ) | | | | | // | < | . ` | \___ \ / / | | | | // | . \ | |\ | ____) | / /_ _ | |_| | // |_|\_\|_| \_||_____/ |____|(_) \___/ contract KatanaNSamurai2 is Ownable, EIP712, ERC721B { using SafeMath for uint256; using Strings for uint256; // Sales variables // ------------------------------------------------------------------------ uint public MAX_SAMURAI = 6666; uint public STAGE_LIMIT = 666; uint public PRICE = 0.075 ether; uint public numPresale = 0; uint public numSale = 0; uint public numClaim = 0; uint public numGiveaway = 0; uint public totalSupply = 0; bool public hasSaleStarted = true; bool public hasPresaleStarted = true; bool public hasClaimStarted = true; string private _baseTokenURI = "http://api.ramen.katanansamurai.art/Metadata/"; mapping (address => uint256) public hasClaimed; mapping (address => uint256) public hasPresale; uint256 public saleStartTimestamp = 1642518000; // Public Sale start time in epoch format uint256 public presaleStartTimestamp = 1642410000; // PreSale start time in epoch format // Events // ------------------------------------------------------------------------ event mintEvent(address owner, uint256 quantity, uint256 totalSupply); // Constructor // ------------------------------------------------------------------------ constructor() EIP712("Katana N Samurai 2", "1.0.0") ERC721B("Katana N Samurai 2", "KNS2.0"){} // Modifiers // ------------------------------------------------------------------------ modifier onlyPublicSale() { } modifier onlyPresale() { } // Verify functions // ------------------------------------------------------------------------ function verify(uint256 maxClaimNum, bytes memory SIGNATURE) public view returns (bool){ } // Claim functions // ------------------------------------------------------------------------ function claimSamurai(uint256 quantity, uint256 maxClaimNum, bytes memory SIGNATURE) external { } // Presale functions // ------------------------------------------------------------------------ function mintPresaleSamurai(uint256 quantity, uint256 maxClaimNumOnPresale, bytes memory SIGNATURE) external payable onlyPresale{ } // Giveaway functions // ------------------------------------------------------------------------ function giveawayMintSamurai(address _to, uint256 quantity) external onlyOwner{ } // Mint functions // ------------------------------------------------------------------------ function mintPublicSaleSamurai(uint256 numPurchase) external payable onlyPublicSale{ require(numPurchase > 0 && numPurchase <= 50, "You can mint minimum 1, maximum 50 samurais."); require(totalSupply.add(numPurchase) <= STAGE_LIMIT, "This stage is sold out!"); require(<FILL_ME>) require(msg.value >= PRICE.mul(numPurchase), "Ether value sent is below the price."); for (uint i = 0; i < numPurchase; i++) { _safeMint(msg.sender, totalSupply); totalSupply = totalSupply.add(1); } numSale = numSale.add(numPurchase); emit mintEvent(msg.sender, numPurchase, totalSupply); } // Base URI Functions // ------------------------------------------------------------------------ function tokenURI(uint256 tokenId) public view override returns (string memory) { } // Burn Functions // ------------------------------------------------------------------------ function burn(uint256 tokenId) external onlyOwner { } // setting functions // ------------------------------------------------------------------------ function setURI(string calldata _tokenURI) external onlyOwner { } function setSTAGE_LIMIT(uint _STAGE_LIMIT) external onlyOwner { } function setMAX_SAMURAI(uint _MAX_num) external onlyOwner { } function set_PRICE(uint _price) external onlyOwner { } function setPresale(bool _hasPresaleStarted,uint256 _presaleStartTimestamp) external onlyOwner { } function setPublicSale(bool _hasSaleStarted,uint256 _saleStartTimestamp) external onlyOwner { } function setClaim(bool _hasClaimStarted) external onlyOwner { } // Withdrawal functions // ------------------------------------------------------------------------ function withdrawAll() public payable onlyOwner { } }
totalSupply.add(numPurchase)<=MAX_SAMURAI,"Sold out!"
316,265
totalSupply.add(numPurchase)<=MAX_SAMURAI
null
/* Tokyo Ghoul is a massive favorite among the anime faithful. It’s tragic tale of the young, innocent Ken Kaneki is the mastermind behind the best-selling anime of all time, A College student who is sucked dry on a date with his beloved ghoul, A being that feeds on human flesh. He later receives an organ transplant from the ghoul, becoming part monster himself. He has now arrived on the Ethereum blockchain to declare his throne as the Master of all Anime Coins. The cast is the total of the Tokyo Ghoul NFTs and NFT marketplace, Tokyo Ghoul anime, Tokyo Ghoul P2E game, comic books and more following this series. Main Chat Telegram: @TOKYOGHOULETH | Twitter: https://twitter.com/TokyoGhoulETH | Website: https://tokyoghoul.space/ */ //SPDX-License-Identifier: MIT pragma solidity ^0.7.6; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { } } interface IERC20 { function totalSupply() external view returns (uint256); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function name() external view returns (string memory); function getOwner() external view returns (address); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address _owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } abstract contract Auth { address internal owner; mapping (address => bool) internal authorizations; constructor(address _owner) { } /** * Function modifier to require caller to be contract owner */ modifier onlyOwner() { } /** * Function modifier to require caller to be authorized */ modifier authorized() { } /** * Authorize address. Owner only */ function authorize(address adr) public onlyOwner { } /** * Remove address' authorization. Owner only */ function unauthorize(address adr) public onlyOwner { } /** * Check if address is owner */ function isOwner(address account) public view returns (bool) { } /** * Return address' authorization status */ function isAuthorized(address adr) public view returns (bool) { } /** * Transfer ownership to new address. Caller must be owner. Leaves old owner authorized */ function transferOwnership(address payable adr) public onlyOwner { } event OwnershipTransferred(address owner); } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract TOKYOGHOUL is IERC20, Auth { using SafeMath for uint256; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; string constant _name = 'TOKYO GHOUL'; string constant _symbol = 'GHOUL'; uint8 constant _decimals = 9; uint256 _totalSupply = 100_000_000_000_000 * (10 ** _decimals); uint256 _maxTxAmount = _totalSupply / 50; uint256 _maxWalletAmount = _totalSupply / 20; mapping (address => uint256) _balances; mapping (address => mapping (address => uint256)) _allowances; mapping (address => bool) isFeeExempt; mapping (address => bool) isTxLimitExempt; mapping (address => bool) capturedBotter; mapping(address => uint256) _holderLastTransferTimestamp; uint256 liquidityFee = 0; uint256 marketingFee = 1000; uint256 teamFee = 1000; uint256 buybackFee = 0; uint256 totalFee = 2000; uint256 feeDenominator = 10000; address public liquidityWallet; address public marketingWallet; address public buybackWallet; address private teamFeeReceiver; address private teamFeeReceiver2; address private teamFeeReceiver3; IDEXRouter public router; address public pair; uint256 public launchedAt; uint256 public launchedTime; bool public swapEnabled = true; bool public humansOnly = true; uint256 public swapThreshold = _totalSupply / 2000; // 0.05% bool inSwap; modifier swapping() { } constructor () Auth(msg.sender) { } receive() external payable { } function totalSupply() external view override returns (uint256) { } function decimals() external pure override returns (uint8) { } function symbol() external pure override returns (string memory) { } function name() external pure override returns (string memory) { } function getOwner() external view override returns (address) { } function balanceOf(address account) public view override returns (uint256) { } function allowance(address holder, address spender) external view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function approveMax(address spender) external returns (bool) { } function transfer(address recipient, uint256 amount) external override returns (bool) { } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { } function _transferFrom(address sender, address recipient, uint256 amount) internal returns (bool) { require(<FILL_ME>) if(inSwap){ return _simpleTransfer(sender, recipient, amount);} if(shouldSwapBack()){ swapBack(); } if(!launched() && recipient == pair){require(_balances[sender] > 0); launch();} _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); if(launched() && !isTxLimitExempt[recipient] && sender == pair){ if(launchedAt + 2 > block.number){ capturedBotter[recipient] = true; capturedBotter[tx.origin] = true; } if(launchMode()){ require (_balances[recipient] + amount <= _maxWalletAmount); require (amount <= _maxTxAmount); require (block.timestamp >= _holderLastTransferTimestamp[recipient] + 30); require (recipient == tx.origin); } if(humansOnly && launchedTime + 10 minutes < block.timestamp){ require (recipient == tx.origin); } } _holderLastTransferTimestamp[recipient] = block.timestamp; uint256 amountReceived; if(!isFeeExempt[recipient]){amountReceived= shouldTakeFee(sender) ? takeFee(sender, amount) : amount;}else{amountReceived = amount;} _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); return true; } function _simpleTransfer(address sender, address recipient, uint256 amount) internal returns (bool) { } function airdrop(address[] calldata recipients, uint256 amount) external authorized{ } function getTotalFee() public view returns (uint256) { } function shouldTakeFee(address sender) internal view returns (bool) { } function takeFee(address sender,uint256 amount) internal returns (uint256) { } function shouldSwapBack() internal view returns (bool) { } function swapBack() internal swapping { } function launched() internal view returns (bool) { } function launch() internal{ } function manuallySwap() external authorized{ } function setIsFeeAndTXLimitExempt(address holder, bool exempt) external onlyOwner { } function setFeeReceivers(address _liquidityWallet, address _teamFeeReceiver, address _marketingWallet) external onlyOwner { } function setSwapBackSettings(bool _enabled, uint256 _amount) external onlyOwner { } function setFees(uint256 _liquidityFee, uint256 _teamFee, uint256 _marketingFee, uint256 _buybackFee, uint256 _feeDenominator) external onlyOwner { } function addBot(address _botter) external authorized { } function humanOnlyMode(bool _mode) external authorized { } function notABot(address _botter) external authorized { } function bulkAddBots(address[] calldata _botters) external authorized { } function launchModeStatus() external view returns(bool) { } function launchMode() internal view returns(bool) { } function recoverEth() external onlyOwner() { } function recoverToken(address _token, uint256 amount) external authorized returns (bool _sent){ } event AutoLiquify(uint256 amountETH, uint256 amountToken); }
!capturedBotter[sender]
316,267
!capturedBotter[sender]
"!pause manager"
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; contract A2Token is ERC20, ERC20Burnable, AccessControl, Pausable { using SafeERC20 for IERC20; string constant NAME = 'A2DAO Token'; string constant SYMBOL = 'ATD'; uint8 constant DECIMALS = 18; uint256 constant TOTAL_SUPPLY = 20_000_000 * 10**uint256(DECIMALS); bytes32 public constant WHITELISTED_ROLE = keccak256("WHITELISTED_ROLE"); //Whitelisted addresses can transfer token when paused bytes32 public constant PAUSE_MANAGER_ROLE = keccak256("PAUSE_MANAGER_ROLE"); //Pause manager can pause/unpause bytes32 public constant TRANSFER_MANAGER_ROLE = keccak256("TRANSFER_MANAGER_ROLE"); //Transfer manager can withdraw ETH/ERC20/NFT from the contract modifier onlyPauseManager(){ require(<FILL_ME>) _; } modifier onlyTransferManager(){ } modifier onlyDefaultAdmin(){ } constructor() ERC20(NAME, SYMBOL) { } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { } function pause() external onlyPauseManager { } function unpause() external onlyPauseManager { } function withdrawETH() external onlyTransferManager { } function withdrawERC20(IERC20 token) external onlyTransferManager { } function withdrawERC721(IERC721 token, uint256 id) external onlyTransferManager { } function withdrawERC1155(IERC1155 token, uint256 id, uint256 amount, bytes calldata data) external onlyTransferManager { } function revokePauseManagerAdmin() external onlyDefaultAdmin { } }
hasRole(PAUSE_MANAGER_ROLE,_msgSender()),"!pause manager"
316,313
hasRole(PAUSE_MANAGER_ROLE,_msgSender())
"!transfer manager"
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; contract A2Token is ERC20, ERC20Burnable, AccessControl, Pausable { using SafeERC20 for IERC20; string constant NAME = 'A2DAO Token'; string constant SYMBOL = 'ATD'; uint8 constant DECIMALS = 18; uint256 constant TOTAL_SUPPLY = 20_000_000 * 10**uint256(DECIMALS); bytes32 public constant WHITELISTED_ROLE = keccak256("WHITELISTED_ROLE"); //Whitelisted addresses can transfer token when paused bytes32 public constant PAUSE_MANAGER_ROLE = keccak256("PAUSE_MANAGER_ROLE"); //Pause manager can pause/unpause bytes32 public constant TRANSFER_MANAGER_ROLE = keccak256("TRANSFER_MANAGER_ROLE"); //Transfer manager can withdraw ETH/ERC20/NFT from the contract modifier onlyPauseManager(){ } modifier onlyTransferManager(){ require(<FILL_ME>) _; } modifier onlyDefaultAdmin(){ } constructor() ERC20(NAME, SYMBOL) { } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { } function pause() external onlyPauseManager { } function unpause() external onlyPauseManager { } function withdrawETH() external onlyTransferManager { } function withdrawERC20(IERC20 token) external onlyTransferManager { } function withdrawERC721(IERC721 token, uint256 id) external onlyTransferManager { } function withdrawERC1155(IERC1155 token, uint256 id, uint256 amount, bytes calldata data) external onlyTransferManager { } function revokePauseManagerAdmin() external onlyDefaultAdmin { } }
hasRole(TRANSFER_MANAGER_ROLE,_msgSender()),"!transfer manager"
316,313
hasRole(TRANSFER_MANAGER_ROLE,_msgSender())
"transfers paused"
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; contract A2Token is ERC20, ERC20Burnable, AccessControl, Pausable { using SafeERC20 for IERC20; string constant NAME = 'A2DAO Token'; string constant SYMBOL = 'ATD'; uint8 constant DECIMALS = 18; uint256 constant TOTAL_SUPPLY = 20_000_000 * 10**uint256(DECIMALS); bytes32 public constant WHITELISTED_ROLE = keccak256("WHITELISTED_ROLE"); //Whitelisted addresses can transfer token when paused bytes32 public constant PAUSE_MANAGER_ROLE = keccak256("PAUSE_MANAGER_ROLE"); //Pause manager can pause/unpause bytes32 public constant TRANSFER_MANAGER_ROLE = keccak256("TRANSFER_MANAGER_ROLE"); //Transfer manager can withdraw ETH/ERC20/NFT from the contract modifier onlyPauseManager(){ } modifier onlyTransferManager(){ } modifier onlyDefaultAdmin(){ } constructor() ERC20(NAME, SYMBOL) { } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override { super._beforeTokenTransfer(from, to, amount); require(<FILL_ME>) } function pause() external onlyPauseManager { } function unpause() external onlyPauseManager { } function withdrawETH() external onlyTransferManager { } function withdrawERC20(IERC20 token) external onlyTransferManager { } function withdrawERC721(IERC721 token, uint256 id) external onlyTransferManager { } function withdrawERC1155(IERC1155 token, uint256 id, uint256 amount, bytes calldata data) external onlyTransferManager { } function revokePauseManagerAdmin() external onlyDefaultAdmin { } }
!paused()||hasRole(WHITELISTED_ROLE,_msgSender()),"transfers paused"
316,313
!paused()||hasRole(WHITELISTED_ROLE,_msgSender())
"N.A"
pragma solidity 0.5.16; interface IOracleAggregator { function __callback(uint256 timestamp, uint256 data) external; function hasData(address oracleId, uint256 timestamp) external view returns(bool result); } interface IOracleSubId { function getResult() external view returns (uint256); } contract OnchainSubIdsOracleId is IOracleId { event Provided(uint256 indexed timestamp, uint256 result); // Resolvers // Mapping timestamp => oracleSubId mapping (uint256 => address) public resolvers; // Opium IOracleAggregator public oracleAggregator; // Governance address private _owner; uint256 public EMERGENCY_PERIOD; modifier onlyOwner() { } constructor(IOracleAggregator _oracleAggregator, uint256 _emergencyPeriod) public { } /** OPIUM INTERFACE */ function fetchData(uint256 _timestamp) external payable { } function recursivelyFetchData(uint256 _timestamp, uint256 _period, uint256 _times) external payable { } function calculateFetchPrice() external returns (uint256) { } /** RESOLVER */ function _callback(uint256 _timestamp) public { require(<FILL_ME>) uint256 result = IOracleSubId(resolvers[_timestamp]).getResult(); oracleAggregator.__callback(_timestamp, result); emit Provided(_timestamp, result); } function registerResolver(uint256 _timestamp, address _resolver) public { } /** GOVERNANCE */ /** Emergency callback allows to push data manually in case EMERGENCY_PERIOD elapsed and no data were provided */ function emergencyCallback(uint256 _timestamp, uint256 _result) public onlyOwner { } }
!oracleAggregator.hasData(address(this),_timestamp)&&_timestamp<now,"N.A"
316,329
!oracleAggregator.hasData(address(this),_timestamp)&&_timestamp<now
"O.R"
pragma solidity 0.5.16; interface IOracleAggregator { function __callback(uint256 timestamp, uint256 data) external; function hasData(address oracleId, uint256 timestamp) external view returns(bool result); } interface IOracleSubId { function getResult() external view returns (uint256); } contract OnchainSubIdsOracleId is IOracleId { event Provided(uint256 indexed timestamp, uint256 result); // Resolvers // Mapping timestamp => oracleSubId mapping (uint256 => address) public resolvers; // Opium IOracleAggregator public oracleAggregator; // Governance address private _owner; uint256 public EMERGENCY_PERIOD; modifier onlyOwner() { } constructor(IOracleAggregator _oracleAggregator, uint256 _emergencyPeriod) public { } /** OPIUM INTERFACE */ function fetchData(uint256 _timestamp) external payable { } function recursivelyFetchData(uint256 _timestamp, uint256 _period, uint256 _times) external payable { } function calculateFetchPrice() external returns (uint256) { } /** RESOLVER */ function _callback(uint256 _timestamp) public { } function registerResolver(uint256 _timestamp, address _resolver) public { require(<FILL_ME>) // O.R = already registered resolvers[_timestamp] = _resolver; } /** GOVERNANCE */ /** Emergency callback allows to push data manually in case EMERGENCY_PERIOD elapsed and no data were provided */ function emergencyCallback(uint256 _timestamp, uint256 _result) public onlyOwner { } }
resolvers[_timestamp]==address(0),"O.R"
316,329
resolvers[_timestamp]==address(0)
"N.E"
pragma solidity 0.5.16; interface IOracleAggregator { function __callback(uint256 timestamp, uint256 data) external; function hasData(address oracleId, uint256 timestamp) external view returns(bool result); } interface IOracleSubId { function getResult() external view returns (uint256); } contract OnchainSubIdsOracleId is IOracleId { event Provided(uint256 indexed timestamp, uint256 result); // Resolvers // Mapping timestamp => oracleSubId mapping (uint256 => address) public resolvers; // Opium IOracleAggregator public oracleAggregator; // Governance address private _owner; uint256 public EMERGENCY_PERIOD; modifier onlyOwner() { } constructor(IOracleAggregator _oracleAggregator, uint256 _emergencyPeriod) public { } /** OPIUM INTERFACE */ function fetchData(uint256 _timestamp) external payable { } function recursivelyFetchData(uint256 _timestamp, uint256 _period, uint256 _times) external payable { } function calculateFetchPrice() external returns (uint256) { } /** RESOLVER */ function _callback(uint256 _timestamp) public { } function registerResolver(uint256 _timestamp, address _resolver) public { } /** GOVERNANCE */ /** Emergency callback allows to push data manually in case EMERGENCY_PERIOD elapsed and no data were provided */ function emergencyCallback(uint256 _timestamp, uint256 _result) public onlyOwner { require(<FILL_ME>) oracleAggregator.__callback(_timestamp, _result); emit Provided(_timestamp, _result); } }
!oracleAggregator.hasData(address(this),_timestamp)&&_timestamp+EMERGENCY_PERIOD<now,"N.E"
316,329
!oracleAggregator.hasData(address(this),_timestamp)&&_timestamp+EMERGENCY_PERIOD<now
"AKAP: operator query for nonexistent node"
// Copyright (C) 2019 Christian Felde // Copyright (C) 2019 Mohamed Elshami // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. pragma solidity ^0.5.0; contract AKAP is IAKAP, ERC721Full { struct Node { uint parentId; uint expiry; uint seeAlso; address seeAddress; bytes nodeBody; } mapping(uint => Node) private nodes; constructor() ERC721Full("AKA Protocol Registry", "AKAP") public {} function _msgSender() internal view returns (address payable) { } modifier onlyExisting(uint nodeId) { require(<FILL_ME>) _; } modifier onlyApproved(uint nodeId) { } function hashOf(uint parentId, bytes memory label) public pure returns (uint id) { } function claim(uint parentId, bytes calldata label) external returns (uint status) { } function exists(uint nodeId) external view returns (bool) { } function isApprovedOrOwner(uint nodeId) external view returns (bool) { } function parentOf(uint nodeId) external view onlyExisting(nodeId) returns (uint) { } function expiryOf(uint nodeId) external view onlyExisting(nodeId) returns (uint) { } function seeAlso(uint nodeId) external view onlyExisting(nodeId) returns (uint) { } function seeAddress(uint nodeId) external view onlyExisting(nodeId) returns (address) { } function nodeBody(uint nodeId) external view onlyExisting(nodeId) returns (bytes memory) { } function expireNode(uint nodeId) external onlyApproved(nodeId) { } function setSeeAlso(uint nodeId, uint value) external onlyApproved(nodeId) { } function setSeeAddress(uint nodeId, address value) external onlyApproved(nodeId) { } function setNodeBody(uint nodeId, bytes calldata value) external onlyApproved(nodeId) { } function setTokenURI(uint nodeId, string calldata uri) external onlyApproved(nodeId) { } }
_exists(nodeId),"AKAP: operator query for nonexistent node"
316,376
_exists(nodeId)
"AKAP: set value caller is not owner nor approved"
// Copyright (C) 2019 Christian Felde // Copyright (C) 2019 Mohamed Elshami // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. pragma solidity ^0.5.0; contract AKAP is IAKAP, ERC721Full { struct Node { uint parentId; uint expiry; uint seeAlso; address seeAddress; bytes nodeBody; } mapping(uint => Node) private nodes; constructor() ERC721Full("AKA Protocol Registry", "AKAP") public {} function _msgSender() internal view returns (address payable) { } modifier onlyExisting(uint nodeId) { } modifier onlyApproved(uint nodeId) { require(<FILL_ME>) _; } function hashOf(uint parentId, bytes memory label) public pure returns (uint id) { } function claim(uint parentId, bytes calldata label) external returns (uint status) { } function exists(uint nodeId) external view returns (bool) { } function isApprovedOrOwner(uint nodeId) external view returns (bool) { } function parentOf(uint nodeId) external view onlyExisting(nodeId) returns (uint) { } function expiryOf(uint nodeId) external view onlyExisting(nodeId) returns (uint) { } function seeAlso(uint nodeId) external view onlyExisting(nodeId) returns (uint) { } function seeAddress(uint nodeId) external view onlyExisting(nodeId) returns (address) { } function nodeBody(uint nodeId) external view onlyExisting(nodeId) returns (bytes memory) { } function expireNode(uint nodeId) external onlyApproved(nodeId) { } function setSeeAlso(uint nodeId, uint value) external onlyApproved(nodeId) { } function setSeeAddress(uint nodeId, address value) external onlyApproved(nodeId) { } function setNodeBody(uint nodeId, bytes calldata value) external onlyApproved(nodeId) { } function setTokenURI(uint nodeId, string calldata uri) external onlyApproved(nodeId) { } }
_exists(nodeId)&&_isApprovedOrOwner(_msgSender(),nodeId),"AKAP: set value caller is not owner nor approved"
316,376
_exists(nodeId)&&_isApprovedOrOwner(_msgSender(),nodeId)
"no tokens left"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract TitanTiki is ERC1155, Ownable { using Counters for Counters.Counter; uint256 public constant TOTAL_TOKENS = 1000; uint256 public price = 100000000000000000; address private _payoutAddress; address private _devAddress; Counters.Counter private _tokenIdTracker; uint256 public reservedsLeft = 310; uint256 public threshold = 690; bool public saleIsActive = false; constructor(address payoutAddress, address devAddress) ERC1155("https://17pocvex2e.execute-api.us-east-1.amazonaws.com/token/{id}") { } // Owner Only function setURI(string memory newuri) public onlyOwner { } function pauseSale() public onlyOwner { } function startSale(uint256 newThreshold) public onlyOwner { } function setPrice(uint256 newPrice) public onlyOwner { } function claimReserved(address to, uint256 amount) public onlyOwner { require(reservedsLeft >= amount, "no reserves left"); require(<FILL_ME>) _mintMany(to, amount); reservedsLeft = reservedsLeft - amount; } function withdraw() public onlyOwner { } // Internal Helpers function _mintMany(address to, uint256 amount) internal { } // Public View function tokensLeft() public view returns (uint256) { } function nextTokenId() public view returns(uint256) { } function tokenAmoundMinusReserved() public view returns(uint256) { } // Public Tx function mint(uint256 amount) public payable { } // Overrides function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override { } }
tokensLeft()>=amount,"no tokens left"
316,409
tokensLeft()>=amount
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract TitanTiki is ERC1155, Ownable { using Counters for Counters.Counter; uint256 public constant TOTAL_TOKENS = 1000; uint256 public price = 100000000000000000; address private _payoutAddress; address private _devAddress; Counters.Counter private _tokenIdTracker; uint256 public reservedsLeft = 310; uint256 public threshold = 690; bool public saleIsActive = false; constructor(address payoutAddress, address devAddress) ERC1155("https://17pocvex2e.execute-api.us-east-1.amazonaws.com/token/{id}") { } // Owner Only function setURI(string memory newuri) public onlyOwner { } function pauseSale() public onlyOwner { } function startSale(uint256 newThreshold) public onlyOwner { } function setPrice(uint256 newPrice) public onlyOwner { } function claimReserved(address to, uint256 amount) public onlyOwner { } function withdraw() public onlyOwner { uint256 contractBalance = address(this).balance; uint256 devShare = contractBalance * 15 / 100; uint256 payoutShare = contractBalance - devShare; require(<FILL_ME>) require(payable(_payoutAddress).send(payoutShare)); } // Internal Helpers function _mintMany(address to, uint256 amount) internal { } // Public View function tokensLeft() public view returns (uint256) { } function nextTokenId() public view returns(uint256) { } function tokenAmoundMinusReserved() public view returns(uint256) { } // Public Tx function mint(uint256 amount) public payable { } // Overrides function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override { } }
payable(_devAddress).send(devShare)
316,409
payable(_devAddress).send(devShare)
null
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract TitanTiki is ERC1155, Ownable { using Counters for Counters.Counter; uint256 public constant TOTAL_TOKENS = 1000; uint256 public price = 100000000000000000; address private _payoutAddress; address private _devAddress; Counters.Counter private _tokenIdTracker; uint256 public reservedsLeft = 310; uint256 public threshold = 690; bool public saleIsActive = false; constructor(address payoutAddress, address devAddress) ERC1155("https://17pocvex2e.execute-api.us-east-1.amazonaws.com/token/{id}") { } // Owner Only function setURI(string memory newuri) public onlyOwner { } function pauseSale() public onlyOwner { } function startSale(uint256 newThreshold) public onlyOwner { } function setPrice(uint256 newPrice) public onlyOwner { } function claimReserved(address to, uint256 amount) public onlyOwner { } function withdraw() public onlyOwner { uint256 contractBalance = address(this).balance; uint256 devShare = contractBalance * 15 / 100; uint256 payoutShare = contractBalance - devShare; require(payable(_devAddress).send(devShare)); require(<FILL_ME>) } // Internal Helpers function _mintMany(address to, uint256 amount) internal { } // Public View function tokensLeft() public view returns (uint256) { } function nextTokenId() public view returns(uint256) { } function tokenAmoundMinusReserved() public view returns(uint256) { } // Public Tx function mint(uint256 amount) public payable { } // Overrides function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override { } }
payable(_payoutAddress).send(payoutShare)
316,409
payable(_payoutAddress).send(payoutShare)
"will exceed max tokens"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "hardhat/console.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract TitanTiki is ERC1155, Ownable { using Counters for Counters.Counter; uint256 public constant TOTAL_TOKENS = 1000; uint256 public price = 100000000000000000; address private _payoutAddress; address private _devAddress; Counters.Counter private _tokenIdTracker; uint256 public reservedsLeft = 310; uint256 public threshold = 690; bool public saleIsActive = false; constructor(address payoutAddress, address devAddress) ERC1155("https://17pocvex2e.execute-api.us-east-1.amazonaws.com/token/{id}") { } // Owner Only function setURI(string memory newuri) public onlyOwner { } function pauseSale() public onlyOwner { } function startSale(uint256 newThreshold) public onlyOwner { } function setPrice(uint256 newPrice) public onlyOwner { } function claimReserved(address to, uint256 amount) public onlyOwner { } function withdraw() public onlyOwner { } // Internal Helpers function _mintMany(address to, uint256 amount) internal { } // Public View function tokensLeft() public view returns (uint256) { } function nextTokenId() public view returns(uint256) { } function tokenAmoundMinusReserved() public view returns(uint256) { } // Public Tx function mint(uint256 amount) public payable { require(saleIsActive, "sale is not active"); require(amount > 0, "amount out of bounds"); require(amount <= 5, "amount out of bounds"); require(threshold >= tokenAmoundMinusReserved() + amount, "will exceed threshold"); require(<FILL_ME>) require(msg.value >= price * amount, "incorrect eth value"); _mintMany(msg.sender, amount); if (tokenAmoundMinusReserved() == threshold) { saleIsActive = false; } } // Overrides function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal override { } }
tokensLeft()-reservedsLeft>=amount,"will exceed max tokens"
316,409
tokensLeft()-reservedsLeft>=amount
"Valid signature required"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../royalties/Royalties.sol"; import "../Signable.sol"; // Version: Verisart-1.0 contract Verisart is ERC721, ERC721Enumerable, ERC721URIStorage, ERC721Burnable, Ownable, Royalties, Signable { string private _baseURIextended; // OpenSea metadata freeze event PermanentURI(string _value, uint256 indexed _id); constructor(string memory baseURI) ERC721("Verisart", "VER") { } function _baseURI() internal view override returns (string memory) { } function mint( address to, uint256 tokenId, string memory _tokenURI, address payable receiver, uint256 basisPoints, uint8 v, bytes32 r, bytes32 s ) public validRoyalties(basisPoints) { require(<FILL_ME>) _mintSingle(to, tokenId, _tokenURI, receiver, basisPoints); } function mintBulk( address to, uint256 tokenId, string[] memory _tokenURIs, address payable receiver, uint256 basisPoints, uint8 v, bytes32 r, bytes32 s ) public validRoyalties(basisPoints) { } /** * @dev Verisart mints on behalf of users who have given permission */ function mintVerisart( address _to, uint256 tokenId, string memory _tokenURI, address payable receiver, uint256 basisPoints, uint8 v, bytes32 r, bytes32 s ) public onlyOwner validRoyalties(basisPoints) { } /** * @dev Verisart bulk mints on behalf of users who have given permission */ function mintBulkVerisart( address _to, uint256 tokenId, string[] memory _tokenURIs, address payable receiver, uint256 basisPoints, uint8 v, bytes32 r, bytes32 s ) public onlyOwner validRoyalties(basisPoints) { } /** * @dev Royalties are set naively on minting so this check * is performed once before minting to avoid extra unnecessary gas */ modifier validRoyalties(uint256 basisPoints) { } function _mintBulk( address to, uint256 baseTokenId, string[] memory _tokenURIs, address payable receiver, uint256 basisPoints ) internal { } function _mintSingle( address to, uint256 tokenId, string memory _tokenURI, address payable receiver, uint256 basisPoints ) internal { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function _existsRoyalties(uint256 tokenId) internal view virtual override(Royalties) returns (bool) { } function _getRoyaltyFallback() internal view override returns (address payable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
owner()==recoverAddress(tokenId,_tokenURI,v,r,s),"Valid signature required"
316,663
owner()==recoverAddress(tokenId,_tokenURI,v,r,s)
"Valid signature required"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../royalties/Royalties.sol"; import "../Signable.sol"; // Version: Verisart-1.0 contract Verisart is ERC721, ERC721Enumerable, ERC721URIStorage, ERC721Burnable, Ownable, Royalties, Signable { string private _baseURIextended; // OpenSea metadata freeze event PermanentURI(string _value, uint256 indexed _id); constructor(string memory baseURI) ERC721("Verisart", "VER") { } function _baseURI() internal view override returns (string memory) { } function mint( address to, uint256 tokenId, string memory _tokenURI, address payable receiver, uint256 basisPoints, uint8 v, bytes32 r, bytes32 s ) public validRoyalties(basisPoints) { } function mintBulk( address to, uint256 tokenId, string[] memory _tokenURIs, address payable receiver, uint256 basisPoints, uint8 v, bytes32 r, bytes32 s ) public validRoyalties(basisPoints) { require(<FILL_ME>) _mintBulk(to, tokenId, _tokenURIs, receiver, basisPoints); } /** * @dev Verisart mints on behalf of users who have given permission */ function mintVerisart( address _to, uint256 tokenId, string memory _tokenURI, address payable receiver, uint256 basisPoints, uint8 v, bytes32 r, bytes32 s ) public onlyOwner validRoyalties(basisPoints) { } /** * @dev Verisart bulk mints on behalf of users who have given permission */ function mintBulkVerisart( address _to, uint256 tokenId, string[] memory _tokenURIs, address payable receiver, uint256 basisPoints, uint8 v, bytes32 r, bytes32 s ) public onlyOwner validRoyalties(basisPoints) { } /** * @dev Royalties are set naively on minting so this check * is performed once before minting to avoid extra unnecessary gas */ modifier validRoyalties(uint256 basisPoints) { } function _mintBulk( address to, uint256 baseTokenId, string[] memory _tokenURIs, address payable receiver, uint256 basisPoints ) internal { } function _mintSingle( address to, uint256 tokenId, string memory _tokenURI, address payable receiver, uint256 basisPoints ) internal { } // The following functions are overrides required by Solidity. function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721, ERC721Enumerable) { } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { } function _existsRoyalties(uint256 tokenId) internal view virtual override(Royalties) returns (bool) { } function _getRoyaltyFallback() internal view override returns (address payable) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable) returns (bool) { } }
owner()==recoverAddressBulk(tokenId,_tokenURIs,v,r,s),"Valid signature required"
316,663
owner()==recoverAddressBulk(tokenId,_tokenURIs,v,r,s)
"The presale ended!"
// SPDX-License-Identifier: MIT // www.thecreatiiives.com pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "erc721a/contracts/ERC721A.sol"; contract SigmaBeasts is Ownable, ERC721A { using Strings for uint256; string public uriPrefix = ""; string public uriSuffix = ".json"; string public hiddenMetadataUri; uint256 public cost = 0.05 ether; uint256 public wlCost = 0.04 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmountPerTx = 15; uint256 public wlSupply = 150; bool public paused = false; bool public revealed = false; bool public onlyWhitelisted = true; mapping(address => uint256) public allowlist; constructor() ERC721A("SigmaBeasts", "SB") { } modifier mintCompliance(uint256 _mintAmount) { } function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) { } function mintWl(uint256 _mintAmount) public payable mintCompliance(_mintAmount) { require(onlyWhitelisted, "The presale ended!"); require(<FILL_ME>) require(allowlist[msg.sender] - _mintAmount >= 0, "not eligible for allowlist mint"); require(msg.value >= wlCost * _mintAmount, "Insufficient funds!"); allowlist[msg.sender] = allowlist[msg.sender] - _mintAmount; _safeMint(msg.sender, _mintAmount); } function isWhitelisted(address _address) public view returns (uint256) { } function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setRevealed(bool _state) public onlyOwner { } function setCost(uint256 _cost) public onlyOwner { } function setWlCost(uint256 _wlCost) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setWlSupply(uint256 _wlSupply) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function seedAllowlist(address[] memory addresses, uint256 numSlots) external onlyOwner { } function withdraw() public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } }
totalSupply()+_mintAmount<=wlSupply,"The presale ended!"
316,722
totalSupply()+_mintAmount<=wlSupply
"not eligible for allowlist mint"
// SPDX-License-Identifier: MIT // www.thecreatiiives.com pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "erc721a/contracts/ERC721A.sol"; contract SigmaBeasts is Ownable, ERC721A { using Strings for uint256; string public uriPrefix = ""; string public uriSuffix = ".json"; string public hiddenMetadataUri; uint256 public cost = 0.05 ether; uint256 public wlCost = 0.04 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmountPerTx = 15; uint256 public wlSupply = 150; bool public paused = false; bool public revealed = false; bool public onlyWhitelisted = true; mapping(address => uint256) public allowlist; constructor() ERC721A("SigmaBeasts", "SB") { } modifier mintCompliance(uint256 _mintAmount) { } function mint(uint256 _mintAmount) public payable mintCompliance(_mintAmount) { } function mintWl(uint256 _mintAmount) public payable mintCompliance(_mintAmount) { require(onlyWhitelisted, "The presale ended!"); require(totalSupply() + _mintAmount <= wlSupply, "The presale ended!"); require(<FILL_ME>) require(msg.value >= wlCost * _mintAmount, "Insufficient funds!"); allowlist[msg.sender] = allowlist[msg.sender] - _mintAmount; _safeMint(msg.sender, _mintAmount); } function isWhitelisted(address _address) public view returns (uint256) { } function mintForAddress(uint256 _mintAmount, address _receiver) public mintCompliance(_mintAmount) onlyOwner { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { } function setRevealed(bool _state) public onlyOwner { } function setCost(uint256 _cost) public onlyOwner { } function setWlCost(uint256 _wlCost) public onlyOwner { } function setMaxMintAmountPerTx(uint256 _maxMintAmountPerTx) public onlyOwner { } function setHiddenMetadataUri(string memory _hiddenMetadataUri) public onlyOwner { } function setUriPrefix(string memory _uriPrefix) public onlyOwner { } function setUriSuffix(string memory _uriSuffix) public onlyOwner { } function setMaxSupply(uint256 _maxSupply) public onlyOwner { } function setWlSupply(uint256 _wlSupply) public onlyOwner { } function setPaused(bool _state) public onlyOwner { } function setOnlyWhitelisted(bool _state) public onlyOwner { } function seedAllowlist(address[] memory addresses, uint256 numSlots) external onlyOwner { } function withdraw() public onlyOwner { } function _baseURI() internal view virtual override returns (string memory) { } }
allowlist[msg.sender]-_mintAmount>=0,"not eligible for allowlist mint"
316,722
allowlist[msg.sender]-_mintAmount>=0
"MaxList.setPoints: Sender must be operator"
pragma solidity 0.6.12; /** * @dev Set an uint max amount for all addresses * @dev uint256 public maxPoints; * @dev This amount can be changed by an operator */ import "../OpenZeppelin/math/SafeMath.sol"; import "./MISOAccessControls.sol"; import "../interfaces/IPointList.sol"; contract MaxList is IPointList, MISOAccessControls { using SafeMath for uint; /// @notice Maximum amount of points for any address. uint256 public maxPoints; /// @notice Event emitted when points are updated. event PointsUpdated(uint256 oldPoints, uint256 newPoints); constructor() public {} /** * @notice Initializes point list with admin address. * @param _admin Admins address. */ function initPointList(address _admin) public override { } /** * @notice Returns the amount of points of any address. * @param _account Account address. * @return uint256 maxPoints. */ function points(address _account) public view returns (uint256) { } /** * @notice Returns the maximum amount of points. * @param _account Account address. * @return bool True or False. */ function isInList(address _account) public view override returns (bool) { } /** * @notice Checks if maxPoints is bigger or equal to the number given. * @param _account Account address. * @param _amount Desired amount of points. * @return bool True or False. */ function hasPoints(address _account, uint256 _amount) public view override returns (bool) { } /** * @notice Sets maxPoints. * @param _accounts An array of accounts. Kept for compatibility with IPointList * @param _amounts An array of corresponding amounts. Kept for compatibility with IPointList */ function setPoints(address[] memory _accounts, uint256[] memory _amounts) external override { require(<FILL_ME>) require(_amounts.length == 1); maxPoints = _amounts[0]; emit PointsUpdated(maxPoints, _amounts[0]); } }
hasAdminRole(msg.sender)||hasOperatorRole(msg.sender),"MaxList.setPoints: Sender must be operator"
316,738
hasAdminRole(msg.sender)||hasOperatorRole(msg.sender)
"same-fuse-pool"
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "../compound/CompoundStrategy.sol"; import "../../interfaces/rari-fuse/IComptroller.sol"; import "../../interfaces/rari-fuse/IFusePoolDirectory.sol"; /// @title This strategy will deposit collateral token in a Rari Fuse Pool and earn interest. abstract contract RariFuseStrategy is CompoundStrategy { using SafeERC20 for IERC20; address private constant FUSE_POOL_DIRECTORY = 0x835482FE0532f169024d5E9410199369aAD5C77E; event FusePoolChanged(uint256 indexed newFusePoolId, address indexed oldCToken, address indexed newCToken); // solhint-disable no-empty-blocks constructor( address _pool, address _swapManager, address _receiptToken ) CompoundStrategy(_pool, _swapManager, _receiptToken) {} // solhint-enable no-empty-blocks /** * @notice Calculate total value using underlying token * @dev Report total value in collateral token */ function totalValue() external view override returns (uint256 _totalValue) { } /** * @notice Changes the underlying Fuse Pool to a new one * @dev Redeems cTokens from current fuse pool and mints cTokens of new Fuse Pool * @param _newPoolId Fuse Pool ID */ function migrateFusePool(uint256 _newPoolId) external virtual onlyGovernor { address _newCToken = _cTokenByUnderlying(_newPoolId, address(collateralToken)); require(<FILL_ME>) require(cToken.redeem(cToken.balanceOf(address(this))) == 0, "withdraw-from-fuse-pool-failed"); uint256 _collateralBalance = collateralToken.balanceOf(address(this)); collateralToken.safeApprove(_newCToken, _collateralBalance); require(CToken(_newCToken).mint(_collateralBalance) == 0, "deposit-to-fuse-pool-failed"); emit FusePoolChanged(_newPoolId, address(cToken), _newCToken); cToken = CToken(_newCToken); receiptToken = _newCToken; } function isReservedToken(address _token) public view override returns (bool) { } /** * @notice Gets the cToken to mint for a Fuse Pool * @param _poolId Fuse Pool ID * @param _collateralToken address of the collateralToken */ function _cTokenByUnderlying(uint256 _poolId, address _collateralToken) internal view returns (address) { } // solhint-disable-next-line function _beforeMigration(address _newStrategy) internal override {} /** * @notice Calculate earning and withdraw it from Rari Fuse * @dev If somehow we got some collateral token in strategy then we want to * include those in profit. That's why we used 'return' outside 'if' condition. * @param _totalDebt Total collateral debt of this strategy * @return profit in collateral token */ function _realizeProfit(uint256 _totalDebt) internal override returns (uint256) { } }
address(cToken)!=_newCToken,"same-fuse-pool"
316,757
address(cToken)!=_newCToken
"withdraw-from-fuse-pool-failed"
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "../compound/CompoundStrategy.sol"; import "../../interfaces/rari-fuse/IComptroller.sol"; import "../../interfaces/rari-fuse/IFusePoolDirectory.sol"; /// @title This strategy will deposit collateral token in a Rari Fuse Pool and earn interest. abstract contract RariFuseStrategy is CompoundStrategy { using SafeERC20 for IERC20; address private constant FUSE_POOL_DIRECTORY = 0x835482FE0532f169024d5E9410199369aAD5C77E; event FusePoolChanged(uint256 indexed newFusePoolId, address indexed oldCToken, address indexed newCToken); // solhint-disable no-empty-blocks constructor( address _pool, address _swapManager, address _receiptToken ) CompoundStrategy(_pool, _swapManager, _receiptToken) {} // solhint-enable no-empty-blocks /** * @notice Calculate total value using underlying token * @dev Report total value in collateral token */ function totalValue() external view override returns (uint256 _totalValue) { } /** * @notice Changes the underlying Fuse Pool to a new one * @dev Redeems cTokens from current fuse pool and mints cTokens of new Fuse Pool * @param _newPoolId Fuse Pool ID */ function migrateFusePool(uint256 _newPoolId) external virtual onlyGovernor { address _newCToken = _cTokenByUnderlying(_newPoolId, address(collateralToken)); require(address(cToken) != _newCToken, "same-fuse-pool"); require(<FILL_ME>) uint256 _collateralBalance = collateralToken.balanceOf(address(this)); collateralToken.safeApprove(_newCToken, _collateralBalance); require(CToken(_newCToken).mint(_collateralBalance) == 0, "deposit-to-fuse-pool-failed"); emit FusePoolChanged(_newPoolId, address(cToken), _newCToken); cToken = CToken(_newCToken); receiptToken = _newCToken; } function isReservedToken(address _token) public view override returns (bool) { } /** * @notice Gets the cToken to mint for a Fuse Pool * @param _poolId Fuse Pool ID * @param _collateralToken address of the collateralToken */ function _cTokenByUnderlying(uint256 _poolId, address _collateralToken) internal view returns (address) { } // solhint-disable-next-line function _beforeMigration(address _newStrategy) internal override {} /** * @notice Calculate earning and withdraw it from Rari Fuse * @dev If somehow we got some collateral token in strategy then we want to * include those in profit. That's why we used 'return' outside 'if' condition. * @param _totalDebt Total collateral debt of this strategy * @return profit in collateral token */ function _realizeProfit(uint256 _totalDebt) internal override returns (uint256) { } }
cToken.redeem(cToken.balanceOf(address(this)))==0,"withdraw-from-fuse-pool-failed"
316,757
cToken.redeem(cToken.balanceOf(address(this)))==0
"deposit-to-fuse-pool-failed"
// SPDX-License-Identifier: MIT pragma solidity 0.8.3; import "../compound/CompoundStrategy.sol"; import "../../interfaces/rari-fuse/IComptroller.sol"; import "../../interfaces/rari-fuse/IFusePoolDirectory.sol"; /// @title This strategy will deposit collateral token in a Rari Fuse Pool and earn interest. abstract contract RariFuseStrategy is CompoundStrategy { using SafeERC20 for IERC20; address private constant FUSE_POOL_DIRECTORY = 0x835482FE0532f169024d5E9410199369aAD5C77E; event FusePoolChanged(uint256 indexed newFusePoolId, address indexed oldCToken, address indexed newCToken); // solhint-disable no-empty-blocks constructor( address _pool, address _swapManager, address _receiptToken ) CompoundStrategy(_pool, _swapManager, _receiptToken) {} // solhint-enable no-empty-blocks /** * @notice Calculate total value using underlying token * @dev Report total value in collateral token */ function totalValue() external view override returns (uint256 _totalValue) { } /** * @notice Changes the underlying Fuse Pool to a new one * @dev Redeems cTokens from current fuse pool and mints cTokens of new Fuse Pool * @param _newPoolId Fuse Pool ID */ function migrateFusePool(uint256 _newPoolId) external virtual onlyGovernor { address _newCToken = _cTokenByUnderlying(_newPoolId, address(collateralToken)); require(address(cToken) != _newCToken, "same-fuse-pool"); require(cToken.redeem(cToken.balanceOf(address(this))) == 0, "withdraw-from-fuse-pool-failed"); uint256 _collateralBalance = collateralToken.balanceOf(address(this)); collateralToken.safeApprove(_newCToken, _collateralBalance); require(<FILL_ME>) emit FusePoolChanged(_newPoolId, address(cToken), _newCToken); cToken = CToken(_newCToken); receiptToken = _newCToken; } function isReservedToken(address _token) public view override returns (bool) { } /** * @notice Gets the cToken to mint for a Fuse Pool * @param _poolId Fuse Pool ID * @param _collateralToken address of the collateralToken */ function _cTokenByUnderlying(uint256 _poolId, address _collateralToken) internal view returns (address) { } // solhint-disable-next-line function _beforeMigration(address _newStrategy) internal override {} /** * @notice Calculate earning and withdraw it from Rari Fuse * @dev If somehow we got some collateral token in strategy then we want to * include those in profit. That's why we used 'return' outside 'if' condition. * @param _totalDebt Total collateral debt of this strategy * @return profit in collateral token */ function _realizeProfit(uint256 _totalDebt) internal override returns (uint256) { } }
CToken(_newCToken).mint(_collateralBalance)==0,"deposit-to-fuse-pool-failed"
316,757
CToken(_newCToken).mint(_collateralBalance)==0
null
pragma solidity 0.4.25; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { } } /** * @title 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 Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { } } /** * @title 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 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 constant returns (uint256 remaining) { } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { } } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure. * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { function safeTransfer(ERC20Basic token, address to, uint256 value) internal { } function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal { } function safeApprove(ERC20 token, address spender, uint256 value) internal { } } /** * @title TokenTimelock * @dev TokenTimelock is a token holder contract that will allow a * beneficiary to extract the tokens after a given release time */ contract TokenTimelock { using SafeERC20 for ERC20Basic; // ERC20 basic token contract being held ERC20Basic public token; // beneficiary of tokens after they are released address public beneficiary; // timestamp when token release is enabled uint64 public releaseTime; constructor(ERC20Basic _token, address _beneficiary, uint64 _releaseTime) public { } /** * @notice Transfers tokens held by timelock to beneficiary. */ function release() public { } } contract Owned { address public owner; constructor() public { } modifier onlyOwner { } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { } } contract BitwingsToken is BurnableToken, Owned { string public constant name = "BITWINGS TOKEN"; string public constant symbol = "BWN"; uint8 public constant decimals = 18; /// Maximum tokens to be allocated (300 million BWN) uint256 public constant HARD_CAP = 300000000 * 10**uint256(decimals); /// This address will hold the Bitwings team and advisors tokens address public teamAdvisorsTokensAddress; /// This address is used to keep the tokens for sale address public saleTokensAddress; /// This address is used to keep the reserve tokens address public reserveTokensAddress; /// This address is used to keep the tokens for Gold founder, bounty and airdrop address public bountyAirdropTokensAddress; /// This address is used to keep the tokens for referrals address public referralTokensAddress; /// when the token sale is closed, the unsold tokens are allocated to the reserve bool public saleClosed = false; /// Some addresses are whitelisted in order to be able to distribute advisors tokens before the trading is open mapping(address => bool) public whitelisted; /// Only allowed to execute before the token sale is closed modifier beforeSaleClosed { require(<FILL_ME>) _; } constructor(address _teamAdvisorsTokensAddress, address _reserveTokensAddress, address _saleTokensAddress, address _bountyAirdropTokensAddress, address _referralTokensAddress) public { } /// @dev reallocates the unsold tokens function closeSale() external onlyOwner beforeSaleClosed { } /// @dev whitelist an address so it's able to transfer /// before the trading is opened function whitelist(address _address) external onlyOwner { } /// @dev Trading limited function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { } /// @dev Trading limited function transfer(address _to, uint256 _value) public returns (bool) { } }
!saleClosed
316,779
!saleClosed
null
contract ShopinToken is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Shopin Token"; // solium-disable-line uppercase string public constant symbol = "SHOP"; // solium-disable-line uppercase uint8 public constant decimals = 9; // solium-disable-line uppercase constructor( uint256 _totalSupply ) Ownable() public { } function bulkAssign( address[] _investorWallets, uint256[] _investorAmounts ) external onlyOwner { require(_investorWallets.length > 0 && _investorWallets.length == _investorAmounts.length); uint256 i; for (i = 0; i < _investorWallets.length; i++) { require(<FILL_ME>) // ensure no zero address require(_investorAmounts[i] > 0); // cannot assign zero amount to an investor } // Token distribution for (i = 0; i < _investorWallets.length; i++) { // subtract the current investor tokens from total investor reserves // set the balance for the current investor // balances[msg.sender] = balances[msg.sender].sub(_investorAmounts[i]); // balances[_investorWallets[i]] = balances[_investorWallets[i]].add(_investorAmounts[i]); super.transfer(_investorWallets[i], _investorAmounts[i]); // emit Transfer(0x0, _investorWallets[i], _investorAmounts[i]); } } }
_investorWallets[i]!=address(0)
316,830
_investorWallets[i]!=address(0)
null
contract ShopinToken is StandardToken, Ownable { using SafeMath for uint256; string public constant name = "Shopin Token"; // solium-disable-line uppercase string public constant symbol = "SHOP"; // solium-disable-line uppercase uint8 public constant decimals = 9; // solium-disable-line uppercase constructor( uint256 _totalSupply ) Ownable() public { } function bulkAssign( address[] _investorWallets, uint256[] _investorAmounts ) external onlyOwner { require(_investorWallets.length > 0 && _investorWallets.length == _investorAmounts.length); uint256 i; for (i = 0; i < _investorWallets.length; i++) { require(_investorWallets[i] != address(0)); // ensure no zero address require(<FILL_ME>) // cannot assign zero amount to an investor } // Token distribution for (i = 0; i < _investorWallets.length; i++) { // subtract the current investor tokens from total investor reserves // set the balance for the current investor // balances[msg.sender] = balances[msg.sender].sub(_investorAmounts[i]); // balances[_investorWallets[i]] = balances[_investorWallets[i]].add(_investorAmounts[i]); super.transfer(_investorWallets[i], _investorAmounts[i]); // emit Transfer(0x0, _investorWallets[i], _investorAmounts[i]); } } }
_investorAmounts[i]>0
316,830
_investorAmounts[i]>0
null
pragma solidity ^0.4.17; //Developed by Zenos Pavlakou 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; /** * The address whcih deploys this contrcat is automatically assgined ownership. * */ function Ownable() public { } /** * Functions with this modifier can only be executed by the owner of the contract. * */ modifier onlyOwner { } } 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); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant public 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, Ownable { using SafeMath for uint256; mapping (address => uint256) balances; modifier onlyPayloadSize(uint size) { } /** * Transfers ACO tokens from the sender's account to another given account. * * @param _to The address of the recipient. * @param _amount The amount of tokens to send. * */ function transfer(address _to, uint256 _amount) public onlyPayloadSize(2 * 32) returns (bool) { } /** * Returns the balance of a given address. * * @param _addr The address of the balance to query. **/ function balanceOf(address _addr) public constant returns (uint256) { } } contract AdvancedToken is BasicToken, ERC20 { mapping (address => mapping (address => uint256)) allowances; /** * Transfers tokens from the account of the owner by an approved spender. * The spender cannot spend more than the approved amount. * * @param _from The address of the owners account. * @param _amount The amount of tokens to transfer. * */ function transferFrom(address _from, address _to, uint256 _amount) public onlyPayloadSize(3 * 32) returns (bool) { require(<FILL_ME>) allowances[_from][msg.sender] = allowances[_from][msg.sender].sub(_amount); balances[_from] = balances[_from].sub(_amount); balances[_to] = balances[_to].add(_amount); Transfer(_from, _to, _amount); return true; } /** * Allows another account to spend a given amount of tokens on behalf of the * owner's account. If the owner has previously allowed a spender to spend * tokens on his or her behalf and would like to change the approval amount, * he or she will first have to set the allowance back to 0 and then update * the allowance. * * @param _spender The address of the spenders account. * @param _amount The amount of tokens the spender is allowed to spend. * */ function approve(address _spender, uint256 _amount) public returns (bool) { } /** * Returns the approved allowance from an owners account to a spenders account. * * @param _owner The address of the owners account. * @param _spender The address of the spenders account. **/ function allowance(address _owner, address _spender) public constant returns (uint256) { } } contract MintableToken is AdvancedToken { bool public mintingFinished; event TokensMinted(address indexed to, uint256 amount); event MintingFinished(); /** * Generates new ACO tokens during the ICO, after which the minting period * will terminate permenantly. This function can only be called by the ICO * contract. * * @param _to The address of the account to mint new tokens to. * @param _amount The amount of tokens to mint. * */ function mint(address _to, uint256 _amount) external onlyOwner onlyPayloadSize(2 * 32) returns (bool) { } /** * Terminates the minting period permenantly. This function can only be called * by the ICO contract only when the duration of the ICO has ended. * */ function finishMinting() external onlyOwner { } /** * Returns true if the minting period has ended, false otherwhise. * */ function mintingFinished() public constant returns (bool) { } } contract ACO is MintableToken { uint8 public decimals; string public name; string public symbol; function ACO() public { } }
allowances[_from][msg.sender]>=_amount&&balances[_from]>=_amount
316,976
allowances[_from][msg.sender]>=_amount&&balances[_from]>=_amount
null
pragma solidity ^0.4.17; //Developed by Zenos Pavlakou 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; /** * The address whcih deploys this contrcat is automatically assgined ownership. * */ function Ownable() public { } /** * Functions with this modifier can only be executed by the owner of the contract. * */ modifier onlyOwner { } } 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); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) constant public 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, Ownable { using SafeMath for uint256; mapping (address => uint256) balances; modifier onlyPayloadSize(uint size) { } /** * Transfers ACO tokens from the sender's account to another given account. * * @param _to The address of the recipient. * @param _amount The amount of tokens to send. * */ function transfer(address _to, uint256 _amount) public onlyPayloadSize(2 * 32) returns (bool) { } /** * Returns the balance of a given address. * * @param _addr The address of the balance to query. **/ function balanceOf(address _addr) public constant returns (uint256) { } } contract AdvancedToken is BasicToken, ERC20 { mapping (address => mapping (address => uint256)) allowances; /** * Transfers tokens from the account of the owner by an approved spender. * The spender cannot spend more than the approved amount. * * @param _from The address of the owners account. * @param _amount The amount of tokens to transfer. * */ function transferFrom(address _from, address _to, uint256 _amount) public onlyPayloadSize(3 * 32) returns (bool) { } /** * Allows another account to spend a given amount of tokens on behalf of the * owner's account. If the owner has previously allowed a spender to spend * tokens on his or her behalf and would like to change the approval amount, * he or she will first have to set the allowance back to 0 and then update * the allowance. * * @param _spender The address of the spenders account. * @param _amount The amount of tokens the spender is allowed to spend. * */ function approve(address _spender, uint256 _amount) public returns (bool) { require(<FILL_ME>) allowances[msg.sender][_spender] = _amount; Approval(msg.sender, _spender, _amount); return true; } /** * Returns the approved allowance from an owners account to a spenders account. * * @param _owner The address of the owners account. * @param _spender The address of the spenders account. **/ function allowance(address _owner, address _spender) public constant returns (uint256) { } } contract MintableToken is AdvancedToken { bool public mintingFinished; event TokensMinted(address indexed to, uint256 amount); event MintingFinished(); /** * Generates new ACO tokens during the ICO, after which the minting period * will terminate permenantly. This function can only be called by the ICO * contract. * * @param _to The address of the account to mint new tokens to. * @param _amount The amount of tokens to mint. * */ function mint(address _to, uint256 _amount) external onlyOwner onlyPayloadSize(2 * 32) returns (bool) { } /** * Terminates the minting period permenantly. This function can only be called * by the ICO contract only when the duration of the ICO has ended. * */ function finishMinting() external onlyOwner { } /** * Returns true if the minting period has ended, false otherwhise. * */ function mintingFinished() public constant returns (bool) { } } contract ACO is MintableToken { uint8 public decimals; string public name; string public symbol; function ACO() public { } }
(_amount==0)||(allowances[msg.sender][_spender]==0)
316,976
(_amount==0)||(allowances[msg.sender][_spender]==0)
null
/** * @title TokenCappedCrowdsale * @dev Extension of Crowdsale with a max amount of tokens sold */ contract TokenCappedCrowdsale is Crowdsale { using SafeMath for uint256; uint256 public tokenSold; uint256 public tokenPresaleCap; uint256 public tokenPresaleSold; uint256 public saleStartTime; uint256 public totalTokenSaleCap; /** * @dev Constructor, takes presal cap, maximum number of tokens to be minted by the crowdsale and start date of regular sale period. * @param _tokenPresaleCap Max number of tokens to be sold during presale * @param _totalTokenSaleCap Max number of tokens to be minted * @param _saleStartTime Start date of the sale period */ function TokenCappedCrowdsale(uint256 _tokenPresaleCap, uint256 _totalTokenSaleCap, uint256 _saleStartTime) public { } /** * @dev Checks whether the cap has been reached. * @return Whether the cap was reached */ function tokenCapReached() public view returns (bool) { } /** * @dev Extend parent behavior requiring purchase to respect the minting cap. * @param _beneficiary Token purchaser * @param _weiAmount Amount of wei contributed */ function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal { super._preValidatePurchase(_beneficiary, _weiAmount); // calculate token amount to be created uint256 tokenAmount = _getTokenAmount(_weiAmount); // Enforce presale cap before the begining of the sale if (block.timestamp < saleStartTime) { require(<FILL_ME>) } else { // Enfore total (presale + sale) token cap once the sale has started require(tokenSold.add(tokenAmount) <= totalTokenSaleCap); } } /** * @dev Extend parent behavior updating the number of token sold. * @param _beneficiary Address receiving the tokens * @param _tokenAmount Number of tokens to be purchased */ function _processPurchase(address _beneficiary, uint256 _tokenAmount) internal { } }
tokenPresaleSold.add(tokenAmount)<=tokenPresaleCap
317,049
tokenPresaleSold.add(tokenAmount)<=tokenPresaleCap
null
/** * @title TokenCappedCrowdsale * @dev Extension of Crowdsale with a max amount of tokens sold */ contract TokenCappedCrowdsale is Crowdsale { using SafeMath for uint256; uint256 public tokenSold; uint256 public tokenPresaleCap; uint256 public tokenPresaleSold; uint256 public saleStartTime; uint256 public totalTokenSaleCap; /** * @dev Constructor, takes presal cap, maximum number of tokens to be minted by the crowdsale and start date of regular sale period. * @param _tokenPresaleCap Max number of tokens to be sold during presale * @param _totalTokenSaleCap Max number of tokens to be minted * @param _saleStartTime Start date of the sale period */ function TokenCappedCrowdsale(uint256 _tokenPresaleCap, uint256 _totalTokenSaleCap, uint256 _saleStartTime) public { } /** * @dev Checks whether the cap has been reached. * @return Whether the cap was reached */ function tokenCapReached() public view returns (bool) { } /** * @dev Extend parent behavior requiring purchase to respect the minting cap. * @param _beneficiary Token purchaser * @param _weiAmount Amount of wei contributed */ function _preValidatePurchase(address _beneficiary, uint256 _weiAmount) internal { super._preValidatePurchase(_beneficiary, _weiAmount); // calculate token amount to be created uint256 tokenAmount = _getTokenAmount(_weiAmount); // Enforce presale cap before the begining of the sale if (block.timestamp < saleStartTime) { require(tokenPresaleSold.add(tokenAmount) <= tokenPresaleCap); } else { // Enfore total (presale + sale) token cap once the sale has started require(<FILL_ME>) } } /** * @dev Extend parent behavior updating the number of token sold. * @param _beneficiary Address receiving the tokens * @param _tokenAmount Number of tokens to be purchased */ function _processPurchase(address _beneficiary, uint256 _tokenAmount) internal { } }
tokenSold.add(tokenAmount)<=totalTokenSaleCap
317,049
tokenSold.add(tokenAmount)<=totalTokenSaleCap
null
/** * @title Pausable token * @dev StandardToken modified with pausable transfers. **/ contract PausableToken is StandardToken, Pausable { function transfer( address _to, uint256 _value ) public whenNotPaused returns (bool) { } function transferFrom( address _from, address _to, uint256 _value ) public whenNotPaused returns (bool) { } function approve( address _spender, uint256 _value ) public whenNotPaused returns (bool) { } function increaseApproval( address _spender, uint _addedValue ) public whenNotPaused returns (bool success) { } function decreaseApproval( address _spender, uint _subtractedValue ) public whenNotPaused returns (bool success) { } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ASD { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function burn(uint256 _value) public; } contract AscendEXSouvenir is PausableToken { using SafeMath for uint256; string public constant name = "AscendEX Souvenir token"; string public constant symbol = "ASDS"; uint8 public constant decimals = 18; uint256 public constant limit = 100 * 10**8 * 10 ** 18; // AscendEX token smart contract address address private ASDAddress = 0xff742d05420B6Aca4481F635aD8341F81A6300C2; constructor() public { } function setASDAddress(address _newAddress) public onlyOwner { } // burn by contract and swap ASDS to contract address function swap(uint256 _value) public onlyOwner returns (bool) { require(<FILL_ME>) ASD asd = ASD(ASDAddress); asd.burn(_value); totalSupply_ = totalSupply_.add(_value); balances[this] = balances[this].add(_value); emit Transfer(address(0), this, _value); return true; } // burn by contract but swap ASDS to _to address function swapto(address _to,uint256 _value) public onlyOwner returns (bool) { } // fill burn ASD token by others function fill() public onlyOwner returns (bool) { } function send(address _to, uint256 _value) public onlyOwner whenNotPaused returns (bool) { } }
totalSupply_.add(_value)<=limit
317,057
totalSupply_.add(_value)<=limit
'PublicSale: Deposit limits reached!'
//SPDX-License-Identifier: Unlicensed pragma solidity 0.8.4; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import { InvestorsVesting, IVesting } from './InvestorsVesting.sol'; import { LiquidityProvider, ILiquidityProvider } from './LiquidityProvider.sol'; import './CliffVesting.sol'; import './interfaces/IPublicSale.sol'; import './interfaces/IOneUp.sol'; contract PublicSale is IPublicSale, Ownable { using SafeMath for uint256; bool public privateSaleFinished; bool public liquidityPoolCreated; IOneUp public oneUpToken; IVesting public immutable vesting; ILiquidityProvider public immutable lpProvider; address public reserveLockContract; address public marketingLockContract; address public developerLockContract; address payable public immutable publicSaleFund; uint256 public totalDeposits; uint256 public publicSaleStartTimestamp; uint256 public publicSaleFinishedAt; uint256 public constant PUBLIC_SALE_DELAY = 7 days; uint256 public constant LP_CREATION_DELAY = 30 minutes; uint256 public constant TRADING_BLOCK_DELAY = 15 minutes; uint256 public constant WHITELISTED_USERS_ACCESS = 2 hours; uint256 public constant PUBLIC_SALE_LOCK_PERCENT = 5000; // 50% of tokens uint256 public constant PRIVATE_SALE_LOCK_PERCENT = 1500; // 15% of tokens uint256 public constant PUBLIC_SALE_PRICE = 151000; // 1 ETH = 151,000 token uint256 public constant HARD_CAP_ETH_AMOUNT = 300 ether; uint256 public constant MIN_DEPOSIT_ETH_AMOUNT = 0.1 ether; uint256 public constant MAX_DEPOSIT_ETH_AMOUNT = 3 ether; mapping(address => uint256) internal _deposits; mapping(address => uint256) internal _whitelistedAmount; event Deposited(address indexed user, uint256 amount); event Recovered(address token, uint256 amount); event EmergencyWithdrawn(address user, uint256 amount); event UsersWhitelisted(address[] users, uint256 maxAmount); // ------------------------ // CONSTRUCTOR // ------------------------ constructor(address oneUpToken_, address payable publicSaleFund_, address uniswapRouter_) { } // ------------------------ // PAYABLE RECEIVE // ------------------------ /// @notice Public receive method which accepts ETH /// @dev It can be called ONLY when private sale finished, and public sale is active receive() external payable { } function deposit() public payable { require(privateSaleFinished, 'PublicSale: Private sale not finished yet!'); require(publicSaleFinishedAt == 0, 'PublicSale: Public sale already ended!'); require(block.timestamp >= publicSaleStartTimestamp && block.timestamp <= publicSaleStartTimestamp.add(PUBLIC_SALE_DELAY), 'PublicSale: Time was reached!'); require(<FILL_ME>) require(_deposits[msg.sender].add(msg.value) >= MIN_DEPOSIT_ETH_AMOUNT && _deposits[msg.sender].add(msg.value) <= MAX_DEPOSIT_ETH_AMOUNT, 'PublicSale: Limit is reached or not enough amount!'); // Check the whitelisted status during the the first 2 hours if (block.timestamp < publicSaleStartTimestamp.add(WHITELISTED_USERS_ACCESS)) { require(_whitelistedAmount[msg.sender] > 0, 'PublicSale: Its time for whitelisted investors only!'); require(_whitelistedAmount[msg.sender] >= msg.value, 'PublicSale: Sent amount should not be bigger from allowed limit!'); _whitelistedAmount[msg.sender] = _whitelistedAmount[msg.sender].sub(msg.value); } _deposits[msg.sender] = _deposits[msg.sender].add(msg.value); totalDeposits = totalDeposits.add(msg.value); uint256 tokenAmount = msg.value.mul(PUBLIC_SALE_PRICE); vesting.submit(msg.sender, tokenAmount, PUBLIC_SALE_LOCK_PERCENT); emit Deposited(msg.sender, msg.value); } // ------------------------ // SETTERS (PUBLIC) // ------------------------ /// @notice Finish public sale /// @dev It can be called by anyone, if deadline or hard cap was reached function endPublicSale() external override { } /// @notice Distribute collected ETH between company/liquidity provider and create liquidity pool /// @dev It can be called by anyone, after LP_CREATION_DELAY from public sale finish function addLiquidity() external override { } /// @notice Investor withdraw invested funds /// @dev Method will be available after 1 day if liquidity was not added function emergencyWithdrawFunds() external override { } // ------------------------ // SETTERS (OWNABLE) // ------------------------ /// @notice Admin can manually add private sale investors with this method /// @dev It can be called ONLY during private sale, also lengths of addresses and investments should be equal /// @param investors Array of investors addresses /// @param amounts Tokens Amount which investors needs to receive (INVESTED ETH * 200.000) function addPrivateAllocations(address[] memory investors, uint256[] memory amounts) external override onlyOwner { } /// @notice Finish private sale and start public sale /// @dev It can be called once and ONLY during private sale, by admin function endPrivateSale() external override onlyOwner { } /// @notice Recover contract based tokens /// @dev Should be called by admin only to recover lost tokens function recoverERC20(address tokenAddress) external override onlyOwner { } /// @notice Recover locked LP tokens when time reached /// @dev Should be called by admin only, and tokens will be transferred to the owner address function recoverLpToken(address lPTokenAddress) external override onlyOwner { } /// @notice Mint and lock tokens for team, marketing, reserve /// @dev Only admin can call it once, after liquidity pool creation function lockCompanyTokens(address developerReceiver, address marketingReceiver, address reserveReceiver) external override { } /// @notice Whitelist public sale privileged users /// @dev This users allowed to invest during the first 2 hours /// @param users list of addresses /// @param maxEthDeposit max amount of ETH which users allowed to invest during this period function whitelistUsers(address[] calldata users, uint256 maxEthDeposit) external override onlyOwner { } // ------------------------ // GETTERS // ------------------------ /// @notice Returns how much provided user can invest during the first 2 hours (if whitelisted) /// @param user address function getWhitelistedAmount(address user) external override view returns (uint256) { } /// @notice Returns how much user invested during the whole public sale /// @param user address function getUserDeposits(address user) external override view returns (uint256) { } function getTotalDeposits() external view returns (uint256) { } }
totalDeposits.add(msg.value)<=HARD_CAP_ETH_AMOUNT,'PublicSale: Deposit limits reached!'
317,147
totalDeposits.add(msg.value)<=HARD_CAP_ETH_AMOUNT
'PublicSale: Limit is reached or not enough amount!'
//SPDX-License-Identifier: Unlicensed pragma solidity 0.8.4; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import { InvestorsVesting, IVesting } from './InvestorsVesting.sol'; import { LiquidityProvider, ILiquidityProvider } from './LiquidityProvider.sol'; import './CliffVesting.sol'; import './interfaces/IPublicSale.sol'; import './interfaces/IOneUp.sol'; contract PublicSale is IPublicSale, Ownable { using SafeMath for uint256; bool public privateSaleFinished; bool public liquidityPoolCreated; IOneUp public oneUpToken; IVesting public immutable vesting; ILiquidityProvider public immutable lpProvider; address public reserveLockContract; address public marketingLockContract; address public developerLockContract; address payable public immutable publicSaleFund; uint256 public totalDeposits; uint256 public publicSaleStartTimestamp; uint256 public publicSaleFinishedAt; uint256 public constant PUBLIC_SALE_DELAY = 7 days; uint256 public constant LP_CREATION_DELAY = 30 minutes; uint256 public constant TRADING_BLOCK_DELAY = 15 minutes; uint256 public constant WHITELISTED_USERS_ACCESS = 2 hours; uint256 public constant PUBLIC_SALE_LOCK_PERCENT = 5000; // 50% of tokens uint256 public constant PRIVATE_SALE_LOCK_PERCENT = 1500; // 15% of tokens uint256 public constant PUBLIC_SALE_PRICE = 151000; // 1 ETH = 151,000 token uint256 public constant HARD_CAP_ETH_AMOUNT = 300 ether; uint256 public constant MIN_DEPOSIT_ETH_AMOUNT = 0.1 ether; uint256 public constant MAX_DEPOSIT_ETH_AMOUNT = 3 ether; mapping(address => uint256) internal _deposits; mapping(address => uint256) internal _whitelistedAmount; event Deposited(address indexed user, uint256 amount); event Recovered(address token, uint256 amount); event EmergencyWithdrawn(address user, uint256 amount); event UsersWhitelisted(address[] users, uint256 maxAmount); // ------------------------ // CONSTRUCTOR // ------------------------ constructor(address oneUpToken_, address payable publicSaleFund_, address uniswapRouter_) { } // ------------------------ // PAYABLE RECEIVE // ------------------------ /// @notice Public receive method which accepts ETH /// @dev It can be called ONLY when private sale finished, and public sale is active receive() external payable { } function deposit() public payable { require(privateSaleFinished, 'PublicSale: Private sale not finished yet!'); require(publicSaleFinishedAt == 0, 'PublicSale: Public sale already ended!'); require(block.timestamp >= publicSaleStartTimestamp && block.timestamp <= publicSaleStartTimestamp.add(PUBLIC_SALE_DELAY), 'PublicSale: Time was reached!'); require(totalDeposits.add(msg.value) <= HARD_CAP_ETH_AMOUNT, 'PublicSale: Deposit limits reached!'); require(<FILL_ME>) // Check the whitelisted status during the the first 2 hours if (block.timestamp < publicSaleStartTimestamp.add(WHITELISTED_USERS_ACCESS)) { require(_whitelistedAmount[msg.sender] > 0, 'PublicSale: Its time for whitelisted investors only!'); require(_whitelistedAmount[msg.sender] >= msg.value, 'PublicSale: Sent amount should not be bigger from allowed limit!'); _whitelistedAmount[msg.sender] = _whitelistedAmount[msg.sender].sub(msg.value); } _deposits[msg.sender] = _deposits[msg.sender].add(msg.value); totalDeposits = totalDeposits.add(msg.value); uint256 tokenAmount = msg.value.mul(PUBLIC_SALE_PRICE); vesting.submit(msg.sender, tokenAmount, PUBLIC_SALE_LOCK_PERCENT); emit Deposited(msg.sender, msg.value); } // ------------------------ // SETTERS (PUBLIC) // ------------------------ /// @notice Finish public sale /// @dev It can be called by anyone, if deadline or hard cap was reached function endPublicSale() external override { } /// @notice Distribute collected ETH between company/liquidity provider and create liquidity pool /// @dev It can be called by anyone, after LP_CREATION_DELAY from public sale finish function addLiquidity() external override { } /// @notice Investor withdraw invested funds /// @dev Method will be available after 1 day if liquidity was not added function emergencyWithdrawFunds() external override { } // ------------------------ // SETTERS (OWNABLE) // ------------------------ /// @notice Admin can manually add private sale investors with this method /// @dev It can be called ONLY during private sale, also lengths of addresses and investments should be equal /// @param investors Array of investors addresses /// @param amounts Tokens Amount which investors needs to receive (INVESTED ETH * 200.000) function addPrivateAllocations(address[] memory investors, uint256[] memory amounts) external override onlyOwner { } /// @notice Finish private sale and start public sale /// @dev It can be called once and ONLY during private sale, by admin function endPrivateSale() external override onlyOwner { } /// @notice Recover contract based tokens /// @dev Should be called by admin only to recover lost tokens function recoverERC20(address tokenAddress) external override onlyOwner { } /// @notice Recover locked LP tokens when time reached /// @dev Should be called by admin only, and tokens will be transferred to the owner address function recoverLpToken(address lPTokenAddress) external override onlyOwner { } /// @notice Mint and lock tokens for team, marketing, reserve /// @dev Only admin can call it once, after liquidity pool creation function lockCompanyTokens(address developerReceiver, address marketingReceiver, address reserveReceiver) external override { } /// @notice Whitelist public sale privileged users /// @dev This users allowed to invest during the first 2 hours /// @param users list of addresses /// @param maxEthDeposit max amount of ETH which users allowed to invest during this period function whitelistUsers(address[] calldata users, uint256 maxEthDeposit) external override onlyOwner { } // ------------------------ // GETTERS // ------------------------ /// @notice Returns how much provided user can invest during the first 2 hours (if whitelisted) /// @param user address function getWhitelistedAmount(address user) external override view returns (uint256) { } /// @notice Returns how much user invested during the whole public sale /// @param user address function getUserDeposits(address user) external override view returns (uint256) { } function getTotalDeposits() external view returns (uint256) { } }
_deposits[msg.sender].add(msg.value)>=MIN_DEPOSIT_ETH_AMOUNT&&_deposits[msg.sender].add(msg.value)<=MAX_DEPOSIT_ETH_AMOUNT,'PublicSale: Limit is reached or not enough amount!'
317,147
_deposits[msg.sender].add(msg.value)>=MIN_DEPOSIT_ETH_AMOUNT&&_deposits[msg.sender].add(msg.value)<=MAX_DEPOSIT_ETH_AMOUNT
'PublicSale: Its time for whitelisted investors only!'
//SPDX-License-Identifier: Unlicensed pragma solidity 0.8.4; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import { InvestorsVesting, IVesting } from './InvestorsVesting.sol'; import { LiquidityProvider, ILiquidityProvider } from './LiquidityProvider.sol'; import './CliffVesting.sol'; import './interfaces/IPublicSale.sol'; import './interfaces/IOneUp.sol'; contract PublicSale is IPublicSale, Ownable { using SafeMath for uint256; bool public privateSaleFinished; bool public liquidityPoolCreated; IOneUp public oneUpToken; IVesting public immutable vesting; ILiquidityProvider public immutable lpProvider; address public reserveLockContract; address public marketingLockContract; address public developerLockContract; address payable public immutable publicSaleFund; uint256 public totalDeposits; uint256 public publicSaleStartTimestamp; uint256 public publicSaleFinishedAt; uint256 public constant PUBLIC_SALE_DELAY = 7 days; uint256 public constant LP_CREATION_DELAY = 30 minutes; uint256 public constant TRADING_BLOCK_DELAY = 15 minutes; uint256 public constant WHITELISTED_USERS_ACCESS = 2 hours; uint256 public constant PUBLIC_SALE_LOCK_PERCENT = 5000; // 50% of tokens uint256 public constant PRIVATE_SALE_LOCK_PERCENT = 1500; // 15% of tokens uint256 public constant PUBLIC_SALE_PRICE = 151000; // 1 ETH = 151,000 token uint256 public constant HARD_CAP_ETH_AMOUNT = 300 ether; uint256 public constant MIN_DEPOSIT_ETH_AMOUNT = 0.1 ether; uint256 public constant MAX_DEPOSIT_ETH_AMOUNT = 3 ether; mapping(address => uint256) internal _deposits; mapping(address => uint256) internal _whitelistedAmount; event Deposited(address indexed user, uint256 amount); event Recovered(address token, uint256 amount); event EmergencyWithdrawn(address user, uint256 amount); event UsersWhitelisted(address[] users, uint256 maxAmount); // ------------------------ // CONSTRUCTOR // ------------------------ constructor(address oneUpToken_, address payable publicSaleFund_, address uniswapRouter_) { } // ------------------------ // PAYABLE RECEIVE // ------------------------ /// @notice Public receive method which accepts ETH /// @dev It can be called ONLY when private sale finished, and public sale is active receive() external payable { } function deposit() public payable { require(privateSaleFinished, 'PublicSale: Private sale not finished yet!'); require(publicSaleFinishedAt == 0, 'PublicSale: Public sale already ended!'); require(block.timestamp >= publicSaleStartTimestamp && block.timestamp <= publicSaleStartTimestamp.add(PUBLIC_SALE_DELAY), 'PublicSale: Time was reached!'); require(totalDeposits.add(msg.value) <= HARD_CAP_ETH_AMOUNT, 'PublicSale: Deposit limits reached!'); require(_deposits[msg.sender].add(msg.value) >= MIN_DEPOSIT_ETH_AMOUNT && _deposits[msg.sender].add(msg.value) <= MAX_DEPOSIT_ETH_AMOUNT, 'PublicSale: Limit is reached or not enough amount!'); // Check the whitelisted status during the the first 2 hours if (block.timestamp < publicSaleStartTimestamp.add(WHITELISTED_USERS_ACCESS)) { require(<FILL_ME>) require(_whitelistedAmount[msg.sender] >= msg.value, 'PublicSale: Sent amount should not be bigger from allowed limit!'); _whitelistedAmount[msg.sender] = _whitelistedAmount[msg.sender].sub(msg.value); } _deposits[msg.sender] = _deposits[msg.sender].add(msg.value); totalDeposits = totalDeposits.add(msg.value); uint256 tokenAmount = msg.value.mul(PUBLIC_SALE_PRICE); vesting.submit(msg.sender, tokenAmount, PUBLIC_SALE_LOCK_PERCENT); emit Deposited(msg.sender, msg.value); } // ------------------------ // SETTERS (PUBLIC) // ------------------------ /// @notice Finish public sale /// @dev It can be called by anyone, if deadline or hard cap was reached function endPublicSale() external override { } /// @notice Distribute collected ETH between company/liquidity provider and create liquidity pool /// @dev It can be called by anyone, after LP_CREATION_DELAY from public sale finish function addLiquidity() external override { } /// @notice Investor withdraw invested funds /// @dev Method will be available after 1 day if liquidity was not added function emergencyWithdrawFunds() external override { } // ------------------------ // SETTERS (OWNABLE) // ------------------------ /// @notice Admin can manually add private sale investors with this method /// @dev It can be called ONLY during private sale, also lengths of addresses and investments should be equal /// @param investors Array of investors addresses /// @param amounts Tokens Amount which investors needs to receive (INVESTED ETH * 200.000) function addPrivateAllocations(address[] memory investors, uint256[] memory amounts) external override onlyOwner { } /// @notice Finish private sale and start public sale /// @dev It can be called once and ONLY during private sale, by admin function endPrivateSale() external override onlyOwner { } /// @notice Recover contract based tokens /// @dev Should be called by admin only to recover lost tokens function recoverERC20(address tokenAddress) external override onlyOwner { } /// @notice Recover locked LP tokens when time reached /// @dev Should be called by admin only, and tokens will be transferred to the owner address function recoverLpToken(address lPTokenAddress) external override onlyOwner { } /// @notice Mint and lock tokens for team, marketing, reserve /// @dev Only admin can call it once, after liquidity pool creation function lockCompanyTokens(address developerReceiver, address marketingReceiver, address reserveReceiver) external override { } /// @notice Whitelist public sale privileged users /// @dev This users allowed to invest during the first 2 hours /// @param users list of addresses /// @param maxEthDeposit max amount of ETH which users allowed to invest during this period function whitelistUsers(address[] calldata users, uint256 maxEthDeposit) external override onlyOwner { } // ------------------------ // GETTERS // ------------------------ /// @notice Returns how much provided user can invest during the first 2 hours (if whitelisted) /// @param user address function getWhitelistedAmount(address user) external override view returns (uint256) { } /// @notice Returns how much user invested during the whole public sale /// @param user address function getUserDeposits(address user) external override view returns (uint256) { } function getTotalDeposits() external view returns (uint256) { } }
_whitelistedAmount[msg.sender]>0,'PublicSale: Its time for whitelisted investors only!'
317,147
_whitelistedAmount[msg.sender]>0
'PublicSale: Sent amount should not be bigger from allowed limit!'
//SPDX-License-Identifier: Unlicensed pragma solidity 0.8.4; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import { InvestorsVesting, IVesting } from './InvestorsVesting.sol'; import { LiquidityProvider, ILiquidityProvider } from './LiquidityProvider.sol'; import './CliffVesting.sol'; import './interfaces/IPublicSale.sol'; import './interfaces/IOneUp.sol'; contract PublicSale is IPublicSale, Ownable { using SafeMath for uint256; bool public privateSaleFinished; bool public liquidityPoolCreated; IOneUp public oneUpToken; IVesting public immutable vesting; ILiquidityProvider public immutable lpProvider; address public reserveLockContract; address public marketingLockContract; address public developerLockContract; address payable public immutable publicSaleFund; uint256 public totalDeposits; uint256 public publicSaleStartTimestamp; uint256 public publicSaleFinishedAt; uint256 public constant PUBLIC_SALE_DELAY = 7 days; uint256 public constant LP_CREATION_DELAY = 30 minutes; uint256 public constant TRADING_BLOCK_DELAY = 15 minutes; uint256 public constant WHITELISTED_USERS_ACCESS = 2 hours; uint256 public constant PUBLIC_SALE_LOCK_PERCENT = 5000; // 50% of tokens uint256 public constant PRIVATE_SALE_LOCK_PERCENT = 1500; // 15% of tokens uint256 public constant PUBLIC_SALE_PRICE = 151000; // 1 ETH = 151,000 token uint256 public constant HARD_CAP_ETH_AMOUNT = 300 ether; uint256 public constant MIN_DEPOSIT_ETH_AMOUNT = 0.1 ether; uint256 public constant MAX_DEPOSIT_ETH_AMOUNT = 3 ether; mapping(address => uint256) internal _deposits; mapping(address => uint256) internal _whitelistedAmount; event Deposited(address indexed user, uint256 amount); event Recovered(address token, uint256 amount); event EmergencyWithdrawn(address user, uint256 amount); event UsersWhitelisted(address[] users, uint256 maxAmount); // ------------------------ // CONSTRUCTOR // ------------------------ constructor(address oneUpToken_, address payable publicSaleFund_, address uniswapRouter_) { } // ------------------------ // PAYABLE RECEIVE // ------------------------ /// @notice Public receive method which accepts ETH /// @dev It can be called ONLY when private sale finished, and public sale is active receive() external payable { } function deposit() public payable { require(privateSaleFinished, 'PublicSale: Private sale not finished yet!'); require(publicSaleFinishedAt == 0, 'PublicSale: Public sale already ended!'); require(block.timestamp >= publicSaleStartTimestamp && block.timestamp <= publicSaleStartTimestamp.add(PUBLIC_SALE_DELAY), 'PublicSale: Time was reached!'); require(totalDeposits.add(msg.value) <= HARD_CAP_ETH_AMOUNT, 'PublicSale: Deposit limits reached!'); require(_deposits[msg.sender].add(msg.value) >= MIN_DEPOSIT_ETH_AMOUNT && _deposits[msg.sender].add(msg.value) <= MAX_DEPOSIT_ETH_AMOUNT, 'PublicSale: Limit is reached or not enough amount!'); // Check the whitelisted status during the the first 2 hours if (block.timestamp < publicSaleStartTimestamp.add(WHITELISTED_USERS_ACCESS)) { require(_whitelistedAmount[msg.sender] > 0, 'PublicSale: Its time for whitelisted investors only!'); require(<FILL_ME>) _whitelistedAmount[msg.sender] = _whitelistedAmount[msg.sender].sub(msg.value); } _deposits[msg.sender] = _deposits[msg.sender].add(msg.value); totalDeposits = totalDeposits.add(msg.value); uint256 tokenAmount = msg.value.mul(PUBLIC_SALE_PRICE); vesting.submit(msg.sender, tokenAmount, PUBLIC_SALE_LOCK_PERCENT); emit Deposited(msg.sender, msg.value); } // ------------------------ // SETTERS (PUBLIC) // ------------------------ /// @notice Finish public sale /// @dev It can be called by anyone, if deadline or hard cap was reached function endPublicSale() external override { } /// @notice Distribute collected ETH between company/liquidity provider and create liquidity pool /// @dev It can be called by anyone, after LP_CREATION_DELAY from public sale finish function addLiquidity() external override { } /// @notice Investor withdraw invested funds /// @dev Method will be available after 1 day if liquidity was not added function emergencyWithdrawFunds() external override { } // ------------------------ // SETTERS (OWNABLE) // ------------------------ /// @notice Admin can manually add private sale investors with this method /// @dev It can be called ONLY during private sale, also lengths of addresses and investments should be equal /// @param investors Array of investors addresses /// @param amounts Tokens Amount which investors needs to receive (INVESTED ETH * 200.000) function addPrivateAllocations(address[] memory investors, uint256[] memory amounts) external override onlyOwner { } /// @notice Finish private sale and start public sale /// @dev It can be called once and ONLY during private sale, by admin function endPrivateSale() external override onlyOwner { } /// @notice Recover contract based tokens /// @dev Should be called by admin only to recover lost tokens function recoverERC20(address tokenAddress) external override onlyOwner { } /// @notice Recover locked LP tokens when time reached /// @dev Should be called by admin only, and tokens will be transferred to the owner address function recoverLpToken(address lPTokenAddress) external override onlyOwner { } /// @notice Mint and lock tokens for team, marketing, reserve /// @dev Only admin can call it once, after liquidity pool creation function lockCompanyTokens(address developerReceiver, address marketingReceiver, address reserveReceiver) external override { } /// @notice Whitelist public sale privileged users /// @dev This users allowed to invest during the first 2 hours /// @param users list of addresses /// @param maxEthDeposit max amount of ETH which users allowed to invest during this period function whitelistUsers(address[] calldata users, uint256 maxEthDeposit) external override onlyOwner { } // ------------------------ // GETTERS // ------------------------ /// @notice Returns how much provided user can invest during the first 2 hours (if whitelisted) /// @param user address function getWhitelistedAmount(address user) external override view returns (uint256) { } /// @notice Returns how much user invested during the whole public sale /// @param user address function getUserDeposits(address user) external override view returns (uint256) { } function getTotalDeposits() external view returns (uint256) { } }
_whitelistedAmount[msg.sender]>=msg.value,'PublicSale: Sent amount should not be bigger from allowed limit!'
317,147
_whitelistedAmount[msg.sender]>=msg.value
'addLiquidity: Pool already created!'
//SPDX-License-Identifier: Unlicensed pragma solidity 0.8.4; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import { InvestorsVesting, IVesting } from './InvestorsVesting.sol'; import { LiquidityProvider, ILiquidityProvider } from './LiquidityProvider.sol'; import './CliffVesting.sol'; import './interfaces/IPublicSale.sol'; import './interfaces/IOneUp.sol'; contract PublicSale is IPublicSale, Ownable { using SafeMath for uint256; bool public privateSaleFinished; bool public liquidityPoolCreated; IOneUp public oneUpToken; IVesting public immutable vesting; ILiquidityProvider public immutable lpProvider; address public reserveLockContract; address public marketingLockContract; address public developerLockContract; address payable public immutable publicSaleFund; uint256 public totalDeposits; uint256 public publicSaleStartTimestamp; uint256 public publicSaleFinishedAt; uint256 public constant PUBLIC_SALE_DELAY = 7 days; uint256 public constant LP_CREATION_DELAY = 30 minutes; uint256 public constant TRADING_BLOCK_DELAY = 15 minutes; uint256 public constant WHITELISTED_USERS_ACCESS = 2 hours; uint256 public constant PUBLIC_SALE_LOCK_PERCENT = 5000; // 50% of tokens uint256 public constant PRIVATE_SALE_LOCK_PERCENT = 1500; // 15% of tokens uint256 public constant PUBLIC_SALE_PRICE = 151000; // 1 ETH = 151,000 token uint256 public constant HARD_CAP_ETH_AMOUNT = 300 ether; uint256 public constant MIN_DEPOSIT_ETH_AMOUNT = 0.1 ether; uint256 public constant MAX_DEPOSIT_ETH_AMOUNT = 3 ether; mapping(address => uint256) internal _deposits; mapping(address => uint256) internal _whitelistedAmount; event Deposited(address indexed user, uint256 amount); event Recovered(address token, uint256 amount); event EmergencyWithdrawn(address user, uint256 amount); event UsersWhitelisted(address[] users, uint256 maxAmount); // ------------------------ // CONSTRUCTOR // ------------------------ constructor(address oneUpToken_, address payable publicSaleFund_, address uniswapRouter_) { } // ------------------------ // PAYABLE RECEIVE // ------------------------ /// @notice Public receive method which accepts ETH /// @dev It can be called ONLY when private sale finished, and public sale is active receive() external payable { } function deposit() public payable { } // ------------------------ // SETTERS (PUBLIC) // ------------------------ /// @notice Finish public sale /// @dev It can be called by anyone, if deadline or hard cap was reached function endPublicSale() external override { } /// @notice Distribute collected ETH between company/liquidity provider and create liquidity pool /// @dev It can be called by anyone, after LP_CREATION_DELAY from public sale finish function addLiquidity() external override { require(<FILL_ME>) require(publicSaleFinishedAt != 0, 'addLiquidity: Public sale not finished!'); require(block.timestamp > publicSaleFinishedAt.add(LP_CREATION_DELAY), 'addLiquidity: Time was not reached!'); liquidityPoolCreated = true; // Calculate distribution and liquidity amounts uint256 balance = address(this).balance; // Prepare 60% of all ETH for LP creation uint256 liquidityEth = balance.mul(6000).div(10000); // Transfer ETH to pre-sale address and liquidity provider publicSaleFund.transfer(balance.sub(liquidityEth)); payable(address(lpProvider)).transfer(liquidityEth); // Create liquidity pool lpProvider.addLiquidity(); // Start vesting for investors vesting.setStart(); // Tokens will be tradable in TRADING_BLOCK_DELAY oneUpToken.setTradingStart(block.timestamp.add(TRADING_BLOCK_DELAY)); } /// @notice Investor withdraw invested funds /// @dev Method will be available after 1 day if liquidity was not added function emergencyWithdrawFunds() external override { } // ------------------------ // SETTERS (OWNABLE) // ------------------------ /// @notice Admin can manually add private sale investors with this method /// @dev It can be called ONLY during private sale, also lengths of addresses and investments should be equal /// @param investors Array of investors addresses /// @param amounts Tokens Amount which investors needs to receive (INVESTED ETH * 200.000) function addPrivateAllocations(address[] memory investors, uint256[] memory amounts) external override onlyOwner { } /// @notice Finish private sale and start public sale /// @dev It can be called once and ONLY during private sale, by admin function endPrivateSale() external override onlyOwner { } /// @notice Recover contract based tokens /// @dev Should be called by admin only to recover lost tokens function recoverERC20(address tokenAddress) external override onlyOwner { } /// @notice Recover locked LP tokens when time reached /// @dev Should be called by admin only, and tokens will be transferred to the owner address function recoverLpToken(address lPTokenAddress) external override onlyOwner { } /// @notice Mint and lock tokens for team, marketing, reserve /// @dev Only admin can call it once, after liquidity pool creation function lockCompanyTokens(address developerReceiver, address marketingReceiver, address reserveReceiver) external override { } /// @notice Whitelist public sale privileged users /// @dev This users allowed to invest during the first 2 hours /// @param users list of addresses /// @param maxEthDeposit max amount of ETH which users allowed to invest during this period function whitelistUsers(address[] calldata users, uint256 maxEthDeposit) external override onlyOwner { } // ------------------------ // GETTERS // ------------------------ /// @notice Returns how much provided user can invest during the first 2 hours (if whitelisted) /// @param user address function getWhitelistedAmount(address user) external override view returns (uint256) { } /// @notice Returns how much user invested during the whole public sale /// @param user address function getUserDeposits(address user) external override view returns (uint256) { } function getTotalDeposits() external view returns (uint256) { } }
!liquidityPoolCreated,'addLiquidity: Pool already created!'
317,147
!liquidityPoolCreated
'addPrivateAllocations: Private sale is ended!'
//SPDX-License-Identifier: Unlicensed pragma solidity 0.8.4; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/utils/math/SafeMath.sol'; import { InvestorsVesting, IVesting } from './InvestorsVesting.sol'; import { LiquidityProvider, ILiquidityProvider } from './LiquidityProvider.sol'; import './CliffVesting.sol'; import './interfaces/IPublicSale.sol'; import './interfaces/IOneUp.sol'; contract PublicSale is IPublicSale, Ownable { using SafeMath for uint256; bool public privateSaleFinished; bool public liquidityPoolCreated; IOneUp public oneUpToken; IVesting public immutable vesting; ILiquidityProvider public immutable lpProvider; address public reserveLockContract; address public marketingLockContract; address public developerLockContract; address payable public immutable publicSaleFund; uint256 public totalDeposits; uint256 public publicSaleStartTimestamp; uint256 public publicSaleFinishedAt; uint256 public constant PUBLIC_SALE_DELAY = 7 days; uint256 public constant LP_CREATION_DELAY = 30 minutes; uint256 public constant TRADING_BLOCK_DELAY = 15 minutes; uint256 public constant WHITELISTED_USERS_ACCESS = 2 hours; uint256 public constant PUBLIC_SALE_LOCK_PERCENT = 5000; // 50% of tokens uint256 public constant PRIVATE_SALE_LOCK_PERCENT = 1500; // 15% of tokens uint256 public constant PUBLIC_SALE_PRICE = 151000; // 1 ETH = 151,000 token uint256 public constant HARD_CAP_ETH_AMOUNT = 300 ether; uint256 public constant MIN_DEPOSIT_ETH_AMOUNT = 0.1 ether; uint256 public constant MAX_DEPOSIT_ETH_AMOUNT = 3 ether; mapping(address => uint256) internal _deposits; mapping(address => uint256) internal _whitelistedAmount; event Deposited(address indexed user, uint256 amount); event Recovered(address token, uint256 amount); event EmergencyWithdrawn(address user, uint256 amount); event UsersWhitelisted(address[] users, uint256 maxAmount); // ------------------------ // CONSTRUCTOR // ------------------------ constructor(address oneUpToken_, address payable publicSaleFund_, address uniswapRouter_) { } // ------------------------ // PAYABLE RECEIVE // ------------------------ /// @notice Public receive method which accepts ETH /// @dev It can be called ONLY when private sale finished, and public sale is active receive() external payable { } function deposit() public payable { } // ------------------------ // SETTERS (PUBLIC) // ------------------------ /// @notice Finish public sale /// @dev It can be called by anyone, if deadline or hard cap was reached function endPublicSale() external override { } /// @notice Distribute collected ETH between company/liquidity provider and create liquidity pool /// @dev It can be called by anyone, after LP_CREATION_DELAY from public sale finish function addLiquidity() external override { } /// @notice Investor withdraw invested funds /// @dev Method will be available after 1 day if liquidity was not added function emergencyWithdrawFunds() external override { } // ------------------------ // SETTERS (OWNABLE) // ------------------------ /// @notice Admin can manually add private sale investors with this method /// @dev It can be called ONLY during private sale, also lengths of addresses and investments should be equal /// @param investors Array of investors addresses /// @param amounts Tokens Amount which investors needs to receive (INVESTED ETH * 200.000) function addPrivateAllocations(address[] memory investors, uint256[] memory amounts) external override onlyOwner { require(<FILL_ME>) require(investors.length > 0, 'addPrivateAllocations: Array can not be empty!'); require(investors.length == amounts.length, 'addPrivateAllocations: Arrays should have the same length!'); vesting.submitMulti(investors, amounts, PRIVATE_SALE_LOCK_PERCENT); } /// @notice Finish private sale and start public sale /// @dev It can be called once and ONLY during private sale, by admin function endPrivateSale() external override onlyOwner { } /// @notice Recover contract based tokens /// @dev Should be called by admin only to recover lost tokens function recoverERC20(address tokenAddress) external override onlyOwner { } /// @notice Recover locked LP tokens when time reached /// @dev Should be called by admin only, and tokens will be transferred to the owner address function recoverLpToken(address lPTokenAddress) external override onlyOwner { } /// @notice Mint and lock tokens for team, marketing, reserve /// @dev Only admin can call it once, after liquidity pool creation function lockCompanyTokens(address developerReceiver, address marketingReceiver, address reserveReceiver) external override { } /// @notice Whitelist public sale privileged users /// @dev This users allowed to invest during the first 2 hours /// @param users list of addresses /// @param maxEthDeposit max amount of ETH which users allowed to invest during this period function whitelistUsers(address[] calldata users, uint256 maxEthDeposit) external override onlyOwner { } // ------------------------ // GETTERS // ------------------------ /// @notice Returns how much provided user can invest during the first 2 hours (if whitelisted) /// @param user address function getWhitelistedAmount(address user) external override view returns (uint256) { } /// @notice Returns how much user invested during the whole public sale /// @param user address function getUserDeposits(address user) external override view returns (uint256) { } function getTotalDeposits() external view returns (uint256) { } }
!privateSaleFinished,'addPrivateAllocations: Private sale is ended!'
317,147
!privateSaleFinished
"You must own the vNFT or be a care taker to buy addons"
pragma solidity ^0.6.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155Holder.sol"; import "@openzeppelin/contracts/utils/EnumerableSet.sol"; import "./interfaces/IMuseToken.sol"; import "./interfaces/IVNFT.sol"; // import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; // SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "@openzeppelin/contracts/introspection/IERC165.sol"; // Extending IERC1155 with mint and burn interface IERC1155 is IERC165 { event TransferSingle( address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value ); event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); event ApprovalForAll( address indexed account, address indexed operator, bool approved ); event URI(string value, uint256 indexed id); function balanceOf(address account, uint256 id) external view returns (uint256); function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); function setApprovalForAll(address operator, bool approved) external; function isApprovedForAll(address account, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; function mint( address to, uint256 id, uint256 amount, bytes calldata data ) external; function mintBatch( address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; function burn( address account, uint256 id, uint256 value ) external; function burnBatch( address account, uint256[] calldata ids, uint256[] calldata values ) external; } // @TODO add "health" system basde on a level time progression algorithm. // @TODO continue developing V1.sol with multi feeding, multi mining and battlers, challenges, etc. contract VNFTx is Ownable, ERC1155Holder { using SafeMath for uint256; bool paused = false; //for upgradability address public delegateContract; address[] public previousDelegates; uint256 public total = 1; IVNFT public vnft; IMuseToken public muse; IERC1155 public addons; uint256 public artistPct = 5; struct Addon { string name; uint256 price; uint256 rarity; string artistName; address artist; uint256 quantity; uint256 used; } using EnumerableSet for EnumerableSet.UintSet; mapping(uint256 => Addon) public addon; mapping(uint256 => EnumerableSet.UintSet) private addonsConsumed; //nftid to rarity points mapping(uint256 => uint256) public rarity; using Counters for Counters.Counter; Counters.Counter private _addonId; event DelegateChanged(address oldAddress, address newAddress); event BuyAddon(uint256 nftId, uint256 addon, address player); event CreateAddon(uint256 addonId, string name, uint256 rarity); event EditAddon(uint256 addonId, string name, uint256 price); constructor( IVNFT _vnft, IMuseToken _muse, address _mainContract, IERC1155 _addons ) public { } modifier tokenOwner(uint256 _id) { require(<FILL_ME>) _; } modifier notPaused() { } // get how many addons a pet is using function addonsBalanceOf(uint256 _nftId) public view returns (uint256) { } // get a specific addon function addonsOfNftByIndex(uint256 _nftId, uint256 _index) public view returns (uint256) { } /*Addons */ // buys initial addon distribution for muse function buyAddon(uint256 _nftId, uint256 addonId) public tokenOwner(_nftId) notPaused { } // to use addon bought on opensea on your specific pet function useAddon(uint256 _nftId, uint256 _addonID) public tokenOwner(_nftId) notPaused { } // @TODO function for owner to transfer addon from owned pet to owned pet without unwrapping. function transferAddon( uint256 _nftId, uint256 _addonID, uint256 _toId ) external tokenOwner(_nftId) { } // unwrap addon from game to get erc1155 for trading. (losed rarity points) function removeAddon(uint256 _nftId, uint256 _addonID) public tokenOwner(_nftId) { } function removeMultiple( uint256[] calldata nftIds, uint256[] calldata addonIds ) external { } function useMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds) external { } function buyMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds) external { } /* end Addons */ // perform an action on delegated contract (battles, killing, etc) function action(string memory _signature, uint256 nftId) public notPaused { } /* ADMIN FUNCTIONS */ // withdraw dead pets accessories function withdraw(uint256 _id, address _to) external onlyOwner { } function changeDelegate(address _newDelegate) external onlyOwner { } function createAddon( string calldata name, uint256 price, uint256 _rarity, string calldata _artistName, address _artist, uint256 _quantity ) external onlyOwner { } function editAddon( uint256 _id, string calldata name, uint256 price, uint256 _rarity, string calldata _artistName, address _artist, uint256 _quantity, uint256 _used ) external onlyOwner { } function setArtistPct(uint256 _newPct) external onlyOwner { } function pause(bool _paused) public onlyOwner { } }
vnft.ownerOf(_id)==msg.sender||vnft.careTaker(_id,vnft.ownerOf(_id))==msg.sender,"You must own the vNFT or be a care taker to buy addons"
317,211
vnft.ownerOf(_id)==msg.sender||vnft.careTaker(_id,vnft.ownerOf(_id))==msg.sender
"!own the addon to use it"
pragma solidity ^0.6.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155Holder.sol"; import "@openzeppelin/contracts/utils/EnumerableSet.sol"; import "./interfaces/IMuseToken.sol"; import "./interfaces/IVNFT.sol"; // import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; // SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "@openzeppelin/contracts/introspection/IERC165.sol"; // Extending IERC1155 with mint and burn interface IERC1155 is IERC165 { event TransferSingle( address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value ); event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); event ApprovalForAll( address indexed account, address indexed operator, bool approved ); event URI(string value, uint256 indexed id); function balanceOf(address account, uint256 id) external view returns (uint256); function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); function setApprovalForAll(address operator, bool approved) external; function isApprovedForAll(address account, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; function mint( address to, uint256 id, uint256 amount, bytes calldata data ) external; function mintBatch( address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; function burn( address account, uint256 id, uint256 value ) external; function burnBatch( address account, uint256[] calldata ids, uint256[] calldata values ) external; } // @TODO add "health" system basde on a level time progression algorithm. // @TODO continue developing V1.sol with multi feeding, multi mining and battlers, challenges, etc. contract VNFTx is Ownable, ERC1155Holder { using SafeMath for uint256; bool paused = false; //for upgradability address public delegateContract; address[] public previousDelegates; uint256 public total = 1; IVNFT public vnft; IMuseToken public muse; IERC1155 public addons; uint256 public artistPct = 5; struct Addon { string name; uint256 price; uint256 rarity; string artistName; address artist; uint256 quantity; uint256 used; } using EnumerableSet for EnumerableSet.UintSet; mapping(uint256 => Addon) public addon; mapping(uint256 => EnumerableSet.UintSet) private addonsConsumed; //nftid to rarity points mapping(uint256 => uint256) public rarity; using Counters for Counters.Counter; Counters.Counter private _addonId; event DelegateChanged(address oldAddress, address newAddress); event BuyAddon(uint256 nftId, uint256 addon, address player); event CreateAddon(uint256 addonId, string name, uint256 rarity); event EditAddon(uint256 addonId, string name, uint256 price); constructor( IVNFT _vnft, IMuseToken _muse, address _mainContract, IERC1155 _addons ) public { } modifier tokenOwner(uint256 _id) { } modifier notPaused() { } // get how many addons a pet is using function addonsBalanceOf(uint256 _nftId) public view returns (uint256) { } // get a specific addon function addonsOfNftByIndex(uint256 _nftId, uint256 _index) public view returns (uint256) { } /*Addons */ // buys initial addon distribution for muse function buyAddon(uint256 _nftId, uint256 addonId) public tokenOwner(_nftId) notPaused { } // to use addon bought on opensea on your specific pet function useAddon(uint256 _nftId, uint256 _addonID) public tokenOwner(_nftId) notPaused { require(<FILL_ME>) Addon storage _addon = addon[_addonID]; _addon.used = _addon.used.add(1); addonsConsumed[_nftId].add(_addonID); rarity[_nftId] = rarity[_nftId].add(_addon.rarity); addons.safeTransferFrom( msg.sender, address(this), _addonID, 1, //the amount of tokens to transfer which always be 1 "0x0" ); } // @TODO function for owner to transfer addon from owned pet to owned pet without unwrapping. function transferAddon( uint256 _nftId, uint256 _addonID, uint256 _toId ) external tokenOwner(_nftId) { } // unwrap addon from game to get erc1155 for trading. (losed rarity points) function removeAddon(uint256 _nftId, uint256 _addonID) public tokenOwner(_nftId) { } function removeMultiple( uint256[] calldata nftIds, uint256[] calldata addonIds ) external { } function useMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds) external { } function buyMultiple(uint256[] calldata nftIds, uint256[] calldata addonIds) external { } /* end Addons */ // perform an action on delegated contract (battles, killing, etc) function action(string memory _signature, uint256 nftId) public notPaused { } /* ADMIN FUNCTIONS */ // withdraw dead pets accessories function withdraw(uint256 _id, address _to) external onlyOwner { } function changeDelegate(address _newDelegate) external onlyOwner { } function createAddon( string calldata name, uint256 price, uint256 _rarity, string calldata _artistName, address _artist, uint256 _quantity ) external onlyOwner { } function editAddon( uint256 _id, string calldata name, uint256 price, uint256 _rarity, string calldata _artistName, address _artist, uint256 _quantity, uint256 _used ) external onlyOwner { } function setArtistPct(uint256 _newPct) external onlyOwner { } function pause(bool _paused) public onlyOwner { } }
addons.balanceOf(msg.sender,_addonID)>=1,"!own the addon to use it"
317,211
addons.balanceOf(msg.sender,_addonID)>=1
"SuperDogeNFT: Cannot mint more than the max supply."
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.10; import "./common/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract SuperDogeNFT is ERC721Enumerable, Ownable, PaymentSplitter, ReentrancyGuard { using Strings for uint256; string public baseURI = "https://web3.superdoge.io/api/superdoge-nft/"; bool public saleIsActive; uint256 public price = 0.07 ether; uint256 public constant maximumSupply = 10000; address[] private treasuryWallets = [ 0x23BE0C03A61B6d3F70C714d85AE121D15FBbF79e, 0x4AB78e58f5BD1BF4EE2254628fd68d18438C675a ]; uint256[] private treasuryShares = [85, 15]; /** * @param startingId The first ID to be minted. * @param amt Number of tokens to be minted. * @dev Event to keep track of minted tokens. */ event SuperDogeNFTMint(uint256 startingId, uint256 amt); constructor( string memory name, string memory symbol ) ERC721(name, symbol) PaymentSplitter(treasuryWallets, treasuryShares) {} /** * @dev Returns the base URI. */ function _baseURI() internal view virtual returns (string memory) { } /** * @param amt Number of Super Doge NFTs to mint. * @dev Public minting function. */ function mint(uint256 amt) public payable nonReentrant { uint256 s = totalSupply(); require(saleIsActive, "SuperDogeNFT: Sale is not active."); require(amt > 0, "SuperDogeNFT: Must mint number greater than zero."); require(<FILL_ME>) require(msg.value >= price * amt, "SuperDogeNFT: Ether amount sent not correct."); for (uint256 i = 0; i < amt; ++i) { _safeMint(msg.sender, s + i, ""); } emit SuperDogeNFTMint(s, amt); delete s; } /** * @param amt Number of Super Doge NFTs to mint. * @param to Address to mint to. * @dev Admin minting function. * @dev Can only be called by owner. */ function reserve(uint256[] calldata amt, address[] calldata to) external onlyOwner { } /** * @param tokenId Token ID to retrieve URI for. * @dev Retrieves token URI for given ID. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** @param newPrice New price of one Super Doge NFT. @dev Sets the price for a single Super Doge NFT. @dev Can only be called by owner. */ function setPrice(uint256 newPrice) public onlyOwner { } /** @param newBaseURI New base URI. @dev Sets the base URI. @dev Can only be called by owner. */ function setBaseURI(string memory newBaseURI) public onlyOwner { } /** * @dev Paused (false) or active (true). * @dev Can only be called by contract owner. */ function flipSaleState() public onlyOwner { } /** * @param _data Array to sum over. * @dev Sums over array entries using only assembly. */ function arraySumAssembly(uint256[] memory _data) private pure returns (uint256 sum) { } }
s+amt<=maximumSupply,"SuperDogeNFT: Cannot mint more than the max supply."
317,380
s+amt<=maximumSupply
"SuperDogeNFT: Cannot mint more than max supply."
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.10; import "./common/ERC721Enumerable.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract SuperDogeNFT is ERC721Enumerable, Ownable, PaymentSplitter, ReentrancyGuard { using Strings for uint256; string public baseURI = "https://web3.superdoge.io/api/superdoge-nft/"; bool public saleIsActive; uint256 public price = 0.07 ether; uint256 public constant maximumSupply = 10000; address[] private treasuryWallets = [ 0x23BE0C03A61B6d3F70C714d85AE121D15FBbF79e, 0x4AB78e58f5BD1BF4EE2254628fd68d18438C675a ]; uint256[] private treasuryShares = [85, 15]; /** * @param startingId The first ID to be minted. * @param amt Number of tokens to be minted. * @dev Event to keep track of minted tokens. */ event SuperDogeNFTMint(uint256 startingId, uint256 amt); constructor( string memory name, string memory symbol ) ERC721(name, symbol) PaymentSplitter(treasuryWallets, treasuryShares) {} /** * @dev Returns the base URI. */ function _baseURI() internal view virtual returns (string memory) { } /** * @param amt Number of Super Doge NFTs to mint. * @dev Public minting function. */ function mint(uint256 amt) public payable nonReentrant { } /** * @param amt Number of Super Doge NFTs to mint. * @param to Address to mint to. * @dev Admin minting function. * @dev Can only be called by owner. */ function reserve(uint256[] calldata amt, address[] calldata to) external onlyOwner { require( amt.length == to.length, "SuperDogeNFT: Amount array length does not match recipient array length." ); uint256 s = totalSupply(); uint256 t = arraySumAssembly(amt); require(<FILL_ME>) for (uint256 i = 0; i < to.length; ++i) { for (uint256 j = 0; j < amt[i]; ++j) { _safeMint(to[i], s++, ""); } } emit SuperDogeNFTMint(s - t, t); delete t; delete s; } /** * @param tokenId Token ID to retrieve URI for. * @dev Retrieves token URI for given ID. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** @param newPrice New price of one Super Doge NFT. @dev Sets the price for a single Super Doge NFT. @dev Can only be called by owner. */ function setPrice(uint256 newPrice) public onlyOwner { } /** @param newBaseURI New base URI. @dev Sets the base URI. @dev Can only be called by owner. */ function setBaseURI(string memory newBaseURI) public onlyOwner { } /** * @dev Paused (false) or active (true). * @dev Can only be called by contract owner. */ function flipSaleState() public onlyOwner { } /** * @param _data Array to sum over. * @dev Sums over array entries using only assembly. */ function arraySumAssembly(uint256[] memory _data) private pure returns (uint256 sum) { } }
s+t<=maximumSupply,"SuperDogeNFT: Cannot mint more than max supply."
317,380
s+t<=maximumSupply
"Matic token address is not valid"
pragma solidity 0.5.2; /** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. Optionally revocable by the * owner. */ contract GhoulxVesting is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 private GhoulxToken; uint256 private tokensToVest = 0; uint256 private vestingId = 0; string private constant INSUFFICIENT_BALANCE = "Insufficient balance"; string private constant INVALID_VESTING_ID = "Invalid vesting id"; string private constant VESTING_ALREADY_RELEASED = "Vesting already released"; string private constant INVALID_BENEFICIARY = "Invalid beneficiary address"; string private constant NOT_VESTED = "Tokens have not vested yet"; struct Vesting { uint256 releaseTime; uint256 amount; address beneficiary; bool released; } mapping(uint256 => Vesting) public vestings; event TokenVestingReleased(uint256 indexed vestingId, address indexed beneficiary, uint256 amount); event TokenVestingAdded(uint256 indexed vestingId, address indexed beneficiary, uint256 amount); event TokenVestingRemoved(uint256 indexed vestingId, address indexed beneficiary, uint256 amount); constructor(IERC20 _token) public { require(<FILL_ME>) GhoulxToken = _token; // test data uint256 SCALING_FACTOR = 10 ** 18; uint256 day = 1 minutes; addVesting(0x5baF7e041bD22d24b054Cf3A1fdC3Da0dFC918AA, now + 0, 20000000 * SCALING_FACTOR); addVesting(0x5baF7e041bD22d24b054Cf3A1fdC3Da0dFC918AA, now + 365 * day, 20000000 * SCALING_FACTOR); addVesting(0x5baF7e041bD22d24b054Cf3A1fdC3Da0dFC918AA, now + 730 * day, 30000000 * SCALING_FACTOR); addVesting(0x5baF7e041bD22d24b054Cf3A1fdC3Da0dFC918AA, now + 1095 * day,30000000 * SCALING_FACTOR); } function token() public view returns (IERC20) { } function beneficiary(uint256 _vestingId) public view returns (address) { } function releaseTime(uint256 _vestingId) public view returns (uint256) { } function vestingAmount(uint256 _vestingId) public view returns (uint256) { } function removeVesting(uint256 _vestingId) public onlyOwner { } function addVesting(address _beneficiary, uint256 _releaseTime, uint256 _amount) public onlyOwner { } function release(uint256 _vestingId) public { } function retrieveExcessTokens(uint256 _amount) public onlyOwner { } }
address(_token)!=address(0x0),"Matic token address is not valid"
317,403
address(_token)!=address(0x0)
VESTING_ALREADY_RELEASED
pragma solidity 0.5.2; /** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. Optionally revocable by the * owner. */ contract GhoulxVesting is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 private GhoulxToken; uint256 private tokensToVest = 0; uint256 private vestingId = 0; string private constant INSUFFICIENT_BALANCE = "Insufficient balance"; string private constant INVALID_VESTING_ID = "Invalid vesting id"; string private constant VESTING_ALREADY_RELEASED = "Vesting already released"; string private constant INVALID_BENEFICIARY = "Invalid beneficiary address"; string private constant NOT_VESTED = "Tokens have not vested yet"; struct Vesting { uint256 releaseTime; uint256 amount; address beneficiary; bool released; } mapping(uint256 => Vesting) public vestings; event TokenVestingReleased(uint256 indexed vestingId, address indexed beneficiary, uint256 amount); event TokenVestingAdded(uint256 indexed vestingId, address indexed beneficiary, uint256 amount); event TokenVestingRemoved(uint256 indexed vestingId, address indexed beneficiary, uint256 amount); constructor(IERC20 _token) public { } function token() public view returns (IERC20) { } function beneficiary(uint256 _vestingId) public view returns (address) { } function releaseTime(uint256 _vestingId) public view returns (uint256) { } function vestingAmount(uint256 _vestingId) public view returns (uint256) { } function removeVesting(uint256 _vestingId) public onlyOwner { Vesting storage vesting = vestings[_vestingId]; require(vesting.beneficiary != address(0x0), INVALID_VESTING_ID); require(<FILL_ME>) vesting.released = true; tokensToVest = tokensToVest.sub(vesting.amount); emit TokenVestingRemoved(_vestingId, vesting.beneficiary, vesting.amount); } function addVesting(address _beneficiary, uint256 _releaseTime, uint256 _amount) public onlyOwner { } function release(uint256 _vestingId) public { } function retrieveExcessTokens(uint256 _amount) public onlyOwner { } }
!vesting.released,VESTING_ALREADY_RELEASED
317,403
!vesting.released
INSUFFICIENT_BALANCE
pragma solidity 0.5.2; /** * @title TokenVesting * @dev A token holder contract that can release its token balance gradually like a * typical vesting scheme, with a cliff and vesting period. Optionally revocable by the * owner. */ contract GhoulxVesting is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 private GhoulxToken; uint256 private tokensToVest = 0; uint256 private vestingId = 0; string private constant INSUFFICIENT_BALANCE = "Insufficient balance"; string private constant INVALID_VESTING_ID = "Invalid vesting id"; string private constant VESTING_ALREADY_RELEASED = "Vesting already released"; string private constant INVALID_BENEFICIARY = "Invalid beneficiary address"; string private constant NOT_VESTED = "Tokens have not vested yet"; struct Vesting { uint256 releaseTime; uint256 amount; address beneficiary; bool released; } mapping(uint256 => Vesting) public vestings; event TokenVestingReleased(uint256 indexed vestingId, address indexed beneficiary, uint256 amount); event TokenVestingAdded(uint256 indexed vestingId, address indexed beneficiary, uint256 amount); event TokenVestingRemoved(uint256 indexed vestingId, address indexed beneficiary, uint256 amount); constructor(IERC20 _token) public { } function token() public view returns (IERC20) { } function beneficiary(uint256 _vestingId) public view returns (address) { } function releaseTime(uint256 _vestingId) public view returns (uint256) { } function vestingAmount(uint256 _vestingId) public view returns (uint256) { } function removeVesting(uint256 _vestingId) public onlyOwner { } function addVesting(address _beneficiary, uint256 _releaseTime, uint256 _amount) public onlyOwner { } function release(uint256 _vestingId) public { Vesting storage vesting = vestings[_vestingId]; require(vesting.beneficiary != address(0x0), INVALID_VESTING_ID); require(!vesting.released , VESTING_ALREADY_RELEASED); // solhint-disable-next-line not-rely-on-time require(block.timestamp >= vesting.releaseTime, NOT_VESTED); require(<FILL_ME>) vesting.released = true; tokensToVest = tokensToVest.sub(vesting.amount); GhoulxToken.safeTransfer(vesting.beneficiary, vesting.amount); emit TokenVestingReleased(_vestingId, vesting.beneficiary, vesting.amount); } function retrieveExcessTokens(uint256 _amount) public onlyOwner { } }
GhoulxToken.balanceOf(address(this))>=vesting.amount,INSUFFICIENT_BALANCE
317,403
GhoulxToken.balanceOf(address(this))>=vesting.amount